diff --git a/.gitattributes b/.gitattributes index a6344aac8c09253b3b630fb776ae94478aa0275b..4757fc72cdd035b666e98c371a99a93801e2da93 100644 --- a/.gitattributes +++ b/.gitattributes @@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text +*.jsonl filter=lfs diff=lfs merge=lfs -text diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..63447fd8bbbf720abce8bb9794177779c8fb5bb1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..74db9e81080f8b61cafa74998c24b9e4c6b812e7 --- /dev/null +++ b/README.md @@ -0,0 +1,318 @@ +--- +pretty_name: "VEGA" +language: + - code +tags: + - C++/C Code + - Compiler Backend +license: "cc-by-4.0" +--- + +# VEGA: Automatically Generating Compiler Backends Using a Pre-Trained Transformer Model + +VEGA is an AI-driven system aimed at easing the development burden of compiler backends for new targets. + +This repository contains code and data for reproducing experimental results. + +For detailed description of each script, please refer to the Artifact Appendix of our paper. + + +## 1. Directory Structure +``` +VEGA_AE +|──dataset +|──saved_models +| |──Fine_Tuned_Model +| |──New_Fine_Tuned_Model +| └──UnixCoder +|——Scripts +| |──Exp +| | |──Accuracy +| | |──Correction +| | |──ForkFlow +| | |──Performance +| | └──Time +| └──UnixCoder +└──Fixed_VEGA_LLVM + |──llvm-riscv + |──llvm-ri5cy + └──llvm-xcore +``` +## 2. Hardware Dependency + +- Intel(R)Xeon(R)Gold 6132 CPU @ 2.60GHz +- 8 Nvidia Tesla V100 GPU, each with 16 GB Memory + +## 3. Software Dependency +- CUDA == 11.4 +- python version == 3.8.1 +- pip install -r requirements.txt + + +## 4. Fine-Tuning + +Run fine-tuning with: +``` +$ bash run_fine_tuning.sh +``` +Customize parameters for fine-tuning by modifying following options in the ```run_fine_tuning.sh```. +``` + --model_name_or_path ../../saved_models/UnixCoder \ + --train_filename ../../dataset/train.jsonl \ + --dev_filename ../../dataset/valid.jsonl \ + --output_dir ../../saved_models/New_Fine_Tuned_Model \ + --beam_size 4 \ + --train_batch_size 96 \ + --eval_batch_size 80 \ + --learning_rate 6e-5 \ + --num_train_epochs 50 \ + --mse_loss_weight 0.9 \ + --ce_loss_weight 0.1 +``` +The fine-tuned model will be saved in ```--output_dir```. + +## 5. Code Generation + +We have provided a fine-tuned model in ```./saved_models/Fine_Tuned_Model```. + +We have also provided a script fot function test, which only generates a single function for RI5CY, taking less than 3 minutes with 8 V100 GPU. + + + +Run function test with: + +``` +$ bash run_function_test.sh +``` + +When the ```run_function_test.sh``` script begins execution, the command line displays +``` +$ " Start Function Inferencing !" +``` +Upon completion of the code generation, the script outputs +``` +$ " Finished Function Inferencing : xxx secs" +``` + +The inference result will be saved in ```--output_dir/result.jsonl```. + +Run code generation with: + +``` +$ bash run_test.sh +``` + +Customize parameters for inferencing by modifying following options in the ```run_test.sh```. +``` + --model_name_or_path ../../saved_models/UnixCoder \ + --test_filename ../../dataset/test.jsonl \ + --output_dir ../../saved_models/Fine_Tuned_Model \ + --beam_size 4 \ + --train_batch_size 256 \ + --eval_batch_size 256 \ + --learning_rate 6e-5 \ + --gradient_accumulation_steps 2 \ + --num_train_epochs 10 \ + --mse_loss_weight 0.9 \ + --ce_loss_weight 0.1 +``` +Users can inference with their own fine-tuned model by changing the ```--output_dir``` option. + + + +When the ```run_test.sh``` script begins execution, the command line displays +``` +$ " Start Inferencing !" +``` +Upon completion of the code generation, the script outputs +``` +$ " Finished Inferencing : xxx secs" +``` + +The inference result will be saved in ```--output_dir/result.jsonl```. + +The ```--output_dir``` parameter specifies the directory where the fine-tuned model is saved, such as ```./saved_models/Fine_Tuned_Model```. + +## 6. Reproducing Results in the Experiment + +We provide the scripts to reproduce each Figure/Table from the paper, along with the corresponding output result files, in the following table: + + +| Script | Description | Output | Figure/Table | +| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -------------- | +| ./Scripts/Exp/Time/calculate_time.py | Calculate the time overhead. | ./Scripts/Exp/Time/time_overhead.csv | Fig.7 | +| ./Scripts/Exp/Accuracy/calculate_accuracy.py | Calculate the function-level accuracy. | ./Scripts/Exp/Accuracy/vega_result.csv | Fig.8 | +| ./Scripts/Exp/Accuracy/calculate_purple.py | Calculate the the percentage of functions accurately synthesized from the statements of various existing targets (Purple Bar in Fig.8). | ./Scripts/Exp/Accuracy/fig8_purple.csv | Fig.8 | +| ./Scripts/Exp/Accuracy/calculate_accuracy.py | Calculate the percentage of three types of error. | ./Scripts/Exp/Accuracy/err_percentage.csv | Table.2 | +| ./Scripts/Exp/ForkFlow/calculate_forkflow.py | Calculate the statement-level accracy of VEGA and ForkFlow. | ./Scripts/Exp/ForkFlow/forkflow_result.csv | Fig.9 | +| ./Scripts/Exp/ForkFlow/calculate_forkflow.py | Calculate the number of accurate statements of VEGA and ForkFlow. | ./Scripts/Exp/ForkFlow/mod_lines.csv | Table.3 | +| - | Recorded time required by Developer A and B to modify the VEGA-generated RISC-V backend. | ./Scripts/Exp/Correction/Correction_Time.xlsx | Table. 4 | +| - | Recorded time required for LLVM-Base (-O0), LLVM-Base (-O3), and LLVM-VEGA (-O3) to pass benchmarks. | ./Scripts/Exp/Performance/BenchMark.xlsx | Fig. 10 | +### 6.1 Results for Fig. 7 in Sec. 4.2 + +In the code generation process, we set a batch size of 256 on 8 Nvidia Tesla V100 GPU (each with 16GB memory), meaning each batch contains 256 statements. Since each batch may include statements from different function modules, we did not directly measure the generation time for each function modules of three targets (RISC-V, RI5CY, xCORE) during execution. Instead, we calculated the average inference time of each batch (25 seconds) and then derived the inference time of each statement (25/256 seconds). With the total number of statements within each function module of each target, we subsequently calculated the total inference time required for each function module of each target. + + +- Command: +``` +$ python ./Scripts/Exp/Time/calculate_time.py +``` + + +- Results: +``` +./Scripts/Exp/Time/time_overhead.csv +``` + +### 6.2 Results for Fig. 8 in Sec. 4.2 + + +In our experiment, we employed the Pass@1 evaluation metric, which involves replacing each VEGA-generated function individually within the official LLVM (LLVM-Base), then running regression tests to verify the correctness of the replaced function. This process is highly time-intensive, as a single regression test run generally takes about half an hour. Thus, sequentially testing all 1,454 VEGA-generated functions across three targets would require approximately 727 hours. + +To simplify this process, we recorded the ground truth for each statement based on the Pass@1 experiment results. Additionally, we documented a list of functions containing Err-Def errors (i.e., errors due to missing necessary statements in the function template; functions with Err-Def can not pass all regression tests). This allowed us to transform the Pass@1 testing process into an Exact Match evaluation. + +In this Exact Match evaluation, each statement is deemed correct if the VEGA-generated code matches the ground truth and the confidence score aligns. A function is considered correct if all statements within it are accurate and it is free from Err-Def errors. + +- Command: +``` +$ cp --output_dir/result.jsonl ./Scripts/Exp/Accuracy +$ python ./Scripts/Exp/Accuracy/calculate_accuracy.py +``` + +This script will automatically analyze the VEGA's output from "result.jsonl" and compare the generated code and confidence scores with the ground truth. Based on this comparison, it will determine whether each function is correct. + +- Accuracy Results: +``` +./Scripts/Exp/Accuracy/vega_result.csv +``` + + +We also provide a script for calculating the proportion of "Accurate Functions with Integrated Statements Across Multiple Targets". The value corresponding to the purple bar in Fig. 8. + + +- Command: +``` +$ python ./Scripts/Exp/Accuracy/calculate_purple.py +``` + + +- Results: +``` +./Scripts/Exp/Accuracy/fig8_purple.csv +``` + + +We also provided manually fixed VEGA-generated RISC-V, RI5CY and xCORE backend, which can be used to run regression tests and pass@1 experiments. **Note that the compilation of llvm-riscv and llvm-ri5cy requires gcc-9.5.0 version, and the compilation of llvm-xcore requires gcc-4.0.0 version.** + +``` +Download from Google Drive: https://drive.google.com/file/d/1VD3H60vMvtnRtMkS6h0qZWTKkjcUzLsw/view?usp=drive_link +$ unzip Fixed_VEGA_LLVM.zip +``` + +- Command for Running RISC-V Backend: +``` +$ cd ./Fixed_VEGA_LLVM +$ bash run_llvm_riscv.sh +``` +- Results for Regression Tests of the RISC-V Backend: +``` +$ Testing Time: xxx s +$ Passed : 16005 +``` + +- Command for Running RI5CY Backend: +``` +$ cd ./Fixed_VEGA_LLVM +$ bash run_llvm_ri5cy.sh +``` +- Results for Regression Tests of the RI5CY Backend: +``` +$ Testing Time: xxx s +$ Passed : 16040 +``` + +- Command for Running xCORE Backend: +``` +$ cd ./Fixed_VEGA_LLVM +$ vim run_llvm_xcore.sh +$ Set the prefix option to the path where you want to install LLVM. +$ Set the CC and llvmgccdir option to the path of gcc-4.0.0 version, change the CXX option to the path of g++-4.0.0 version. +$ bash run_llvm_xcore.sh +``` +- Results for Regression Tests of the xCORE Backend: +``` +$ Testing Time: xxx s +$ Passed : 5466 +``` + +### 6.3 Results for Table. 2 in Sec. 4.2 + +Executing the script in (2) will also yield the proportion of the three types of errors for each target. + + +- Command: +``` +$ python ./Scripts/Exp/Accuracy/calculate_accuracy.py +``` + + +- Results: +``` +./Scripts/Exp/Accuracy/err_percentage.csv +``` + + +### 6.4 Results for Fig. 9 in Sec. 4.2 + +We modified the functions generated by VEGA and functions in the MIPS backend (ForkFlow) to ensure they can correctly run on the RISC-V, RI5CY, and xCORE backends respectively. By executing the following script, the proportion of accurate and modified statements of the VEGA-generated functions and ForkFlow processes will be automatically calculated. + +- Command: +``` +$ python ./Scripts/Exp/ForkFlow/calculate_forkflow.py +``` + + +- Results: +``` +./Scripts/Exp/ForkFlow/forkflow_result.csv +``` + +### 6.5 Results for Table. 3 in Sec. 4.2 + +Executing the script in 6.4 will also output the number of statements accurately generated and requiring manual correction by VEGA across seven function modules for RISC-V, RI5CY, and xCORE. + + +- Command: +``` +$ python ./Scripts/Exp/ForkFlow/calculate_forkflow.py +``` + + +- Results: +``` +./Scripts/Exp/ForkFlow/mod_lines.csv +``` + + +### 6.6 Results for Table. 4 in Sec. 4.2 + +The data in Table. 4 record the time required by two developers to modify the VEGA-generated RISC-V backend. As this is a human-based experiment, we can only provide the recorded time for modifying each function within the VEGA-generated RISC-V backend. + +- Results: +``` +./Scripts/Exp/Correction/Correction_Time.xlsx +``` + +This file contains two sheets, each corresponding to the time required by Developer A and Developer B to modify the VEGA-generated RISC-V backend. Each sheet includes four columns: the first three indicate the function module, file, and function name of each function in the VEGA-generated RISC-V backend, while the final column specifies the time spent modifying each function, measured in seconds. By summing the data in each sheet according to function modules, we calculated the total time (in hours) that Developer A and Developer B spent on each module. + +### 6.7 Results for Fig. 10 in Sec. 4.3 + +Due to restrictions associated with the commercial license, we are unable to provide the source code of the SPEC 2017 CPU benchmark directly used in this experiment. Furthermore, the testing duration for SPEC 2017 CPU is highly time-consuming, requiring approximately 565 hours. To address these constraints, we provide our recorded experimental data, which can be accessed at: + + +- Results: +``` +./Scripts/Exp/Performance/BenchMark.xlsx +``` + +Each sheet in this recorded data is named with the experimental target and benchmark tested, e.g., "RISCV (SPEC 2017CPU)". We recorded the time required for LLVM-Base (-O0), LLVM-Base (-O3), and LLVM-VEGA (-O3) to successfully pass each test case, and calculated the corresponding speedup ratios respectively. diff --git a/Scripts/Exp/Accuracy/Accurate_Func_Merged.csv b/Scripts/Exp/Accuracy/Accurate_Func_Merged.csv new file mode 100644 index 0000000000000000000000000000000000000000..3486f4b48baf1d28ea789af82a6147b31fcc6c2d --- /dev/null +++ b/Scripts/Exp/Accuracy/Accurate_Func_Merged.csv @@ -0,0 +1,171 @@ +Allocation,RegisterInfo,getCalleeSavedRegs,PULP +Allocation,RegisterInfo,getFrameRegister,PULP +Assembler,AsmParser,isRV64,PULP +Assembler,AsmParser,isRV64-2,PULP +Assembler,AsmParser,isSImm6NonZero,PULP +Assembler,AsmParser,isSImm9Lsb0,PULP +Assembler,AsmParser,parseImmediate,PULP +Assembler,AsmParser,validateTargetOperandClass,PULP +Assembler,AsmPrinter,isSImm12Lsb0,PULP +Disassembler,Disassembler,addImplySP,PULP +Disassembler,Disassembler,DecodePulpV2RegisterClass,PULP +Disassembler,Disassembler,DecodePulpV4RegisterClass,PULP +Disassembler,Disassembler,decodeSImmNonZeroOperand,PULP +Disassembler,Disassembler,decodeUImmNonZeroOperand,PULP +Disassembler,Disassembler,DecodeVRRegisterClass,PULP +Disassembler,Disassembler,LLVMInitializeDisassembler,PULP +Emission,AsmBackend,applyFixup,PULP +Emission,AsmBackend,fixupNeedsRelaxationAdvanced,PULP +Emission,AsmBackend,getFixupKind,PULP +Emission,AsmBackend,getRelaxedOpcode,PULP +Emission,AsmBackend,mayNeedRelaxation,PULP +Emission,AsmInfo,MCAsmInfo,PULP +Emission,BaseInfo,ABI,PULP +Emission,BaseInfo,getTargetABI,PULP +Emission,BaseInfo,stringToRoundingMode,PULP +Emission,BaseInfo,VLMUL,PULP +Emission,ELFObjectWriter,getRelocType,PULP +Emission,ELFStreamer,calculateContentSize,PULP +Emission,ELFStreamer,setAttributeItem1,PULP +Emission,ELFStreamer,setAttributeItem2,PULP +Emission,ELFStreamer,setAttributeItems,PULP +Emission,FixupKind,enumFixups,PULP +Emission,InstPrinter,printBranchOperand,PULP +Emission,MCCodeEmitter,getVMaskReg,PULP +Emission,MCExpr,enumVariantKind,PULP +Emission,MCExpr,printImpl,PULP +Emission,MCTargetDesc,evaluateBranch,PULP +Emission,MCTargetDesc,LLVMInitializeTargetMC,PULP +Optimization,CleanupVSETVLI,getRequiredProperties,PULP +Optimization,MergeBaseOffset,getRequiredProperties,PULP +Optimization,PULPHardWareLoops,containsInvalidInstruction,PULP +Optimization,PULPHardWareLoops,getComparisonKind,PULP +Optimization,PULPHardWareLoops,getNegatedComparison,PULP +Optimization,PULPHardWareLoops,getSwappedComparison,PULP +Optimization,SNITCHFrepLoops,getComparisonKind,PULP +Scheduling,InstrInfo,isFunctionSafeToOutlineFrom,PULP +Scheduling,InstrInfo,isLoadFromStackSlot,PULP +Scheduling,InstrInfo,isMBBSafeToOutlineFrom,PULP +Scheduling,InstrInfo,isStoreToStackSlot,PULP +Scheduling,InstrInfo,loadRegFromStackSlot,PULP +Scheduling,InstrInfo,storeRegToStackSlot,PULP +Scheduling,MachineFunctionInfo,getUsedSSR,PULP +Scheduling,Subtarget,enableLinkerRelax,PULP +Scheduling,Subtarget,enableRVCHintInstrs,PULP +Scheduling,Subtarget,enableSaveRestore,PULP +Scheduling,Subtarget,getXLen,PULP +Scheduling,Subtarget,getXLenVT,PULP +Scheduling,Subtarget,is64Bit,PULP +Scheduling,TargetInfo,LLVMInitializeTargetInfo,PULP +Scheduling,TargetMachine,addPreEmitPass2,PULP +Scheduling,TargetMachine,LLVMInitializeTarget,PULP +Scheduling,TargetObjectFile,getSectionForConstant,PULP +Scheduling,TargetTransformInfo,getIntImmCostIntrin,PULP +Selection,FrameLowering,hasBP,PULP +Selection,FrameLowering,hasFP,PULP +Selection,FrameLowering,hasReservedCallFrame,PULP +Selection,InstructionSelector,InstructionSelector,PULP +Selection,ISelDAGToDAG,SelectAddrFI,PULP +Selection,ISelLowering,getConstraintType,PULP +Selection,ISelLowering,getInlineAsmMemConstraint,PULP +Selection,ISelLowering,getPointerMemTy,PULP +Selection,ISelLowering,getPointerTy,PULP +Selection,ISelLowering,getScalarShiftAmountTy,PULP +Selection,ISelLowering,getTargetNodeName,PULP +Selection,ISelLowering,isLegalAddressingMode,PULP +Selection,ISelLowering,LowerAsmOperandForConstraint,PULP +Selection,ISelLowering,LowerGlobalAddress,PULP +Selection,ISelLowering,LowerGlobalTLSAddress,PULP +Selection,ISelLowering,lowerJumpTable,PULP +Selection,ISelLowering,lowerSELECT,PULP +Selection,ISelLowering,mayBeEmittedAsTailCall,PULP +Selection,ISelLowering,NodeType,PULP +Selection,ISelLowering,shouldExpandAtomicCmpXchgInIR,PULP +Selection,ISelLowering,shouldExpandAtomicRMWInIR,PULP +Selection,ISelLowering,shouldSignExtendTypeInLibCall,PULP +Selection,MCInstLower,lowerMachineOperandToMCOperand,PULP +Selection,MCInstLower,lowerSymbolOperand,PULP +Allocation,RegisterInfo,getCalleeSavedRegs,RISCV +Allocation,RegisterInfo,getFrameRegister,RISCV +Allocation,RegisterInfo,getReservedRegs,RISCV +Assembler,AsmParser,isRV64,RISCV +Assembler,AsmParser,isRV64-2,RISCV +Assembler,AsmParser,isSImm6NonZero,RISCV +Assembler,AsmParser,isSImm9Lsb0,RISCV +Assembler,AsmParser,parseImmediate,RISCV +Assembler,AsmParser,parseOperand,RISCV +Assembler,AsmParser,validateTargetOperandClass,RISCV +Assembler,AsmPrinter,isSImm12Lsb0,RISCV +Disassembler,Disassembler,addImplySP,RISCV +Disassembler,Disassembler,decodeSImmNonZeroOperand,RISCV +Disassembler,Disassembler,decodeUImmNonZeroOperand,RISCV +Disassembler,Disassembler,DecodeVRRegisterClass,RISCV +Disassembler,Disassembler,LLVMInitializeDisassembler,RISCV +Emission,AsmBackend,applyFixup,RISCV +Emission,AsmBackend,fixupNeedsRelaxationAdvanced,RISCV +Emission,AsmBackend,getFixupKind,RISCV +Emission,AsmBackend,getRelaxedOpcode,RISCV +Emission,AsmBackend,mayNeedRelaxation,RISCV +Emission,AsmInfo,MCAsmInfo,RISCV +Emission,BaseInfo,ABI,RISCV +Emission,BaseInfo,getTargetABI,RISCV +Emission,BaseInfo,stringToRoundingMode,RISCV +Emission,BaseInfo,VLMUL,RISCV +Emission,ELFObjectWriter,getRelocType,RISCV +Emission,ELFStreamer,calculateContentSize,RISCV +Emission,ELFStreamer,setAttributeItem1,RISCV +Emission,ELFStreamer,setAttributeItem2,RISCV +Emission,ELFStreamer,setAttributeItems,RISCV +Emission,InstPrinter,printBranchOperand,RISCV +Emission,MCCodeEmitter,getVMaskReg,RISCV +Emission,MCExpr,enumVariantKind,RISCV +Emission,MCExpr,printImpl,RISCV +Emission,MCTargetDesc,LLVMInitializeTargetMC,RISCV +Optimization,CleanupVSETVLI,getRequiredProperties,RISCV +Optimization,CleanupVSETVLI,runOnMachineFunction,RISCV +Optimization,MergeBaseOffset,getRequiredProperties,RISCV +Scheduling,InstrInfo,isFunctionSafeToOutlineFrom,RISCV +Scheduling,InstrInfo,isLoadFromStackSlot,RISCV +Scheduling,InstrInfo,isMBBSafeToOutlineFrom,RISCV +Scheduling,InstrInfo,isStoreToStackSlot,RISCV +Scheduling,InstrInfo,loadRegFromStackSlot,RISCV +Scheduling,InstrInfo,storeRegToStackSlot,RISCV +Scheduling,Subtarget,enableLinkerRelax,RISCV +Scheduling,Subtarget,enableRVCHintInstrs,RISCV +Scheduling,Subtarget,enableSaveRestore,RISCV +Scheduling,Subtarget,getXLen,RISCV +Scheduling,Subtarget,getXLenVT,RISCV +Scheduling,Subtarget,is64Bit,RISCV +Scheduling,TargetInfo,LLVMInitializeTargetInfo,RISCV +Scheduling,TargetMachine,addPreEmitPass2,RISCV +Scheduling,TargetMachine,LLVMInitializeTarget,RISCV +Scheduling,TargetObjectFile,getSectionForConstant,RISCV +Scheduling,TargetTransformInfo,getIntImmCostIntrin,RISCV +Selection,FrameLowering,hasBP,RISCV +Selection,FrameLowering,hasFP,RISCV +Selection,FrameLowering,hasReservedCallFrame,RISCV +Selection,InstructionSelector,InstructionSelector,RISCV +Selection,ISelDAGToDAG,SelectAddrFI,RISCV +Selection,ISelLowering,getConstraintType,RISCV +Selection,ISelLowering,getInlineAsmMemConstraint,RISCV +Selection,ISelLowering,getTargetNodeName,RISCV +Selection,ISelLowering,isLegalAddressingMode,RISCV +Selection,ISelLowering,LowerAsmOperandForConstraint,RISCV +Selection,ISelLowering,LowerGlobalAddress,RISCV +Selection,ISelLowering,LowerGlobalTLSAddress,RISCV +Selection,ISelLowering,lowerJumpTable,RISCV +Selection,ISelLowering,lowerSELECT,RISCV +Selection,ISelLowering,mayBeEmittedAsTailCall,RISCV +Selection,ISelLowering,NodeType,RISCV +Selection,ISelLowering,shouldExpandAtomicCmpXchgInIR,RISCV +Selection,ISelLowering,shouldExpandAtomicRMWInIR,RISCV +Selection,ISelLowering,shouldSignExtendTypeInLibCall,RISCV +Selection,MCInstLower,lowerMachineOperandToMCOperand,RISCV +Selection,MCInstLower,lowerSymbolOperand,RISCV +Emission,MCTargetDesc,LLVMInitializeTargetMC,XCore +Scheduling,InstrInfo,GetCondBranchFromCond,XCore +Scheduling,InstrInfo,GetOppositeBranchCondition,XCore +Scheduling,InstrInfo,IsCondBranch,XCore +Scheduling,TargetMachine,addPreEmitPass,XCore +Selection,ISelLowering,enumNodeType,XCore +Selection,ISelLowering,getTargetNodeName,XCore diff --git a/Scripts/Exp/Accuracy/calculate_accuracy.py b/Scripts/Exp/Accuracy/calculate_accuracy.py new file mode 100644 index 0000000000000000000000000000000000000000..5a3678a67ba832d55c1cb3a8ec44c8b03d58ced9 --- /dev/null +++ b/Scripts/Exp/Accuracy/calculate_accuracy.py @@ -0,0 +1,178 @@ +import os, sys,string,re,glob + +import json +import csv +import copy + + +import pathlib +import time + +folder = str(pathlib.Path(__file__).parent.resolve()) +#Total_encas + +func_num_dic = { + "riscv" : 568, + "pulp" : 698, + "xcore" : 188 +} + + + +wrong_lis_all = [] +wrong_stmt = [] +err_def_dic = {} +def get_wrong_list(): + global wrong_stmt + global wrong_lis_all + global err_def_dic + with open(folder+"/wrong_func_list_def.csv", 'r', encoding='utf-8') as fcsv: + reader = csv.reader(fcsv) + for row in reader: + if row[0] == "idx": + continue + wrong_stmt.append(row[0].strip().lower() + " " + row[1].strip().lower() + " " + row[2].strip().lower()) + wrong_lis_all.append(" ".join(row)) + if " ".join([row[2], row[3]]) not in err_def_dic.keys(): + err_def_dic[" ".join([row[2], row[3]])]= 1 + else: + err_def_dic[" ".join([row[2], row[3]])] += 1 + +def calculate_accuracy(): + func_res = {} + stable_stmt_dic = {} + all_func_lis = [] + global wrong_stmt + global wrong_lis_all + global err_def_dic + total_dic = {} + wrong_dic = {} + asm_file = [] + for line in open(folder+"/result.jsonl", 'r', encoding="utf-8"): + dic = json.loads(line) + all_func_lis.append(dic["File"].strip().lower() + " " + dic["Func"].strip().lower() + " " + dic["Target"].strip().lower()) + + if int(dic["vega_pre"]) == 1: + if " ".join([dic["Target"], dic["Module"], dic["File"], dic["Func"]]) not in func_res.keys(): + func_res[" ".join([dic["Target"], dic["Module"], dic["File"], dic["Func"]])] = [dic["vega_code"].replace("zmtarzm", dic["Target"])] + else: + func_res[" ".join([dic["Target"], dic["Module"], dic["File"], dic["Func"]])].append(dic["vega_code"].replace("zmtarzm", dic["Target"])) + if " ".join([dic["Target"], dic["Module"]]) not in stable_stmt_dic.keys(): + stable_stmt_dic[" ".join([dic["Target"], dic["Module"]])] = [0, 0] + if dic["Stable"].lower() == "true": + stable_stmt_dic[" ".join([dic["Target"], dic["Module"]])][0] += 1 + stable_stmt_dic[" ".join([dic["Target"], dic["Module"]])][1] += 1 + else: + stable_stmt_dic[" ".join([dic["Target"], dic["Module"]])][1] += 1 + + if dic["Target"] + " " + dic["Module"] not in total_dic.keys(): + total_dic[dic["Target"] + " " + dic["Module"]] = [dic["File"].strip() + " " + dic["Func"].strip() + " " + dic["Target"].strip()] + wrong_dic[dic["Target"] + " " + dic["Module"]] = [] + else: + total_dic[dic["Target"] + " " + dic["Module"]].append(dic["File"].strip() + " " + dic["Func"].strip() + " " + dic["Target"].strip()) + if dic["File"].strip().lower() + " " + dic["Func"].strip().lower() + " " + dic["Target"].strip().lower() in wrong_stmt: + #print(dic["File"].strip() + " " + dic["Func"].strip() + " " + dic["Target"].strip()) + wrong_dic[dic["Target"] + " " + dic["Module"]].append(dic["File"].strip() + " " + dic["Func"].strip() + " " + dic["Target"].strip()) + if dic["ans_code"].replace(" ", "") != dic["vega_code"].replace(" ", "") or dic["ans_pre"] != dic["vega_pre"]: + wrong_dic[dic["Target"] + " " + dic["Module"]].append(dic["File"].strip() + " " + dic["Func"].strip() + " " + dic["Target"].strip()) + if dic["ans_code"] != dic["vega_code"]: + wrong_lis_all.append(" ".join([dic["File"], dic["Func"], dic["Target"], dic["Module"], "Err_V"])) + if dic["ans_pre"] != dic["vega_pre"]: + wrong_lis_all.append(" ".join([dic["File"], dic["Func"], dic["Target"], dic["Module"], "Err_CS"])) + + all_func_lis = list(set(all_func_lis)) + + with open(folder+"/vega_result.csv", 'a', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + avg_dic = {} + all_dic = {} + for k in total_dic.keys(): + Correct_Func_Num = len(list(set(total_dic[k])))-len(list(set(wrong_dic[k]))) + Total_Func_Num = len(list(set(total_dic[k]))) + Accuracy_Func = 1-round(len(list(set(wrong_dic[k]))) * 1.0 / len(list(set(total_dic[k]))), 3) + Wrong_Func_Percentage = round(len(list(set(wrong_dic[k]))) * 1.0 / len(list(set(total_dic[k]))), 3) + Pre_Equal_1_Stmt_Percentage = round(stable_stmt_dic[k][0]/stable_stmt_dic[k][1], 3) + Pre_Less_1_Stmt_Percentage = 1 - round(stable_stmt_dic[k][0]/stable_stmt_dic[k][1], 3) + if k.split(" ")[0] not in avg_dic.keys(): + avg_dic[k.split(" ")[0]] = Accuracy_Func + all_dic[k.split(" ")[0]] = Correct_Func_Num + else: + avg_dic[k.split(" ")[0]] += Accuracy_Func + all_dic[k.split(" ")[0]] += Correct_Func_Num + tem_k = k.replace("PULP", "RI5CY") + f_csv.writerow(tem_k.split(" ") + [Correct_Func_Num, Total_Func_Num, Accuracy_Func, Wrong_Func_Percentage, Pre_Equal_1_Stmt_Percentage, Pre_Less_1_Stmt_Percentage]) + + for k in avg_dic: + if k.lower() == "riscv": + f_csv.writerow([k, "AVG", round(avg_dic[k] / 7.0, 3)]) + f_csv.writerow([k, "ALL", round(all_dic[k] / func_num_dic[k.lower()], 3)]) + elif k.lower() == "pulp": + f_csv.writerow(["RI5CY", "AVG", round(avg_dic[k] / 7.0, 3)]) + f_csv.writerow(["RI5CY", "ALL", round(all_dic[k] / func_num_dic[k.lower()], 3)]) + else: + f_csv.writerow([k, "AVG", round(avg_dic[k] / 6.0, 3)]) + f_csv.writerow([k, "ALL", round(all_dic[k] / func_num_dic[k.lower()], 3)]) + + + + for k in func_res.keys(): + Tar_Path = folder + "/../ForkFlow/VEGA_Code/" + "/".join(k.split(" ")) + ".cpp" + Tar_Path = Tar_Path.replace("enum/NodeType", "enum NodeType") + Tar_Path = Tar_Path.replace("enum/CondCode", "enum CondCode") + Tar_Path = Tar_Path.replace("ExpandSSRInsts/ExpandPseudo", "ExpandSSRInsts/ExpandSSRInsts") + if os.path.exists(Tar_Path): + with open(Tar_Path, 'w') as file: + for idx, l in enumerate(func_res[k]): + if idx < len(func_res[k])-1: + file.write(l) + file.write("\n") + else: + file.write(l) + else: + print(Tar_Path) + + return total_dic + + +if __name__ == '__main__': + get_wrong_list() + with open(folder+"/vega_result.csv", 'w', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + f_csv.writerow(["Target", "Module", "Correct", "Total", "Accurate", "Inaccurate", "Confidence Score≈1.00", "Confidence Score in [0.50, 1.00)"]) + total_dic = calculate_accuracy() + wrong_lis_all = list(set(wrong_lis_all)) + with open(folder+"/wrong_list_all.csv", 'w', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + for err in wrong_lis_all: + f_csv.writerow(err.split(" ")) + with open(folder+"/../ForkFlow/wrong_list_all.csv", 'w', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + for err in wrong_lis_all: + f_csv.writerow(err.split(" ")) + + wrong_dic = {} + with open(folder+"/wrong_list_all.csv", 'r', encoding='utf-8') as f: + f_csv = csv.reader(f) + for row in f_csv: + if " ".join([row[-3].lower(), row[-1].lower()]) not in wrong_dic.keys(): + wrong_dic[" ".join([row[-3].lower(), row[-1].lower()])] = 1 + else: + wrong_dic[" ".join([row[-3].lower(), row[-1].lower()])] += 1 + #print(wrong_dic) + target_func_num_dic = {} + for k in total_dic: + if k.split(" ")[0].lower() not in target_func_num_dic: + target_func_num_dic[k.split(" ")[0].lower()] = len(list(set(total_dic[k]))) + else: + target_func_num_dic[k.split(" ")[0].lower()] += len(list(set(total_dic[k]))) + + with open(folder+"/err_percentage.csv", 'w', encoding='utf-8', newline = "") as f: + f_csv = csv.writer(f) + for k in target_func_num_dic: + #print(target_func_num_dic[k]) + for err_type in ["err_v", "err_cs", "err_def"]: + if k + " " + err_type in wrong_dic.keys(): + + f_csv.writerow([k.replace("pulp", "ri5cy"), err_type, round(float(wrong_dic[k + " " + err_type]) / float(target_func_num_dic[k]), 3)]) + else: + f_csv.writerow([k.replace("pulp", "ri5cy"), err_type, 0]) diff --git a/Scripts/Exp/Accuracy/calculate_purple.py b/Scripts/Exp/Accuracy/calculate_purple.py new file mode 100644 index 0000000000000000000000000000000000000000..4b982e368ec848bdee337383f9bb35cccbe8d428 --- /dev/null +++ b/Scripts/Exp/Accuracy/calculate_purple.py @@ -0,0 +1,42 @@ +import os, sys,string,re,glob + +import json +import csv +import copy + + +import pathlib +import time + +folder = str(pathlib.Path(__file__).parent.resolve()) +#Total_encas + + + +def calculate_template(): + total_dic = {} + for line in open(folder+"/result.jsonl", 'r', encoding="utf-8"): + dic = json.loads(line) + if dic["Target"].lower() + " " + dic["Module"].lower() not in total_dic.keys(): + total_dic[dic["Target"].lower() + " " + dic["Module"].lower()] = set() + total_dic[dic["Target"].lower() + " " + dic["Module"].lower()].add(dic["File"].strip() + " " + dic["Func"].strip() + " " + dic["Target"].strip()) + + + res_dic = {} + with open(folder+"/Accurate_Func_Merged.csv", 'r', encoding='utf-8') as f: + f_csv = csv.reader(f) + for row in f_csv: + if " ".join([row[-1], row[0]]).lower() not in res_dic: + res_dic[" ".join([row[-1], row[0]]).lower()] = 1 + else: + res_dic[" ".join([row[-1], row[0]]).lower()] += 1 + with open(folder+"/fig8_purple.csv", 'w', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + for k in res_dic.keys(): + f_csv.writerow([k.split(' ')[0].replace("pulp", "ri5cy"), k.split(' ')[1], round(float(res_dic[k])/float(len(list(total_dic[k]))), 3)]) + + + +if __name__ == '__main__': + calculate_template() + \ No newline at end of file diff --git a/Scripts/Exp/Accuracy/wrong_func_list_def.csv b/Scripts/Exp/Accuracy/wrong_func_list_def.csv new file mode 100644 index 0000000000000000000000000000000000000000..71d80463d23a5f4d32a5356158a365687a834c26 --- /dev/null +++ b/Scripts/Exp/Accuracy/wrong_func_list_def.csv @@ -0,0 +1,366 @@ +RegisterInfo,eliminateFrameIndex,PULP,Allocation,Err_Def +RegisterInfo,getReservedRegs,PULP,Allocation,Err_Def +RegisterInfo,hasReservedSpillSlot,PULP,Allocation,Err_Def +AsmParser,addFenceArgOperands,PULP,Assembler,Err_Def +AsmParser,AsmParser,PULP,Assembler,Err_Def +AsmParser,classifySymbolRef,PULP,Assembler,Err_Def +AsmParser,defaultMaskRegOp,PULP,Assembler,Err_Def +AsmParser,getFeatureBits,PULP,Assembler,Err_Def +AsmParser,getRoundingMode,PULP,Assembler,Err_Def +AsmParser,isFenceArg,PULP,Assembler,Err_Def +AsmParser,isFRMArg,PULP,Assembler,Err_Def +AsmParser,MatchAndEmitInstruction,PULP,Assembler,Err_Def +AsmParser,matchRegisterNameHelper,PULP,Assembler,Err_Def +AsmParser,Operand2,PULP,Assembler,Err_Def +AsmParser,parseAtomicMemOp,PULP,Assembler,Err_Def +AsmParser,parseCallSymbol,PULP,Assembler,Err_Def +AsmParser,parseCSRSyestemRegister,PULP,Assembler,Err_Def +AsmParser,ParseDirective,PULP,Assembler,Err_Def +AsmParser,ParseInstruction,PULP,Assembler,Err_Def +AsmParser,parseJALOffset,PULP,Assembler,Err_Def +AsmParser,parseMaskReg,PULP,Assembler,Err_Def +AsmParser,parseMemOpBaseReg,PULP,Assembler,Err_Def +AsmParser,parseOperand,PULP,Assembler,Err_Def +AsmParser,parsePseudoJumpSymbol,PULP,Assembler,Err_Def +AsmParser,parseRegister2,PULP,Assembler,Err_Def +AsmParser,parseVTypeI,PULP,Assembler,Err_Def +AsmParser,print,PULP,Assembler,Err_Def +Disassembler,decodeFRMArg,PULP,Disassembler,Err_Def +Disassembler,DecodeGPRRegisterClass,PULP,Disassembler,Err_Def +Disassembler,decodeRVCInstrRdRs1UImm,PULP,Disassembler,Err_Def +Disassembler,decodeRVCInstrRdSImm,PULP,Disassembler,Err_Def +Disassembler,decodeRVCInstrSImm,PULP,Disassembler,Err_Def +Disassembler,getInstruction,PULP,Disassembler,Err_Def +AsmBackend,AsmBackend,PULP,Emission,Err_Def +AsmBackend,evaluateTargetFixup,PULP,Emission,Err_Def +AsmBackend,relaxInstruction,PULP,Emission,Err_Def +AsmBackend,requiresDiffExpressionRelocations,PULP,Emission,Err_Def +AsmBackend,shouldForceRelocation,PULP,Emission,Err_Def +AsmBackend,shouldInsertExtraNopBytesForCodeAlign,PULP,Emission,Err_Def +AsmBackend,shouldInsertFixupForCodeAlign,PULP,Emission,Err_Def +AsmBackend,willForceRelocations,PULP,Emission,Err_Def +BaseInfo,computeTargetABI,PULP,Emission,Err_Def +BaseInfo,validate,PULP,Emission,Err_Def +BaseInfo,VMTs,PULP,Emission,Err_Def +ELFStreamer,TargetELFStreamer,PULP,Emission,Err_Def +InstPrinter,printAtomicMemOp,PULP,Emission,Err_Def +InstPrinter,printCSRSystemRegister,PULP,Emission,Err_Def +InstPrinter,printFenceArg,PULP,Emission,Err_Def +InstPrinter,printFRMArg,PULP,Emission,Err_Def +InstPrinter,printInst,PULP,Emission,Err_Def +InstPrinter,printVMaskReg,PULP,Emission,Err_Def +InstPrinter,printVTypeI,PULP,Emission,Err_Def +MatInt,generateInstSeq,PULP,Emission,Err_Def +MatInt,getIntMatCost,PULP,Emission,Err_Def +MCCodeEmitter,encodeInstruction,PULP,Emission,Err_Def +MCCodeEmitter,getImmOpValue,PULP,Emission,Err_Def +MCCodeEmitter,getImmOpValueAsr1,PULP,Emission,Err_Def +MCCodeEmitter,getImmOpValueMinus1,PULP,Emission,Err_Def +MCExpr,evaluateAsConstant,PULP,Emission,Err_Def +MCExpr,getPCRelHiFixup,PULP,Emission,Err_Def +TargetStreamer,emitTargetAttributes,PULP,Emission,Err_Def +CleanupVSETVLI,runOnMachineBasicBlock,PULP,Optimization,Err_Def +ExpandAtomicPseudoInsts,expandMI,PULP,Optimization,Err_Def +ExpandPseudoInsts,expandMI,PULP,Optimization,Err_Def +ExpandSDMAInsts,expandMI,PULP,Optimization,Err_Def +ExpandSSRInsts,expandMI,PULP,Optimization,Err_Def +ExpandSSRInsts,runOnMachineFunction,PULP,Optimization,Err_Def +MergeBaseOffset,runOnMachineFunction,PULP,Optimization,Err_Def +PULPFixupHwLoops,runOnMachineFunction,PULP,Optimization,Err_Def +PULPHardwareLoops,checkForImmediate,PULP,Optimization,Err_Def +PULPHardwareLoops,convertToHardwareLoop,PULP,Optimization,Err_Def +PULPHardwareLoops,findInductionRegister,PULP,Optimization,Err_Def +PULPHardwareLoops,getLoopTripCount,PULP,Optimization,Err_Def +PULPHardwareLoops,isInvalidLoopOperation,PULP,Optimization,Err_Def +PULPHardwareLoops,runOnMachineFunction,PULP,Optimization,Err_Def +SNITCHFrepLoops,checkForImmediate,PULP,Optimization,Err_Def +SNITCHFrepLoops,containsInvalidInstruction,PULP,Optimization,Err_Def +SNITCHFrepLoops,convertToHardwareLoop,PULP,Optimization,Err_Def +SNITCHFrepLoops,findBranchInstruction,PULP,Optimization,Err_Def +SNITCHFrepLoops,findInductionRegister,PULP,Optimization,Err_Def +SNITCHFrepLoops,getLoopTripCount,PULP,Optimization,Err_Def +SNITCHFrepLoops,isInvalidLoopOperation,PULP,Optimization,Err_Def +SNITCHFrepLoops,runOnMachineFunction,PULP,Optimization,Err_Def +InstrInfo,buildOutlinedFrame,PULP,Scheduling,Err_Def +InstrInfo,copyPhysReg,PULP,Scheduling,Err_Def +InstrInfo,getInstSizeInBytes,PULP,Scheduling,Err_Def +InstrInfo,getOutliningCandidateInfo,PULP,Scheduling,Err_Def +InstrInfo,getOutliningType,PULP,Scheduling,Err_Def +InstrInfo,insertIndirectBranch,PULP,Scheduling,Err_Def +InstrInfo,insertOutlinedCall,PULP,Scheduling,Err_Def +InstrInfo,isAsCheapAsAMove,PULP,Scheduling,Err_Def +InstrInfo,isCopyInstrImpl,PULP,Scheduling,Err_Def +InstrInfo,movImm,PULP,Scheduling,Err_Def +InstrInfo,verifyInstruction,PULP,Scheduling,Err_Def +MachineFunctionInfo,getMoveF64FrameIndex,PULP,Scheduling,Err_Def +MachineFunctionInfo,useSaveRestoreLibCalls,PULP,Scheduling,Err_Def +Subtarget,initializeSubtargetDependencies,PULP,Scheduling,Err_Def +TargetMachine,addPreRegAlloc,PULP,Scheduling,Err_Def +TargetMachine,setTargetOptionsWithModuleMetadata,PULP,Scheduling,Err_Def +TargetMachine,TargetMachine,PULP,Scheduling,Err_Def +TargetObjectFile,getModuleMetadata,PULP,Scheduling,Err_Def +TargetObjectFile,isGlobalInSmallSection,PULP,Scheduling,Err_Def +TargetTransformInfo,getIntImmCost,PULP,Scheduling,Err_Def +TargetTransformInfo,getIntImmCostInst,PULP,Scheduling,Err_Def +FrameLowering,canUseAsEpilogue,PULP,Selection,Err_Def +FrameLowering,canUseAsPrologue,PULP,Selection,Err_Def +FrameLowering,determineCalleeSaves,PULP,Selection,Err_Def +FrameLowering,emitEpilogue,PULP,Selection,Err_Def +FrameLowering,emitPrologue,PULP,Selection,Err_Def +FrameLowering,getFrameIndexReference,PULP,Selection,Err_Def +FrameLowering,restoreCalleeSavedRegisters,PULP,Selection,Err_Def +FrameLowering,spillCalleeSavedRegisters,PULP,Selection,Err_Def +ISelDAGtoDAG,MatchSLLIUW,PULP,Selection,Err_Def +ISelDAGtoDAG,MatchSRLIUW,PULP,Selection,Err_Def +ISelDAGtoDAG,PostprocessISelDAG,PULP,Selection,Err_Def +ISelDAGtoDAG,Select,PULP,Selection,Err_Def +ISelDAGtoDAG,selectVLOp,PULP,Selection,Err_Def +ISelDAGtoDAG,selectVSplat,PULP,Selection,Err_Def +ISelDAGtoDAG,selectVSplatSimm5,PULP,Selection,Err_Def +ISelDAGtoDAG,selectVSplatUimm5,PULP,Selection,Err_Def +ISelLowering,analyzeInputArgs,PULP,Selection,Err_Def +ISelLowering,analyzeOutputArgs,PULP,Selection,Err_Def +ISelLowering,CanLowerReturn,PULP,Selection,Err_Def +ISelLowering,computeKnownBitsForTargetNode,PULP,Selection,Err_Def +ISelLowering,ComputeNumSignBitsForTargetNode,PULP,Selection,Err_Def +ISelLowering,decomposeMulByConstant,PULP,Selection,Err_Def +ISelLowering,EmitInstrWithCustomInserter,PULP,Selection,Err_Def +ISelLowering,emitLeadingFence,PULP,Selection,Err_Def +ISelLowering,emitMaskedAtomicCmpXchgIntrinsic,PULP,Selection,Err_Def +ISelLowering,emitMaskedAtomicRMWIntrinsic,PULP,Selection,Err_Def +ISelLowering,emitTrailingFence,PULP,Selection,Err_Def +ISelLowering,getAddr,PULP,Selection,Err_Def +ISelLowering,getPostIndexedAddressParts,PULP,Selection,Err_Def +ISelLowering,getRegForInlineAsmConstraint,PULP,Selection,Err_Def +ISelLowering,getRegisterByName,PULP,Selection,Err_Def +ISelLowering,getStaticTLSAddr,PULP,Selection,Err_Def +ISelLowering,getTgtMemIntrinsic,PULP,Selection,Err_Def +ISelLowering,isDesirableToCommuteWithShift,PULP,Selection,Err_Def +ISelLowering,isEligibleForTailCallOptimization,PULP,Selection,Err_Def +ISelLowering,isFPImmLegal,PULP,Selection,Err_Def +ISelLowering,LowerCall,PULP,Selection,Err_Def +ISelLowering,lowerEXTRACT_VECTOR_ELT,PULP,Selection,Err_Def +ISelLowering,LowerFormalArguments,PULP,Selection,Err_Def +ISelLowering,lowerINSERT_VECTOR_ELT,PULP,Selection,Err_Def +ISelLowering,LowerINTRINSIC_W_CHAIN,PULP,Selection,Err_Def +ISelLowering,LowerINTRINSIC_WO_CHAIN,PULP,Selection,Err_Def +ISelLowering,LowerOperation,PULP,Selection,Err_Def +ISelLowering,LowerReturn,PULP,Selection,Err_Def +ISelLowering,lowerShiftLeftParts,PULP,Selection,Err_Def +ISelLowering,lowerShiftRightParts,PULP,Selection,Err_Def +ISelLowering,lowerSPLATVECTOR,PULP,Selection,Err_Def +ISelLowering,lowerVectorMaskExt,PULP,Selection,Err_Def +ISelLowering,lowerVectorMaskTrunc,PULP,Selection,Err_Def +ISelLowering,PerformDAGCombine,PULP,Selection,Err_Def +ISelLowering,ReplaceNodeResults,PULP,Selection,Err_Def +ISelLowering,shouldExtendTypeInLibCall,PULP,Selection,Err_Def +ISelLowering,TargetLowering,PULP,Selection,Err_Def +ISelLowering,targetShrinkDemandedConstant,PULP,Selection,Err_Def +ISelLowering,validateCCReservedRegs,PULP,Selection,Err_Def +MCInstLower,lowerMachineInstrToMCInst,PULP,Selection,Err_Def +RegisterInfo,eliminateFrameIndex,RISCV,Allocation,Err_Def +RegisterInfo,hasReservedSpillSlot,RISCV,Allocation,Err_Def +AsmParser,addFenceArgOperands,RISCV,Assembler,Err_Def +AsmParser,AsmParser,RISCV,Assembler,Err_Def +AsmParser,classifySymbolRef,RISCV,Assembler,Err_Def +AsmParser,defaultMaskRegOp,RISCV,Assembler,Err_Def +AsmParser,getFeatureBits,RISCV,Assembler,Err_Def +AsmParser,getRoundingMode,RISCV,Assembler,Err_Def +AsmParser,isFenceArg,RISCV,Assembler,Err_Def +AsmParser,isFRMArg,RISCV,Assembler,Err_Def +AsmParser,MatchAndEmitInstruction,RISCV,Assembler,Err_Def +AsmParser,matchRegisterNameHelper,RISCV,Assembler,Err_Def +AsmParser,Operand2,RISCV,Assembler,Err_Def +AsmParser,parseAtomicMemOp,RISCV,Assembler,Err_Def +AsmParser,parseCallSymbol,RISCV,Assembler,Err_Def +AsmParser,parseCSRSyestemRegister,RISCV,Assembler,Err_Def +AsmParser,ParseDirective,RISCV,Assembler,Err_Def +AsmParser,ParseInstruction,RISCV,Assembler,Err_Def +AsmParser,parseJALOffset,RISCV,Assembler,Err_Def +AsmParser,parseMaskReg,RISCV,Assembler,Err_Def +AsmParser,parsePseudoJumpSymbol,RISCV,Assembler,Err_Def +AsmParser,parseRegister2,RISCV,Assembler,Err_Def +AsmParser,parseVTypeI,RISCV,Assembler,Err_Def +AsmParser,print,RISCV,Assembler,Err_Def +Disassembler,decodeFRMArg,RISCV,Disassembler,Err_Def +Disassembler,DecodeGPRRegisterClass,RISCV,Disassembler,Err_Def +Disassembler,decodeRVCInstrRdRs1UImm,RISCV,Disassembler,Err_Def +Disassembler,decodeRVCInstrRdSImm,RISCV,Disassembler,Err_Def +Disassembler,decodeRVCInstrSImm,RISCV,Disassembler,Err_Def +Disassembler,getInstruction,RISCV,Disassembler,Err_Def +AsmBackend,AsmBackend,RISCV,Emission,Err_Def +AsmBackend,evaluateTargetFixup,RISCV,Emission,Err_Def +AsmBackend,relaxInstruction,RISCV,Emission,Err_Def +AsmBackend,requiresDiffExpressionRelocations,RISCV,Emission,Err_Def +AsmBackend,shouldForceRelocation,RISCV,Emission,Err_Def +AsmBackend,shouldInsertExtraNopBytesForCodeAlign,RISCV,Emission,Err_Def +AsmBackend,shouldInsertFixupForCodeAlign,RISCV,Emission,Err_Def +AsmBackend,willForceRelocations,RISCV,Emission,Err_Def +BaseInfo,computeTargetABI,RISCV,Emission,Err_Def +BaseInfo,validate,RISCV,Emission,Err_Def +BaseInfo,VMTs,RISCV,Emission,Err_Def +ELFStreamer,TargetELFStreamer,RISCV,Emission,Err_Def +InstPrinter,printAtomicMemOp,RISCV,Emission,Err_Def +InstPrinter,printCSRSystemRegister,RISCV,Emission,Err_Def +InstPrinter,printFenceArg,RISCV,Emission,Err_Def +InstPrinter,printFRMArg,RISCV,Emission,Err_Def +InstPrinter,printInst,RISCV,Emission,Err_Def +InstPrinter,printVMaskReg,RISCV,Emission,Err_Def +InstPrinter,printVTypeI,RISCV,Emission,Err_Def +MatInt,generateInstSeq,RISCV,Emission,Err_Def +MatInt,getIntMatCost,RISCV,Emission,Err_Def +MCCodeEmitter,encodeInstruction,RISCV,Emission,Err_Def +MCCodeEmitter,getImmOpValue,RISCV,Emission,Err_Def +MCCodeEmitter,getImmOpValueAsr1,RISCV,Emission,Err_Def +MCExpr,evaluateAsConstant,RISCV,Emission,Err_Def +MCExpr,getPCRelHiFixup,RISCV,Emission,Err_Def +TargetStreamer,emitTargetAttributes,RISCV,Emission,Err_Def +CleanupVSETVLI,runOnMachineBasicBlock,RISCV,Optimization,Err_Def +ExpandAtomicPseudoInsts,expandMI,RISCV,Optimization,Err_Def +ExpandPseudoInsts,expandMI,RISCV,Optimization,Err_Def +MergeBaseOffset,runOnMachineFunction,RISCV,Optimization,Err_Def +InstrInfo,buildOutlinedFrame,RISCV,Scheduling,Err_Def +InstrInfo,copyPhysReg,RISCV,Scheduling,Err_Def +InstrInfo,getInstSizeInBytes,RISCV,Scheduling,Err_Def +InstrInfo,getOutliningCandidateInfo,RISCV,Scheduling,Err_Def +InstrInfo,getOutliningType,RISCV,Scheduling,Err_Def +InstrInfo,insertIndirectBranch,RISCV,Scheduling,Err_Def +InstrInfo,insertOutlinedCall,RISCV,Scheduling,Err_Def +InstrInfo,isAsCheapAsAMove,RISCV,Scheduling,Err_Def +InstrInfo,isCopyInstrImpl,RISCV,Scheduling,Err_Def +InstrInfo,movImm,RISCV,Scheduling,Err_Def +InstrInfo,verifyInstruction,RISCV,Scheduling,Err_Def +MachineFunctionInfo,getMoveF64FrameIndex,RISCV,Scheduling,Err_Def +MachineFunctionInfo,useSaveRestoreLibCalls,RISCV,Scheduling,Err_Def +Subtarget,initializeSubtargetDependencies,RISCV,Scheduling,Err_Def +TargetMachine,addPreRegAlloc,RISCV,Scheduling,Err_Def +TargetMachine,TargetMachine,RISCV,Scheduling,Err_Def +TargetObjectFile,getModuleMetadata,RISCV,Scheduling,Err_Def +TargetObjectFile,isGlobalInSmallSection,RISCV,Scheduling,Err_Def +TargetTransformInfo,getIntImmCost,RISCV,Scheduling,Err_Def +TargetTransformInfo,getIntImmCostInst,RISCV,Scheduling,Err_Def +FrameLowering,canUseAsEpilogue,RISCV,Selection,Err_Def +FrameLowering,canUseAsPrologue,RISCV,Selection,Err_Def +FrameLowering,determineCalleeSaves,RISCV,Selection,Err_Def +FrameLowering,emitEpilogue,RISCV,Selection,Err_Def +FrameLowering,emitPrologue,RISCV,Selection,Err_Def +FrameLowering,getFrameIndexReference,RISCV,Selection,Err_Def +FrameLowering,restoreCalleeSavedRegisters,RISCV,Selection,Err_Def +FrameLowering,spillCalleeSavedRegisters,RISCV,Selection,Err_Def +ISelDAGtoDAG,MatchSLLIUW,RISCV,Selection,Err_Def +ISelDAGtoDAG,MatchSRLIUW,RISCV,Selection,Err_Def +ISelDAGtoDAG,PostprocessISelDAG,RISCV,Selection,Err_Def +ISelDAGtoDAG,Select,RISCV,Selection,Err_Def +ISelDAGtoDAG,selectVLOp,RISCV,Selection,Err_Def +ISelDAGtoDAG,selectVSplat,RISCV,Selection,Err_Def +ISelDAGtoDAG,selectVSplatSimm5,RISCV,Selection,Err_Def +ISelDAGtoDAG,selectVSplatUimm5,RISCV,Selection,Err_Def +ISelLowering,analyzeInputArgs,RISCV,Selection,Err_Def +ISelLowering,analyzeOutputArgs,RISCV,Selection,Err_Def +ISelLowering,CanLowerReturn,RISCV,Selection,Err_Def +ISelLowering,computeKnownBitsForTargetNode,RISCV,Selection,Err_Def +ISelLowering,ComputeNumSignBitsForTargetNode,RISCV,Selection,Err_Def +ISelLowering,decomposeMulByConstant,RISCV,Selection,Err_Def +ISelLowering,EmitInstrWithCustomInserter,RISCV,Selection,Err_Def +ISelLowering,emitLeadingFence,RISCV,Selection,Err_Def +ISelLowering,emitMaskedAtomicCmpXchgIntrinsic,RISCV,Selection,Err_Def +ISelLowering,emitMaskedAtomicRMWIntrinsic,RISCV,Selection,Err_Def +ISelLowering,emitTrailingFence,RISCV,Selection,Err_Def +ISelLowering,getAddr,RISCV,Selection,Err_Def +ISelLowering,getRegForInlineAsmConstraint,RISCV,Selection,Err_Def +ISelLowering,getRegisterByName,RISCV,Selection,Err_Def +ISelLowering,getStaticTLSAddr,RISCV,Selection,Err_Def +ISelLowering,getTgtMemIntrinsic,RISCV,Selection,Err_Def +ISelLowering,isDesirableToCommuteWithShift,RISCV,Selection,Err_Def +ISelLowering,isEligibleForTailCallOptimization,RISCV,Selection,Err_Def +ISelLowering,isFPImmLegal,RISCV,Selection,Err_Def +ISelLowering,LowerCall,RISCV,Selection,Err_Def +ISelLowering,lowerEXTRACT_VECTOR_ELT,RISCV,Selection,Err_Def +ISelLowering,LowerFormalArguments,RISCV,Selection,Err_Def +ISelLowering,lowerINSERT_VECTOR_ELT,RISCV,Selection,Err_Def +ISelLowering,LowerINTRINSIC_W_CHAIN,RISCV,Selection,Err_Def +ISelLowering,LowerINTRINSIC_WO_CHAIN,RISCV,Selection,Err_Def +ISelLowering,LowerOperation,RISCV,Selection,Err_Def +ISelLowering,LowerReturn,RISCV,Selection,Err_Def +ISelLowering,lowerShiftLeftParts,RISCV,Selection,Err_Def +ISelLowering,lowerShiftRightParts,RISCV,Selection,Err_Def +ISelLowering,lowerSPLATVECTOR,RISCV,Selection,Err_Def +ISelLowering,lowerVectorMaskExt,RISCV,Selection,Err_Def +ISelLowering,lowerVectorMaskTrunc,RISCV,Selection,Err_Def +ISelLowering,PerformDAGCombine,RISCV,Selection,Err_Def +ISelLowering,ReplaceNodeResults,RISCV,Selection,Err_Def +ISelLowering,shouldExtendTypeInLibCall,RISCV,Selection,Err_Def +ISelLowering,TargetLowering,RISCV,Selection,Err_Def +ISelLowering,targetShrinkDemandedConstant,RISCV,Selection,Err_Def +ISelLowering,validateCCReservedRegs,RISCV,Selection,Err_Def +MCInstLower,lowerMachineInstrToMCInst,RISCV,Selection,Err_Def +RegisterInfo,eliminateCallFramePseudoInstr,XCore,Allocation,Err_Def +RegisterInfo,eliminateFrameIndex,XCore,Allocation,Err_Def +RegisterInfo,getCalleeSavedRegs,XCore,Allocation,Err_Def +AsmPrinter,AsmPrinter,XCore,Assembler,Err_Def +AsmPrinter,EmitBasicBlockStart,XCore,Assembler,Err_Def +AsmPrinter,EmitConstantPool,XCore,Assembler,Err_Def +AsmPrinter,EmitEndOfAsmFile,XCore,Assembler,Err_Def +AsmPrinter,EmitFunctionEntryLabel,XCore,Assembler,Err_Def +AsmPrinter,EmitGlobalVariable,XCore,Assembler,Err_Def +AsmPrinter,EmitInstruction,XCore,Assembler,Err_Def +AsmPrinter,EmitStartOfAsmFile,XCore,Assembler,Err_Def +AsmPrinter,printInlineJT,XCore,Assembler,Err_Def +AsmPrinter,printInlineJT32,XCore,Assembler,Err_Def +AsmPrinter,PrintSpecial,XCore,Assembler,Err_Def +AsmPrinter,runOnMachineFunction,XCore,Assembler,Err_Def +FrameToArgsOffsetElim,runOnMachineFunction,XCore,Optimization,Err_Def +LoopMetadataLowering,runOnFunction,XCore,Optimization,Err_Def +SimpleBranchOpt,runOnMachineFunction,XCore,Optimization,Err_Def +StackAnalysisPrepare,runOnFunction,XCore,Optimization,Err_Def +StackUsage,runOnMachineFunction,XCore,Optimization,Err_Def +InstrInfo,analyzeBranch,XCore,Scheduling,Err_Def +InstrInfo,copyPhysReg,XCore,Scheduling,Err_Def +InstrInfo,GetInstSizeInBytes,XCore,Scheduling,Err_Def +InstrInfo,insertBranch,XCore,Scheduling,Err_Def +MachineFunctionInfo,~FunctionInfo,XCore,Scheduling,Err_Def +MachineFunctionInfo,Call,XCore,Scheduling,Err_Def +MachineFunctionInfo,ExternalSymbolCall,XCore,Scheduling,Err_Def +MachineFunctionInfo,FunctionCall,XCore,Scheduling,Err_Def +MachineFunctionInfo,FunctionInfo,XCore,Scheduling,Err_Def +MachineFunctionInfo,FunctionInfo2,XCore,Scheduling,Err_Def +TargetObjectFile,getExplicitSectionGlobal,XCore,Scheduling,Err_Def +TargetObjectFile,getSectionForConstant,XCore,Scheduling,Err_Def +TargetObjectFile,Initialize,XCore,Scheduling,Err_Def +TargetObjectFile,SelectSectionForGlobal,XCore,Scheduling,Err_Def +FrameLowering,emitEpilogue,XCore,Selection,Err_Def +FrameLowering,emitPrologue,XCore,Selection,Err_Def +FrameLowering,processFunctionBeforeCalleeSavedScan,XCore,Selection,Err_Def +FrameLowering,restoreCalleeSavedRegisters,XCore,Selection,Err_Def +FrameLowering,spillCalleeSavedRegisters,XCore,Selection,Err_Def +ISelDAGToDAG,immBitp,XCore,Selection,Err_Def +ISelDAGToDAG,immMskBitp,XCore,Selection,Err_Def +ISelDAGToDAG,Select,XCore,Selection,Err_Def +ISelDAGToDAG,SelectInlineAsmMemoryOperand,XCore,Selection,Err_Def +ISelLowering,computeMaskedBitsForTargetNode,XCore,Selection,Err_Def +ISelLowering,ExpandADDSUB,XCore,Selection,Err_Def +ISelLowering,isLegalAddImmediate,XCore,Selection,Err_Def +ISelLowering,isLegalAddressingMode,XCore,Selection,Err_Def +ISelLowering,LowerBR_JT,XCore,Selection,Err_Def +ISelLowering,LowerCall,XCore,Selection,Err_Def +ISelLowering,LowerDYNAMIC_STACKALLOC,XCore,Selection,Err_Def +ISelLowering,LowerEH_RETURN,XCore,Selection,Err_Def +ISelLowering,LowerFormalArguments,XCore,Selection,Err_Def +ISelLowering,LowerFRAME_TO_ARGS_OFFSET,XCore,Selection,Err_Def +ISelLowering,LowerFRAMEADDR,XCore,Selection,Err_Def +ISelLowering,LowerGlobalAddress,XCore,Selection,Err_Def +ISelLowering,LowerGlobalTLSAddress,XCore,Selection,Err_Def +ISelLowering,LowerINIT_TRAMPOLINE,XCore,Selection,Err_Def +ISelLowering,LowerINTRINSIC_WO_CHAIN,XCore,Selection,Err_Def +ISelLowering,LowerLOAD,XCore,Selection,Err_Def +ISelLowering,LowerOperation,XCore,Selection,Err_Def +ISelLowering,LowerReturn,XCore,Selection,Err_Def +ISelLowering,LowerRETURNADDR,XCore,Selection,Err_Def +ISelLowering,LowerSMUL_LOHI,XCore,Selection,Err_Def +ISelLowering,LowerSTACKSAVE,XCore,Selection,Err_Def +ISelLowering,LowerSTORE,XCore,Selection,Err_Def +ISelLowering,LowerUMUL_LOHI,XCore,Selection,Err_Def +ISelLowering,PerformDAGCombine,XCore,Selection,Err_Def +ISelLowering,ReplaceNodeResults,XCore,Selection,Err_Def +ISelLowering,TargetLowering,XCore,Selection,Err_Def +SelectionDAGInfo,EmitTargetCodeForMemcpy,XCore,Selection,Err_Def diff --git a/Scripts/Exp/Correction/Correction_Time.xlsx b/Scripts/Exp/Correction/Correction_Time.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..f2817f3b9061217fc31d4dc21c4a2ae7dda57ddc Binary files /dev/null and b/Scripts/Exp/Correction/Correction_Time.xlsx differ diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..154620e398d7f0953efcca93ed80eb3382eec4d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp @@ -0,0 +1,2 @@ +MipsRegisterBankInfo::MipsRegisterBankInfo(const TargetRegisterInfo &TRI) : MipsGenRegisterBankInfo() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9e6f816b7f0ea865a533d9408fcc407f4cc146f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +MipsRegisterInfo::MipsRegisterInfo() : MipsGenRegisterInfo(Mips::RA) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80dcd82832876ef68c5dac162843caf8d669a919 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,10 @@ +void MipsRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS) const { + MachineInstr &MI = *II; + MachineFunction &MF = *MI.getParent()->getParent(); + LLVM_DEBUG(errs() << "\nFunction : " << MF.getName() << "\n"; errs() << "<--------->\n" << MI); + int FrameIndex = MI.getOperand(FIOperandNum).getIndex(); + uint64_t stackSize = MF.getFrameInfo().getStackSize(); + int64_t spOffset = MF.getFrameInfo().getObjectOffset(FrameIndex); + LLVM_DEBUG(errs() << "FrameIndex : " << FrameIndex << "\n" << "spOffset : " << spOffset << "\n" << "stackSize : " << stackSize << "\n" << "alignment : " << DebugStr(MF.getFrameInfo().getObjectAlign(FrameIndex)) << "\n"); + eliminateFI(MI, FIOperandNum, FrameIndex, stackSize, spOffset); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c237e572ddf1fb74501680c681b1277c0f939faa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp @@ -0,0 +1,14 @@ +const uint32_t *MipsRegisterInfo::getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const { + const MipsSubtarget &Subtarget = MF.getSubtarget(); + if (Subtarget.isSingleFloat()) + return CSR_SingleFloatOnly_RegMask; + if (Subtarget.isABI_N64()) + return CSR_N64_RegMask; + if (Subtarget.isABI_N32()) + return CSR_N32_RegMask; + if (Subtarget.isFP64bit()) + return CSR_O32_FP64_RegMask; + if (Subtarget.isFPXX()) + return CSR_O32_FPXX_RegMask; + return CSR_O32_RegMask; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee86b1ec364747b2b7adec2f4c7503435563ae61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,21 @@ +const MCPhysReg *MipsRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + const MipsSubtarget &Subtarget = MF->getSubtarget(); + const Function &F = MF->getFunction(); + if (F.hasFnAttribute("interrupt")) { + if (Subtarget.hasMips64()) + return Subtarget.hasMips64r6() ? CSR_Interrupt_64R6_SaveList : CSR_Interrupt_64_SaveList; + else + return Subtarget.hasMips32r6() ? CSR_Interrupt_32R6_SaveList : CSR_Interrupt_32_SaveList; + } + if (Subtarget.isSingleFloat()) + return CSR_SingleFloatOnly_SaveList; + if (Subtarget.isABI_N64()) + return CSR_N64_SaveList; + if (Subtarget.isABI_N32()) + return CSR_N32_SaveList; + if (Subtarget.isFP64bit()) + return CSR_O32_FP64_SaveList; + if (Subtarget.isFPXX()) + return CSR_O32_FPXX_SaveList; + return CSR_O32_SaveList; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5f8f103812c92122b87cb59e13c69048c13c8d7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,9 @@ +Register MipsRegisterInfo::getFrameRegister(const MachineFunction &MF) const { + const MipsSubtarget &Subtarget = MF.getSubtarget(); + const TargetFrameLowering *TFI = Subtarget.getFrameLowering(); + bool IsN64 = static_cast(MF.getTarget()).getABI().IsN64(); + if (Subtarget.inMips16Mode()) + return TFI->hasFP(MF) ? Mips::S0 : Mips::SP; + else + return TFI->hasFP(MF) ? (IsN64 ? Mips::FP_64 : Mips::FP) : (IsN64 ? Mips::SP_64 : Mips::SP); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..768c66e1a51386be2f8f561bf3a64986f6b8ec80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp @@ -0,0 +1,15 @@ +const TargetRegisterClass *MipsRegisterInfo::getPointerRegClass(const MachineFunction &MF, unsigned Kind) const { + MipsABIInfo ABI = MF.getSubtarget().getABI(); + MipsPtrClass PtrClassKind = static_cast(Kind); + switch (PtrClassKind) { + case MipsPtrClass::Default: + return ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + case MipsPtrClass::GPR16MM: + return &Mips::GPRMM16RegClass; + case MipsPtrClass::StackPointer: + return ABI.ArePtrs64bit() ? &Mips::SP64RegClass : &Mips::SP32RegClass; + case MipsPtrClass::GlobalPointer: + return ABI.ArePtrs64bit() ? &Mips::GP64RegClass : &Mips::GP32RegClass; + } + llvm_unreachable("Unknown pointer kind"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e54fad41cb6792bb287045716ad70601b8ede981 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,65 @@ +BitVector MipsRegisterInfo::getReservedRegs(const MachineFunction &MF) const { + static const MCPhysReg ReservedGPR32[] = { + Mips::ZERO, Mips::K0, Mips::K1, Mips::SP + }; + static const MCPhysReg ReservedGPR64[] = { + Mips::ZERO_64, Mips::K0_64, Mips::K1_64, Mips::SP_64 + }; + BitVector Reserved(getNumRegs()); + const MipsSubtarget &Subtarget = MF.getSubtarget(); + for (unsigned I = 0; I < array_lengthof(ReservedGPR32); ++I) + Reserved.set(ReservedGPR32[I]); + if (Subtarget.isTargetNaCl()) { + Reserved.set(Mips::T6); + Reserved.set(Mips::T7); + Reserved.set(Mips::T8); + } + for (unsigned I = 0; I < array_lengthof(ReservedGPR64); ++I) + Reserved.set(ReservedGPR64[I]); + if (!Subtarget.isABICalls()) { + Reserved.set(Mips::GP); + Reserved.set(Mips::GP_64); + } + if (Subtarget.isFP64bit()) { + for (MCPhysReg Reg : Mips::AFGR64RegClass) + Reserved.set(Reg); + } + else { + for (MCPhysReg Reg : Mips::FGR64RegClass) + Reserved.set(Reg); + } + if (Subtarget.getFrameLowering()->hasFP(MF)) { + if (Subtarget.inMips16Mode()) + Reserved.set(Mips::S0); + else { + Reserved.set(Mips::FP); + Reserved.set(Mips::FP_64); + if (needsStackRealignment(MF) && MF.getFrameInfo().hasVarSizedObjects()) { + Reserved.set(Mips::S7); + Reserved.set(Mips::S7_64); + } + } + } + Reserved.set(Mips::HWR29); + Reserved.set(Mips::DSPPos); + Reserved.set(Mips::DSPSCount); + Reserved.set(Mips::DSPCarry); + Reserved.set(Mips::DSPEFI); + Reserved.set(Mips::DSPOutFlag); + for (MCPhysReg Reg : Mips::MSACtrlRegClass) + Reserved.set(Reg); + if (Subtarget.inMips16Mode()) { + const MipsFunctionInfo *MipsFI = MF.getInfo(); + Reserved.set(Mips::RA); + Reserved.set(Mips::RA_64); + Reserved.set(Mips::T0); + Reserved.set(Mips::T1); + if (MF.getFunction().hasFnAttribute("saveS2") || MipsFI->hasSaveS2()) + Reserved.set(Mips::S2); + } + if (Subtarget.useSmallSection()) { + Reserved.set(Mips::GP); + Reserved.set(Mips::GP_64); + } + return Reserved; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e1497c8af968f9fb8df0d24aa0ec03d295b89d0b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp @@ -0,0 +1,3 @@ +bool Mips16RegisterInfo::requiresFrameIndexScavenging(const MachineFunction &MF) const { + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2682c40f6351c32f0b694fd849308d114c3a623b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,3 @@ +bool MipsRegisterInfo::requiresRegisterScavenging(const MachineFunction &MF) const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/AsmParser.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/AsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0024f46337cf0a1788c8f6d813e7962cf06aec64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/AsmParser.cpp @@ -0,0 +1,24 @@ +MipsAsmParser(const MCSubtargetInfo &sti, MCAsmParser &parser, const MCInstrInfo &MII, const MCTargetOptions &Options) : MCTargetAsmParser(Options, sti, MII), ABI(MipsABIInfo::computeTargetABI(Triple(sti.getTargetTriple()), sti.getCPU(), Options)) { + MCAsmParserExtension::Initialize(parser); + parser.addAliasForDirective(".asciiz", ".asciz"); + parser.addAliasForDirective(".hword", ".2byte"); + parser.addAliasForDirective(".word", ".4byte"); + parser.addAliasForDirective(".dword", ".8byte"); + setAvailableFeatures(ComputeAvailableFeatures(getSTI().getFeatureBits())); + AssemblerOptions.push_back(std::make_unique(getSTI().getFeatureBits())); + AssemblerOptions.push_back(std::make_unique(getSTI().getFeatureBits())); + getTargetStreamer().updateABIInfo(*this); + if (!isABI_O32() && !useOddSPReg() != 0) + report_fatal_error("-mno-odd-spreg requires the O32 ABI"); + CurrentFn = nullptr; + IsPicEnabled = getContext().getObjectFileInfo()->isPositionIndependent(); + IsCpRestoreSet = false; + CpRestoreOffset = -1; + GPReg = ABI.GetGlobalPtr(); + const Triple &TheTriple = sti.getTargetTriple(); + IsLittleEndian = TheTriple.isLittleEndian(); + if (getSTI().getCPU() == "mips64r6" && inMicroMipsMode()) + report_fatal_error("microMIPS64R6 is not supported", false); + if (!isABI_O32() && inMicroMipsMode()) + report_fatal_error("microMIPS64 is not supported", false); + } \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/KindTy.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/KindTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f4c302b6b8fa3a780b93821daa1a44f0536c32c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/KindTy.cpp @@ -0,0 +1,7 @@ +enum KindTy { + k_Immediate, + k_Memory, + k_RegisterIndex, + k_Token, + k_RegList, +} Kind; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03817d477c15f4208d1f063c8f12a417d900e788 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmParser() { + RegisterMCAsmParser X(getTheMipsTarget()); + RegisterMCAsmParser Y(getTheMipselTarget()); + RegisterMCAsmParser A(getTheMips64Target()); + RegisterMCAsmParser B(getTheMips64elTarget()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d5d91e4524a97a5a07f08a46e5da9ac9048942a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp @@ -0,0 +1,142 @@ +bool MipsAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, OperandVector &Operands, MCStreamer &Out, uint64_t &ErrorInfo, bool MatchingInlineAsm) { + MCInst Inst; + unsigned MatchResult = MatchInstructionImpl(Operands, Inst, ErrorInfo, MatchingInlineAsm); + switch (MatchResult) { + case Match_Success: + if (processInstruction(Inst, IDLoc, Out, STI)) + return true; + return false; + case Match_MissingFeature: + Error(IDLoc, "instruction requires a CPU feature not currently enabled"); + return true; + case Match_InvalidOperand: { + SMLoc ErrorLoc = IDLoc; + if (ErrorInfo != ~0ULL) { + if (ErrorInfo >= Operands.size()) + return Error(IDLoc, "too few operands for instruction"); + ErrorLoc = Operands[ErrorInfo]->getStartLoc(); + if (ErrorLoc == SMLoc()) + ErrorLoc = IDLoc; + } + return Error(ErrorLoc, "invalid operand for instruction"); + } + case Match_NonZeroOperandForSync: + return Error(IDLoc, "s-type must be zero or unspecified for pre-MIPS32 ISAs"); + case Match_NonZeroOperandForMTCX: + return Error(IDLoc, "selector must be zero for pre-MIPS32 ISAs"); + case Match_MnemonicFail: + return Error(IDLoc, "invalid instruction"); + case Match_RequiresDifferentSrcAndDst: + return Error(IDLoc, "source and destination must be different"); + case Match_RequiresDifferentOperands: + return Error(IDLoc, "registers must be different"); + case Match_RequiresNoZeroRegister: + return Error(IDLoc, "invalid operand ($zero) for instruction"); + case Match_RequiresSameSrcAndDst: + return Error(IDLoc, "source and destination must match"); + case Match_NoFCCRegisterForCurrentISA: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "non-zero fcc register doesn't exist in current ISA level"); + case Match_Immz: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected '0'"); + case Match_UImm1_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 1-bit unsigned immediate"); + case Match_UImm2_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 2-bit unsigned immediate"); + case Match_UImm2_1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 1 .. 4"); + case Match_UImm3_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 3-bit unsigned immediate"); + case Match_UImm4_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 4-bit unsigned immediate"); + case Match_SImm4_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 4-bit signed immediate"); + case Match_UImm5_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 5-bit unsigned immediate"); + case Match_SImm5_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 5-bit signed immediate"); + case Match_UImm5_1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 1 .. 32"); + case Match_UImm5_32: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 32 .. 63"); + case Match_UImm5_33: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 33 .. 64"); + case Match_UImm5_0_Report_UImm6: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 6-bit unsigned immediate"); + case Match_UImm5_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 7-bit unsigned immediate and multiple of 4"); + case Match_UImmRange2_64: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 2 .. 64"); + case Match_UImm6_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 6-bit unsigned immediate"); + case Match_UImm6_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 8-bit unsigned immediate and multiple of 4"); + case Match_SImm6_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 6-bit signed immediate"); + case Match_UImm7_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 7-bit unsigned immediate"); + case Match_UImm7_N1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range -1 .. 126"); + case Match_SImm7_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 9-bit signed immediate and multiple of 4"); + case Match_UImm8_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 8-bit unsigned immediate"); + case Match_UImm10_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 10-bit unsigned immediate"); + case Match_SImm10_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 10-bit signed immediate"); + case Match_SImm11_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 11-bit signed immediate"); + case Match_UImm16: + case Match_UImm16_Relaxed: + case Match_UImm16_AltRelaxed: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 16-bit unsigned immediate"); + case Match_SImm16: + case Match_SImm16_Relaxed: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 16-bit signed immediate"); + case Match_SImm19_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 19-bit signed immediate and multiple of 4"); + case Match_UImm20_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 20-bit unsigned immediate"); + case Match_UImm26_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 26-bit unsigned immediate"); + case Match_SImm32: + case Match_SImm32_Relaxed: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 32-bit signed immediate"); + case Match_UImm32_Coerced: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 32-bit immediate"); + case Match_MemSImm9: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 9-bit signed offset"); + case Match_MemSImm10: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 10-bit signed offset"); + case Match_MemSImm10Lsl1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 11-bit signed offset and multiple of 2"); + case Match_MemSImm10Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 12-bit signed offset and multiple of 4"); + case Match_MemSImm10Lsl3: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 13-bit signed offset and multiple of 8"); + case Match_MemSImm11: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 11-bit signed offset"); + case Match_MemSImm12: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 12-bit signed offset"); + case Match_MemSImm16: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 16-bit signed offset"); + case Match_MemSImmPtr: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 32-bit signed offset"); + case Match_RequiresPosSizeRange0_32: { + SMLoc ErrorStart = Operands[3]->getStartLoc(); + SMLoc ErrorEnd = Operands[4]->getEndLoc(); + return Error(ErrorStart, "size plus position are not in the range 0 .. 32", SMRange(ErrorStart, ErrorEnd)); + } + case Match_RequiresPosSizeUImm6: { + SMLoc ErrorStart = Operands[3]->getStartLoc(); + SMLoc ErrorEnd = Operands[4]->getEndLoc(); + return Error(ErrorStart, "size plus position are not in the range 1 .. 63", SMRange(ErrorStart, ErrorEnd)); + } + case Match_RequiresPosSizeRange33_64: { + SMLoc ErrorStart = Operands[3]->getStartLoc(); + SMLoc ErrorEnd = Operands[4]->getEndLoc(); + return Error(ErrorStart, "size plus position are not in the range 33 .. 64", SMRange(ErrorStart, ErrorEnd)); + } +} + llvm_unreachable("Implement any new match types added!"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/Operand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ea6992dcf8df85c16752926355da897ce7de63a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/Operand.cpp @@ -0,0 +1,2 @@ +MipsOperand(KindTy K, MipsAsmParser &Parser) : MCParsedAsmOperand(), Kind(K), AsmParser(Parser) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/Operand2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/Operand2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ea6992dcf8df85c16752926355da897ce7de63a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/Operand2.cpp @@ -0,0 +1,2 @@ +MipsOperand(KindTy K, MipsAsmParser &Parser) : MCParsedAsmOperand(), Kind(K), AsmParser(Parser) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseDirective.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseDirective.cpp new file mode 100644 index 0000000000000000000000000000000000000000..759b5538a90a0648a7e34b1e218abc61944b5841 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseDirective.cpp @@ -0,0 +1,243 @@ +bool MipsAsmParser::ParseDirective(AsmToken DirectiveID) { + MCAsmParser &Parser = getParser(); + StringRef IDVal = DirectiveID.getString(); + if (IDVal == ".cpadd") { + parseDirectiveCpAdd(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".cpload") { + parseDirectiveCpLoad(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".cprestore") { + parseDirectiveCpRestore(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".cplocal") { + parseDirectiveCpLocal(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".ent") { + StringRef SymbolName; + if (Parser.parseIdentifier(SymbolName)) { + reportParseError("expected identifier after .ent"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + if (getLexer().isNot(AsmToken::Comma)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + Parser.Lex(); + const MCExpr *DummyNumber; + int64_t DummyNumberVal; + if (Parser.parseExpression(DummyNumber)) { + reportParseError("expected number after comma"); + return false; + } + if (!DummyNumber->evaluateAsAbsolute(DummyNumberVal)) { + reportParseError("expected an absolute expression after comma"); + return false; + } + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + MCSymbol *Sym = getContext().getOrCreateSymbol(SymbolName); + getTargetStreamer().emitDirectiveEnt(*Sym); + CurrentFn = Sym; + IsCpRestoreSet = false; + return false; + } + if (IDVal == ".end") { + StringRef SymbolName; + if (Parser.parseIdentifier(SymbolName)) { + reportParseError("expected identifier after .end"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + if (CurrentFn == nullptr) { + reportParseError(".end used without .ent"); + return false; + } + if ((SymbolName != CurrentFn->getName())) { + reportParseError(".end symbol does not match .ent symbol"); + return false; + } + getTargetStreamer().emitDirectiveEnd(SymbolName); + CurrentFn = nullptr; + IsCpRestoreSet = false; + return false; + } + if (IDVal == ".frame") { + SmallVector, 1> TmpReg; + OperandMatchResultTy ResTy = parseAnyRegister(TmpReg); + if (ResTy == MatchOperand_NoMatch || ResTy == MatchOperand_ParseFail) { + reportParseError("expected stack register"); + return false; + } + MipsOperand &StackRegOpnd = static_cast(*TmpReg[0]); + if (!StackRegOpnd.isGPRAsmReg()) { + reportParseError(StackRegOpnd.getStartLoc(), "expected general purpose register"); + return false; + } + unsigned StackReg = StackRegOpnd.getGPR32Reg(); + if (Parser.getTok().is(AsmToken::Comma)) + Parser.Lex(); + else { + reportParseError("unexpected token, expected comma"); + return false; + } + const MCExpr *FrameSize; + int64_t FrameSizeVal; + if (Parser.parseExpression(FrameSize)) { + reportParseError("expected frame size value"); + return false; + } + if (!FrameSize->evaluateAsAbsolute(FrameSizeVal)) { + reportParseError("frame size not an absolute expression"); + return false; + } + if (Parser.getTok().is(AsmToken::Comma)) + Parser.Lex(); + else { + reportParseError("unexpected token, expected comma"); + return false; + } + TmpReg.clear(); + ResTy = parseAnyRegister(TmpReg); + if (ResTy == MatchOperand_NoMatch || ResTy == MatchOperand_ParseFail) { + reportParseError("expected return register"); + return false; + } + MipsOperand &ReturnRegOpnd = static_cast(*TmpReg[0]); + if (!ReturnRegOpnd.isGPRAsmReg()) { + reportParseError(ReturnRegOpnd.getStartLoc(), "expected general purpose register"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + getTargetStreamer().emitFrame(StackReg, FrameSizeVal, ReturnRegOpnd.getGPR32Reg()); + IsCpRestoreSet = false; + return false; + } + if (IDVal == ".set") { + parseDirectiveSet(); + return false; + } + if (IDVal == ".mask" || IDVal == ".fmask") { + const MCExpr *BitMask; + int64_t BitMaskVal; + if (Parser.parseExpression(BitMask)) { + reportParseError("expected bitmask value"); + return false; + } + if (!BitMask->evaluateAsAbsolute(BitMaskVal)) { + reportParseError("bitmask not an absolute expression"); + return false; + } + if (Parser.getTok().is(AsmToken::Comma)) + Parser.Lex(); + else { + reportParseError("unexpected token, expected comma"); + return false; + } + const MCExpr *FrameOffset; + int64_t FrameOffsetVal; + if (Parser.parseExpression(FrameOffset)) { + reportParseError("expected frame offset value"); + return false; + } + if (!FrameOffset->evaluateAsAbsolute(FrameOffsetVal)) { + reportParseError("frame offset not an absolute expression"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + if (IDVal == ".mask") + getTargetStreamer().emitMask(BitMaskVal, FrameOffsetVal); + else + getTargetStreamer().emitFMask(BitMaskVal, FrameOffsetVal); + return false; + } + if (IDVal == ".nan") + return parseDirectiveNaN(); + + if (IDVal == ".gpword") { + parseDirectiveGpWord(); + return false; + } + if (IDVal == ".gpdword") { + parseDirectiveGpDWord(); + return false; + } + + if (IDVal == ".dtprelword") { + parseDirectiveDtpRelWord(); + return false; + } + if (IDVal == ".dtpreldword") { + parseDirectiveDtpRelDWord(); + return false; + } + if (IDVal == ".tprelword") { + parseDirectiveTpRelWord(); + return false; + } + if (IDVal == ".tpreldword") { + parseDirectiveTpRelDWord(); + return false; + } + if (IDVal == ".option") { + parseDirectiveOption(); + return false; + } + if (IDVal == ".abicalls") { + getTargetStreamer().emitDirectiveAbiCalls(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + return false; + } + if (IDVal == ".cpsetup") { + parseDirectiveCPSetup(); + return false; + } + if (IDVal == ".cpreturn") { + parseDirectiveCPReturn(); + return false; + } + if (IDVal == ".module") { + parseDirectiveModule(); + return false; + } + if (IDVal == ".llvm_internal_mips_reallow_module_directive") { + parseInternalDirectiveReallowModule(); + return false; + } + if (IDVal == ".insn") { + parseInsnDirective(); + return false; + } + if (IDVal == ".rdata") { + parseRSectionDirective(".rodata"); + return false; + } + if (IDVal == ".sbss") { + parseSSectionDirective(IDVal, ELF::SHT_NOBITS); + return false; + } + if (IDVal == ".sdata") { + parseSSectionDirective(IDVal, ELF::SHT_PROGBITS); + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2a508ccdd7784c61a69914df68dd816e913dd917 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp @@ -0,0 +1,38 @@ +bool MipsAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc, OperandVector &Operands) { + MCAsmParser &Parser = getParser(); + LLVM_DEBUG(dbgs() << "ParseInstruction\n"); + getTargetStreamer().forbidModuleDirective(); + if (!mnemonicIsValid(Name, 0)) { + FeatureBitset FBS = ComputeAvailableFeatures(getSTI().getFeatureBits()); + std::string Suggestion = MipsMnemonicSpellCheck(Name, FBS); + return Error(NameLoc, "unknown instruction" + Suggestion); + } + Operands.push_back(MipsOperand::CreateToken(Name, NameLoc, *this)); + if (getLexer().isNot(AsmToken::EndOfStatement)) { + if (parseOperand(Operands, Name)) { + SMLoc Loc = getLexer().getLoc(); + return Error(Loc, "unexpected token in argument list"); + } + if (getLexer().is(AsmToken::LBrac) && parseBracketSuffix(Name, Operands)) + return true; + while (getLexer().is(AsmToken::Comma)) { + Parser.Lex(); + if (parseOperand(Operands, Name)) { + SMLoc Loc = getLexer().getLoc(); + return Error(Loc, "unexpected token in argument list"); + } + if (getLexer().is(AsmToken::LBrac)) { + if (parseBracketSuffix(Name, Operands)) + return true; + } + else if (getLexer().is(AsmToken::LParen) && parseParenSuffix(Name, Operands)) + return true; + } + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + SMLoc Loc = getLexer().getLoc(); + return Error(Loc, "unexpected token in argument list"); + } + Parser.Lex(); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1c007833f59929cb9d0324e00d3040998464996 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/ParseRegister.cpp @@ -0,0 +1,3 @@ +bool MipsAsmParser::ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + return tryParseRegister(RegNo, StartLoc, EndLoc) != MatchOperand_Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d2a064b7a9d4fb757645ce723c9d45a4e21f59f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addExpr.cpp @@ -0,0 +1,8 @@ +void addExpr(MCInst &Inst, const MCExpr *Expr) const { + if (!Expr) + Inst.addOperand(MCOperand::createImm(0)); + else if (const MCConstantExpr *CE = dyn_cast(Expr)) + Inst.addOperand(MCOperand::createImm(CE->getValue())); + else + Inst.addOperand(MCOperand::createExpr(Expr)); + } \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addImmOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addImmOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..99f9c831995140cddadc166fd097ee368b5c5f2d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addImmOperands.cpp @@ -0,0 +1,4 @@ +void addImmOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + addExpr(Inst, getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addRegOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addRegOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b5826e8ee5f4576985c9fdb509c547c63f4ec8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addRegOperands.cpp @@ -0,0 +1,3 @@ +void addRegOperands(MCInst &Inst, unsigned N) const { + llvm_unreachable("Use a custom parser instead"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3da1052dc575118e5bbe16ca357f8c8a15196bdf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createImm.cpp @@ -0,0 +1,7 @@ +static std::unique_ptr createImm(const MCExpr *Val, SMLoc S, SMLoc E, MipsAsmParser &Parser) { + auto Op = std::make_unique(k_Immediate, Parser); + Op->Imm.Val = Val; + Op->StartLoc = S; + Op->EndLoc = E; + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3abcdf12ae77e0a78c900564055206a22187242 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createReg.cpp @@ -0,0 +1,11 @@ +static std::unique_ptr CreateReg(unsigned Index, StringRef Str, RegKind RegKind, const MCRegisterInfo *RegInfo, SMLoc S, SMLoc E, MipsAsmParser &Parser) { + auto Op = std::make_unique(k_RegisterIndex, Parser); + Op->RegIdx.Index = Index; + Op->RegIdx.RegInfo = RegInfo; + Op->RegIdx.Kind = RegKind; + Op->RegIdx.Tok.Data = Str.data(); + Op->RegIdx.Tok.Length = Str.size(); + Op->StartLoc = S; + Op->EndLoc = E; + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createSysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createSysReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createToken.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b32d17dd87c68e6be83414d2394197c68d1245e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createToken.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr CreateToken(StringRef Str, SMLoc S, MipsAsmParser &Parser) { + auto Op = std::make_unique(k_Token, Parser); + Op->Tok.Data = Str.data(); + Op->Tok.Length = Str.size(); + Op->StartLoc = S; + Op->EndLoc = S; + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createVType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/createVType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getEndLoc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getEndLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e9075c3fe891637688ed0ec5409f13457d6bbdd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getEndLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getEndLoc() const override { + return EndLoc; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92325c487a33c523dd5549a7a6d810023646c31d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getImm.cpp @@ -0,0 +1,4 @@ +const MCExpr *getImm() const { + assert((Kind == k_Immediate) && "Invalid access!"); + return Imm.Val; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getLoc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getLoc.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..561fb299f3424c0fccbf96c162cdbc182753d4d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getReg.cpp @@ -0,0 +1,6 @@ +unsigned getReg() const override { + if (Kind == k_RegisterIndex && RegIdx.Index == 0 && RegIdx.Kind & RegKind_GPR) + return getGPR32Reg(); + llvm_unreachable("Invalid access!"); + return 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getStartLoc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getStartLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e36379a2af7e3a50c3295ec879be99ded34a75f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getStartLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getStartLoc() const override { + return StartLoc; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getSysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getSysReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f0702cf4d0fc4fe32fcfe3d6382149cf4456f1ef --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp @@ -0,0 +1,5 @@ +MipsTargetStreamer &getTargetStreamer() { + assert(getParser().getStreamer().getTargetStreamer() && "do not have a target streamer"); + MCTargetStreamer &TS = *getParser().getStreamer().getTargetStreamer(); + return static_cast(TS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getToken.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e40c78da1e88d4186d87ae697481e4458dc6d09f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getToken.cpp @@ -0,0 +1,4 @@ +StringRef getToken() const { + assert(Kind == k_Token && "Invalid access!"); + return StringRef(Tok.Data, Tok.Length); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getVType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/getVType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isFRMArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isFRMArg.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isFenceArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isFenceArg.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isGPR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isGPR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97325e19a5f38a3dc2992126c618d96f7d7813b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isGPR.cpp @@ -0,0 +1,3 @@ +bool isGPRAsmReg() const { + return isRegIdx() && RegIdx.Kind & RegKind_GPR && RegIdx.Index <= 31; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e028f1acc0adc990eaaa7cd33412bb583aa50693 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const override { + return Kind == k_Immediate; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isMem.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isMem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..433c1871fb3ee7ace6d97413913de43c8c9fba2a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isMem.cpp @@ -0,0 +1,3 @@ +bool isMem() const override { + return Kind == k_Memory; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV32E.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV32E.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV64-2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV64-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV64-2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV64.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isRV64.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d367df6e72a1916e56ea13412e32c693d1dd119b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const override { + return isGPRAsmReg() && RegIdx.Index == 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm12.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm12.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm5.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm6.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm6.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isToken.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..434a02a9965ade469608f0cf55d543128efbe8ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isToken.cpp @@ -0,0 +1,3 @@ +bool isToken() const override { + return Kind == k_Token; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm1.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm12.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm12.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm3.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm3.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm4.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm4.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm4.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm5.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm6.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm6.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isV0Reg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isV0Reg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isV0Reg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isVType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isVType.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isVTypeI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/isVTypeI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa71ede088179ac896028ca527da6898ad8c02dd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseOperand.cpp @@ -0,0 +1,36 @@ +bool MipsAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) { + MCAsmParser &Parser = getParser(); + LLVM_DEBUG(dbgs() << "parseOperand\n"); + OperandMatchResultTy ResTy = MatchOperandParserImpl(Operands, Mnemonic); + if (ResTy == MatchOperand_Success) + return false; + if (ResTy == MatchOperand_ParseFail) + return true; + LLVM_DEBUG(dbgs() << ".. Generic Parser\n"); + switch (getLexer().getKind()) { + case AsmToken::Dollar: { + SMLoc S = Parser.getTok().getLoc(); + if (parseAnyRegister(Operands) != MatchOperand_NoMatch) + return false; + StringRef Identifier; + if (Parser.parseIdentifier(Identifier)) + return true; + SMLoc E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); + MCSymbol *Sym = getContext().getOrCreateSymbol("$" + Identifier); + const MCExpr *Res = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext()); + Operands.push_back(MipsOperand::CreateImm(Res, S, E, *this)); + return false; + } + default: { + LLVM_DEBUG(dbgs() << ".. generic integer expression\n"); + const MCExpr *Expr; + SMLoc S = Parser.getTok().getLoc(); + if (getParser().parseExpression(Expr)) + return true; + SMLoc E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); + Operands.push_back(MipsOperand::CreateImm(Expr, S, E, *this)); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseRegister2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseRegister2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseRegister2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/print.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84efdd1c18cb87d13ff89482402cbc6dadca4b57 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/print.cpp @@ -0,0 +1,29 @@ +void print(raw_ostream &OS) const override { + switch (Kind) { + case k_Immediate: + OS << "Imm<"; + OS << *Imm.Val; + OS << ">"; + break; + case k_Memory: + OS << "Mem<"; + Mem.Base->print(OS); + OS << ", "; + OS << *Mem.Off; + OS << ">"; + break; + case k_RegisterIndex: + OS << "RegIdx<" << RegIdx.Index << ":" << RegIdx.Kind << ", " + << StringRef(RegIdx.Tok.Data, RegIdx.Tok.Length) << ">"; + break; + case k_Token: + OS << getToken(); + break; + case k_RegList: + OS << "RegList< "; + for (auto Reg : (*RegList.List)) + OS << Reg << " "; + OS << ">"; + break; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bd1a8cbc7b97359b66a58cc455ce07f739cf6627 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp @@ -0,0 +1,7 @@ +void setFeatureBits(uint64_t Feature, StringRef FeatureString) { + if (!(getSTI().getFeatureBits()[Feature])) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); + AssemblerOptions.back()->setFeatures(STI.getFeatureBits()); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b7da7ddacfdef727bd3c1256963779f4610d80b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp @@ -0,0 +1,16 @@ +OperandMatchResultTy MipsAsmParser::tryParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + SmallVector, 1> Operands; + OperandMatchResultTy ResTy = parseAnyRegister(Operands); + if (ResTy == MatchOperand_Success) { + assert(Operands.size() == 1); + MipsOperand &Operand = static_cast(*Operands.front()); + StartLoc = Operand.getStartLoc(); + EndLoc = Operand.getEndLoc(); + if (Operand.isGPRAsmReg()) { + RegNo = isGP64bit() ? Operand.getGPR64Reg() : Operand.getGPR32Reg(); + } + return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch : MatchOperand_Success; + } + assert(Operands.size() == 0); + return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch : MatchOperand_Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69363c6c07ac6569bb6adaa08ef2328e96b8a16f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit MipsAsmPrinter(TargetMachine &TM, std::unique_ptr Streamer) : AsmPrinter(TM, std::move(Streamer)), MCInstLowering(*this) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d4ab5bf715e86e02b908fb3cab0a9fd1fecee42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmPrinter() { + RegisterAsmPrinter X(getTheMipsTarget()); + RegisterAsmPrinter Y(getTheMipselTarget()); + RegisterAsmPrinter A(getTheMips64Target()); + RegisterAsmPrinter B(getTheMips64elTarget()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13d636aa596545eb1d4a0b5e90251d6ac7d5200a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,27 @@ +bool MipsAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) { + assert(OpNum + 1 < MI->getNumOperands() && "Insufficient operands"); + const MachineOperand &BaseMO = MI->getOperand(OpNum); + const MachineOperand &OffsetMO = MI->getOperand(OpNum + 1); + assert(BaseMO.isReg() && "Unexpected base pointer for inline asm memory operand."); + assert(OffsetMO.isImm() && "Unexpected offset for inline asm memory operand."); + int Offset = OffsetMO.getImm(); + if (ExtraCode) { + switch (ExtraCode[0]) { + case 'D': + Offset += 4; + break; + case 'M': + if (Subtarget->isLittle()) + Offset += 4; + break; + case 'L': + if (!Subtarget->isLittle()) + Offset += 4; + break; + default: + return true; + } + } + O << Offset << "($" << MipsInstPrinter::getRegisterName(BaseMO.getReg()) << ")"; + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79f3c9422c159809396fc8b54c7323732a4efe88 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,89 @@ +bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) { + if (ExtraCode && ExtraCode[0]) { + if (ExtraCode[1] != 0) return true; + const MachineOperand &MO = MI->getOperand(OpNum); + switch (ExtraCode[0]) { + default: + return AsmPrinter::PrintAsmOperand(MI, OpNum, ExtraCode, O); + case 'X': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << "0x" << Twine::utohexstr(MO.getImm()); + return false; + case 'x': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << "0x" << Twine::utohexstr(MO.getImm() & 0xffff); + return false; + case 'd': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << MO.getImm(); + return false; + case 'm': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << MO.getImm() - 1; + return false; + case 'y': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + if (!isPowerOf2_64(MO.getImm())) + return true; + O << Log2_64(MO.getImm()); + return false; + case 'z': + if (MO.getType() == MachineOperand::MO_Immediate && MO.getImm() == 0) { + O << "$0"; + return false; + } + break; + case 'D': + case 'L': + case 'M': + { + if (OpNum == 0) + return true; + const MachineOperand &FlagsOP = MI->getOperand(OpNum - 1); + if (!FlagsOP.isImm()) + return true; + unsigned Flags = FlagsOP.getImm(); + unsigned NumVals = InlineAsm::getNumOperandRegisters(Flags); + if (NumVals != 2) { + if (Subtarget->isGP64bit() && NumVals == 1 && MO.isReg()) { + Register Reg = MO.getReg(); + O << '$' << MipsInstPrinter::getRegisterName(Reg); + return false; + } + return true; + } + unsigned RegOp = OpNum; + if (!Subtarget->isGP64bit()){ + switch(ExtraCode[0]) { + case 'M': + RegOp = (Subtarget->isLittle()) ? OpNum + 1 : OpNum; + break; + case 'L': + RegOp = (Subtarget->isLittle()) ? OpNum : OpNum + 1; + break; + case 'D': + RegOp = OpNum + 1; + } + if (RegOp >= MI->getNumOperands()) + return true; + const MachineOperand &MO = MI->getOperand(RegOp); + if (!MO.isReg()) + return true; + Register Reg = MO.getReg(); + O << '$' << MipsInstPrinter::getRegisterName(Reg); + return false; + } + break; + } + case 'w': + break; + } + } + printOperand(MI, OpNum, O); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7146d50f3a4b68a80abd13882286d1c3d617f2b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,8 @@ +void MipsAsmPrinter::emitEndOfAsmFile(Module &M) { + for (std::map::const_iterator it = StubsNeeded.begin(); it != StubsNeeded.end(); ++it) { + const char *Symbol = it->first; + const Mips16HardFloatInfo::FuncSignature *Signature = it->second; + EmitFPCallStub(Symbol, Signature); + } + OutStreamer->SwitchSection(OutContext.getObjectFileInfo()->getTextSection()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52d759a06f0cc7d92fe9b7e4c9454e2fb460d219 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp @@ -0,0 +1,63 @@ +void MipsAsmPrinter::emitInstruction(const MachineInstr *MI) { + MipsTargetStreamer &TS = getTargetStreamer(); + unsigned Opc = MI->getOpcode(); + TS.forbidModuleDirective(); + if (MI->isDebugValue()) { + SmallString<128> Str; + raw_svector_ostream OS(Str); + PrintDebugValueComment(MI, OS); + return; + } + if (MI->isDebugLabel()) + return; + if (InConstantPool && Opc != Mips::CONSTPOOL_ENTRY) { + OutStreamer->emitDataRegion(MCDR_DataRegionEnd); + InConstantPool = false; + } + if (Opc == Mips::CONSTPOOL_ENTRY) { + unsigned LabelId = (unsigned)MI->getOperand(0).getImm(); + unsigned CPIdx = (unsigned)MI->getOperand(1).getIndex(); + if (!InConstantPool) { + OutStreamer->emitDataRegion(MCDR_DataRegion); + InConstantPool = true; + } + OutStreamer->emitLabel(GetCPISymbol(LabelId)); + const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPIdx]; + if (MCPE.isMachineConstantPoolEntry()) + emitMachineConstantPoolValue(MCPE.Val.MachineCPVal); + else + emitGlobalConstant(MF->getDataLayout(), MCPE.Val.ConstVal); + return; + } + switch (Opc) { + case Mips::PATCHABLE_FUNCTION_ENTER: + LowerPATCHABLE_FUNCTION_ENTER(*MI); + return; + case Mips::PATCHABLE_FUNCTION_EXIT: + LowerPATCHABLE_FUNCTION_EXIT(*MI); + return; + case Mips::PATCHABLE_TAIL_CALL: + LowerPATCHABLE_TAIL_CALL(*MI); + return; + } + if (EmitJalrReloc && (MI->isReturn() || MI->isCall() || MI->isIndirectBranch())) { + emitDirectiveRelocJalr(*MI, OutContext, TM, *OutStreamer, *Subtarget); + } + MachineBasicBlock::const_instr_iterator I = MI->getIterator(); + MachineBasicBlock::const_instr_iterator E = MI->getParent()->instr_end(); + do { + if (emitPseudoExpansionLowering(*OutStreamer, &*I)) + continue; + if (I->isBundle()) + continue; + if (I->getOpcode() == Mips::PseudoReturn || I->getOpcode() == Mips::PseudoReturn64 || I->getOpcode() == Mips::PseudoIndirectBranch || I->getOpcode() == Mips::PseudoIndirectBranch64 || I->getOpcode() == Mips::TAILCALLREG || I->getOpcode() == Mips::TAILCALLREG64) { + emitPseudoIndirectBranch(*OutStreamer, &*I); + continue; + } + if (I->isPseudo() && !Subtarget->inMips16Mode() && !isLongBranchPseudo(I->getOpcode())) + llvm_unreachable("Pseudo opcode found in emitInstruction()"); + MCInst TmpInst0; + MCInstLowering.Lower(&*I, TmpInst0); + EmitToStreamer(*OutStreamer, TmpInst0); + } while ((++I != E) && I->isInsideBundle()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..67253a3102205d65b0ab1e07350da6cc883fc27d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,8 @@ +void MipsAsmPrinter::emitInlineAsmStart() const { + MipsTargetStreamer &TS = getTargetStreamer(); + TS.emitDirectiveSetPush(); + TS.emitDirectiveSetAt(); + TS.emitDirectiveSetMacro(); + TS.emitDirectiveSetReorder(); + OutStreamer->AddBlankLine(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39ec07ec3d83ebefc05c0f7f720dba157cb08bb7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Assembly Printer"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..217416888da6098c0f3f5d5d508fa79919629b53 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp @@ -0,0 +1,4 @@ +bool MipsAsmPrinter::lowerOperand(const MachineOperand &MO, MCOperand &MCOp) { + MCOp = MCInstLowering.LowerOperand(MO); + return MCOp.isValid(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ea4e69b88d62186a605cf374ec7eb5204d98196 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,17 @@ +bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) { + Subtarget = &MF.getSubtarget(); + MipsFI = MF.getInfo(); + if (Subtarget->inMips16Mode()) + for (std::map::const_iterator it = MipsFI->StubsNeeded.begin(); it != MipsFI->StubsNeeded.end(); ++it) { + const char *Symbol = it->first; + const Mips16HardFloatInfo::FuncSignature *Signature = it->second; + if (StubsNeeded.find(Symbol) == StubsNeeded.end()) + StubsNeeded[Symbol] = Signature; + } + MCP = MF.getConstantPool(); + if (Subtarget->isTargetNaCl()) + NaClAlignIndirectJumpTargets(MF); + AsmPrinter::runOnMachineFunction(MF); + emitXRayTable(); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61b2928a98a3b89735c62a0242d23f47844cecbb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61b2928a98a3b89735c62a0242d23f47844cecbb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61b2928a98a3b89735c62a0242d23f47844cecbb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..950f52d398b103964a07e02830d6937798200f64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR64RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40fd65a586b4b9459534d9dadd3e4fad80e94d91 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR64RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa54d4bfd9313a9f0a99641dacadf1e355216ffb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/Disassembler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/Disassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..289bc27b55c7aa92cbcaaaafea3aa7bfec1dc351 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/Disassembler.cpp @@ -0,0 +1,2 @@ +MipsDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx, bool IsBigEndian) : MCDisassembler(STI, Ctx), IsMicroMips(STI.getFeatureBits()[Mips::FeatureMicroMips]), IsBigEndian(IsBigEndian) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aac362f8290944c06ffebaf290b8b64edc748283 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsDisassembler() { + TargetRegistry::RegisterMCDisassembler(getTheMipsTarget(), createMipsDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheMipselTarget(), createMipselDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheMips64Target(), createMipsDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheMips64elTarget(), createMipselDisassembler); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/addImplySP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/addImplySP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/addImplySP.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c9f23dc4c3675d6d55e1ff1b1517fc2d45acc8ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp @@ -0,0 +1,3 @@ +static MCDisassembler *createMipsDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) { + return new MipsDisassembler(STI, Ctx, true); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dc5ce568523000d9e6a9d150a81ec69f1c4be78 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPR64RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4c2cab7aa576d3436889701317d4baac06b9654 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeSyncI(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + Inst.addOperand(MCOperand::createReg(Base)); + Inst.addOperand(MCOperand::createImm(Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0282ae9b186c226781e9e8e2f3cc39a828d3ef17 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus DecodeSImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + int32_t Imm = SignExtend32(Value) * ScaleBy; + Inst.addOperand(MCOperand::createImm(Imm + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0282ae9b186c226781e9e8e2f3cc39a828d3ef17 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus DecodeSImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + int32_t Imm = SignExtend32(Value) * ScaleBy; + Inst.addOperand(MCOperand::createImm(Imm + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0282ae9b186c226781e9e8e2f3cc39a828d3ef17 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus DecodeSImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + int32_t Imm = SignExtend32(Value) * ScaleBy; + Inst.addOperand(MCOperand::createImm(Imm + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/getInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/getInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97a894caca0ae1138b9d72b7014c73e34494b18c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Disassembler/Disassembler/getInstruction.cpp @@ -0,0 +1,114 @@ +DecodeStatus MipsDisassembler::getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, raw_ostream &CStream) const { + uint32_t Insn; + DecodeStatus Result; + Size = 0; + if (IsMicroMips) { + Result = readInstruction16(Bytes, Address, Size, Insn, IsBigEndian); + if (Result == MCDisassembler::Fail) + return MCDisassembler::Fail; + if (hasMips32r6()) { + LLVM_DEBUG(dbgs() << "Trying MicroMipsR616 table (16-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMipsR616, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + } + LLVM_DEBUG(dbgs() << "Trying MicroMips16 table (16-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMips16, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + Result = readInstruction32(Bytes, Address, Size, Insn, IsBigEndian, true); + if (Result == MCDisassembler::Fail) + return MCDisassembler::Fail; + if (hasMips32r6()) { + LLVM_DEBUG(dbgs() << "Trying MicroMips32r632 table (32-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMipsR632, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 4; + return Result; + } + } + LLVM_DEBUG(dbgs() << "Trying MicroMips32 table (32-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMips32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 4; + return Result; + } + if (isFP64()) { + LLVM_DEBUG(dbgs() << "Trying MicroMipsFP64 table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMicroMipsFP6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 4; + return Result; + } + } + Size = 2; + return MCDisassembler::Fail; + } + Result = readInstruction32(Bytes, Address, Size, Insn, IsBigEndian, false); + if (Result == MCDisassembler::Fail) + return MCDisassembler::Fail; + Size = 4; + if (hasCOP3()) { + LLVM_DEBUG(dbgs() << "Trying COP3_ table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableCOP3_32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips32r6() && isGP64()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 (GPR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32r6_64r6_GP6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips32r6() && isPTR64()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 (PTR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32r6_64r6_PTR6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips32r6()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32r6_64r632, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips2() && isPTR64()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 (PTR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32_64_PTR6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasCnMips()) { + LLVM_DEBUG(dbgs() << "Trying CnMips table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableCnMips32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasCnMipsP()) { + LLVM_DEBUG(dbgs() << "Trying CnMipsP table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableCnMipsP32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (isGP64()) { + LLVM_DEBUG(dbgs() << "Trying Mips64 (GPR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (isFP64()) { + LLVM_DEBUG(dbgs() << "Trying MipsFP64 (64 bit FPU) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMipsFP6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + LLVM_DEBUG(dbgs() << "Trying Mips table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + return MCDisassembler::Fail; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/AsmBackend.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7ae0321d2626e19fa5446eb52df8fbb49738d2df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/AsmBackend.cpp @@ -0,0 +1,2 @@ +MipsAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU, bool N32) : MCAsmBackend(TT.isLittleEndian() ? support::little : support::big), TheTriple(TT), IsN32(N32) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e955e760b17b32c034de715643494327c2cb575e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp @@ -0,0 +1,144 @@ +static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value, MCContext &Ctx) { + unsigned Kind = Fixup.getKind(); + switch (Kind) { + default: + return 0; + case FK_Data_2: + case Mips::fixup_Mips_LO16: + case Mips::fixup_Mips_GPREL16: + case Mips::fixup_Mips_GPOFF_HI: + case Mips::fixup_Mips_GPOFF_LO: + case Mips::fixup_Mips_GOT_PAGE: + case Mips::fixup_Mips_GOT_OFST: + case Mips::fixup_Mips_GOT_DISP: + case Mips::fixup_Mips_GOT_LO16: + case Mips::fixup_Mips_CALL_LO16: + case Mips::fixup_MICROMIPS_GPOFF_HI: + case Mips::fixup_MICROMIPS_GPOFF_LO: + case Mips::fixup_MICROMIPS_LO16: + case Mips::fixup_MICROMIPS_GOT_PAGE: + case Mips::fixup_MICROMIPS_GOT_OFST: + case Mips::fixup_MICROMIPS_GOT_DISP: + case Mips::fixup_MIPS_PCLO16: + Value &= 0xffff; + break; + case FK_DTPRel_4: + case FK_DTPRel_8: + case FK_TPRel_4: + case FK_TPRel_8: + case FK_GPRel_4: + case FK_Data_4: + case FK_Data_8: + case Mips::fixup_Mips_SUB: + case Mips::fixup_MICROMIPS_SUB: + break; + case Mips::fixup_Mips_PC16: + Value = (int64_t)Value / 4; + if (!isInt<16>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC16 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC19_S2: + case Mips::fixup_MICROMIPS_PC19_S2: + Value = (int64_t)Value / 4; + if (!isInt<19>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC19 fixup"); + return 0; + } + break; + case Mips::fixup_Mips_26: + Value >>= 2; + break; + case Mips::fixup_Mips_HI16: + case Mips::fixup_Mips_GOT: + case Mips::fixup_MICROMIPS_GOT16: + case Mips::fixup_Mips_GOT_HI16: + case Mips::fixup_Mips_CALL_HI16: + case Mips::fixup_MICROMIPS_HI16: + case Mips::fixup_MIPS_PCHI16: + Value = ((Value + 0x8000) >> 16) & 0xffff; + break; + case Mips::fixup_Mips_HIGHER: + case Mips::fixup_MICROMIPS_HIGHER: + Value = ((Value + 0x80008000LL) >> 32) & 0xffff; + break; + case Mips::fixup_Mips_HIGHEST: + case Mips::fixup_MICROMIPS_HIGHEST: + Value = ((Value + 0x800080008000LL) >> 48) & 0xffff; + break; + case Mips::fixup_MICROMIPS_26_S1: + Value >>= 1; + break; + case Mips::fixup_MICROMIPS_PC7_S1: + Value -= 4; + Value = (int64_t) Value / 2; + if (!isInt<7>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC7 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC10_S1: + Value -= 2; + Value = (int64_t) Value / 2; + if (!isInt<10>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC10 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC16_S1: + Value -= 4; + Value = (int64_t)Value / 2; + if (!isInt<16>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC16 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC18_S3: + Value = (int64_t)Value / 8; + if (!isInt<18>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC18 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC18_S3: + if ((Value & 7)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC18 fixup"); + } + Value = (int64_t)Value / 8; + if (!isInt<18>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC18 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC21_S2: + Value = (int64_t) Value / 4; + if (!isInt<21>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC21 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC26_S2: + Value = (int64_t) Value / 4; + if (!isInt<26>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC26 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC26_S1: + Value = (int64_t)Value / 2; + if (!isInt<26>(Value)) { + Ctx.reportFatalError(Fixup.getLoc(), "out of range PC26 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC21_S1: + Value = (int64_t)Value / 2; + if (!isInt<21>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC21 fixup"); + return 0; + } + break; + } + return Value; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/applyFixup.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/applyFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9211dcecd9d0b897b105d23d99f75b18563bee0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/applyFixup.cpp @@ -0,0 +1,37 @@ +void MipsAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target, MutableArrayRef Data, uint64_t Value, bool IsResolved, const MCSubtargetInfo *STI) const { + MCFixupKind Kind = Fixup.getKind(); + MCContext &Ctx = Asm.getContext(); + Value = adjustFixupValue(Fixup, Value, Ctx); + if (!Value) + return; + unsigned Offset = Fixup.getOffset(); + unsigned NumBytes = (getFixupKindInfo(Kind).TargetSize + 7) / 8; + unsigned FullSize; + switch ((unsigned)Kind) { + case FK_Data_2: + case Mips::fixup_Mips_16: + case Mips::fixup_MICROMIPS_PC10_S1: + FullSize = 2; + break; + case FK_Data_8: + case Mips::fixup_Mips_64: + FullSize = 8; + break; + case FK_Data_4: + default: + FullSize = 4; + break; + } + uint64_t CurVal = 0; + bool microMipsLEByteOrder = needsMMLEByteOrder((unsigned) Kind); + for (unsigned i = 0; i != NumBytes; ++i) { + unsigned Idx = Endian == support::little ? (microMipsLEByteOrder ? calculateMMLEIndex(i) : i) : (FullSize - 1 - i); + CurVal |= (uint64_t)((uint8_t)Data[Offset + Idx]) << (i*8); + } + uint64_t Mask = ((uint64_t)(-1) >> (64 - getFixupKindInfo(Kind).TargetSize)); + CurVal |= Value & Mask; + for (unsigned i = 0; i != NumBytes; ++i) { + unsigned Idx = Endian == support::little ? (microMipsLEByteOrder ? calculateMMLEIndex(i) : i): (FullSize - 1 - i); + Data[Offset + Idx] = (uint8_t)((CurVal >> (i*8)) & 0xff); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea5dcd4a2c2d8d9b3c9e7a32fdfd9f44242047f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp @@ -0,0 +1,4 @@ +MCAsmBackend *llvm::createMipsAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) { + MipsABIInfo ABI = MipsABIInfo::computeTargetABI(STI.getTargetTriple(), STI.getCPU(), Options); + return new MipsAsmBackend(T, MRI, STI.getTargetTriple(), STI.getCPU(), ABI.IsN32()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..00f1fa1f26067758af5e13abbd8903b7c44a4d89 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp @@ -0,0 +1,4 @@ +std::unique_ptr MipsAsmBackend::createObjectTargetWriter() const { + return createMipsELFObjectWriter(TheTriple, IsN32); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getFixupKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getFixupKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a92b79f89ec89f4e0b16dfd5b04b822a41bfa98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getFixupKind.cpp @@ -0,0 +1,36 @@ +Optional MipsAsmBackend::getFixupKind(StringRef Name) const { + return StringSwitch>(Name) + .Case("R_MIPS_NONE", FK_NONE) + .Case("R_MIPS_32", FK_Data_4) + .Case("R_MIPS_CALL_HI16", (MCFixupKind)Mips::fixup_Mips_CALL_HI16) + .Case("R_MIPS_CALL_LO16", (MCFixupKind)Mips::fixup_Mips_CALL_LO16) + .Case("R_MIPS_CALL16", (MCFixupKind)Mips::fixup_Mips_CALL16) + .Case("R_MIPS_GOT16", (MCFixupKind)Mips::fixup_Mips_GOT) + .Case("R_MIPS_GOT_PAGE", (MCFixupKind)Mips::fixup_Mips_GOT_PAGE) + .Case("R_MIPS_GOT_OFST", (MCFixupKind)Mips::fixup_Mips_GOT_OFST) + .Case("R_MIPS_GOT_DISP", (MCFixupKind)Mips::fixup_Mips_GOT_DISP) + .Case("R_MIPS_GOT_HI16", (MCFixupKind)Mips::fixup_Mips_GOT_HI16) + .Case("R_MIPS_GOT_LO16", (MCFixupKind)Mips::fixup_Mips_GOT_LO16) + .Case("R_MIPS_TLS_GOTTPREL", (MCFixupKind)Mips::fixup_Mips_GOTTPREL) + .Case("R_MIPS_TLS_DTPREL_HI16", (MCFixupKind)Mips::fixup_Mips_DTPREL_HI) + .Case("R_MIPS_TLS_DTPREL_LO16", (MCFixupKind)Mips::fixup_Mips_DTPREL_LO) + .Case("R_MIPS_TLS_GD", (MCFixupKind)Mips::fixup_Mips_TLSGD) + .Case("R_MIPS_TLS_LDM", (MCFixupKind)Mips::fixup_Mips_TLSLDM) + .Case("R_MIPS_TLS_TPREL_HI16", (MCFixupKind)Mips::fixup_Mips_TPREL_HI) + .Case("R_MIPS_TLS_TPREL_LO16", (MCFixupKind)Mips::fixup_Mips_TPREL_LO) + .Case("R_MICROMIPS_CALL16", (MCFixupKind)Mips::fixup_MICROMIPS_CALL16) + .Case("R_MICROMIPS_GOT_DISP", (MCFixupKind)Mips::fixup_MICROMIPS_GOT_DISP) + .Case("R_MICROMIPS_GOT_PAGE", (MCFixupKind)Mips::fixup_MICROMIPS_GOT_PAGE) + .Case("R_MICROMIPS_GOT_OFST", (MCFixupKind)Mips::fixup_MICROMIPS_GOT_OFST) + .Case("R_MICROMIPS_GOT16", (MCFixupKind)Mips::fixup_MICROMIPS_GOT16) + .Case("R_MICROMIPS_TLS_GOTTPREL", (MCFixupKind)Mips::fixup_MICROMIPS_GOTTPREL) + .Case("R_MICROMIPS_TLS_DTPREL_HI16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_DTPREL_HI16) + .Case("R_MICROMIPS_TLS_DTPREL_LO16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_DTPREL_LO16) + .Case("R_MICROMIPS_TLS_GD", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_GD) + .Case("R_MICROMIPS_TLS_LDM", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_LDM) + .Case("R_MICROMIPS_TLS_TPREL_HI16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_TPREL_HI16) + .Case("R_MICROMIPS_TLS_TPREL_LO16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_TPREL_LO16) + .Case("R_MIPS_JALR", (MCFixupKind)Mips::fixup_Mips_JALR) + .Case("R_MICROMIPS_JALR", (MCFixupKind)Mips::fixup_MICROMIPS_JALR) + .Default(MCAsmBackend::getFixupKind(Name)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63f50b02cd845c04f7ac393ce134edd753ac4c6e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp @@ -0,0 +1,154 @@ +const MCFixupKindInfo &MipsAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { + const static MCFixupKindInfo LittleEndianInfos[] = { + { "fixup_Mips_16", 0, 16, 0 }, + { "fixup_Mips_32", 0, 32, 0 }, + { "fixup_Mips_REL32", 0, 32, 0 }, + { "fixup_Mips_26", 0, 26, 0 }, + { "fixup_Mips_HI16", 0, 16, 0 }, + { "fixup_Mips_LO16", 0, 16, 0 }, + { "fixup_Mips_GPREL16", 0, 16, 0 }, + { "fixup_Mips_LITERAL", 0, 16, 0 }, + { "fixup_Mips_GOT", 0, 16, 0 }, + { "fixup_Mips_PC16", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_CALL16", 0, 16, 0 }, + { "fixup_Mips_GPREL32", 0, 32, 0 }, + { "fixup_Mips_SHIFT5", 6, 5, 0 }, + { "fixup_Mips_SHIFT6", 6, 5, 0 }, + { "fixup_Mips_64", 0, 64, 0 }, + { "fixup_Mips_TLSGD", 0, 16, 0 }, + { "fixup_Mips_GOTTPREL", 0, 16, 0 }, + { "fixup_Mips_TPREL_HI", 0, 16, 0 }, + { "fixup_Mips_TPREL_LO", 0, 16, 0 }, + { "fixup_Mips_TLSLDM", 0, 16, 0 }, + { "fixup_Mips_DTPREL_HI", 0, 16, 0 }, + { "fixup_Mips_DTPREL_LO", 0, 16, 0 }, + { "fixup_Mips_Branch_PCRel", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_GPOFF_HI", 0, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_HI",0, 16, 0 }, + { "fixup_Mips_GPOFF_LO", 0, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_LO",0, 16, 0 }, + { "fixup_Mips_GOT_PAGE", 0, 16, 0 }, + { "fixup_Mips_GOT_OFST", 0, 16, 0 }, + { "fixup_Mips_GOT_DISP", 0, 16, 0 }, + { "fixup_Mips_HIGHER", 0, 16, 0 }, + { "fixup_MICROMIPS_HIGHER", 0, 16, 0 }, + { "fixup_Mips_HIGHEST", 0, 16, 0 }, + { "fixup_MICROMIPS_HIGHEST", 0, 16, 0 }, + { "fixup_Mips_GOT_HI16", 0, 16, 0 }, + { "fixup_Mips_GOT_LO16", 0, 16, 0 }, + { "fixup_Mips_CALL_HI16", 0, 16, 0 }, + { "fixup_Mips_CALL_LO16", 0, 16, 0 }, + { "fixup_Mips_PC18_S3", 0, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC19_S2", 0, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC21_S2", 0, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC26_S2", 0, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCHI16", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCLO16", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_26_S1", 0, 26, 0 }, + { "fixup_MICROMIPS_HI16", 0, 16, 0 }, + { "fixup_MICROMIPS_LO16", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT16", 0, 16, 0 }, + { "fixup_MICROMIPS_PC7_S1", 0, 7, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC10_S1", 0, 10, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC16_S1", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC26_S1", 0, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC19_S2", 0, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC18_S3", 0, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC21_S1", 0, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_CALL16", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT_DISP", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT_PAGE", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT_OFST", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_GD", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_LDM", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_HI16", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_LO16", 0, 16, 0 }, + { "fixup_MICROMIPS_GOTTPREL", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_HI16", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_LO16", 0, 16, 0 }, + { "fixup_Mips_SUB", 0, 64, 0 }, + { "fixup_MICROMIPS_SUB", 0, 64, 0 }, + { "fixup_Mips_JALR", 0, 32, 0 }, + { "fixup_MICROMIPS_JALR", 0, 32, 0 } + }; + static_assert(array_lengthof(LittleEndianInfos) == Mips::NumTargetFixupKinds, "Not all MIPS little endian fixup kinds added!"); + const static MCFixupKindInfo BigEndianInfos[] = { + { "fixup_Mips_16", 16, 16, 0 }, + { "fixup_Mips_32", 0, 32, 0 }, + { "fixup_Mips_REL32", 0, 32, 0 }, + { "fixup_Mips_26", 6, 26, 0 }, + { "fixup_Mips_HI16", 16, 16, 0 }, + { "fixup_Mips_LO16", 16, 16, 0 }, + { "fixup_Mips_GPREL16", 16, 16, 0 }, + { "fixup_Mips_LITERAL", 16, 16, 0 }, + { "fixup_Mips_GOT", 16, 16, 0 }, + { "fixup_Mips_PC16", 16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_CALL16", 16, 16, 0 }, + { "fixup_Mips_GPREL32", 0, 32, 0 }, + { "fixup_Mips_SHIFT5", 21, 5, 0 }, + { "fixup_Mips_SHIFT6", 21, 5, 0 }, + { "fixup_Mips_64", 0, 64, 0 }, + { "fixup_Mips_TLSGD", 16, 16, 0 }, + { "fixup_Mips_GOTTPREL", 16, 16, 0 }, + { "fixup_Mips_TPREL_HI", 16, 16, 0 }, + { "fixup_Mips_TPREL_LO", 16, 16, 0 }, + { "fixup_Mips_TLSLDM", 16, 16, 0 }, + { "fixup_Mips_DTPREL_HI", 16, 16, 0 }, + { "fixup_Mips_DTPREL_LO", 16, 16, 0 }, + { "fixup_Mips_Branch_PCRel",16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_GPOFF_HI", 16, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_HI", 16, 16, 0 }, + { "fixup_Mips_GPOFF_LO", 16, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_LO", 16, 16, 0 }, + { "fixup_Mips_GOT_PAGE", 16, 16, 0 }, + { "fixup_Mips_GOT_OFST", 16, 16, 0 }, + { "fixup_Mips_GOT_DISP", 16, 16, 0 }, + { "fixup_Mips_HIGHER", 16, 16, 0 }, + { "fixup_MICROMIPS_HIGHER", 16, 16, 0 }, + { "fixup_Mips_HIGHEST", 16, 16, 0 }, + { "fixup_MICROMIPS_HIGHEST",16, 16, 0 }, + { "fixup_Mips_GOT_HI16", 16, 16, 0 }, + { "fixup_Mips_GOT_LO16", 16, 16, 0 }, + { "fixup_Mips_CALL_HI16", 16, 16, 0 }, + { "fixup_Mips_CALL_LO16", 16, 16, 0 }, + { "fixup_Mips_PC18_S3", 14, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC19_S2", 13, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC21_S2", 11, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC26_S2", 6, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCHI16", 16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCLO16", 16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_26_S1", 6, 26, 0 }, + { "fixup_MICROMIPS_HI16", 16, 16, 0 }, + { "fixup_MICROMIPS_LO16", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT16", 16, 16, 0 }, + { "fixup_MICROMIPS_PC7_S1", 9, 7, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC10_S1", 6, 10, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC16_S1",16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC26_S1", 6, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC19_S2",13, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC18_S3",14, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC21_S1",11, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_CALL16", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT_DISP", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT_PAGE", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT_OFST", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_GD", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_LDM", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_HI16", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_LO16", 16, 16, 0 }, + { "fixup_MICROMIPS_GOTTPREL", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_HI16", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_LO16", 16, 16, 0 }, + { "fixup_Mips_SUB", 0, 64, 0 }, + { "fixup_MICROMIPS_SUB", 0, 64, 0 }, + { "fixup_Mips_JALR", 0, 32, 0 }, + { "fixup_MICROMIPS_JALR", 0, 32, 0 } + }; + static_assert(array_lengthof(BigEndianInfos) == Mips::NumTargetFixupKinds, "Not all MIPS big endian fixup kinds added!"); + if (Kind < FirstTargetFixupKind) + return MCAsmBackend::getFixupKindInfo(Kind); + assert(unsigned(Kind - FirstTargetFixupKind) < getNumFixupKinds() && "Invalid kind!"); + if (Endian == support::little) + return LittleEndianInfos[Kind - FirstTargetFixupKind]; + return BigEndianInfos[Kind - FirstTargetFixupKind]; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getTargetABI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..707ad9a7adfa30dd4cdbb7e4406787776f6689a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp @@ -0,0 +1,38 @@ +bool MipsAsmBackend::shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target) { + const unsigned FixupKind = Fixup.getKind(); + switch (FixupKind) { + default: + return false; + case Mips::fixup_Mips_CALL_HI16: + case Mips::fixup_Mips_CALL_LO16: + case Mips::fixup_Mips_CALL16: + case Mips::fixup_Mips_GOT: + case Mips::fixup_Mips_GOT_PAGE: + case Mips::fixup_Mips_GOT_OFST: + case Mips::fixup_Mips_GOT_DISP: + case Mips::fixup_Mips_GOT_HI16: + case Mips::fixup_Mips_GOT_LO16: + case Mips::fixup_Mips_GOTTPREL: + case Mips::fixup_Mips_DTPREL_HI: + case Mips::fixup_Mips_DTPREL_LO: + case Mips::fixup_Mips_TLSGD: + case Mips::fixup_Mips_TLSLDM: + case Mips::fixup_Mips_TPREL_HI: + case Mips::fixup_Mips_TPREL_LO: + case Mips::fixup_Mips_JALR: + case Mips::fixup_MICROMIPS_CALL16: + case Mips::fixup_MICROMIPS_GOT_DISP: + case Mips::fixup_MICROMIPS_GOT_PAGE: + case Mips::fixup_MICROMIPS_GOT_OFST: + case Mips::fixup_MICROMIPS_GOT16: + case Mips::fixup_MICROMIPS_GOTTPREL: + case Mips::fixup_MICROMIPS_TLS_DTPREL_HI16: + case Mips::fixup_MICROMIPS_TLS_DTPREL_LO16: + case Mips::fixup_MICROMIPS_TLS_GD: + case Mips::fixup_MICROMIPS_TLS_LDM: + case Mips::fixup_MICROMIPS_TLS_TPREL_HI16: + case Mips::fixup_MICROMIPS_TLS_TPREL_LO16: + case Mips::fixup_MICROMIPS_JALR: + return true; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/writeNopData.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/writeNopData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..624acfd8a76919adf6444d864bc4f6716cb589bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/writeNopData.cpp @@ -0,0 +1,4 @@ +bool MipsAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const { + OS.write_zeros(Count); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3dbf2eaf5993d301dc8ae0720319683c2860d3d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,28 @@ +MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple, const MCTargetOptions &Options) { + IsLittleEndian = TheTriple.isLittleEndian(); + MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TheTriple, "", Options); + if (TheTriple.isMIPS64() && !ABI.IsN32()) + CodePointerSize = CalleeSaveStackSlotSize = 8; + if (ABI.IsO32()) + PrivateGlobalPrefix = "$"; + else if (ABI.IsN32() || ABI.IsN64()) + PrivateGlobalPrefix = ".L"; + PrivateLabelPrefix = PrivateGlobalPrefix; + AlignmentIsInBytes = false; + Data16bitsDirective = "\t.2byte\t"; + Data32bitsDirective = "\t.4byte\t"; + Data64bitsDirective = "\t.8byte\t"; + CommentString = "#"; + ZeroDirective = "\t.space\t"; + GPRel32Directive = "\t.gpword\t"; + GPRel64Directive = "\t.gpdword\t"; + DTPRel32Directive = "\t.dtprelword\t"; + DTPRel64Directive = "\t.dtpreldword\t"; + TPRel32Directive = "\t.tprelword\t"; + TPRel64Directive = "\t.tpreldword\t"; + UseAssignmentForEHBegin = true; + SupportsDebugInformation = true; + ExceptionsType = ExceptionHandling::DwarfCFI; + DwarfRegNumForCFI = true; + HasMipsExpressions = true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/anchor.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f2b70e5a457a170f552b5d40557e5769efd425f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/anchor.cpp @@ -0,0 +1,2 @@ +void MipsMCAsmInfo::anchor() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/ABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/ABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/ABI.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/FenceField.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/FenceField.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/FenceField.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/II.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/II.cpp new file mode 100644 index 0000000000000000000000000000000000000000..daadf4bba15edd51d62b76f8a5f2922cd3dfb63b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/II.cpp @@ -0,0 +1,42 @@ +namespace MipsII { + enum TOF { + MO_NO_FLAG, + MO_GOT, + MO_GOT_CALL, + MO_GPREL, + MO_ABS_HI, + MO_ABS_LO, + MO_TLSGD, + MO_TLSLDM, + MO_DTPREL_HI, + MO_DTPREL_LO, + MO_GOTTPREL, + MO_TPREL_HI, + MO_TPREL_LO, + MO_GPOFF_HI, + MO_GPOFF_LO, + MO_GOT_DISP, + MO_GOT_PAGE, + MO_GOT_OFST, + MO_HIGHER, + MO_HIGHEST, + MO_GOT_HI16, + MO_GOT_LO16, + MO_CALL_HI16, + MO_CALL_LO16, + MO_JALR + }; + enum { + Pseudo = 0, + FrmR = 1, + FrmI = 2, + FrmJ = 3, + FrmFR = 4, + FrmFI = 5, + FrmOther = 6, + FormMask = 15, + IsCTI = 1 << 4, + HasForbiddenSlot = 1 << 5, + HasFCCRegOperand = 1 << 6 + }; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/OperandType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/OperandType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19db91538f2257839ecb2a14d1c12740760ec25d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/OperandType.cpp @@ -0,0 +1,5 @@ +enum OperandType : unsigned { + OPERAND_FIRST_MIPS_MEM_IMM = MCOI::OPERAND_FIRST_TARGET, + OPERAND_MEM_SIMM9 = OPERAND_FIRST_MIPS_MEM_IMM, + OPERAND_LAST_MIPS_MEM_IMM = OPERAND_MEM_SIMM9 +}; diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RoundingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/RoundingMode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/VLMUL.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/VLMUL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/VLMUL.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/VMTs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/VMTs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/VMTs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d6853920e499f673dd13662b1ce142b45fd480d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp @@ -0,0 +1,14 @@ +MipsABIInfo MipsABIInfo::computeTargetABI(const Triple &TT, StringRef CPU, const MCTargetOptions &Options) { + if (Options.getABIName().startswith("o32")) + return MipsABIInfo::O32(); + if (Options.getABIName().startswith("n32")) + return MipsABIInfo::N32(); + if (Options.getABIName().startswith("n64")) + return MipsABIInfo::N64(); + if (TT.getEnvironment() == llvm::Triple::GNUABIN32) + return MipsABIInfo::N32(); + assert(Options.getABIName().empty() && "Unknown ABI option for MIPS"); + if (TT.isMIPS64()) + return MipsABIInfo::N64(); + return MipsABIInfo::O32(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/getTargetABI.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/validate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/validate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/BaseInfo/validate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88f55f07a55f5d6e27aacf8f610dbab4444a2d20 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +MipsELFObjectWriter::MipsELFObjectWriter(uint8_t OSABI, bool HasRelocationAddend, bool Is64) : MCELFObjectTargetWriter(Is64, OSABI, ELF::EM_MIPS, HasRelocationAddend) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86e17ba3612af05cf31412d2f7693b9925ecc958 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp @@ -0,0 +1,6 @@ +std::unique_ptrllvm::createMipsELFObjectWriter(const Triple &TT, bool IsN32) { + uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS()); + bool IsN64 = TT.isArch64Bit() && !IsN32; + bool HasRelocationAddend = TT.isArch64Bit(); + return std::make_unique(OSABI, HasRelocationAddend, IsN64); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d8b4ed83f6a2bbf608dac997f973ba4486b27c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp @@ -0,0 +1,160 @@ +unsigned MipsELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const { + unsigned Kind = Fixup.getTargetKind(); + switch (Kind) { + case FK_NONE: + return ELF::R_MIPS_NONE; + case FK_Data_1: + Ctx.reportError(Fixup.getLoc(), "MIPS does not support one byte relocations"); + return ELF::R_MIPS_NONE; + case Mips::fixup_Mips_16: + case FK_Data_2: + return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; + case Mips::fixup_Mips_32: + case FK_Data_4: + return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32; + case Mips::fixup_Mips_64: + case FK_Data_8: + return IsPCRel ? setRTypes(ELF::R_MIPS_PC32, ELF::R_MIPS_64, ELF::R_MIPS_NONE) : (unsigned)ELF::R_MIPS_64; + } + if (IsPCRel) { + switch (Kind) { + case Mips::fixup_Mips_Branch_PCRel: + case Mips::fixup_Mips_PC16: + return ELF::R_MIPS_PC16; + case Mips::fixup_MICROMIPS_PC7_S1: + return ELF::R_MICROMIPS_PC7_S1; + case Mips::fixup_MICROMIPS_PC10_S1: + return ELF::R_MICROMIPS_PC10_S1; + case Mips::fixup_MICROMIPS_PC16_S1: + return ELF::R_MICROMIPS_PC16_S1; + case Mips::fixup_MICROMIPS_PC26_S1: + return ELF::R_MICROMIPS_PC26_S1; + case Mips::fixup_MICROMIPS_PC19_S2: + return ELF::R_MICROMIPS_PC19_S2; + case Mips::fixup_MICROMIPS_PC18_S3: + return ELF::R_MICROMIPS_PC18_S3; + case Mips::fixup_MICROMIPS_PC21_S1: + return ELF::R_MICROMIPS_PC21_S1; + case Mips::fixup_MIPS_PC19_S2: + return ELF::R_MIPS_PC19_S2; + case Mips::fixup_MIPS_PC18_S3: + return ELF::R_MIPS_PC18_S3; + case Mips::fixup_MIPS_PC21_S2: + return ELF::R_MIPS_PC21_S2; + case Mips::fixup_MIPS_PC26_S2: + return ELF::R_MIPS_PC26_S2; + case Mips::fixup_MIPS_PCHI16: + return ELF::R_MIPS_PCHI16; + case Mips::fixup_MIPS_PCLO16: + return ELF::R_MIPS_PCLO16; + } + llvm_unreachable("invalid PC-relative fixup kind!"); + } + switch (Kind) { + case FK_DTPRel_4: + return ELF::R_MIPS_TLS_DTPREL32; + case FK_DTPRel_8: + return ELF::R_MIPS_TLS_DTPREL64; + case FK_TPRel_4: + return ELF::R_MIPS_TLS_TPREL32; + case FK_TPRel_8: + return ELF::R_MIPS_TLS_TPREL64; + case FK_GPRel_4: + return setRTypes(ELF::R_MIPS_GPREL32, is64Bit() ? ELF::R_MIPS_64 : ELF::R_MIPS_NONE, ELF::R_MIPS_NONE); + case Mips::fixup_Mips_GPREL16: + return ELF::R_MIPS_GPREL16; + case Mips::fixup_Mips_26: + return ELF::R_MIPS_26; + case Mips::fixup_Mips_CALL16: + return ELF::R_MIPS_CALL16; + case Mips::fixup_Mips_GOT: + return ELF::R_MIPS_GOT16; + case Mips::fixup_Mips_HI16: + return ELF::R_MIPS_HI16; + case Mips::fixup_Mips_LO16: + return ELF::R_MIPS_LO16; + case Mips::fixup_Mips_TLSGD: + return ELF::R_MIPS_TLS_GD; + case Mips::fixup_Mips_GOTTPREL: + return ELF::R_MIPS_TLS_GOTTPREL; + case Mips::fixup_Mips_TPREL_HI: + return ELF::R_MIPS_TLS_TPREL_HI16; + case Mips::fixup_Mips_TPREL_LO: + return ELF::R_MIPS_TLS_TPREL_LO16; + case Mips::fixup_Mips_TLSLDM: + return ELF::R_MIPS_TLS_LDM; + case Mips::fixup_Mips_DTPREL_HI: + return ELF::R_MIPS_TLS_DTPREL_HI16; + case Mips::fixup_Mips_DTPREL_LO: + return ELF::R_MIPS_TLS_DTPREL_LO16; + case Mips::fixup_Mips_GOT_PAGE: + return ELF::R_MIPS_GOT_PAGE; + case Mips::fixup_Mips_GOT_OFST: + return ELF::R_MIPS_GOT_OFST; + case Mips::fixup_Mips_GOT_DISP: + return ELF::R_MIPS_GOT_DISP; + case Mips::fixup_Mips_GPOFF_HI: + return setRTypes(ELF::R_MIPS_GPREL16, ELF::R_MIPS_SUB, ELF::R_MIPS_HI16); + case Mips::fixup_MICROMIPS_GPOFF_HI: + return setRTypes(ELF::R_MICROMIPS_GPREL16, ELF::R_MICROMIPS_SUB, ELF::R_MICROMIPS_HI16); + case Mips::fixup_Mips_GPOFF_LO: + return setRTypes(ELF::R_MIPS_GPREL16, ELF::R_MIPS_SUB, ELF::R_MIPS_LO16); + case Mips::fixup_MICROMIPS_GPOFF_LO: + return setRTypes(ELF::R_MICROMIPS_GPREL16, ELF::R_MICROMIPS_SUB, ELF::R_MICROMIPS_LO16); + case Mips::fixup_Mips_HIGHER: + return ELF::R_MIPS_HIGHER; + case Mips::fixup_Mips_HIGHEST: + return ELF::R_MIPS_HIGHEST; + case Mips::fixup_Mips_SUB: + return ELF::R_MIPS_SUB; + case Mips::fixup_Mips_GOT_HI16: + return ELF::R_MIPS_GOT_HI16; + case Mips::fixup_Mips_GOT_LO16: + return ELF::R_MIPS_GOT_LO16; + case Mips::fixup_Mips_CALL_HI16: + return ELF::R_MIPS_CALL_HI16; + case Mips::fixup_Mips_CALL_LO16: + return ELF::R_MIPS_CALL_LO16; + case Mips::fixup_MICROMIPS_26_S1: + return ELF::R_MICROMIPS_26_S1; + case Mips::fixup_MICROMIPS_HI16: + return ELF::R_MICROMIPS_HI16; + case Mips::fixup_MICROMIPS_LO16: + return ELF::R_MICROMIPS_LO16; + case Mips::fixup_MICROMIPS_GOT16: + return ELF::R_MICROMIPS_GOT16; + case Mips::fixup_MICROMIPS_CALL16: + return ELF::R_MICROMIPS_CALL16; + case Mips::fixup_MICROMIPS_GOT_DISP: + return ELF::R_MICROMIPS_GOT_DISP; + case Mips::fixup_MICROMIPS_GOT_PAGE: + return ELF::R_MICROMIPS_GOT_PAGE; + case Mips::fixup_MICROMIPS_GOT_OFST: + return ELF::R_MICROMIPS_GOT_OFST; + case Mips::fixup_MICROMIPS_TLS_GD: + return ELF::R_MICROMIPS_TLS_GD; + case Mips::fixup_MICROMIPS_TLS_LDM: + return ELF::R_MICROMIPS_TLS_LDM; + case Mips::fixup_MICROMIPS_TLS_DTPREL_HI16: + return ELF::R_MICROMIPS_TLS_DTPREL_HI16; + case Mips::fixup_MICROMIPS_TLS_DTPREL_LO16: + return ELF::R_MICROMIPS_TLS_DTPREL_LO16; + case Mips::fixup_MICROMIPS_GOTTPREL: + return ELF::R_MICROMIPS_TLS_GOTTPREL; + case Mips::fixup_MICROMIPS_TLS_TPREL_HI16: + return ELF::R_MICROMIPS_TLS_TPREL_HI16; + case Mips::fixup_MICROMIPS_TLS_TPREL_LO16: + return ELF::R_MICROMIPS_TLS_TPREL_LO16; + case Mips::fixup_MICROMIPS_SUB: + return ELF::R_MICROMIPS_SUB; + case Mips::fixup_MICROMIPS_HIGHER: + return ELF::R_MICROMIPS_HIGHER; + case Mips::fixup_MICROMIPS_HIGHEST: + return ELF::R_MICROMIPS_HIGHEST; + case Mips::fixup_Mips_JALR: + return ELF::R_MIPS_JALR; + case Mips::fixup_MICROMIPS_JALR: + return ELF::R_MICROMIPS_JALR; + } + llvm_unreachable("invalid fixup kind!"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f531ea4250537c4a6213a42e7766c1c17828d3f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp @@ -0,0 +1,130 @@ +bool MipsELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &Sym, unsigned Type) const { + if (!isUInt<8>(Type)) + return needsRelocateWithSymbol(Sym, Type & 0xff) || needsRelocateWithSymbol(Sym, (Type >> 8) & 0xff) || needsRelocateWithSymbol(Sym, (Type >> 16) & 0xff); + switch (Type) { + default: + errs() << Type << "\n"; + llvm_unreachable("Unexpected relocation"); + return true; + case ELF::R_MIPS_NONE: + return false; + case ELF::R_MIPS_GOT16: + case ELF::R_MIPS16_GOT16: + case ELF::R_MICROMIPS_GOT16: + case ELF::R_MIPS_HIGHER: + case ELF::R_MIPS_HIGHEST: + case ELF::R_MIPS_HI16: + case ELF::R_MIPS16_HI16: + case ELF::R_MICROMIPS_HI16: + case ELF::R_MIPS_LO16: + case ELF::R_MIPS16_LO16: + case ELF::R_MICROMIPS_LO16: + if (cast(Sym).getOther() & ELF::STO_MIPS_MICROMIPS) + return true; + return false; + case ELF::R_MIPS_GOT_PAGE: + case ELF::R_MICROMIPS_GOT_PAGE: + case ELF::R_MIPS_GOT_OFST: + case ELF::R_MICROMIPS_GOT_OFST: + case ELF::R_MIPS_16: + case ELF::R_MIPS_32: + case ELF::R_MIPS_GPREL32: + if (cast(Sym).getOther() & ELF::STO_MIPS_MICROMIPS) + return true; + LLVM_FALLTHROUGH; + case ELF::R_MIPS_26: + case ELF::R_MIPS_64: + case ELF::R_MIPS_GPREL16: + case ELF::R_MIPS_PC16: + case ELF::R_MIPS_SUB: + return false; + case ELF::R_MIPS_REL32: + case ELF::R_MIPS_LITERAL: + case ELF::R_MIPS_CALL16: + case ELF::R_MIPS_SHIFT5: + case ELF::R_MIPS_SHIFT6: + case ELF::R_MIPS_GOT_DISP: + case ELF::R_MIPS_GOT_HI16: + case ELF::R_MIPS_GOT_LO16: + case ELF::R_MIPS_INSERT_A: + case ELF::R_MIPS_INSERT_B: + case ELF::R_MIPS_DELETE: + case ELF::R_MIPS_CALL_HI16: + case ELF::R_MIPS_CALL_LO16: + case ELF::R_MIPS_SCN_DISP: + case ELF::R_MIPS_REL16: + case ELF::R_MIPS_ADD_IMMEDIATE: + case ELF::R_MIPS_PJUMP: + case ELF::R_MIPS_RELGOT: + case ELF::R_MIPS_JALR: + case ELF::R_MIPS_TLS_DTPMOD32: + case ELF::R_MIPS_TLS_DTPREL32: + case ELF::R_MIPS_TLS_DTPMOD64: + case ELF::R_MIPS_TLS_DTPREL64: + case ELF::R_MIPS_TLS_GD: + case ELF::R_MIPS_TLS_LDM: + case ELF::R_MIPS_TLS_DTPREL_HI16: + case ELF::R_MIPS_TLS_DTPREL_LO16: + case ELF::R_MIPS_TLS_GOTTPREL: + case ELF::R_MIPS_TLS_TPREL32: + case ELF::R_MIPS_TLS_TPREL64: + case ELF::R_MIPS_TLS_TPREL_HI16: + case ELF::R_MIPS_TLS_TPREL_LO16: + case ELF::R_MIPS_GLOB_DAT: + case ELF::R_MIPS_PC21_S2: + case ELF::R_MIPS_PC26_S2: + case ELF::R_MIPS_PC18_S3: + case ELF::R_MIPS_PC19_S2: + case ELF::R_MIPS_PCHI16: + case ELF::R_MIPS_PCLO16: + case ELF::R_MIPS_COPY: + case ELF::R_MIPS_JUMP_SLOT: + case ELF::R_MIPS_NUM: + case ELF::R_MIPS_PC32: + case ELF::R_MIPS_EH: + case ELF::R_MICROMIPS_26_S1: + case ELF::R_MICROMIPS_GPREL16: + case ELF::R_MICROMIPS_LITERAL: + case ELF::R_MICROMIPS_PC7_S1: + case ELF::R_MICROMIPS_PC10_S1: + case ELF::R_MICROMIPS_PC16_S1: + case ELF::R_MICROMIPS_CALL16: + case ELF::R_MICROMIPS_GOT_DISP: + case ELF::R_MICROMIPS_GOT_HI16: + case ELF::R_MICROMIPS_GOT_LO16: + case ELF::R_MICROMIPS_SUB: + case ELF::R_MICROMIPS_HIGHER: + case ELF::R_MICROMIPS_HIGHEST: + case ELF::R_MICROMIPS_CALL_HI16: + case ELF::R_MICROMIPS_CALL_LO16: + case ELF::R_MICROMIPS_SCN_DISP: + case ELF::R_MICROMIPS_JALR: + case ELF::R_MICROMIPS_HI0_LO16: + case ELF::R_MICROMIPS_TLS_GD: + case ELF::R_MICROMIPS_TLS_LDM: + case ELF::R_MICROMIPS_TLS_DTPREL_HI16: + case ELF::R_MICROMIPS_TLS_DTPREL_LO16: + case ELF::R_MICROMIPS_TLS_GOTTPREL: + case ELF::R_MICROMIPS_TLS_TPREL_HI16: + case ELF::R_MICROMIPS_TLS_TPREL_LO16: + case ELF::R_MICROMIPS_GPREL7_S2: + case ELF::R_MICROMIPS_PC23_S2: + case ELF::R_MICROMIPS_PC21_S1: + case ELF::R_MICROMIPS_PC26_S1: + case ELF::R_MICROMIPS_PC18_S3: + case ELF::R_MICROMIPS_PC19_S2: + return true; + case ELF::R_MIPS16_26: + case ELF::R_MIPS16_GPREL: + case ELF::R_MIPS16_CALL16: + case ELF::R_MIPS16_TLS_GD: + case ELF::R_MIPS16_TLS_LDM: + case ELF::R_MIPS16_TLS_DTPREL_HI16: + case ELF::R_MIPS16_TLS_DTPREL_LO16: + case ELF::R_MIPS16_TLS_GOTTPREL: + case ELF::R_MIPS16_TLS_TPREL_HI16: + case ELF::R_MIPS16_TLS_TPREL_LO16: + llvm_unreachable("Unsupported MIPS16 relocation"); + return true; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/AttributeType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/AttributeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/AttributeType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dba92c27146b58cdb0e204902db70262196e9b1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp @@ -0,0 +1,34 @@ +MipsTargetELFStreamer::MipsTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI) : MipsTargetStreamer(S), MicroMipsEnabled(false), STI(STI) { + MCAssembler &MCA = getStreamer().getAssembler(); + Pic = MCA.getContext().getObjectFileInfo()->isPositionIndependent(); + const FeatureBitset &Features = STI.getFeatureBits(); + unsigned EFlags = MCA.getELFHeaderEFlags(); + ABI = MipsABIInfo(STI.getTargetTriple().getArch() == Triple::ArchType::mipsel || STI.getTargetTriple().getArch() == Triple::ArchType::mips ? MipsABIInfo::O32() : MipsABIInfo::N64()); + if (Features[Mips::FeatureMips64r6]) + EFlags |= ELF::EF_MIPS_ARCH_64R6; + else if (Features[Mips::FeatureMips64r2] || Features[Mips::FeatureMips64r3] || Features[Mips::FeatureMips64r5]) + EFlags |= ELF::EF_MIPS_ARCH_64R2; + else if (Features[Mips::FeatureMips64]) + EFlags |= ELF::EF_MIPS_ARCH_64; + else if (Features[Mips::FeatureMips5]) + EFlags |= ELF::EF_MIPS_ARCH_5; + else if (Features[Mips::FeatureMips4]) + EFlags |= ELF::EF_MIPS_ARCH_4; + else if (Features[Mips::FeatureMips3]) + EFlags |= ELF::EF_MIPS_ARCH_3; + else if (Features[Mips::FeatureMips32r6]) + EFlags |= ELF::EF_MIPS_ARCH_32R6; + else if (Features[Mips::FeatureMips32r2] || Features[Mips::FeatureMips32r3] || Features[Mips::FeatureMips32r5]) + EFlags |= ELF::EF_MIPS_ARCH_32R2; + else if (Features[Mips::FeatureMips32]) + EFlags |= ELF::EF_MIPS_ARCH_32; + else if (Features[Mips::FeatureMips2]) + EFlags |= ELF::EF_MIPS_ARCH_2; + else + EFlags |= ELF::EF_MIPS_ARCH_1; + if (Features[Mips::FeatureCnMips]) + EFlags |= ELF::EF_MIPS_MACH_OCTEON; + if (Features[Mips::FeatureNaN2008]) + EFlags |= ELF::EF_MIPS_NAN2008; + MCA.setELFHeaderEFlags(EFlags); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/getStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/getStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..169a904a234aa96ead39b9536240237025564fdf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/getStreamer.cpp @@ -0,0 +1,3 @@ +MCELFStreamer &MipsTargetELFStreamer::getStreamer() { + return static_cast(Streamer); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/FixupKind/enumFixups.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/FixupKind/enumFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d35d8d0bcb890e7cd11ff4ce19ee49ce8fd56641 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/FixupKind/enumFixups.cpp @@ -0,0 +1,74 @@ +enum Fixups { + fixup_Mips_16 = FirstTargetFixupKind, + fixup_Mips_32, + fixup_Mips_REL32, + fixup_Mips_26, + fixup_Mips_HI16, + fixup_Mips_LO16, + fixup_Mips_GPREL16, + fixup_Mips_LITERAL, + fixup_Mips_GOT, + fixup_Mips_PC16, + fixup_Mips_CALL16, + fixup_Mips_GPREL32, + fixup_Mips_SHIFT5, + fixup_Mips_SHIFT6, + fixup_Mips_64, + fixup_Mips_TLSGD, + fixup_Mips_GOTTPREL, + fixup_Mips_TPREL_HI, + fixup_Mips_TPREL_LO, + fixup_Mips_TLSLDM, + fixup_Mips_DTPREL_HI, + fixup_Mips_DTPREL_LO, + fixup_Mips_Branch_PCRel, + fixup_Mips_GPOFF_HI, + fixup_MICROMIPS_GPOFF_HI, + fixup_Mips_GPOFF_LO, + fixup_MICROMIPS_GPOFF_LO, + fixup_Mips_GOT_PAGE, + fixup_Mips_GOT_OFST, + fixup_Mips_GOT_DISP, + fixup_Mips_HIGHER, + fixup_MICROMIPS_HIGHER, + fixup_Mips_HIGHEST, + fixup_MICROMIPS_HIGHEST, + fixup_Mips_GOT_HI16, + fixup_Mips_GOT_LO16, + fixup_Mips_CALL_HI16, + fixup_Mips_CALL_LO16, + fixup_MIPS_PC18_S3, + fixup_MIPS_PC19_S2, + fixup_MIPS_PC21_S2, + fixup_MIPS_PC26_S2, + fixup_MIPS_PCHI16, + fixup_MIPS_PCLO16, + fixup_MICROMIPS_26_S1, + fixup_MICROMIPS_HI16, + fixup_MICROMIPS_LO16, + fixup_MICROMIPS_GOT16, + fixup_MICROMIPS_PC7_S1, + fixup_MICROMIPS_PC10_S1, + fixup_MICROMIPS_PC16_S1, + fixup_MICROMIPS_PC26_S1, + fixup_MICROMIPS_PC19_S2, + fixup_MICROMIPS_PC18_S3, + fixup_MICROMIPS_PC21_S1, + fixup_MICROMIPS_CALL16, + fixup_MICROMIPS_GOT_DISP, + fixup_MICROMIPS_GOT_PAGE, + fixup_MICROMIPS_GOT_OFST, + fixup_MICROMIPS_TLS_GD, + fixup_MICROMIPS_TLS_LDM, + fixup_MICROMIPS_TLS_DTPREL_HI16, + fixup_MICROMIPS_TLS_DTPREL_LO16, + fixup_MICROMIPS_GOTTPREL, + fixup_MICROMIPS_TLS_TPREL_HI16, + fixup_MICROMIPS_TLS_TPREL_LO16, + fixup_Mips_SUB, + fixup_MICROMIPS_SUB, + fixup_Mips_JALR, + fixup_MICROMIPS_JALR, + LastTargetFixupKind, + NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind + }; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/InstPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/InstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c883a428f10b83a397704285295212b9d6aa78f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/InstPrinter.cpp @@ -0,0 +1,2 @@ +MipsInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) : MCInstPrinter(MAI, MII, MRI) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/getRegisterName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/getRegisterName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/getRegisterName.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6febf95d372d6ef3759047b96191a4f8d15d48d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c2e2fe2d155616e4b721b21af96e900ec321a28 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp @@ -0,0 +1,5 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printFRMArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printFRMArg.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printFenceArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printFenceArg.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70f5f37e80cc471496d5af941591d8998271fd72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printInst.cpp @@ -0,0 +1,41 @@ +void MipsInstPrinter::printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) { + switch (MI->getOpcode()) { + default: + break; + case Mips::RDHWR: + case Mips::RDHWR64: + O << "\t.set\tpush\n"; + O << "\t.set\tmips32r2\n"; + break; + case Mips::Save16: + O << "\tsave\t"; + printSaveRestore(MI, O); + O << " # 16 bit inst\n"; + return; + case Mips::SaveX16: + O << "\tsave\t"; + printSaveRestore(MI, O); + O << "\n"; + return; + case Mips::Restore16: + O << "\trestore\t"; + printSaveRestore(MI, O); + O << " # 16 bit inst\n"; + return; + case Mips::RestoreX16: + O << "\trestore\t"; + printSaveRestore(MI, O); + O << "\n"; + return; + } + if (!printAliasInstr(MI, Address, O) && !printAlias(*MI, O)) + printInstruction(MI, Address, O); + printAnnotation(O, Annot); + switch (MI->getOpcode()) { + default: + break; + case Mips::RDHWR: + case Mips::RDHWR64: + O << "\n\t.set\tpop"; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca8f19bc8f4f6fc50ae215ec71e28772be6a4589 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printOperand.cpp @@ -0,0 +1,13 @@ +void MipsInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) { + const MCOperand &Op = MI->getOperand(OpNo); + if (Op.isReg()) { + printRegName(O, Op.getReg()); + return; + } + if (Op.isImm()) { + O << formatImm(Op.getImm()); + return; + } + assert(Op.isExpr() && "unknown operand kind in printOperand"); + Op.getExpr()->print(O, &MAI, true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printRegName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printRegName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26b28de5ee26164ed0644e6397f6fe42a83f0610 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printRegName.cpp @@ -0,0 +1,3 @@ +void MipsInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { + OS << '$' << StringRef(getRegisterName(RegNo)).lower(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printVTypeI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/InstPrinter/printVTypeI.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d80f585e9e89d79aa6714d871030005b94ba0ecc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +MipsMCCodeEmitter(const MCInstrInfo &mcii, MCContext &Ctx_, bool IsLittle) : MCII(mcii), Ctx(Ctx_), IsLittleEndian(IsLittle) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..372156d0e033b36f8cdce99d9225b6cc7cd64e00 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp @@ -0,0 +1,3 @@ +MCCodeEmitter *createMipsMCCodeEmitterEL(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx) { + return new MipsMCCodeEmitter(MCII, Ctx, true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59427e05cfb3b9c5884cb26981fdac565f23caa6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp @@ -0,0 +1,52 @@ +void MipsMCCodeEmitter::encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + MCInst TmpInst = MI; + switch (MI.getOpcode()) { + case Mips::DSLL: + case Mips::DSRL: + case Mips::DSRA: + case Mips::DROTR: + LowerLargeShift(TmpInst); + break; + case Mips::BEQC: + case Mips::BNEC: + case Mips::BEQC64: + case Mips::BNEC64: + case Mips::BOVC: + case Mips::BOVC_MMR6: + case Mips::BNVC: + case Mips::BNVC_MMR6: + LowerCompactBranch(TmpInst); + } + unsigned long N = Fixups.size(); + uint32_t Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + const unsigned Opcode = TmpInst.getOpcode(); + if ((Opcode != Mips::NOP) && (Opcode != Mips::SLL) && (Opcode != Mips::SLL_MM) && (Opcode != Mips::SLL_MMR6) && !Binary) + llvm_unreachable("unimplemented opcode in encodeInstruction()"); + int NewOpcode = -1; + if (isMicroMips(STI)) { + if (isMips32r6(STI)) { + NewOpcode = Mips::MipsR62MicroMipsR6(Opcode, Mips::Arch_micromipsr6); + if (NewOpcode == -1) + NewOpcode = Mips::Std2MicroMipsR6(Opcode, Mips::Arch_micromipsr6); + } + else + NewOpcode = Mips::Std2MicroMips(Opcode, Mips::Arch_micromips); + if (NewOpcode == -1) + NewOpcode = Mips::Dsp2MicroMips(Opcode, Mips::Arch_mmdsp); + if (NewOpcode != -1) { + if (Fixups.size() > N) + Fixups.pop_back(); + TmpInst.setOpcode (NewOpcode); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + } + if (((MI.getOpcode() == Mips::MOVEP_MM) || (MI.getOpcode() == Mips::MOVEP_MMR6))) { + unsigned RegPair = getMovePRegPairOpValue(MI, 0, Fixups, STI); + Binary = (Binary & 0xFFFFFC7F) | (RegPair << 7); + } + } + const MCInstrDesc &Desc = MCII.get(TmpInst.getOpcode()); + unsigned Size = Desc.getSize(); + if (!Size) + llvm_unreachable("Desc.getSize() returns 0"); + emitInstruction(Binary, Size, STI, OS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb189232a33043c90a46e56fd801fda68c47150e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp @@ -0,0 +1,15 @@ +unsigned MipsMCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + if (MO.isReg()) { + unsigned Reg = MO.getReg(); + unsigned RegNo = Ctx.getRegisterInfo()->getEncodingValue(Reg); + return RegNo; + } + else if (MO.isImm()) { + return static_cast(MO.getImm()); + } + else if (MO.isFPImm()) { + return static_cast(APFloat(MO.getFPImm()).bitcastToAPInt().getHiBits(32).getLimitedValue()); + } + assert(MO.isExpr()); + return getExprOpValue(MO.getExpr(),Fixups, STI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/MCExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/MCExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ebc24eb5d0635cf958da238e89ee965268122ac9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/MCExpr.cpp @@ -0,0 +1,2 @@ +explicit MipsMCExpr(MipsExprKind Kind, const MCExpr *Expr) : Kind(Kind), Expr(Expr) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/classof1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/classof1.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/classof2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/classof2.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/create.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/create.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3094fed7f989b1117507901af1e6037af93072b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/create.cpp @@ -0,0 +1,3 @@ +const MipsMCExpr *MipsMCExpr::create(MipsMCExpr::MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx) { + return new (Ctx) MipsMCExpr(Kind, Expr); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/enumVariantKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/enumVariantKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27c457d66a9d950c263ecd8db1e0cc53834ab166 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/enumVariantKind.cpp @@ -0,0 +1,29 @@ +enum MipsExprKind { + MEK_None, + MEK_CALL_HI16, + MEK_CALL_LO16, + MEK_DTPREL, + MEK_DTPREL_HI, + MEK_DTPREL_LO, + MEK_GOT, + MEK_GOTTPREL, + MEK_GOT_CALL, + MEK_GOT_DISP, + MEK_GOT_HI16, + MEK_GOT_LO16, + MEK_GOT_OFST, + MEK_GOT_PAGE, + MEK_GPREL, + MEK_HI, + MEK_HIGHER, + MEK_HIGHEST, + MEK_LO, + MEK_NEG, + MEK_PCREL_HI16, + MEK_PCREL_LO16, + MEK_TLSGD, + MEK_TLSLDM, + MEK_TPREL_HI, + MEK_TPREL_LO, + MEK_Special, +}; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..670c710ada9b1fb33725c09e83b7683e32a4776f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp @@ -0,0 +1,62 @@ +bool MipsMCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const { + if (isGpOff()) { + const MCExpr *SubExpr = cast(cast(getSubExpr())->getSubExpr())->getSubExpr(); + if (!SubExpr->evaluateAsRelocatable(Res, Layout, Fixup)) + return false; + Res = MCValue::get(Res.getSymA(), Res.getSymB(), Res.getConstant(), MEK_Special); + return true; + } + if (!getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup)) + return false; + if (Res.getRefKind() != MCSymbolRefExpr::VK_None) + return false; + if (Res.isAbsolute() && Fixup == nullptr) { + int64_t AbsVal = Res.getConstant(); + switch (Kind) { + case MEK_None: + case MEK_Special: + llvm_unreachable("MEK_None and MEK_Special are invalid"); + case MEK_DTPREL: + return getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup); + case MEK_DTPREL_HI: + case MEK_DTPREL_LO: + case MEK_GOT: + case MEK_GOTTPREL: + case MEK_GOT_CALL: + case MEK_GOT_DISP: + case MEK_GOT_HI16: + case MEK_GOT_LO16: + case MEK_GOT_OFST: + case MEK_GOT_PAGE: + case MEK_GPREL: + case MEK_PCREL_HI16: + case MEK_PCREL_LO16: + case MEK_TLSGD: + case MEK_TLSLDM: + case MEK_TPREL_HI: + case MEK_TPREL_LO: + return false; + case MEK_LO: + case MEK_CALL_LO16: + AbsVal = SignExtend64<16>(AbsVal); + break; + case MEK_CALL_HI16: + case MEK_HI: + AbsVal = SignExtend64<16>((AbsVal + 0x8000) >> 16); + break; + case MEK_HIGHER: + AbsVal = SignExtend64<16>((AbsVal + 0x80008000LL) >> 32); + break; + case MEK_HIGHEST: + AbsVal = SignExtend64<16>((AbsVal + 0x800080008000LL) >> 48); + break; + case MEK_NEG: + AbsVal = -AbsVal; + break; + } + Res = MCValue::get(AbsVal); + return true; + } + Res = MCValue::get(Res.getSymA(), Res.getSymB(), Res.getConstant(), getKind()); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08da2eccf295202e12e9442a7e9eb5f68e318ec8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp @@ -0,0 +1,3 @@ +MCFragment *findAssociatedFragment() const override { + return getSubExpr()->findAssociatedFragment(); + } \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc1b15aad7b4dd5503f3f01be4930b6d0030989f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp @@ -0,0 +1,38 @@ +void MipsMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const { + switch (getKind()) { + case MEK_None: + case MEK_Special: + llvm_unreachable("MEK_None and MEK_Special are invalid"); + break; + case MEK_CALL_HI16: + case MEK_CALL_LO16: + case MEK_GOT: + case MEK_GOT_CALL: + case MEK_GOT_DISP: + case MEK_GOT_HI16: + case MEK_GOT_LO16: + case MEK_GOT_OFST: + case MEK_GOT_PAGE: + case MEK_GPREL: + case MEK_HI: + case MEK_HIGHER: + case MEK_HIGHEST: + case MEK_LO: + case MEK_NEG: + case MEK_PCREL_HI16: + case MEK_PCREL_LO16: + if (const MipsMCExpr *E = dyn_cast(getSubExpr())) + E->fixELFSymbolsInTLSFixups(Asm); + break; + case MEK_DTPREL: + case MEK_DTPREL_HI: + case MEK_DTPREL_LO: + case MEK_TLSLDM: + case MEK_TLSGD: + case MEK_GOTTPREL: + case MEK_TPREL_HI: + case MEK_TPREL_LO: + fixELFSymbolsInTLSFixupsImpl(getSubExpr(), Asm); + break; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e9ca0c40060014e6baba99f4f067c0ffd884676 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp @@ -0,0 +1,23 @@ +static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm) { + switch (Expr->getKind()) { + case MCExpr::Target: + fixELFSymbolsInTLSFixupsImpl(cast(Expr)->getSubExpr(), Asm); + break; + case MCExpr::Constant: + break; + case MCExpr::Binary: { + const MCBinaryExpr *BE = cast(Expr); + fixELFSymbolsInTLSFixupsImpl(BE->getLHS(), Asm); + fixELFSymbolsInTLSFixupsImpl(BE->getRHS(), Asm); + break; + } + case MCExpr::SymbolRef: { + const MCSymbolRefExpr &SymRef = *cast(Expr); + cast(SymRef.getSymbol()).setType(ELF::STT_TLS); + break; + } + case MCExpr::Unary: + fixELFSymbolsInTLSFixupsImpl(cast(Expr)->getSubExpr(), Asm); + break; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fca267923e392a3304df0e777f53b17ec30c814 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getKind.cpp @@ -0,0 +1,3 @@ +MipsExprKind getKind() const { + return Kind; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getSubExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getSubExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c70598c07f1d0625d598037483c5a146ef4feaa5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getSubExpr.cpp @@ -0,0 +1,3 @@ +const MCExpr *getSubExpr() const { + return Expr; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getVariantKindName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getVariantKindName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/getVariantKindName.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/printImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/printImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47538cb3613642553049ed964b24bf4d4b25031d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/printImpl.cpp @@ -0,0 +1,90 @@ +void MipsMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const { + int64_t AbsVal; + switch (Kind) { + case MEK_None: + case MEK_Special: + llvm_unreachable("MEK_None and MEK_Special are invalid"); + break; + case MEK_DTPREL: + getSubExpr()->print(OS, MAI, true); + return; + case MEK_CALL_HI16: + OS << "%call_hi"; + break; + case MEK_CALL_LO16: + OS << "%call_lo"; + break; + case MEK_DTPREL_HI: + OS << "%dtprel_hi"; + break; + case MEK_DTPREL_LO: + OS << "%dtprel_lo"; + break; + case MEK_GOT: + OS << "%got"; + break; + case MEK_GOTTPREL: + OS << "%gottprel"; + break; + case MEK_GOT_CALL: + OS << "%call16"; + break; + case MEK_GOT_DISP: + OS << "%got_disp"; + break; + case MEK_GOT_HI16: + OS << "%got_hi"; + break; + case MEK_GOT_LO16: + OS << "%got_lo"; + break; + case MEK_GOT_PAGE: + OS << "%got_page"; + break; + case MEK_GOT_OFST: + OS << "%got_ofst"; + break; + case MEK_GPREL: + OS << "%gp_rel"; + break; + case MEK_HI: + OS << "%hi"; + break; + case MEK_HIGHER: + OS << "%higher"; + break; + case MEK_HIGHEST: + OS << "%highest"; + break; + case MEK_LO: + OS << "%lo"; + break; + case MEK_NEG: + OS << "%neg"; + break; + case MEK_PCREL_HI16: + OS << "%pcrel_hi"; + break; + case MEK_PCREL_LO16: + OS << "%pcrel_lo"; + break; + case MEK_TLSGD: + OS << "%tlsgd"; + break; + case MEK_TLSLDM: + OS << "%tlsldm"; + break; + case MEK_TPREL_HI: + OS << "%tprel_hi"; + break; + case MEK_TPREL_LO: + OS << "%tprel_lo"; + break; + } + OS << '('; + if (Expr->evaluateAsAbsolute(AbsVal)) + OS << AbsVal; + else + Expr->print(OS, MAI, true); + OS << ')'; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8372a7ff589eca544f1df8088f54e8b8b2b114fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp @@ -0,0 +1,3 @@ +void MipsMCExpr::visitUsedExpr(MCStreamer &Streamer) const { + Streamer.visitUsedExpr(*getSubExpr()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5658244ea718376f3d69b7fbc49854fa42668962 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp @@ -0,0 +1,2 @@ +MipsMCInstrAnalysis(const MCInstrInfo *Info) : MCInstrAnalysis(Info) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b01b2aad777f0e33601f9c86bac72b81a8343d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,19 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetMC() { + for (Target *T : {&getTheMipsTarget(), &getTheMipselTarget(), &getTheMips64Target(), &getTheMips64elTarget()}) { + RegisterMCAsmInfoFn X(*T, createMipsMCAsmInfo); + TargetRegistry::RegisterMCInstrInfo(*T, createMipsMCInstrInfo); + TargetRegistry::RegisterMCRegInfo(*T, createMipsMCRegisterInfo); + TargetRegistry::RegisterELFStreamer(*T, createMCStreamer); + TargetRegistry::RegisterAsmTargetStreamer(*T, createMipsAsmTargetStreamer); + TargetRegistry::RegisterNullTargetStreamer(*T, createMipsNullTargetStreamer); + TargetRegistry::RegisterMCSubtargetInfo(*T, createMipsMCSubtargetInfo); + TargetRegistry::RegisterMCInstrAnalysis(*T, createMipsMCInstrAnalysis); + TargetRegistry::RegisterMCInstPrinter(*T, createMipsMCInstPrinter); + TargetRegistry::RegisterObjectTargetStreamer(*T, createMipsObjectTargetStreamer); + TargetRegistry::RegisterMCAsmBackend(*T, createMipsAsmBackend); + } + for (Target *T : {&getTheMipsTarget(), &getTheMips64Target()}) + TargetRegistry::RegisterMCCodeEmitter(*T, createMipsMCCodeEmitterEB); + for (Target *T : {&getTheMipselTarget(), &getTheMips64elTarget()}) + TargetRegistry::RegisterMCCodeEmitter(*T, createMipsMCCodeEmitterEL); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98ebbf2d49c4647aed8ecd64155f39e30e2d242a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createMipsAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool isVerboseAsm) { + return new MipsTargetAsmStreamer(S, OS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2a5cba504ed7a086ff506e9d8e6bc2f4fde5991 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp @@ -0,0 +1,3 @@ +static MCInstrAnalysis *createMipsMCInstrAnalysis(const MCInstrInfo *Info) { + return new MipsMCInstrAnalysis(Info); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..837b9167e024dfc0068281dbe50fc9ad3064ca21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,7 @@ +static MCAsmInfo *createMipsMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options) { + MCAsmInfo *MAI = new MipsMCAsmInfo(TT, Options); + unsigned SP = MRI.getDwarfRegNum(Mips::SP, true); + MCCFIInstruction Inst = MCCFIInstruction::createDefCfaRegister(nullptr, SP); + MAI->addInitialFrameState(Inst); + return MAI; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..df05a3cab536755996ee2967e89aee556fc9d7aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp @@ -0,0 +1,3 @@ +static MCInstPrinter *createMipsMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) { + return new MipsInstPrinter(MAI, MII, MRI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d50ca24c8cac1fc0d6821b37c8cea1728525d7a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,5 @@ +static MCInstrInfo *createMipsMCInstrInfo() { + MCInstrInfo *X = new MCInstrInfo(); + InitMipsMCInstrInfo(X); + return X; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39b142645d1a74904b92b3d82dd3360575145767 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,5 @@ +static MCRegisterInfo *createMipsMCRegisterInfo(const Triple &TT) { + MCRegisterInfo *X = new MCRegisterInfo(); + InitMipsMCRegisterInfo(X, Mips::RA); + return X; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c05371de5a90f36670a3dbf3f15208b2ffbee21f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,4 @@ +static MCSubtargetInfo *createMipsMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { + CPU = MIPS_MC::selectMipsCPU(TT, CPU); + return createMipsMCSubtargetInfoImpl(TT, CPU, CPU, FS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf2f5e7108d8aa4cf1b43892131f3f21abecdd36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createMipsNullTargetStreamer(MCStreamer &S) { + return new MipsTargetStreamer(S); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10ee25d3af46cc3570b3f04fcd7ca01c661f6f81 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createMipsObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) { + return new MipsTargetELFStreamer(S, STI); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b84c6fb1759fb7beed2dd8b743d221a44f24ed8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp @@ -0,0 +1,18 @@ +bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size, uint64_t &Target) const override { + unsigned NumOps = Inst.getNumOperands(); + if (NumOps == 0) + return false; + switch (Info->get(Inst.getOpcode()).OpInfo[NumOps - 1].OperandType) { + case MCOI::OPERAND_UNKNOWN: + case MCOI::OPERAND_IMMEDIATE: { + uint64_t Region = Addr & ~uint64_t(0xfffffff); + Target = Region + Inst.getOperand(NumOps - 1).getImm(); + return true; + } + case MCOI::OPERAND_PCREL: + Target = Addr + Inst.getOperand(NumOps - 1).getImm(); + return true; + default: + return false; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/generateInstSeq.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/generateInstSeq.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/generateInstSeq.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/getIntMatCost.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/getIntMatCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/getIntMatCost.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/structInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/structInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/MatInt/structInst.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee43d3cfc20af7f5ce81d111b7c1eb270406abca --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp @@ -0,0 +1,2 @@ +MipsTargetAsmStreamer::MipsTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS) : MipsTargetStreamer(S), OS(OS) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6e217f82aee591bb534adeb6d7253244f98d5f09 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp @@ -0,0 +1,3 @@ +MipsTargetStreamer::MipsTargetStreamer(MCStreamer &S) : MCTargetStreamer(S), GPReg(Mips::GP), ModuleDirectiveAllowed(true) { + GPRInfoSet = FPRInfoSet = FrameInfoSet = false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finish.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finish.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d532f0f886a4e984cb24aea1e0b94a27c8f44b31 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finish.cpp @@ -0,0 +1,47 @@ +void MipsTargetELFStreamer::finish() { + MCAssembler &MCA = getStreamer().getAssembler(); + const MCObjectFileInfo &OFI = *MCA.getContext().getObjectFileInfo(); + MCSection &TextSection = *OFI.getTextSection(); + MCA.registerSection(TextSection); + MCSection &DataSection = *OFI.getDataSection(); + MCA.registerSection(DataSection); + MCSection &BSSSection = *OFI.getBSSSection(); + MCA.registerSection(BSSSection); + TextSection.setAlignment(Align(std::max(16u, TextSection.getAlignment()))); + DataSection.setAlignment(Align(std::max(16u, DataSection.getAlignment()))); + BSSSection.setAlignment(Align(std::max(16u, BSSSection.getAlignment()))); + if (RoundSectionSizes) { + MCStreamer &OS = getStreamer(); + for (MCSection &S : MCA) { + MCSectionELF &Section = static_cast(S); + unsigned Alignment = Section.getAlignment(); + if (Alignment) { + OS.SwitchSection(&Section); + if (Section.UseCodeAlign()) + OS.emitCodeAlignment(Alignment, Alignment); + else + OS.emitValueToAlignment(Alignment, 0, 1, Alignment); + } + } + } + const FeatureBitset &Features = STI.getFeatureBits(); + unsigned EFlags = MCA.getELFHeaderEFlags(); + if (getABI().IsO32()) + EFlags |= ELF::EF_MIPS_ABI_O32; + else if (getABI().IsN32()) + EFlags |= ELF::EF_MIPS_ABI2; + if (Features[Mips::FeatureGP64Bit]) { + if (getABI().IsO32()) + EFlags |= ELF::EF_MIPS_32BITMODE; /* Compatibility Mode */ + } + else if (Features[Mips::FeatureMips64r2] || Features[Mips::FeatureMips64]) + EFlags |= ELF::EF_MIPS_32BITMODE; + if (!Features[Mips::FeatureNoABICalls]) + EFlags |= ELF::EF_MIPS_CPIC; + if (Pic) + EFlags |= ELF::EF_MIPS_PIC | ELF::EF_MIPS_CPIC; + MCA.setELFHeaderEFlags(EFlags); + MipsELFStreamer &MEF = static_cast(Streamer); + MEF.EmitMipsOptionRecords(); + emitMipsAbiFlags(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c75653867ef66dd435b2ea7205493d823d8fbb30 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::NoVRegs); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77e28c673af82e311aad8811a99167bc300e4849 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp @@ -0,0 +1,49 @@ +bool MipsDelaySlotFiller::runOnMachineBasicBlock(MachineBasicBlock &MBB) { + bool Changed = false; + const MipsSubtarget &STI = MBB.getParent()->getSubtarget(); + bool InMicroMipsMode = STI.inMicroMipsMode(); + const MipsInstrInfo *TII = STI.getInstrInfo(); + for (Iter I = MBB.begin(); I != MBB.end(); ++I) { + if (!hasUnoccupiedSlot(&*I)) + continue; + if (!DisableDelaySlotFiller && (TM->getOptLevel() != CodeGenOpt::None) && !(InMicroMipsMode && STI.hasMips32r6())) { + bool Filled = false; + if (MipsCompactBranchPolicy.getValue() != CB_Always || !TII->getEquivalentCompactForm(I)) { + if (searchBackward(MBB, *I)) { + LLVM_DEBUG(dbgs() << DEBUG_TYPE ": found instruction for delay slot in backwards search.\n"); + Filled = true; + } + else if (I->isTerminator()) { + if (searchSuccBBs(MBB, I)) { + Filled = true; + LLVM_DEBUG(dbgs() << DEBUG_TYPE ": found instruction for delay slot in successor BB search.\n"); + } + } + else if (searchForward(MBB, I)) { + LLVM_DEBUG(dbgs() << DEBUG_TYPE ": found instruction for delay slot in forwards search.\n"); + Filled = true; + } + } + if (Filled) { + MachineBasicBlock::instr_iterator DSI = I.getInstrIterator(); + if (InMicroMipsMode && TII->getInstSizeInBytes(*std::next(DSI)) == 2 && DSI->isCall()) { + DSI->setDesc(TII->get(getEquivalentCallShort(DSI->getOpcode()))); + } + ++FilledSlots; + Changed = true; + continue; + } + } + if ((InMicroMipsMode || (STI.hasMips32r6() && MipsCompactBranchPolicy != CB_Never)) && TII->getEquivalentCompactForm(I)) { + I = replaceWithCompactBranch(MBB, I, I->getDebugLoc()); + Changed = true; + continue; + } + LLVM_DEBUG(dbgs() << DEBUG_TYPE << ": could not fill delay slot for "; I->dump()); + BuildMI(MBB, std::next(I), I->getDebugLoc(), TII->get(Mips::NOP)); + MIBundleBuilder(MBB, I, std::next(I, 2)); + ++FilledSlots; + Changed = true; + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e591da793babbe33581e2a658ea7c9a09e93dedb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool MipsExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..687810462f4fad5e6d8ad2e77820cb9e1a0aac2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp @@ -0,0 +1,60 @@ +bool MipsExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NMBB) { + bool Modified = false; + switch (MBBI->getOpcode()) { + case Mips::ATOMIC_CMP_SWAP_I32_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I64_POSTRA: + return expandAtomicCmpSwap(MBB, MBBI, NMBB); + case Mips::ATOMIC_CMP_SWAP_I8_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I16_POSTRA: + return expandAtomicCmpSwapSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_SWAP_I8_POSTRA: + case Mips::ATOMIC_SWAP_I16_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I8_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I16_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I8_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I16_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I8_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I16_POSTRA: + case Mips::ATOMIC_LOAD_AND_I8_POSTRA: + case Mips::ATOMIC_LOAD_AND_I16_POSTRA: + case Mips::ATOMIC_LOAD_OR_I8_POSTRA: + case Mips::ATOMIC_LOAD_OR_I16_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I8_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I16_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I16_POSTRA: + return expandAtomicBinOpSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_LOAD_ADD_I32_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I32_POSTRA: + case Mips::ATOMIC_LOAD_AND_I32_POSTRA: + case Mips::ATOMIC_LOAD_OR_I32_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I32_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I32_POSTRA: + case Mips::ATOMIC_SWAP_I32_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I32_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 4); + case Mips::ATOMIC_LOAD_ADD_I64_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I64_POSTRA: + case Mips::ATOMIC_LOAD_AND_I64_POSTRA: + case Mips::ATOMIC_LOAD_OR_I64_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I64_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I64_POSTRA: + case Mips::ATOMIC_SWAP_I64_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I64_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 8); + default: + return Modified; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e591da793babbe33581e2a658ea7c9a09e93dedb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool MipsExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..687810462f4fad5e6d8ad2e77820cb9e1a0aac2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp @@ -0,0 +1,60 @@ +bool MipsExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NMBB) { + bool Modified = false; + switch (MBBI->getOpcode()) { + case Mips::ATOMIC_CMP_SWAP_I32_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I64_POSTRA: + return expandAtomicCmpSwap(MBB, MBBI, NMBB); + case Mips::ATOMIC_CMP_SWAP_I8_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I16_POSTRA: + return expandAtomicCmpSwapSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_SWAP_I8_POSTRA: + case Mips::ATOMIC_SWAP_I16_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I8_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I16_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I8_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I16_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I8_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I16_POSTRA: + case Mips::ATOMIC_LOAD_AND_I8_POSTRA: + case Mips::ATOMIC_LOAD_AND_I16_POSTRA: + case Mips::ATOMIC_LOAD_OR_I8_POSTRA: + case Mips::ATOMIC_LOAD_OR_I16_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I8_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I16_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I16_POSTRA: + return expandAtomicBinOpSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_LOAD_ADD_I32_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I32_POSTRA: + case Mips::ATOMIC_LOAD_AND_I32_POSTRA: + case Mips::ATOMIC_LOAD_OR_I32_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I32_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I32_POSTRA: + case Mips::ATOMIC_SWAP_I32_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I32_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 4); + case Mips::ATOMIC_LOAD_ADD_I64_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I64_POSTRA: + case Mips::ATOMIC_LOAD_AND_I64_POSTRA: + case Mips::ATOMIC_LOAD_OR_I64_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I64_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I64_POSTRA: + case Mips::ATOMIC_SWAP_I64_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I64_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 8); + default: + return Modified; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bfd690f83227cf797a5122869053bdf61b88b080 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +RISCVExpandSDMA() : MachineFunctionPass(ID) { + initializeRISCVExpandSDMAPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e591da793babbe33581e2a658ea7c9a09e93dedb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool MipsExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..687810462f4fad5e6d8ad2e77820cb9e1a0aac2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp @@ -0,0 +1,60 @@ +bool MipsExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NMBB) { + bool Modified = false; + switch (MBBI->getOpcode()) { + case Mips::ATOMIC_CMP_SWAP_I32_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I64_POSTRA: + return expandAtomicCmpSwap(MBB, MBBI, NMBB); + case Mips::ATOMIC_CMP_SWAP_I8_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I16_POSTRA: + return expandAtomicCmpSwapSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_SWAP_I8_POSTRA: + case Mips::ATOMIC_SWAP_I16_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I8_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I16_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I8_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I16_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I8_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I16_POSTRA: + case Mips::ATOMIC_LOAD_AND_I8_POSTRA: + case Mips::ATOMIC_LOAD_AND_I16_POSTRA: + case Mips::ATOMIC_LOAD_OR_I8_POSTRA: + case Mips::ATOMIC_LOAD_OR_I16_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I8_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I16_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I16_POSTRA: + return expandAtomicBinOpSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_LOAD_ADD_I32_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I32_POSTRA: + case Mips::ATOMIC_LOAD_AND_I32_POSTRA: + case Mips::ATOMIC_LOAD_OR_I32_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I32_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I32_POSTRA: + case Mips::ATOMIC_SWAP_I32_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I32_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 4); + case Mips::ATOMIC_LOAD_ADD_I64_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I64_POSTRA: + case Mips::ATOMIC_LOAD_AND_I64_POSTRA: + case Mips::ATOMIC_LOAD_OR_I64_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I64_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I64_POSTRA: + case Mips::ATOMIC_SWAP_I64_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I64_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 8); + default: + return Modified; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa757aa1fd9eaedaca391e3d7e85b7cbdce96b27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +RISCVExpandSSR() : MachineFunctionPass(ID) { + initializeRISCVExpandSSRPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e591da793babbe33581e2a658ea7c9a09e93dedb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool MipsExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..687810462f4fad5e6d8ad2e77820cb9e1a0aac2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp @@ -0,0 +1,60 @@ +bool MipsExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NMBB) { + bool Modified = false; + switch (MBBI->getOpcode()) { + case Mips::ATOMIC_CMP_SWAP_I32_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I64_POSTRA: + return expandAtomicCmpSwap(MBB, MBBI, NMBB); + case Mips::ATOMIC_CMP_SWAP_I8_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I16_POSTRA: + return expandAtomicCmpSwapSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_SWAP_I8_POSTRA: + case Mips::ATOMIC_SWAP_I16_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I8_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I16_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I8_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I16_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I8_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I16_POSTRA: + case Mips::ATOMIC_LOAD_AND_I8_POSTRA: + case Mips::ATOMIC_LOAD_AND_I16_POSTRA: + case Mips::ATOMIC_LOAD_OR_I8_POSTRA: + case Mips::ATOMIC_LOAD_OR_I16_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I8_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I16_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I16_POSTRA: + return expandAtomicBinOpSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_LOAD_ADD_I32_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I32_POSTRA: + case Mips::ATOMIC_LOAD_AND_I32_POSTRA: + case Mips::ATOMIC_LOAD_OR_I32_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I32_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I32_POSTRA: + case Mips::ATOMIC_SWAP_I32_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I32_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 4); + case Mips::ATOMIC_LOAD_ADD_I64_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I64_POSTRA: + case Mips::ATOMIC_LOAD_AND_I64_POSTRA: + case Mips::ATOMIC_LOAD_OR_I64_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I64_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I64_POSTRA: + case Mips::ATOMIC_SWAP_I64_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I64_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 8); + default: + return Modified; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c75653867ef66dd435b2ea7205493d823d8fbb30 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::NoVRegs); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66c7b3864fbc88610507a3b57469c33cbe7067a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c17fd5a279439a187f60893c6e3615c047d045e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +PULPFixupHwLoops() : MachineFunctionPass(ID) { + initializePULPFixupHwLoopsPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b12c744298f9d869e8fc2ee963c1702dfb79d52e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp @@ -0,0 +1,4 @@ +//zmcorrectzm +FunctionPass *llvm::createPULPFixupHwLoops() { + return new PULPFixupHwLoops(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c75653867ef66dd435b2ea7205493d823d8fbb30 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::NoVRegs); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58d2e084d50b83358610cdea163f6b7531686fa5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp @@ -0,0 +1,3 @@ +PULPHardwareLoops() : MachineFunctionPass(ID) { + initializePULPHardwareLoopsPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..863945051646c9f1c5aa4d13b92798567cf74358 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp @@ -0,0 +1,4 @@ +//zmcorrectzm +FunctionPass *llvm::createPULPHardwareLoops() { + return new PULPHardwareLoops(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1dab4ca6570e40abe996369fb6a7b1dfa1b32b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const { + assert(isRegBase() && "Invalid base register access!"); + return Base.Reg; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1dab4ca6570e40abe996369fb6a7b1dfa1b32b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const { + assert(isRegBase() && "Invalid base register access!"); + return Base.Reg; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e028f1acc0adc990eaaa7cd33412bb583aa50693 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const override { + return Kind == k_Immediate; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d367df6e72a1916e56ea13412e32c693d1dd119b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const override { + return isGPRAsmReg() && RegIdx.Index == 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/print.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/print.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a57ba5865dbb3f7dd0933b0843eda5372b9d3171 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +SNITCHFrepLoops() : MachineFunctionPass(ID) { + initializeSNITCHFrepLoopsPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13afedbcaa1d50da9013e6346335c6c9abec58a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp @@ -0,0 +1,4 @@ +//zmcorrectzm +FunctionPass *createSNITCHFrepLoopsPass() { + return new SNITCHFrepLoops(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/findInductionRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/findInductionRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/findInductionRegister.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1dab4ca6570e40abe996369fb6a7b1dfa1b32b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const { + assert(isRegBase() && "Invalid base register access!"); + return Base.Reg; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1dab4ca6570e40abe996369fb6a7b1dfa1b32b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const { + assert(isRegBase() && "Invalid base register access!"); + return Base.Reg; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e028f1acc0adc990eaaa7cd33412bb583aa50693 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const override { + return Kind == k_Immediate; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d367df6e72a1916e56ea13412e32c693d1dd119b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const override { + return isGPRAsmReg() && RegIdx.Index == 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89ef265a73d366c9fe3f2c94f235af727e8b5dcd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +MipsInstrInfo::MipsInstrInfo(const MipsSubtarget &STI, unsigned UncondBr) : MipsGenInstrInfo(Mips::ADJCALLSTACKDOWN, Mips::ADJCALLSTACKUP), Subtarget(STI), UncondBrOpc(UncondBr) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..492da016718b9b6f818e0f34a01596e175c6affb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,5 @@ +bool MipsInstrInfo::analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, bool AllowModify) const { + SmallVector BranchInstrs; + BranchType BT = analyzeBranch(MBB, TBB, FBB, Cond, AllowModify, BranchInstrs); + return (BT == BT_None) || (BT == BT_Indirect); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5fc2c1a67373b362485a1ac80c16cbe10ca55a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,92 @@ +void MipsSEInstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc) const { + unsigned Opc = 0, ZeroReg = 0; + bool isMicroMips = Subtarget.inMicroMipsMode(); + if (Mips::GPR32RegClass.contains(DestReg)) { + if (Mips::GPR32RegClass.contains(SrcReg)) { + if (isMicroMips) + Opc = Mips::MOVE16_MM; + else + Opc = Mips::OR, ZeroReg = Mips::ZERO; + } + else if (Mips::CCRRegClass.contains(SrcReg)) + Opc = Mips::CFC1; + else if (Mips::FGR32RegClass.contains(SrcReg)) + Opc = Mips::MFC1; + else if (Mips::HI32RegClass.contains(SrcReg)) { + Opc = isMicroMips ? Mips::MFHI16_MM : Mips::MFHI; + SrcReg = 0; + } + else if (Mips::LO32RegClass.contains(SrcReg)) { + Opc = isMicroMips ? Mips::MFLO16_MM : Mips::MFLO; + SrcReg = 0; + } + else if (Mips::HI32DSPRegClass.contains(SrcReg)) + Opc = Mips::MFHI_DSP; + else if (Mips::LO32DSPRegClass.contains(SrcReg)) + Opc = Mips::MFLO_DSP; + else if (Mips::DSPCCRegClass.contains(SrcReg)) { + BuildMI(MBB, I, DL, get(Mips::RDDSP), DestReg).addImm(1 << 4).addReg(SrcReg, RegState::Implicit | getKillRegState(KillSrc)); + return; + } + else if (Mips::MSACtrlRegClass.contains(SrcReg)) + Opc = Mips::CFCMSA; + } + else if (Mips::GPR32RegClass.contains(SrcReg)) { + if (Mips::CCRRegClass.contains(DestReg)) + Opc = Mips::CTC1; + else if (Mips::FGR32RegClass.contains(DestReg)) + Opc = Mips::MTC1; + else if (Mips::HI32RegClass.contains(DestReg)) + Opc = Mips::MTHI, DestReg = 0; + else if (Mips::LO32RegClass.contains(DestReg)) + Opc = Mips::MTLO, DestReg = 0; + else if (Mips::HI32DSPRegClass.contains(DestReg)) + Opc = Mips::MTHI_DSP; + else if (Mips::LO32DSPRegClass.contains(DestReg)) + Opc = Mips::MTLO_DSP; + else if (Mips::DSPCCRegClass.contains(DestReg)) { + BuildMI(MBB, I, DL, get(Mips::WRDSP)).addReg(SrcReg, getKillRegState(KillSrc)).addImm(1 << 4).addReg(DestReg, RegState::ImplicitDefine); + return; + } + else if (Mips::MSACtrlRegClass.contains(DestReg)) { + BuildMI(MBB, I, DL, get(Mips::CTCMSA)).addReg(DestReg).addReg(SrcReg, getKillRegState(KillSrc)); + return; + } + } + else if (Mips::FGR32RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_S; + else if (Mips::AFGR64RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_D32; + else if (Mips::FGR64RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_D64; + else if (Mips::GPR64RegClass.contains(DestReg)) { + if (Mips::GPR64RegClass.contains(SrcReg)) + Opc = Mips::OR64, ZeroReg = Mips::ZERO_64; + else if (Mips::HI64RegClass.contains(SrcReg)) + Opc = Mips::MFHI64, SrcReg = 0; + else if (Mips::LO64RegClass.contains(SrcReg)) + Opc = Mips::MFLO64, SrcReg = 0; + else if (Mips::FGR64RegClass.contains(SrcReg)) + Opc = Mips::DMFC1; + } + else if (Mips::GPR64RegClass.contains(SrcReg)) { + if (Mips::HI64RegClass.contains(DestReg)) + Opc = Mips::MTHI64, DestReg = 0; + else if (Mips::LO64RegClass.contains(DestReg)) + Opc = Mips::MTLO64, DestReg = 0; + else if (Mips::FGR64RegClass.contains(DestReg)) + Opc = Mips::DMTC1; + } + else if (Mips::MSA128BRegClass.contains(DestReg)) { + if (Mips::MSA128BRegClass.contains(SrcReg)) + Opc = Mips::MOVE_V; + } + assert(Opc && "Cannot copy registers"); + MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(Opc)); + if (DestReg) + MIB.addReg(DestReg, RegState::Define); + if (SrcReg) + MIB.addReg(SrcReg, getKillRegState(KillSrc)); + if (ZeroReg) + MIB.addReg(ZeroReg); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..597c42a46327b8073dd001d24e93dda00be2781e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp @@ -0,0 +1,3 @@ +std::pair MipsInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { + return std::make_pair(TF, 0u); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6a73118f0d98feb321a30df73ba2e80992df4ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp @@ -0,0 +1,5 @@ +ArrayRef> MipsInstrInfo::getSerializableDirectMachineOperandTargetFlags() const { + using namespace MipsII; + static const std::pair Flags[] = {{MO_GOT, "mips-got"}, {MO_GOT_CALL, "mips-got-call"}, {MO_GPREL, "mips-gprel"}, {MO_ABS_HI, "mips-abs-hi"}, {MO_ABS_LO, "mips-abs-lo"}, {MO_TLSGD, "mips-tlsgd"}, {MO_TLSLDM, "mips-tlsldm"}, {MO_DTPREL_HI, "mips-dtprel-hi"}, {MO_DTPREL_LO, "mips-dtprel-lo"}, {MO_GOTTPREL, "mips-gottprel"}, {MO_TPREL_HI, "mips-tprel-hi"}, {MO_TPREL_LO, "mips-tprel-lo"}, {MO_GPOFF_HI, "mips-gpoff-hi"}, {MO_GPOFF_LO, "mips-gpoff-lo"}, {MO_GOT_DISP, "mips-got-disp"}, {MO_GOT_PAGE, "mips-got-page"}, {MO_GOT_OFST, "mips-got-ofst"}, {MO_HIGHER, "mips-higher"}, {MO_HIGHEST, "mips-highest"}, {MO_GOT_HI16, "mips-got-hi16"}, {MO_GOT_LO16, "mips-got-lo16"}, {MO_CALL_HI16, "mips-call-hi16"}, {MO_CALL_LO16, "mips-call-lo16"}, {MO_JALR, "mips-jalr"}}; + return makeArrayRef(Flags); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7aadd2573c6e9b7e1703c86ae78cd84d2f384d34 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,15 @@ +unsigned MipsInstrInfo::insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef Cond, const DebugLoc &DL, int *BytesAdded) const { + assert(TBB && "insertBranch must not be told to insert a fallthrough"); + assert(!BytesAdded && "code size not handled"); + assert((Cond.size() <= 3) && "# of Mips branch conditions must be <= 3!"); + if (FBB) { + BuildCondBr(MBB, TBB, DL, Cond); + BuildMI(&MBB, DL, get(UncondBrOpc)).addMBB(FBB); + return 2; + } + if (Cond.empty()) + BuildMI(&MBB, DL, get(UncondBrOpc)).addMBB(TBB); + else + BuildCondBr(MBB, TBB, DL, Cond); + return 1; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp new file mode 100644 index 0000000000000000000000000000000000000000..387646d147fa990d12248ab10485109553457415 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp @@ -0,0 +1,134 @@ +bool MipsInstrInfo::isBranchOffsetInRange(unsigned BranchOpc, int64_t BrOffset) const { + switch (BranchOpc) { + case Mips::B: + case Mips::BAL: + case Mips::BAL_BR: + case Mips::BAL_BR_MM: + case Mips::BC1F: + case Mips::BC1FL: + case Mips::BC1T: + case Mips::BC1TL: + case Mips::BEQ: case Mips::BEQ64: + case Mips::BEQL: + case Mips::BGEZ: case Mips::BGEZ64: + case Mips::BGEZL: + case Mips::BGEZAL: + case Mips::BGEZALL: + case Mips::BGTZ: case Mips::BGTZ64: + case Mips::BGTZL: + case Mips::BLEZ: case Mips::BLEZ64: + case Mips::BLEZL: + case Mips::BLTZ: case Mips::BLTZ64: + case Mips::BLTZL: + case Mips::BLTZAL: + case Mips::BLTZALL: + case Mips::BNE: case Mips::BNE64: + case Mips::BNEL: + return isInt<18>(BrOffset); + case Mips::B_MM: + case Mips::BC1F_MM: + case Mips::BC1T_MM: + case Mips::BEQ_MM: + case Mips::BGEZ_MM: + case Mips::BGEZAL_MM: + case Mips::BGTZ_MM: + case Mips::BLEZ_MM: + case Mips::BLTZ_MM: + case Mips::BLTZAL_MM: + case Mips::BNE_MM: + case Mips::BEQZC_MM: + case Mips::BNEZC_MM: + return isInt<17>(BrOffset); + case Mips::B16_MM: + return isInt<11>(BrOffset); + case Mips::BEQZ16_MM: + case Mips::BNEZ16_MM: + return isInt<8>(BrOffset); + case Mips::BALC: + case Mips::BC: + return isInt<28>(BrOffset); + case Mips::BC1EQZ: + case Mips::BC1NEZ: + case Mips::BC2EQZ: + case Mips::BC2NEZ: + case Mips::BEQC: case Mips::BEQC64: + case Mips::BNEC: case Mips::BNEC64: + case Mips::BGEC: case Mips::BGEC64: + case Mips::BGEUC: case Mips::BGEUC64: + case Mips::BGEZC: case Mips::BGEZC64: + case Mips::BGTZC: case Mips::BGTZC64: + case Mips::BLEZC: case Mips::BLEZC64: + case Mips::BLTC: case Mips::BLTC64: + case Mips::BLTUC: case Mips::BLTUC64: + case Mips::BLTZC: case Mips::BLTZC64: + case Mips::BNVC: + case Mips::BOVC: + case Mips::BGEZALC: + case Mips::BEQZALC: + case Mips::BGTZALC: + case Mips::BLEZALC: + case Mips::BLTZALC: + case Mips::BNEZALC: + return isInt<18>(BrOffset); + case Mips::BEQZC: case Mips::BEQZC64: + case Mips::BNEZC: case Mips::BNEZC64: + return isInt<23>(BrOffset); + case Mips::BC16_MMR6: + return isInt<11>(BrOffset); + case Mips::BEQZC16_MMR6: + case Mips::BNEZC16_MMR6: + return isInt<8>(BrOffset); + case Mips::BALC_MMR6: + case Mips::BC_MMR6: + return isInt<27>(BrOffset); + case Mips::BC1EQZC_MMR6: + case Mips::BC1NEZC_MMR6: + case Mips::BC2EQZC_MMR6: + case Mips::BC2NEZC_MMR6: + case Mips::BGEZALC_MMR6: + case Mips::BEQZALC_MMR6: + case Mips::BGTZALC_MMR6: + case Mips::BLEZALC_MMR6: + case Mips::BLTZALC_MMR6: + case Mips::BNEZALC_MMR6: + case Mips::BNVC_MMR6: + case Mips::BOVC_MMR6: + return isInt<17>(BrOffset); + case Mips::BEQC_MMR6: + case Mips::BNEC_MMR6: + case Mips::BGEC_MMR6: + case Mips::BGEUC_MMR6: + case Mips::BGEZC_MMR6: + case Mips::BGTZC_MMR6: + case Mips::BLEZC_MMR6: + case Mips::BLTC_MMR6: + case Mips::BLTUC_MMR6: + case Mips::BLTZC_MMR6: + return isInt<18>(BrOffset); + case Mips::BEQZC_MMR6: + case Mips::BNEZC_MMR6: + return isInt<23>(BrOffset); + case Mips::BPOSGE32: + return isInt<18>(BrOffset); + case Mips::BPOSGE32_MM: + case Mips::BPOSGE32C_MMR3: + return isInt<17>(BrOffset); + case Mips::BBIT0: + case Mips::BBIT032: + case Mips::BBIT1: + case Mips::BBIT132: + return isInt<18>(BrOffset); + case Mips::BZ_B: + case Mips::BZ_H: + case Mips::BZ_W: + case Mips::BZ_D: + case Mips::BZ_V: + case Mips::BNZ_B: + case Mips::BNZ_H: + case Mips::BNZ_W: + case Mips::BNZ_D: + case Mips::BNZ_V: + return isInt<18>(BrOffset); + } + llvm_unreachable("Unknown branch instruction!"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcd4b976e92def26b6c872ee0f07b832132ded3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp @@ -0,0 +1,17 @@ +Optional MipsSEInstrInfo::isCopyInstrImpl(const MachineInstr &MI) const { + bool isDSPControlWrite = false; + if (isReadOrWriteToDSPReg(MI, isDSPControlWrite)) { + if (!MI.getOperand(1).isImm() || MI.getOperand(1).getImm() != (1 << 4)) + return None; + else if (isDSPControlWrite) { + return DestSourcePair{MI.getOperand(2), MI.getOperand(0)}; + } + else { + return DestSourcePair{MI.getOperand(0), MI.getOperand(2)}; + } + } + else if (MI.isMoveReg() || isORCopyInst(MI)) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + return None; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2d8d63900cd69f173695b130359cfe1d18aa693 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,10 @@ +unsigned MipsSEInstrInfo::isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const { + unsigned Opc = MI.getOpcode(); + if ((Opc == Mips::LW) || (Opc == Mips::LD) || (Opc == Mips::LWC1) || (Opc == Mips::LDC1) || (Opc == Mips::LDC164)) { + if ((MI.getOperand(1).isFI()) && (MI.getOperand(2).isImm()) && (isZeroImm(MI.getOperand(2)))) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + return 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc4822b4dace5d5d62f234df92749f851e92acbc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp @@ -0,0 +1,3 @@ +None + + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..049c3f11016793dd29d3fb81bb7172132b37b96d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,11 @@ +unsigned MipsSEInstrInfo::isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const { + unsigned Opc = MI.getOpcode(); + if ((Opc == Mips::SW) || (Opc == Mips::SD) || (Opc == Mips::SWC1) || (Opc == Mips::SDC1) || (Opc == Mips::SDC164)) { + if ((MI.getOperand(1).isFI()) && (MI.getOperand(2).isImm()) && (isZeroImm(MI.getOperand(2)))) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + return 0; +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0dbe9a6a32e51bc601900a9635c3d6376933a144 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,62 @@ +void MipsSEInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register DestReg, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, int64_t Offset) const { + DebugLoc DL; + if (I != MBB.end()) DL = I->getDebugLoc(); + MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOLoad); + unsigned Opc = 0; + const Function &Func = MBB.getParent()->getFunction(); + bool ReqIndirectLoad = Func.hasFnAttribute("interrupt") && (DestReg == Mips::LO0 || DestReg == Mips::LO0_64 || DestReg == Mips::HI0 || DestReg == Mips::HI0_64); + if (Mips::GPR32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::GPR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::ACC64RegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC64; + else if (Mips::ACC64DSPRegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC64DSP; + else if (Mips::ACC128RegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC128; + else if (Mips::DSPCCRegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_CCOND_DSP; + else if (Mips::FGR32RegClass.hasSubClassEq(RC)) + Opc = Mips::LWC1; + else if (Mips::AFGR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LDC1; + else if (Mips::FGR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LDC164; + else if (TRI->isTypeLegalForClass(*RC, MVT::v16i8)) + Opc = Mips::LD_B; + else if (TRI->isTypeLegalForClass(*RC, MVT::v8i16) || TRI->isTypeLegalForClass(*RC, MVT::v8f16)) + Opc = Mips::LD_H; + else if (TRI->isTypeLegalForClass(*RC, MVT::v4i32) || TRI->isTypeLegalForClass(*RC, MVT::v4f32)) + Opc = Mips::LD_W; + else if (TRI->isTypeLegalForClass(*RC, MVT::v2i64) || TRI->isTypeLegalForClass(*RC, MVT::v2f64)) + Opc = Mips::LD_D; + else if (Mips::HI32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::HI64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::LO32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::LO64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::DSPRRegClass.hasSubClassEq(RC)) + Opc = Mips::LWDSP; + assert(Opc && "Register class not handled!"); + if (!ReqIndirectLoad) + BuildMI(MBB, I, DL, get(Opc), DestReg).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); + else { + unsigned Reg = Mips::K0; + unsigned LdOp = Mips::MTLO; + if (DestReg == Mips::HI0) + LdOp = Mips::MTHI; + if (Subtarget.getABI().ArePtrs64bit()) { + Reg = Mips::K0_64; + if (DestReg == Mips::HI0_64) + LdOp = Mips::MTHI64; + else + LdOp = Mips::MTLO64; + } + BuildMI(MBB, I, DL, get(Opc), Reg).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); + BuildMI(MBB, I, DL, get(LdOp)).addReg(Reg); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/movImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/movImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/movImm.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cef1e08a42cd47a219a08a7b03df1b62305453b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,17 @@ +unsigned MipsInstrInfo::removeBranch(MachineBasicBlock &MBB, int *BytesRemoved) const { + assert(!BytesRemoved && "code size not handled"); + MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend(); + unsigned removed = 0; + while (I != REnd && removed < 2) { + if (I->isDebugInstr()) { + ++I; + continue; + } + if (!getAnalyzableBrOpc(I->getOpcode())) + break; + I->eraseFromParent(); + I = MBB.rbegin(); + ++removed; + } + return removed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf4c73519980083d2273651b2680171851c4d0a1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,5 @@ +bool MipsInstrInfo::reverseBranchCondition(SmallVectorImpl &Cond) const { + assert( (Cond.size() && Cond.size() <= 3) && "Invalid Mips branch condition!"); + Cond[0].setImm(getOppositeBranchOpc(Cond[0].getImm())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b46bd40f8ae60038cbce551cc210dfdc0d86cc72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,10 @@ +void Mips16InstrInfo::storeRegToStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register SrcReg, bool isKill, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, int64_t Offset) const { + DebugLoc DL; + if (I != MBB.end()) DL = I->getDebugLoc(); + MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOStore); + unsigned Opc = 0; + if (Mips::CPU16RegsRegClass.hasSubClassEq(RC)) + Opc = Mips::SwRxSpImmX16; + assert(Opc && "Register class not handled!"); + BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4e70d6cfccd0aae1635f5ad95610e11da64d4f0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp @@ -0,0 +1,34 @@ +bool MipsInstrInfo::verifyInstruction(const MachineInstr &MI, StringRef &ErrInfo) const { + switch (MI.getOpcode()) { + case Mips::EXT: + case Mips::EXT_MM: + case Mips::INS: + case Mips::INS_MM: + case Mips::DINS: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 0, 32, 0, 32); + case Mips::DINSM: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 1, 64, 32, 64); + case Mips::DINSU: + return verifyInsExtInstruction(MI, ErrInfo, 32, 64, 0, 32, 32, 64); + case Mips::DEXT: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 0, 32, 0, 63); + case Mips::DEXTM: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 32, 64, 32, 64); + case Mips::DEXTU: + return verifyInsExtInstruction(MI, ErrInfo, 32, 64, 0, 32, 32, 64); + case Mips::TAILCALLREG: + case Mips::PseudoIndirectBranch: + case Mips::JR: + case Mips::JR64: + case Mips::JALR: + case Mips::JALR64: + case Mips::JALRPseudo: + if (!Subtarget.useIndirectJumpsHazard()) + return true; + ErrInfo = "invalid instruction when using jump guards!"; + return false; + default: + return true; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f7bafbb1b297ac62ef58faf3ebbc3ba088ae838 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp @@ -0,0 +1,2 @@ +MipsFunctionInfo(MachineFunction &MF) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..815700881400f3e2610e1d74e0907493d5ea7898 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex() const { + return VarArgsFrameIndex; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f453600ffb2d2bf1e86883efc8373719fb63f8ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex(int Index) { + VarArgsFrameIndex = Index; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8dbe9393d5f502927a51bf3bd6e31b2ef5a0ed3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,89 @@ +MipsSubtarget::MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS, bool little, const MipsTargetMachine &TM, MaybeAlign StackAlignOverride): MipsGenSubtargetInfo(TT, CPU, CPU, FS), MipsArchVersion(MipsDefault), IsLittle(little), IsSoftFloat(false), IsSingleFloat(false), IsFPXX(false), NoABICalls(false), Abs2008(false), IsFP64bit(false), UseOddSPReg(true), IsNaN2008bit(false), IsGP64bit(false), HasVFPU(false), HasCnMips(false), HasCnMipsP(false), HasMips3_32(false), HasMips3_32r2(false), HasMips4_32(false), HasMips4_32r2(false), HasMips5_32r2(false), InMips16Mode(false), InMips16HardFloat(Mips16HardFloat), InMicroMipsMode(false), HasDSP(false), HasDSPR2(false), HasDSPR3(false), AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16), HasMSA(false), UseTCCInDIV(false), HasSym32(false), HasEVA(false), DisableMadd4(false), HasMT(false), HasCRC(false), HasVirt(false), HasGINV(false), UseIndirectJumpsHazard(false), StackAlignOverride(StackAlignOverride), TM(TM), TargetTriple(TT), TSInfo(), InstrInfo(MipsInstrInfo::create( initializeSubtargetDependencies(CPU, FS, TM))), FrameLowering(MipsFrameLowering::create(*this)), TLInfo(MipsTargetLowering::create(TM, *this)) { + if (MipsArchVersion == MipsDefault) + MipsArchVersion = Mips32; + if (MipsArchVersion == Mips1) + report_fatal_error("Code generation for MIPS-I is not implemented", false); + if (MipsArchVersion == Mips5) + report_fatal_error("Code generation for MIPS-V is not implemented", false); + assert(((!isGP64bit() && isABI_O32()) || (isGP64bit() && (isABI_N32() || isABI_N64()))) && "Invalid Arch & ABI pair."); + if (hasMSA() && !isFP64bit()) + report_fatal_error("MSA requires a 64-bit FPU register file (FR=1 mode). See -mattr=+fp64.", false); + if (isFP64bit() && !hasMips64() && hasMips32() && !hasMips32r2()) + report_fatal_error("FPU with 64-bit registers is not available on MIPS32 pre revision 2. Use -mcpu=mips32r2 or greater."); + if (!isABI_O32() && !useOddSPReg()) + report_fatal_error("-mattr=+nooddspreg requires the O32 ABI.", false); + if (IsFPXX && (isABI_N32() || isABI_N64())) + report_fatal_error("FPXX is not permitted for the N32/N64 ABI's.", false); + if (hasMips64r6() && InMicroMipsMode) + report_fatal_error("microMIPS64R6 is not supported", false); + if (!isABI_O32() && InMicroMipsMode) + report_fatal_error("microMIPS64 is not supported.", false); + if (UseIndirectJumpsHazard) { + if (InMicroMipsMode) + report_fatal_error("cannot combine indirect jumps with hazard barriers and microMIPS"); + if (!hasMips32r2()) + report_fatal_error("indirect jumps with hazard barriers requires MIPS32R2 or later"); + } + if (inAbs2008Mode() && hasMips32() && !hasMips32r2()) { + report_fatal_error("IEEE 754-2008 abs.fmt is not supported for the given architecture.", false); + } + if (hasMips32r6()) { + StringRef ISA = hasMips64r6() ? "MIPS64r6" : "MIPS32r6"; + assert(isFP64bit()); + assert(isNaN2008()); + assert(inAbs2008Mode()); + if (hasDSP()) + report_fatal_error(ISA + " is not compatible with the DSP ASE", false); + } + if (NoABICalls && TM.isPositionIndependent()) + report_fatal_error("position-independent code requires '-mabicalls'"); + if (isABI_N64() && !TM.isPositionIndependent() && !hasSym32()) + NoABICalls = true; + UseSmallSection = GPOpt; + if (!NoABICalls && GPOpt) { + errs() << "warning: cannot use small-data accesses for '-mabicalls'" << "\n"; + UseSmallSection = false; + } + if (hasDSPR2() && !DspWarningPrinted) { + if (hasMips64() && !hasMips64r2()) { + errs() << "warning: the 'dspr2' ASE requires MIPS64 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + else if (hasMips32() && !hasMips32r2()) { + errs() << "warning: the 'dspr2' ASE requires MIPS32 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + } + else if (hasDSP() && !DspWarningPrinted) { + if (hasMips64() && !hasMips64r2()) { + errs() << "warning: the 'dsp' ASE requires MIPS64 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + else if (hasMips32() && !hasMips32r2()) { + errs() << "warning: the 'dsp' ASE requires MIPS32 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + } + StringRef ArchName = hasMips64() ? "MIPS64" : "MIPS32"; + if (!hasMips32r5() && hasMSA() && !MSAWarningPrinted) { + errs() << "warning: the 'msa' ASE requires " << ArchName << " revision 5 or greater\n"; + MSAWarningPrinted = true; + } + if (!hasMips32r5() && hasVirt() && !VirtWarningPrinted) { + errs() << "warning: the 'virt' ASE requires " << ArchName << " revision 5 or greater\n"; + VirtWarningPrinted = true; + } + if (!hasMips32r6() && hasCRC() && !CRCWarningPrinted) { + errs() << "warning: the 'crc' ASE requires " << ArchName << " revision 6 or greater\n"; + CRCWarningPrinted = true; + } + if (!hasMips32r6() && hasGINV() && !GINVWarningPrinted) { + errs() << "warning: the 'ginv' ASE requires " << ArchName << " revision 6 or greater\n"; + GINVWarningPrinted = true; + } + CallLoweringInfo.reset(new MipsCallLowering(*getTargetLowering())); + Legalizer.reset(new MipsLegalizerInfo(*this)); + auto *RBI = new MipsRegisterBankInfo(*getRegisterInfo()); + RegBankInfo.reset(RBI); + InstSelector.reset(createMipsInstructionSelector(*static_cast(&TM), *this, *RBI)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/anchor.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..436736c15924b75b84b927d41c944ede3edceaa0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/anchor.cpp @@ -0,0 +1,2 @@ +void MipsSubtarget::anchor() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa3fad473e1b3246c8f94087b5fbbd169058d219 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp @@ -0,0 +1,3 @@ +const CallLowering *MipsSubtarget::getCallLowering() const { + return CallLoweringInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46facc9d53d8ed20463a68f1486618473e216322 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const TargetFrameLowering *getFrameLowering() const override { + return FrameLowering.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e800e2a8b4f1864f21678597f1942ae03a8a6ab2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp @@ -0,0 +1,3 @@ +const MipsInstrInfo *getInstrInfo() const override { + return InstrInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62e906d17d51ea4764241fa71a10f28d9159bfbd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *MipsSubtarget::getInstructionSelector() const { + return InstSelector.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe91271b193b048bfbdd2a0096116ff7350be978 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp @@ -0,0 +1,3 @@ +const LegalizerInfo *MipsSubtarget::getLegalizerInfo() const { + return Legalizer.get(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5417d779e8304c5adaad1f053b6982c7a2dcd37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp @@ -0,0 +1,3 @@ +const RegisterBankInfo *MipsSubtarget::getRegBankInfo() const { + return RegBankInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70e4b467269f9a62a119d78ba8756d15153967e2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const MipsRegisterInfo *getRegisterInfo() const override { + return &InstrInfo->getRegisterInfo(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9cec09b2f3127f3d36917798ff8d808237620f9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +const SelectionDAGTargetInfo *getSelectionDAGInfo() const override { + return &TSInfo; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6a80a497f8d2bee84fc660d8e8cdfcfe7048369 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp @@ -0,0 +1,3 @@ +const MipsTargetLowering *getTargetLowering() const override { + return TLInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getXLen.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getXLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..619cc9eaf53f1510ccde851e748b819574304f6d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getXLen.cpp @@ -0,0 +1,3 @@ +MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override { + return MVT::i32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..619cc9eaf53f1510ccde851e748b819574304f6d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp @@ -0,0 +1,3 @@ +MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override { + return MVT::i32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a9e9e37c3feac2354466675ef429eee1bf53c525 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp @@ -0,0 +1,18 @@ +MipsSubtarget &MipsSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS, const TargetMachine &TM) { + StringRef CPUName = MIPS_MC::selectMipsCPU(TM.getTargetTriple(), CPU); + ParseSubtargetFeatures(CPUName, CPUName, FS); + InstrItins = getInstrItineraryForCPU(CPUName); + if (InMips16Mode && !IsSoftFloat) + InMips16HardFloat = true; + if (StackAlignOverride) + stackAlignment = *StackAlignOverride; + else if (isABI_N32() || isABI_N64()) + stackAlignment = Align(16); + else { + assert(isABI_O32() && "Unknown ABI for stack alignment!"); + stackAlignment = Align(8); + } + if ((isABI_N32() || isABI_N64()) && !isGP64bit()) + report_fatal_error("64-bit code requested on a subtarget that doesn't support it!"); + return *this; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/is64Bit.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/is64Bit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2d28ef868387af51863de445769ffa8d848320d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/is64Bit.cpp @@ -0,0 +1,3 @@ +bool isPTR64bit() const { + return IsPTR64bit; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isPULP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isPULP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2d28ef868387af51863de445769ffa8d848320d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isPULP.cpp @@ -0,0 +1,3 @@ +bool isPTR64bit() const { + return IsPTR64bit; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isRV32E.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1f93561d2032e25cd18ca3d71c412c8891819cf5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isGP32bit() const { + return !IsGP64bit; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa19b102fcb9d571a36a08f83de9e63d0dad45af --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetInfo() { + RegisterTarget X(getTheMipsTarget(), "mips", "MIPS (32-bit big endian)", "Mips"); + RegisterTarget Y(getTheMipselTarget(), "mipsel", "MIPS (32-bit little endian)", "Mips"); + RegisterTarget A(getTheMips64Target(), "mips64", "MIPS (64-bit big endian)", "Mips"); + RegisterTarget B(getTheMips64elTarget(), "mips64el", "MIPS (64-bit little endian)","Mips"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d029fee31d59b7b7e4c2d46eb1753cc207e1a386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheMipsTarget() { + static Target TheMipsTarget; + return TheMipsTarget; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a203a8b0cb4ad6485ee57f457ac01c93bb38bca7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheMips64Target() { + static Target TheMips64Target; + return TheMips64Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cebec48b8e7e252d90044f50cbef0210c65c5fa2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,13 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTarget() { + RegisterTargetMachine X(getTheMipsTarget()); + RegisterTargetMachine Y(getTheMipselTarget()); + RegisterTargetMachine A(getTheMips64Target()); + RegisterTargetMachine B(getTheMips64elTarget()); + PassRegistry *PR = PassRegistry::getPassRegistry(); + initializeGlobalISel(*PR); + initializeMipsDelaySlotFillerPass(*PR); + initializeMipsBranchExpansionPass(*PR); + initializeMicroMipsSizeReducePass(*PR); + initializeMipsPreLegalizerCombinerPass(*PR); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20da95a9d216fe1c9fd7a5ecdd41da237b1d474b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp @@ -0,0 +1,3 @@ +MipsPassConfig(MipsTargetMachine &TM, PassManagerBase &PM) : TargetPassConfig(TM, PM) { + EnableTailMerge = !getMipsSubtarget().enableLongBranchPass(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb7a4b12d46b90e267a11d089bac3205f01c869d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,5 @@ +MipsTargetMachine::MipsTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional RM, Optional CM, CodeGenOpt::Level OL, bool JIT, bool isLittle) : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options, isLittle), TT, CPU, FS, Options, getEffectiveRelocModel(JIT, RM), getEffectiveCodeModel(CM, CodeModel::Small), OL), isLittle(isLittle), TLOF(std::make_unique()), ABI(MipsABIInfo::computeTargetABI(TT, CPU, Options.MCOptions)), Subtarget(nullptr), DefaultSubtarget(TT, CPU, FS, isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)), NoMips16Subtarget(TT, CPU, FS.empty() ? "-mips16" : FS.str() + ",-mips16", isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)), Mips16Subtarget(TT, CPU, FS.empty() ? "+mips16" : FS.str() + ",+mips16", isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)) { + Subtarget = &DefaultSubtarget; + initAsmInfo(); + setSupportsDebugEntryValues(true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a5d768ad0a3e96bbc37e8565f6c69e6eb507228 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addGlobalInstructionSelect() { + addPass(new InstructionSelect()); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..33f91a1a415e698013c6df506516503925f5c3c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp @@ -0,0 +1,8 @@ +void MipsPassConfig::addIRPasses() { + TargetPassConfig::addIRPasses(); + addPass(createAtomicExpandPass()); + if (getMipsSubtarget().os16()) + addPass(createMipsOs16Pass()); + if (getMipsSubtarget().inMips16HardFloat()) + addPass(createMips16HardFloatPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a41c67c0603be6e9b5672f4fc565ac21ee5ce3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addIRTranslator() { + addPass(new IRTranslator(getOptLevel())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fed7400583c9fc2fb0ebb7485b3e4058b93f7c8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,6 @@ +bool MipsPassConfig::addInstSelector() { + addPass(createMipsModuleISelDagPass()); + addPass(createMips16ISelDag(getMipsTargetMachine(), getOptLevel())); + addPass(createMipsSEISelDag(getMipsTargetMachine(), getOptLevel())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c0f208a88cac1846e74f7f3e819d7d6bf6406f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addLegalizeMachineIR() { + addPass(new Legalizer()); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06d033e3b1fed3f9944e982215833add08185065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,7 @@ +void MipsPassConfig::addPreEmitPass() { + addPass(createMipsExpandPseudoPass()); + addPass(createMicroMipsSizeReducePass()); + addPass(createMipsDelaySlotFillerPass()); + addPass(createMipsBranchExpansion()); + addPass(createMipsConstantIslandPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06d033e3b1fed3f9944e982215833add08185065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp @@ -0,0 +1,7 @@ +void MipsPassConfig::addPreEmitPass() { + addPass(createMipsExpandPseudoPass()); + addPass(createMicroMipsSizeReducePass()); + addPass(createMipsDelaySlotFillerPass()); + addPass(createMipsBranchExpansion()); + addPass(createMipsConstantIslandPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4fd1e966f2f6f1aa1e1720c3be90df4ac59f83e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp @@ -0,0 +1,3 @@ +void MipsPassConfig::addPreRegAlloc() { + addPass(createMipsOptimizePICCallPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..496fa0d237ac7a067970ee6482c4710e8643aa15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addRegBankSelect() { + addPass(new RegBankSelect()); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp new file mode 100644 index 0000000000000000000000000000000000000000..779e0541abcede80b44734c783ecdbab4e2a47ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp @@ -0,0 +1,20 @@ +static std::string computeDataLayout(const Triple &TT, StringRef CPU, const TargetOptions &Options, bool isLittle) { + std::string Ret; + MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TT, CPU, Options.MCOptions); + if (isLittle) + Ret += "e"; + else + Ret += "E"; + if (ABI.IsO32()) + Ret += "-m:m"; + else + Ret += "-m:e"; + if (!ABI.IsN64()) + Ret += "-p:32:32"; + Ret += "-i8:8:32-i16:16:32-i64:64"; + if (ABI.IsN64() || ABI.IsN32()) + Ret += "-n32:64-S128"; + else + Ret += "-n32-S64"; + return Ret; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28c6d90decc8dea3f4e8ff897e48ef6d66908345 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp @@ -0,0 +1,3 @@ +TargetPassConfig *MipsTargetMachine::createPassConfig(PassManagerBase &PM) { + return new MipsPassConfig(*this, PM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5e25a02cd5a11b44924270ee2dfbdb9e9292cf63 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp @@ -0,0 +1,5 @@ +static Reloc::Model getEffectiveRelocModel(bool JIT, Optional RM) { + if (!RM.hasValue() || JIT) + return Reloc::Static; + return *RM; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1c1365ba51f49fb7fb122c5b7afd2635513e01d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp @@ -0,0 +1,3 @@ +TargetLoweringObjectFile *getObjFileLowering() const override { + return TLOF.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72a6aa9b0b63f9e9fcc02d673c5a32c466330d21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,27 @@ +const MipsSubtarget *MipsTargetMachine::getSubtargetImpl(const Function &F) const { + Attribute CPUAttr = F.getFnAttribute("target-cpu"); + Attribute FSAttr = F.getFnAttribute("target-features"); + std::string CPU = CPUAttr.isValid() ? CPUAttr.getValueAsString().str() : TargetCPU; + std::string FS = FSAttr.isValid() ? FSAttr.getValueAsString().str() : TargetFS; + bool hasMips16Attr = F.getFnAttribute("mips16").isValid(); + bool hasNoMips16Attr = F.getFnAttribute("nomips16").isValid(); + bool HasMicroMipsAttr = F.getFnAttribute("micromips").isValid(); + bool HasNoMicroMipsAttr = F.getFnAttribute("nomicromips").isValid(); + bool softFloat = F.hasFnAttribute("use-soft-float") && F.getFnAttribute("use-soft-float").getValueAsString() == "true"; + if (hasMips16Attr) + FS += FS.empty() ? "+mips16" : ",+mips16"; + else if (hasNoMips16Attr) + FS += FS.empty() ? "-mips16" : ",-mips16"; + if (HasMicroMipsAttr) + FS += FS.empty() ? "+micromips" : ",+micromips"; + else if (HasNoMicroMipsAttr) + FS += FS.empty() ? "-micromips" : ",-micromips"; + if (softFloat) + FS += FS.empty() ? "+soft-float" : ",+soft-float"; + auto &I = SubtargetMap[CPU + FS]; + if (!I) { + resetTargetOptions(F); + I = std::make_unique(TargetTriple, CPU, FS, isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)); + } + return I.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3dc48d3b86556ea44b4a72126e4ab9c2dde73782 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp @@ -0,0 +1,3 @@ +MipsTargetMachine &getMipsTargetMachine() const { + return getTM(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65f11723367b31e66f2c9629d33d19297544e2f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp @@ -0,0 +1,8 @@ +TargetTransformInfo MipsTargetMachine::getTargetTransformInfo(const Function &F) { + if (Subtarget->allowMixed16_32()) { + LLVM_DEBUG(errs() << "No Target Transform Info Pass Added\n"); + return TargetTransformInfo(F.getParent()->getDataLayout()); + } + LLVM_DEBUG(errs() << "Target Transform Info Pass Added\n"); + return TargetTransformInfo(BasicTTIImpl(this, F)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e50de996547528d432f64de320d37eb30e46f396 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp @@ -0,0 +1,3 @@ +bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const override { + return SrcAS < 256 && DestAS < 256; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0d8533856448921babe3c7b5cab65e7ceeebca3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,6 @@ +void MipsTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){ + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + SmallDataSection = getContext().getELFSection(".sdata", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_MIPS_GPREL); + SmallBSSSection = getContext().getELFSection(".sbss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_MIPS_GPREL); + this->TM = &static_cast(TM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcb179748f251dd885c72ec65ea012aa51523e27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,12 @@ +MCSection *MipsTargetObjectFile::SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { + if (Kind.isBSS() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallBSSSection; + } + if (Kind.isData() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallDataSection; + } + if (Kind.isReadOnly() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallDataSection; + } + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2aa9fc13963d18be314c20bb620b4fea6a394505 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,5 @@ +MCSection *MipsTargetObjectFile::getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const { + if (IsConstantInSmallSection(DL, C, *TM)) + return SmallDataSection; + return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Alignment); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58b216236a3eef9c2fcf8becb5197f101875eb40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp @@ -0,0 +1,3 @@ +bool MipsTargetObjectFile::IsConstantInSmallSection(const DataLayout &DL, const Constant *CN, const TargetMachine &TM) const { + return (static_cast(TM).getSubtargetImpl()->useSmallSection() && LocalSData && IsInSmallSection(DL.getTypeAllocSize(CN->getType()))); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69f774302db816d7d0bc6b0b821abfc8a844636a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp @@ -0,0 +1,5 @@ +bool MipsTargetObjectFile::IsGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const { + if (GO->isDeclaration() || GO->hasAvailableExternallyLinkage()) + return IsGlobalInSmallSectionImpl(GO, TM); + return IsGlobalInSmallSection(GO, TM, getKindForGlobal(GO, TM)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3bf6ffdc320b495882842e7acb341a1969b06a0c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp @@ -0,0 +1,3 @@ +static bool IsInSmallSection(uint64_t Size) { + return Size > 0 && Size <= SSThreshold; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/CallLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/CallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90829bbc2f32e1f7018b1e63e73338c2bb6df8d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/CallLowering.cpp @@ -0,0 +1,2 @@ +MipsCallLowering::MipsCallLowering(const MipsTargetLowering &TLI) : CallLowering(&TLI) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..99874c4d2466cbcdbe62fc4abe7ad4b4a0994fb8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerCall.cpp @@ -0,0 +1,95 @@ +bool MipsCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const { + if (Info.CallConv != CallingConv::C) + return false; + for (auto &Arg : Info.OrigArgs) { + if (!isSupportedArgumentType(Arg.Ty)) + return false; + if (Arg.Flags[0].isByVal()) + return false; + if (Arg.Flags[0].isSRet() && !Arg.Ty->isPointerTy()) + return false; + } + if (!Info.OrigRet.Ty->isVoidTy() && !isSupportedReturnType(Info.OrigRet.Ty)) + return false; + MachineFunction &MF = MIRBuilder.getMF(); + const Function &F = MF.getFunction(); + const DataLayout &DL = MF.getDataLayout(); + const MipsTargetLowering &TLI = *getTLI(); + const MipsTargetMachine &TM = static_cast(MF.getTarget()); + const MipsABIInfo &ABI = TM.getABI(); + MachineInstrBuilder CallSeqStart = MIRBuilder.buildInstr(Mips::ADJCALLSTACKDOWN); + const bool IsCalleeGlobalPIC = Info.Callee.isGlobal() && TM.isPositionIndependent(); + MachineInstrBuilder MIB = MIRBuilder.buildInstrNoInsert(Info.Callee.isReg() || IsCalleeGlobalPIC ? Mips::JALRPseudo : Mips::JAL); + MIB.addDef(Mips::SP, RegState::Implicit); + if (IsCalleeGlobalPIC) { + Register CalleeReg = MF.getRegInfo().createGenericVirtualRegister(LLT::pointer(0, 32)); + MachineInstr *CalleeGlobalValue = MIRBuilder.buildGlobalValue(CalleeReg, Info.Callee.getGlobal()); + if (!Info.Callee.getGlobal()->hasLocalLinkage()) + CalleeGlobalValue->getOperand(1).setTargetFlags(MipsII::MO_GOT_CALL); + MIB.addUse(CalleeReg); + } + else + MIB.add(Info.Callee); + const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); + MIB.addRegMask(TRI->getCallPreservedMask(MF, F.getCallingConv())); + TargetLowering::ArgListTy FuncOrigArgs; + FuncOrigArgs.reserve(Info.OrigArgs.size()); + SmallVector ArgInfos; + SmallVector OrigArgIndices; + unsigned i = 0; + for (auto &Arg : Info.OrigArgs) { + TargetLowering::ArgListEntry Entry; + Entry.Ty = Arg.Ty; + FuncOrigArgs.push_back(Entry); + ArgInfos.push_back(Arg); + OrigArgIndices.push_back(i); + ++i; + } + SmallVector Outs; + subTargetRegTypeForCallingConv(F, ArgInfos, OrigArgIndices, Outs); + SmallVector ArgLocs; + bool IsCalleeVarArg = false; + if (Info.Callee.isGlobal()) { + const Function *CF = static_cast(Info.Callee.getGlobal()); + IsCalleeVarArg = CF->isVarArg(); + } + MipsCCState CCInfo(F.getCallingConv(), IsCalleeVarArg, MF, ArgLocs, F.getContext()); + CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(Info.CallConv), Align(1)); + const char *Call = Info.Callee.isSymbol() ? Info.Callee.getSymbolName() : nullptr; + CCInfo.AnalyzeCallOperands(Outs, TLI.CCAssignFnForCall(), FuncOrigArgs, Call); + setLocInfo(ArgLocs, Outs); + MipsOutgoingValueHandler RetHandler(MIRBuilder, MF.getRegInfo(), MIB); + if (!RetHandler.handle(ArgLocs, ArgInfos)) { + return false; + } + unsigned NextStackOffset = CCInfo.getNextStackOffset(); + const TargetFrameLowering *TFL = MF.getSubtarget().getFrameLowering(); + unsigned StackAlignment = TFL->getStackAlignment(); + NextStackOffset = alignTo(NextStackOffset, StackAlignment); + CallSeqStart.addImm(NextStackOffset).addImm(0); + if (IsCalleeGlobalPIC) { + MIRBuilder.buildCopy(Register(Mips::GP), MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)); + MIB.addDef(Mips::GP, RegState::Implicit); + } + MIRBuilder.insertInstr(MIB); + if (MIB->getOpcode() == Mips::JALRPseudo) { + const MipsSubtarget &STI = static_cast(MIRBuilder.getMF().getSubtarget()); + MIB.constrainAllUses(MIRBuilder.getTII(), *STI.getRegisterInfo(), *STI.getRegBankInfo()); + } + if (!Info.OrigRet.Ty->isVoidTy()) { + ArgInfos.clear(); + SmallVector OrigRetIndices; + splitToValueTypes(DL, Info.OrigRet, 0, ArgInfos, OrigRetIndices); + SmallVector Ins; + subTargetRegTypeForCallingConv(F, ArgInfos, OrigRetIndices, Ins); + SmallVector ArgLocs; + MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext()); + CCInfo.AnalyzeCallResult(Ins, TLI.CCAssignFnForReturn(), Info.OrigRet.Ty, Call); + setLocInfo(ArgLocs, Ins); + CallReturnHandler Handler(MIRBuilder, MF.getRegInfo(), MIB); + if (!Handler.handle(ArgLocs, ArgInfos)) + return false; + } + MIRBuilder.buildInstr(Mips::ADJCALLSTACKUP).addImm(NextStackOffset).addImm(0); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4868c10586ca16cd0b682161b6b5ac7e1e639036 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp @@ -0,0 +1,57 @@ +bool MipsCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef> VRegs, FunctionLoweringInfo &FLI) const { + if (F.arg_empty()) + return true; + for (auto &Arg : F.args()) { + if (!isSupportedArgumentType(Arg.getType())) + return false; + } + MachineFunction &MF = MIRBuilder.getMF(); + const DataLayout &DL = MF.getDataLayout(); + const MipsTargetLowering &TLI = *getTLI(); + SmallVector ArgInfos; + SmallVector OrigArgIndices; + unsigned i = 0; + for (auto &Arg : F.args()) { + ArgInfo AInfo(VRegs[i], Arg.getType()); + setArgFlags(AInfo, i + AttributeList::FirstArgIndex, DL, F); + ArgInfos.push_back(AInfo); + OrigArgIndices.push_back(i); + ++i; + } + SmallVector Ins; + subTargetRegTypeForCallingConv(F, ArgInfos, OrigArgIndices, Ins); + SmallVector ArgLocs; + MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext()); + const MipsTargetMachine &TM = static_cast(MF.getTarget()); + const MipsABIInfo &ABI = TM.getABI(); + CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(F.getCallingConv()), Align(1)); + CCInfo.AnalyzeFormalArguments(Ins, TLI.CCAssignFnForCall()); + setLocInfo(ArgLocs, Ins); + MipsIncomingValueHandler Handler(MIRBuilder, MF.getRegInfo()); + if (!Handler.handle(ArgLocs, ArgInfos)) + return false; + if (F.isVarArg()) { + ArrayRef ArgRegs = ABI.GetVarArgRegs(); + unsigned Idx = CCInfo.getFirstUnallocated(ArgRegs); + int VaArgOffset; + unsigned RegSize = 4; + if (ArgRegs.size() == Idx) + VaArgOffset = alignTo(CCInfo.getNextStackOffset(), RegSize); + else { + VaArgOffset = (int)ABI.GetCalleeAllocdArgSizeInBytes(CCInfo.getCallingConv()) - (int)(RegSize * (ArgRegs.size() - Idx)); + } + MachineFrameInfo &MFI = MF.getFrameInfo(); + int FI = MFI.CreateFixedObject(RegSize, VaArgOffset, true); + MF.getInfo()->setVarArgsFrameIndex(FI); + for (unsigned I = Idx; I < ArgRegs.size(); ++I, VaArgOffset += RegSize) { + MIRBuilder.getMBB().addLiveIn(ArgRegs[I]); + MachineInstrBuilder Copy = MIRBuilder.buildCopy(LLT::scalar(RegSize * 8), Register(ArgRegs[I])); + FI = MFI.CreateFixedObject(RegSize, VaArgOffset, true); + MachinePointerInfo MPO = MachinePointerInfo::getFixedStack(MF, FI); + MachineInstrBuilder FrameIndex = MIRBuilder.buildFrameIndex(LLT::pointer(MPO.getAddrSpace(), 32), FI); + MachineMemOperand *MMO = MF.getMachineMemOperand(MPO, MachineMemOperand::MOStore, RegSize, Align(RegSize)); + MIRBuilder.buildStore(Copy, FrameIndex, *MMO); + } + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66034aff8f85ce0f2fd76b08013c3be1992ec37d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/CallLowering/lowerReturn.cpp @@ -0,0 +1,28 @@ +bool MipsCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef VRegs, FunctionLoweringInfo &FLI) const { + MachineInstrBuilder Ret = MIRBuilder.buildInstrNoInsert(Mips::RetRA); + if (Val != nullptr && !isSupportedReturnType(Val->getType())) + return false; + if (!VRegs.empty()) { + MachineFunction &MF = MIRBuilder.getMF(); + const Function &F = MF.getFunction(); + const DataLayout &DL = MF.getDataLayout(); + const MipsTargetLowering &TLI = *getTLI(); + SmallVector RetInfos; + SmallVector OrigArgIndices; + ArgInfo ArgRetInfo(VRegs, Val->getType()); + setArgFlags(ArgRetInfo, AttributeList::ReturnIndex, DL, F); + splitToValueTypes(DL, ArgRetInfo, 0, RetInfos, OrigArgIndices); + SmallVector Outs; + subTargetRegTypeForCallingConv(F, RetInfos, OrigArgIndices, Outs); + SmallVector ArgLocs; + MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext()); + CCInfo.AnalyzeReturn(Outs, TLI.CCAssignFnForReturn()); + setLocInfo(ArgLocs, Outs); + MipsOutgoingValueHandler RetHandler(MIRBuilder, MF.getRegInfo(), Ret); + if (!RetHandler.handle(ArgLocs, RetInfos)) { + return false; + } + } + MIRBuilder.insertInstr(Ret); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b384d32685bad5866f04b66f1bea348030208c0d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +explicit MipsFrameLowering(const MipsSubtarget &sti, Align Alignment) : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) { +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/adjustReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/adjustReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/adjustReg.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c7be3a46a081dd318f6d9cb6c1c8652f9ee3d8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp @@ -0,0 +1,31 @@ +void MipsSEFrameLowering::determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const { + TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS); + const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + MipsABIInfo ABI = STI.getABI(); + unsigned RA = ABI.IsN64() ? Mips::RA_64 : Mips::RA; + unsigned FP = ABI.GetFramePtr(); + unsigned BP = ABI.IsN64() ? Mips::S7_64 : Mips::S7; + if (hasFP(MF)) { + setAliasRegs(MF, SavedRegs, RA); + setAliasRegs(MF, SavedRegs, FP); + } + if (hasBP(MF)) + setAliasRegs(MF, SavedRegs, BP); + if (MipsFI->callsEhReturn()) + MipsFI->createEhDataRegsFI(MF); + if (MipsFI->isISR()) + MipsFI->createISRRegFI(MF); + if (ExpandPseudo(MF).expand()) { + const TargetRegisterClass &RC = STI.isGP64bit() ? Mips::GPR64RegClass : Mips::GPR32RegClass; + int FI = MF.getFrameInfo().CreateStackObject(TRI->getSpillSize(RC), TRI->getSpillAlign(RC), false); + RS->addScavengingFrameIndex(FI); + } + uint64_t MaxSPOffset = estimateStackSize(MF); + if (isIntN(STI.hasMSA() ? 10 : 16, MaxSPOffset) && !MF.getFrameInfo().hasVarSizedObjects()) + return; + const TargetRegisterClass &RC = ABI.ArePtrs64bit() ? Mips::GPR64RegClass : Mips::GPR32RegClass; + int FI = MF.getFrameInfo().CreateStackObject(TRI->getSpillSize(RC),TRI->getSpillAlign(RC), false); + RS->addScavengingFrameIndex(FI); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b1f59ca8eacf87fd0c630d96c6589f6dca5e270 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,10 @@ +MachineBasicBlock::iterator MipsFrameLowering::eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { + unsigned SP = STI.getABI().IsN64() ? Mips::SP_64 : Mips::SP; + if (!hasReservedCallFrame(MF)) { + int64_t Amount = I->getOperand(0).getImm(); + if (I->getOpcode() == Mips::ADJCALLSTACKDOWN) + Amount = -Amount; + STI.getInstrInfo()->adjustStackPtr(SP, Amount, MBB, I); + } + return MBB.erase(I); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fecd648fee2494cb011a5cd242be9efbd0d7efe2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,35 @@ +void MipsSEFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + const MipsSEInstrInfo &TII = *static_cast(STI.getInstrInfo()); + const MipsRegisterInfo &RegInfo = *static_cast(STI.getRegisterInfo()); + DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); + MipsABIInfo ABI = STI.getABI(); + unsigned SP = ABI.GetStackPtr(); + unsigned FP = ABI.GetFramePtr(); + unsigned ZERO = ABI.GetNullPtr(); + unsigned MOVE = ABI.GetGPRMoveOp(); + if (hasFP(MF)) { + MachineBasicBlock::iterator I = MBBI; + for (unsigned i = 0; i < MFI.getCalleeSavedInfo().size(); ++i) + --I; + BuildMI(MBB, I, DL, TII.get(MOVE), SP).addReg(FP).addReg(ZERO); + } + if (MipsFI->callsEhReturn()) { + const TargetRegisterClass *RC = ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + MachineBasicBlock::iterator I = MBBI; + for (unsigned i = 0; i < MFI.getCalleeSavedInfo().size(); ++i) + --I; + for (int J = 0; J < 4; ++J) { + TII.loadRegFromStackSlot(MBB, I, ABI.GetEhDataReg(J), MipsFI->getEhDataRegFI(J), RC, &RegInfo); + } + } + if (MF.getFunction().hasFnAttribute("interrupt")) + emitInterruptEpilogueStub(MF, MBB); + uint64_t StackSize = MFI.getStackSize(); + if (!StackSize) + return; + TII.adjustStackPtr(SP, StackSize, MBB, MBBI); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04cc5f5bac4d52157c1c5891a8c7a3810d0c6ef0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,88 @@ +void MipsSEFrameLowering::emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + const MipsSEInstrInfo &TII = *static_cast(STI.getInstrInfo()); + const MipsRegisterInfo &RegInfo = *static_cast(STI.getRegisterInfo()); + MachineBasicBlock::iterator MBBI = MBB.begin(); + DebugLoc dl; + MipsABIInfo ABI = STI.getABI(); + unsigned SP = ABI.GetStackPtr(); + unsigned FP = ABI.GetFramePtr(); + unsigned ZERO = ABI.GetNullPtr(); + unsigned MOVE = ABI.GetGPRMoveOp(); + unsigned ADDiu = ABI.GetPtrAddiuOp(); + unsigned AND = ABI.IsN64() ? Mips::AND64 : Mips::AND; + const TargetRegisterClass *RC = ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + uint64_t StackSize = MFI.getStackSize(); + if (StackSize == 0 && !MFI.adjustsStack()) + return; + MachineModuleInfo &MMI = MF.getMMI(); + const MCRegisterInfo *MRI = MMI.getContext().getRegisterInfo(); + TII.adjustStackPtr(SP, -StackSize, MBB, MBBI); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, StackSize)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + if (MF.getFunction().hasFnAttribute("interrupt")) + emitInterruptPrologueStub(MF, MBB); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + if (!CSI.empty()) { + for (unsigned i = 0; i < CSI.size(); ++i) + ++MBBI; + for (std::vector::const_iterator I = CSI.begin(), E = CSI.end(); I != E; ++I) { + int64_t Offset = MFI.getObjectOffset(I->getFrameIdx()); + unsigned Reg = I->getReg(); + if (Mips::AFGR64RegClass.contains(Reg)) { + unsigned Reg0 = MRI->getDwarfRegNum(RegInfo.getSubReg(Reg, Mips::sub_lo), true); + unsigned Reg1 = MRI->getDwarfRegNum(RegInfo.getSubReg(Reg, Mips::sub_hi), true); + if (!STI.isLittle()) + std::swap(Reg0, Reg1); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg0, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg1, Offset + 4)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + else if (Mips::FGR64RegClass.contains(Reg)) { + unsigned Reg0 = MRI->getDwarfRegNum(Reg, true); + unsigned Reg1 = MRI->getDwarfRegNum(Reg, true) + 1; + if (!STI.isLittle()) + std::swap(Reg0, Reg1); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg0, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg1, Offset + 4)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + else { + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, MRI->getDwarfRegNum(Reg, true), Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + } + if (MipsFI->callsEhReturn()) { + for (int I = 0; I < 4; ++I) { + if (!MBB.isLiveIn(ABI.GetEhDataReg(I))) + MBB.addLiveIn(ABI.GetEhDataReg(I)); + TII.storeRegToStackSlot(MBB, MBBI, ABI.GetEhDataReg(I), false, MipsFI->getEhDataRegFI(I), RC, &RegInfo); + } + for (int I = 0; I < 4; ++I) { + int64_t Offset = MFI.getObjectOffset(MipsFI->getEhDataRegFI(I)); + unsigned Reg = MRI->getDwarfRegNum(ABI.GetEhDataReg(I), true); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + if (hasFP(MF)) { + BuildMI(MBB, MBBI, dl, TII.get(MOVE), FP).addReg(SP).addReg(ZERO).setMIFlag(MachineInstr::FrameSetup); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createDefCfaRegister( nullptr, MRI->getDwarfRegNum(FP, true))); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + if (RegInfo.needsStackRealignment(MF)) { + Register VR = MF.getRegInfo().createVirtualRegister(RC); + assert((Log2(MFI.getMaxAlign()) < 16) && "Function's alignment size requirement is not supported."); + int64_t MaxAlign = -(int64_t)MFI.getMaxAlign().value(); + BuildMI(MBB, MBBI, dl, TII.get(ADDiu), VR).addReg(ZERO).addImm(MaxAlign); + BuildMI(MBB, MBBI, dl, TII.get(AND), SP).addReg(SP).addReg(VR); + if (hasBP(MF)) { + unsigned BP = STI.isABI_N64() ? Mips::S7_64 : Mips::S7; + BuildMI(MBB, MBBI, dl, TII.get(MOVE), BP).addReg(SP).addReg(ZERO); + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96cd6c3b3e00e732bf4cc98667e6b6cc7d664c40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp @@ -0,0 +1,9 @@ +StackOffset MipsSEFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsABIInfo ABI = STI.getABI(); + if (MFI.isFixedObjectIndex(FI)) + FrameReg = hasFP(MF) ? ABI.GetFramePtr() : ABI.GetStackPtr(); + else + FrameReg = hasBP(MF) ? ABI.GetBasePtr() : ABI.GetStackPtr(); + return StackOffset::getFixed(MFI.getObjectOffset(FI) + MFI.getStackSize() - getOffsetOfLocalArea() + MFI.getOffsetAdjustment()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasBP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasBP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a6469c7a278c038c82567ff8856bedb6dadf7202 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasBP.cpp @@ -0,0 +1,5 @@ +bool MipsFrameLowering::hasBP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + return MFI.hasVarSizedObjects() && TRI->needsStackRealignment(MF); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2984a24fb87e41d561111fe745a031a4ae00d2f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,5 @@ +bool MipsFrameLowering::hasFP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + return MF.getTarget().Options.DisableFramePointerElim(MF) || MFI.hasVarSizedObjects() || MFI.isFrameAddressTaken() || TRI->needsStackRealignment(MF); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97a97d73efcd689066a40c08ef80ad03f0f94706 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp @@ -0,0 +1,4 @@ +bool MipsSEFrameLowering::hasReservedCallFrame(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + return isInt<16>(MFI.getMaxCallFrameSize() + getStackAlignment()) && !MFI.hasVarSizedObjects(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39a52f6a3ffb6bddaec5669406257eaaf8382c20 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,3 @@ +bool Mips16FrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef CSI, const TargetRegisterInfo *TRI) const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7ccdfa1edf7514e9f46b468c4a170614877a6c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,29 @@ +bool MipsSEFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef CSI, const TargetRegisterInfo *TRI) const { + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *STI.getInstrInfo(); + for (unsigned i = 0, e = CSI.size(); i != e; ++i) { + unsigned Reg = CSI[i].getReg(); + bool IsRAAndRetAddrIsTaken = (Reg == Mips::RA || Reg == Mips::RA_64) && MF->getFrameInfo().isReturnAddressTaken(); + if (!IsRAAndRetAddrIsTaken) + MBB.addLiveIn(Reg); + bool IsLOHI = (Reg == Mips::LO0 || Reg == Mips::LO0_64 || Reg == Mips::HI0 || Reg == Mips::HI0_64); + const Function &Func = MBB.getParent()->getFunction(); + if (IsLOHI && Func.hasFnAttribute("interrupt")) { + DebugLoc DL = MI->getDebugLoc(); + unsigned Op = 0; + if (!STI.getABI().ArePtrs64bit()) { + Op = (Reg == Mips::HI0) ? Mips::MFHI : Mips::MFLO; + Reg = Mips::K0; + } + else { + Op = (Reg == Mips::HI0) ? Mips::MFHI64 : Mips::MFLO64; + Reg = Mips::K0_64; + } + BuildMI(MBB, MI, DL, TII.get(Op), Mips::K0).setMIFlag(MachineInstr::FrameSetup); + } + bool IsKill = !IsRAAndRetAddrIsTaken; + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.storeRegToStackSlot(MBB, MI, Reg, IsKill, CSI[i].getFrameIdx(), RC, TRI); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a7fcbbf66a18053cbb09eb170938804acb78987 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +explicit MipsSEDAGToDAGISel(MipsTargetMachine &TM, CodeGenOpt::Level OL) : MipsDAGToDAGISel(TM, OL) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d342f74eef8e6835cb6a33677db55fb78cb5d785 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,50 @@ +bool MipsSEDAGToDAGISel::SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, std::vector &OutOps) { + SDValue Base, Offset; + switch(ConstraintID) { + default: + llvm_unreachable("Unexpected asm memory constraint"); + case InlineAsm::Constraint_m: + case InlineAsm::Constraint_o: + if (selectAddrRegImm16(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + case InlineAsm::Constraint_R: + if (selectAddrRegImm9(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + case InlineAsm::Constraint_ZC: + if (Subtarget->inMicroMipsMode()) { + if (selectAddrRegImm12(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + } + else if (Subtarget->hasMips32r6()) { + if (selectAddrRegImm9(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + } + else if (selectAddrRegImm16(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36e8855eb544200582451f8c21a565df6b7b9a48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createMipsSEISelDag(MipsTargetMachine &TM, CodeGenOpt::Level OptLevel) { + return new MipsSEDAGToDAGISel(TM, OptLevel); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5049e898a5b33a064ed6484e2e7cf1667997bef8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "MIPS DAG->DAG Pattern Instruction Selection"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23043d2db6c9d6e9b1f35cdf3b44609cf5975340 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp @@ -0,0 +1,7 @@ +bool MipsModuleDAGToDAGISel::runOnMachineFunction(MachineFunction &MF) { + LLVM_DEBUG(errs() << "In MipsModuleDAGToDAGISel::runMachineFunction\n"); + auto &TPC = getAnalysis(); + auto &TM = TPC.getTM(); + TM.resetSubtarget(&MF); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ddc959d5cec6fb8668b07d516cd6e866a0989a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp @@ -0,0 +1,14 @@ +bool MipsSEDAGToDAGISel::selectVSplat(SDNode *N, APInt &Imm, unsigned MinSizeInBits) const { + if (!Subtarget->hasMSA()) + return false; + BuildVectorSDNode *Node = dyn_cast(N); + if (!Node) + return false; + APInt SplatValue, SplatUndef; + unsigned SplatBitSize; + bool HasAnyUndefs; + if (!Node->isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs, MinSizeInBits, !Subtarget->isLittle())) + return false; + Imm = SplatValue; + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e86a8153fbab9c79b9ea14bfbc050c061ff370fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp @@ -0,0 +1,4 @@ +bool MipsDAGToDAGISel::selectVSplatSimm5(SDValue N, SDValue &Imm) const { + llvm_unreachable("Unimplemented function."); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..02c4b950f0aa45a72a3ed3b1bce2af4f5eb6cd6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp @@ -0,0 +1,4 @@ +bool MipsDAGToDAGISel::selectVSplatUimm5(SDValue N, SDValue &Imm) const { + llvm_unreachable("Unimplemented function."); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e857257cc58f086519f5aa8fb47b84c794ac83d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,5 @@ +bool MipsTargetLowering::CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg, const SmallVectorImpl &Outs, LLVMContext &Context) const { + SmallVector RVLocs; + MipsCCState CCInfo(CallConv, IsVarArg, MF, RVLocs, Context); + return CCInfo.CheckReturn(Outs, RetCC_Mips); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7a577133ff50ac6ce86af208c82aec90f270744 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,154 @@ +MachineBasicBlock *MipsTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *BB) const { + switch (MI.getOpcode()) { + default: + llvm_unreachable("Unexpected instr type to insert"); + case Mips::ATOMIC_LOAD_ADD_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_ADD_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_ADD_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_ADD_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_AND_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_AND_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_AND_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_AND_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_OR_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_OR_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_OR_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_OR_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_XOR_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_XOR_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_XOR_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_XOR_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_NAND_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_NAND_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_NAND_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_NAND_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_SUB_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_SUB_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_SUB_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_SUB_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_SWAP_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_SWAP_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_SWAP_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_SWAP_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_CMP_SWAP_I8: + return emitAtomicCmpSwapPartword(MI, BB, 1); + case Mips::ATOMIC_CMP_SWAP_I16: + return emitAtomicCmpSwapPartword(MI, BB, 2); + case Mips::ATOMIC_CMP_SWAP_I32: + return emitAtomicCmpSwap(MI, BB); + case Mips::ATOMIC_CMP_SWAP_I64: + return emitAtomicCmpSwap(MI, BB); + case Mips::ATOMIC_LOAD_MIN_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_MIN_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_MIN_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MIN_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MAX_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_MAX_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_MAX_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MAX_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMIN_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_UMIN_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_UMIN_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMIN_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMAX_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_UMAX_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_UMAX_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMAX_I64: + return emitAtomicBinary(MI, BB); + case Mips::PseudoSDIV: + case Mips::PseudoUDIV: + case Mips::DIV: + case Mips::DIVU: + case Mips::MOD: + case Mips::MODU: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), false, false); + case Mips::SDIV_MM_Pseudo: + case Mips::UDIV_MM_Pseudo: + case Mips::SDIV_MM: + case Mips::UDIV_MM: + case Mips::DIV_MMR6: + case Mips::DIVU_MMR6: + case Mips::MOD_MMR6: + case Mips::MODU_MMR6: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), false, true); + case Mips::PseudoDSDIV: + case Mips::PseudoDUDIV: + case Mips::DDIV: + case Mips::DDIVU: + case Mips::DMOD: + case Mips::DMODU: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), true, false); + case Mips::PseudoSELECT_I: + case Mips::PseudoSELECT_I64: + case Mips::PseudoSELECT_S: + case Mips::PseudoSELECT_D32: + case Mips::PseudoSELECT_D64: + return emitPseudoSELECT(MI, BB, false, Mips::BNE); + case Mips::PseudoSELECTFP_F_I: + case Mips::PseudoSELECTFP_F_I64: + case Mips::PseudoSELECTFP_F_S: + case Mips::PseudoSELECTFP_F_D32: + case Mips::PseudoSELECTFP_F_D64: + return emitPseudoSELECT(MI, BB, true, Mips::BC1F); + case Mips::PseudoSELECTFP_T_I: + case Mips::PseudoSELECTFP_T_I64: + case Mips::PseudoSELECTFP_T_S: + case Mips::PseudoSELECTFP_T_D32: + case Mips::PseudoSELECTFP_T_D64: + return emitPseudoSELECT(MI, BB, true, Mips::BC1T); + case Mips::PseudoD_SELECT_I: + case Mips::PseudoD_SELECT_I64: + return emitPseudoD_SELECT(MI, BB); + case Mips::LDR_W: + return emitLDR_W(MI, BB); + case Mips::LDR_D: + return emitLDR_D(MI, BB); + case Mips::STR_W: + return emitSTR_W(MI, BB); + case Mips::STR_D: + return emitSTR_D(MI, BB); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a35f0f7b2528752ec8bf1cb35bc8dac3d13de61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp @@ -0,0 +1,86 @@ +void MipsTargetLowering::LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector&Ops, SelectionDAG &DAG) const { + SDLoc DL(Op); + SDValue Result; + if (Constraint.length() > 1) + return; + char ConstraintLetter = Constraint[0]; + switch (ConstraintLetter) { + default: + break; + case 'I': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if (isInt<16>(Val)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'J': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getZExtValue(); + if (Val == 0) { + Result = DAG.getTargetConstant(0, DL, Type); + break; + } + } + return; + case 'K': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + uint64_t Val = (uint64_t)C->getZExtValue(); + if (isUInt<16>(Val)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'L': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((isInt<32>(Val)) && ((Val & 0xffff) == 0)){ + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'N': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((Val >= -65535) && (Val <= -1)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'O': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((isInt<15>(Val))) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'P': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((Val <= 65535) && (Val >= 1)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + } + if (Result.getNode()) { + Ops.push_back(Result); + return; + } + TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63faa865e7326bef8f45aeceafcb0fa0a1c608eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { + BlockAddressSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e452e8db8b1f84d438f35752f0c4f697f1ca6bd3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,194 @@ +SDValue MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl &InVals) const { + SelectionDAG &DAG = CLI.DAG; + SDLoc DL = CLI.DL; + SmallVectorImpl &Outs = CLI.Outs; + SmallVectorImpl &OutVals = CLI.OutVals; + SmallVectorImpl &Ins = CLI.Ins; + SDValue Chain = CLI.Chain; + SDValue Callee = CLI.Callee; + bool &IsTailCall = CLI.IsTailCall; + CallingConv::ID CallConv = CLI.CallConv; + bool IsVarArg = CLI.IsVarArg; + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetFrameLowering *TFL = Subtarget.getFrameLowering(); + MipsFunctionInfo *FuncInfo = MF.getInfo(); + bool IsPIC = isPositionIndependent(); + SmallVector ArgLocs; + MipsCCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), ArgLocs, *DAG.getContext(), MipsCCState::getSpecialCallingConvForCallee(Callee.getNode(), Subtarget)); + const ExternalSymbolSDNode *ES = dyn_cast_or_null(Callee.getNode()); + bool MemcpyInByVal = ES && StringRef(ES->getSymbol()) == StringRef("memcpy") && CallConv != CallingConv::Fast && Chain.getOpcode() == ISD::CALLSEQ_START; + unsigned ReservedArgArea = MemcpyInByVal ? 0 : ABI.GetCalleeAllocdArgSizeInBytes(CallConv); + CCInfo.AllocateStack(ReservedArgArea, Align(1)); + CCInfo.AnalyzeCallOperands(Outs, CC_Mips, CLI.getArgs(), ES ? ES->getSymbol() : nullptr); + unsigned NextStackOffset = CCInfo.getNextStackOffset(); + MachineFunction::CallSiteInfo CSInfo; + bool InternalLinkage = false; + if (IsTailCall) { + IsTailCall = isEligibleForTailCallOptimization(CCInfo, NextStackOffset, *MF.getInfo()); + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + InternalLinkage = G->getGlobal()->hasInternalLinkage(); + IsTailCall &= (InternalLinkage || G->getGlobal()->hasLocalLinkage() || G->getGlobal()->hasPrivateLinkage() || G->getGlobal()->hasHiddenVisibility() || G->getGlobal()->hasProtectedVisibility()); + } + } + if (!IsTailCall && CLI.CB && CLI.CB->isMustTailCall()) + report_fatal_error("failed to perform tail call elimination on a call site marked musttail"); + if (IsTailCall) + ++NumTailCalls; + unsigned StackAlignment = TFL->getStackAlignment(); + NextStackOffset = alignTo(NextStackOffset, StackAlignment); + SDValue NextStackOffsetVal = DAG.getIntPtrConstant(NextStackOffset, DL, true); + if (!(IsTailCall || MemcpyInByVal)) + Chain = DAG.getCALLSEQ_START(Chain, NextStackOffset, 0, DL); + SDValue StackPtr = DAG.getCopyFromReg(Chain, DL, ABI.IsN64() ? Mips::SP_64 : Mips::SP, getPointerTy(DAG.getDataLayout())); + std::deque> RegsToPass; + SmallVector MemOpChains; + CCInfo.rewindByValRegsInfo(); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + SDValue Arg = OutVals[i]; + CCValAssign &VA = ArgLocs[i]; + MVT ValVT = VA.getValVT(), LocVT = VA.getLocVT(); + ISD::ArgFlagsTy Flags = Outs[i].Flags; + bool UseUpperBits = false; + if (Flags.isByVal()) { + unsigned FirstByValReg, LastByValReg; + unsigned ByValIdx = CCInfo.getInRegsParamsProcessed(); + CCInfo.getInRegsParamInfo(ByValIdx, FirstByValReg, LastByValReg); + assert(Flags.getByValSize() && "ByVal args of size 0 should have been ignored by front-end."); + assert(ByValIdx < CCInfo.getInRegsParamsCount()); + assert(!IsTailCall && "Do not tail-call optimize if there is a byval argument."); + passByValArg(Chain, DL, RegsToPass, MemOpChains, StackPtr, MFI, DAG, Arg, FirstByValReg, LastByValReg, Flags, Subtarget.isLittle(), VA); + CCInfo.nextInRegsParam(); + continue; + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: + if (VA.isRegLoc()) { + if ((ValVT == MVT::f32 && LocVT == MVT::i32) || (ValVT == MVT::f64 && LocVT == MVT::i64) || (ValVT == MVT::i64 && LocVT == MVT::f64)) + Arg = DAG.getNode(ISD::BITCAST, DL, LocVT, Arg); + else if (ValVT == MVT::f64 && LocVT == MVT::i32) { + SDValue Lo = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Arg, DAG.getConstant(0, DL, MVT::i32)); + SDValue Hi = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Arg, DAG.getConstant(1, DL, MVT::i32)); + if (!Subtarget.isLittle()) + std::swap(Lo, Hi); + Register LocRegLo = VA.getLocReg(); + unsigned LocRegHigh = getNextIntArgReg(LocRegLo); + RegsToPass.push_back(std::make_pair(LocRegLo, Lo)); + RegsToPass.push_back(std::make_pair(LocRegHigh, Hi)); + continue; + } + } + break; + case CCValAssign::BCvt: + Arg = DAG.getNode(ISD::BITCAST, DL, LocVT, Arg); + break; + case CCValAssign::SExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::SExt: + Arg = DAG.getNode(ISD::SIGN_EXTEND, DL, LocVT, Arg); + break; + case CCValAssign::ZExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::ZExt: + Arg = DAG.getNode(ISD::ZERO_EXTEND, DL, LocVT, Arg); + break; + case CCValAssign::AExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::AExt: + Arg = DAG.getNode(ISD::ANY_EXTEND, DL, LocVT, Arg); + break; + } + if (UseUpperBits) { + unsigned ValSizeInBits = Outs[i].ArgVT.getSizeInBits(); + unsigned LocSizeInBits = VA.getLocVT().getSizeInBits(); + Arg = DAG.getNode(ISD::SHL, DL, VA.getLocVT(), Arg, DAG.getConstant(LocSizeInBits - ValSizeInBits, DL, VA.getLocVT())); + } + if (VA.isRegLoc()) { + RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); + if (Mips::AFGR64RegClass.contains(VA.getLocReg())) + continue; + const TargetOptions &Options = DAG.getTarget().Options; + if (Options.SupportsDebugEntryValues) + CSInfo.emplace_back(VA.getLocReg(), i); + continue; + } + assert(VA.isMemLoc()); + MemOpChains.push_back(passArgOnStack(StackPtr, VA.getLocMemOffset(), Chain, Arg, DL, IsTailCall, DAG)); + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, MemOpChains); + EVT Ty = Callee.getValueType(); + bool GlobalOrExternal = false, IsCallReloc = false; + if (!Subtarget.isABICalls() && !IsPIC) { + if (auto *N = dyn_cast(Callee)) { + if (Subtarget.useLongCalls()) + Callee = Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + else if (auto *N = dyn_cast(Callee)) { + bool UseLongCalls = Subtarget.useLongCalls(); + if (auto *F = dyn_cast(N->getGlobal())) { + if (F->hasFnAttribute("long-call")) + UseLongCalls = true; + else if (F->hasFnAttribute("short-call")) + UseLongCalls = false; + } + if (UseLongCalls) + Callee = Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + } + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + if (IsPIC) { + const GlobalValue *Val = G->getGlobal(); + InternalLinkage = Val->hasInternalLinkage(); + if (InternalLinkage) + Callee = getAddrLocal(G, DL, Ty, DAG, ABI.IsN32() || ABI.IsN64()); + else if (Subtarget.useXGOT()) { + Callee = getAddrGlobalLargeGOT(G, DL, Ty, DAG, MipsII::MO_CALL_HI16, MipsII::MO_CALL_LO16, Chain, FuncInfo->callPtrInfo(MF, Val)); + IsCallReloc = true; + } + else { + Callee = getAddrGlobal(G, DL, Ty, DAG, MipsII::MO_GOT_CALL, Chain, FuncInfo->callPtrInfo(MF, Val)); + IsCallReloc = true; + } + } + else + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), DL, getPointerTy(DAG.getDataLayout()), 0, MipsII::MO_NO_FLAG); + GlobalOrExternal = true; + } + else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { + const char *Sym = S->getSymbol(); + if (!IsPIC) + Callee = DAG.getTargetExternalSymbol( Sym, getPointerTy(DAG.getDataLayout()), MipsII::MO_NO_FLAG); + else if (Subtarget.useXGOT()) { + Callee = getAddrGlobalLargeGOT(S, DL, Ty, DAG, MipsII::MO_CALL_HI16, MipsII::MO_CALL_LO16, Chain, FuncInfo->callPtrInfo(MF, Sym)); + IsCallReloc = true; + } + else { + Callee = getAddrGlobal(S, DL, Ty, DAG, MipsII::MO_GOT_CALL, Chain, FuncInfo->callPtrInfo(MF, Sym)); + IsCallReloc = true; + } + GlobalOrExternal = true; + } + SmallVector Ops(1, Chain); + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); + getOpndList(Ops, RegsToPass, IsPIC, GlobalOrExternal, InternalLinkage, IsCallReloc, CLI, Callee, Chain); + if (IsTailCall) { + MF.getFrameInfo().setHasTailCall(); + SDValue Ret = DAG.getNode(MipsISD::TailCall, DL, MVT::Other, Ops); + DAG.addCallSiteInfo(Ret.getNode(), std::move(CSInfo)); + return Ret; + } + Chain = DAG.getNode(MipsISD::JmpLink, DL, NodeTys, Ops); + SDValue InFlag = Chain.getValue(1); + DAG.addCallSiteInfo(Chain.getNode(), std::move(CSInfo)); + if (!(MemcpyInByVal)) { + Chain = DAG.getCALLSEQ_END(Chain, NextStackOffsetVal, DAG.getIntPtrConstant(0, DL, true), InFlag, DL); + InFlag = Chain.getValue(1); + } + return LowerCallResult(Chain, InFlag, CallConv, IsVarArg, Ins, DL, DAG, InVals, CLI); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a118c8fea23e323e770a810738ac56de09cca15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,11 @@ +SDValue MipsTargetLowering::lowerConstantPool(SDValue Op, SelectionDAG &DAG) const { + ConstantPoolSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) { + const MipsTargetObjectFile *TLOF = static_cast(getTargetMachine().getObjFileLowering()); + if (TLOF->IsConstantInSmallSection(DAG.getDataLayout(), N->getConstVal(), getTargetMachine())) + return getAddrGPRel(N, SDLoc(N), Ty, DAG, ABI.IsN64()); + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55304c0e002c25426cac915e340d397c57564694 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,12 @@ +SDValue MipsTargetLowering::lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { + if (cast(Op.getOperand(0))->getZExtValue() != 0) { + DAG.getContext()->emitError("return address can be determined only for current frame"); + return SDValue(); + } + MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo(); + MFI.setFrameAddressIsTaken(true); + EVT VT = Op.getValueType(); + SDLoc DL(Op); + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), DL, ABI.IsN64() ? Mips::FP_64 : Mips::FP, VT); + return FrameAddr; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbb9efff7eb46b474008aab70f4ce03c006a5618 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,90 @@ +SDValue MipsTargetLowering::LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Ins, const SDLoc &DL, SelectionDAG &DAG, SmallVectorImpl &InVals) const { + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + MipsFI->setVarArgsFrameIndex(0); + std::vector OutChains; + SmallVector ArgLocs; + MipsCCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), ArgLocs, *DAG.getContext()); + CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(CallConv), Align(1)); + const Function &Func = DAG.getMachineFunction().getFunction(); + Function::const_arg_iterator FuncArg = Func.arg_begin(); + if (Func.hasFnAttribute("interrupt") && !Func.arg_empty()) + report_fatal_error("Functions with the interrupt attribute cannot have arguments!"); + CCInfo.AnalyzeFormalArguments(Ins, CC_Mips_FixedArg); + MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(), CCInfo.getInRegsParamsCount() > 0); + unsigned CurArgIdx = 0; + CCInfo.rewindByValRegsInfo(); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + if (Ins[i].isOrigArg()) { + std::advance(FuncArg, Ins[i].getOrigArgIndex() - CurArgIdx); + CurArgIdx = Ins[i].getOrigArgIndex(); + } + EVT ValVT = VA.getValVT(); + ISD::ArgFlagsTy Flags = Ins[i].Flags; + bool IsRegLoc = VA.isRegLoc(); + if (Flags.isByVal()) { + assert(Ins[i].isOrigArg() && "Byval arguments cannot be implicit"); + unsigned FirstByValReg, LastByValReg; + unsigned ByValIdx = CCInfo.getInRegsParamsProcessed(); + CCInfo.getInRegsParamInfo(ByValIdx, FirstByValReg, LastByValReg); + assert(Flags.getByValSize() && "ByVal args of size 0 should have been ignored by front-end."); + assert(ByValIdx < CCInfo.getInRegsParamsCount()); + copyByValRegs(Chain, DL, OutChains, DAG, Flags, InVals, &*FuncArg, FirstByValReg, LastByValReg, VA, CCInfo); + CCInfo.nextInRegsParam(); + continue; + } + if (IsRegLoc) { + MVT RegVT = VA.getLocVT(); + Register ArgReg = VA.getLocReg(); + const TargetRegisterClass *RC = getRegClassFor(RegVT); + unsigned Reg = addLiveIn(DAG.getMachineFunction(), ArgReg, RC); + SDValue ArgValue = DAG.getCopyFromReg(Chain, DL, Reg, RegVT); + ArgValue = UnpackFromArgumentSlot(ArgValue, VA, Ins[i].ArgVT, DL, DAG); + if ((RegVT == MVT::i32 && ValVT == MVT::f32) || (RegVT == MVT::i64 && ValVT == MVT::f64) || (RegVT == MVT::f64 && ValVT == MVT::i64)) + ArgValue = DAG.getNode(ISD::BITCAST, DL, ValVT, ArgValue); + else if (ABI.IsO32() && RegVT == MVT::i32 && ValVT == MVT::f64) { + unsigned Reg2 = addLiveIn(DAG.getMachineFunction(), getNextIntArgReg(ArgReg), RC); + SDValue ArgValue2 = DAG.getCopyFromReg(Chain, DL, Reg2, RegVT); + if (!Subtarget.isLittle()) + std::swap(ArgValue, ArgValue2); + ArgValue = DAG.getNode(MipsISD::BuildPairF64, DL, MVT::f64, ArgValue, ArgValue2); + } + InVals.push_back(ArgValue); + } + else { + MVT LocVT = VA.getLocVT(); + if (ABI.IsO32()) { + if (VA.getValVT().isFloatingPoint() && !Subtarget.useSoftFloat()) + LocVT = VA.getValVT(); + } + assert(VA.isMemLoc()); + int FI = MFI.CreateFixedObject(LocVT.getSizeInBits() / 8, VA.getLocMemOffset(), true); + SDValue FIN = DAG.getFrameIndex(FI, getPointerTy(DAG.getDataLayout())); + SDValue ArgValue = DAG.getLoad(LocVT, DL, Chain, FIN, MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FI)); + OutChains.push_back(ArgValue.getValue(1)); + ArgValue = UnpackFromArgumentSlot(ArgValue, VA, Ins[i].ArgVT, DL, DAG); + InVals.push_back(ArgValue); + } + } + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + if (Ins[i].Flags.isSRet()) { + unsigned Reg = MipsFI->getSRetReturnReg(); + if (!Reg) { + Reg = MF.getRegInfo().createVirtualRegister(getRegClassFor(ABI.IsN64() ? MVT::i64 : MVT::i32)); + MipsFI->setSRetReturnReg(Reg); + } + SDValue Copy = DAG.getCopyToReg(DAG.getEntryNode(), DL, Reg, InVals[i]); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Copy, Chain); + break; + } + } + if (IsVarArg) + writeVarArgRegs(OutChains, Chain, DL, DAG, CCInfo); + if (!OutChains.empty()) { + OutChains.push_back(Chain); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, OutChains); + } + return Chain; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3bc241861141aeaf0155e6e05b289a3c4232fdc8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,17 @@ +SDValue MipsTargetLowering::lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { + EVT Ty = Op.getValueType(); + GlobalAddressSDNode *N = cast(Op); + const GlobalValue *GV = N->getGlobal(); + if (!isPositionIndependent()) { + const MipsTargetObjectFile *TLOF = static_cast(getTargetMachine().getObjFileLowering()); + const GlobalObject *GO = GV->getBaseObject(); + if (GO && TLOF->IsGlobalInSmallSection(GO, getTargetMachine())) + return getAddrGPRel(N, SDLoc(N), Ty, DAG, ABI.IsN64()); + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + if (GV->hasLocalLinkage()) + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); + if (Subtarget.useXGOT()) + return getAddrGlobalLargeGOT(N, SDLoc(N), Ty, DAG, MipsII::MO_GOT_HI16, MipsII::MO_GOT_LO16, DAG.getEntryNode(), MachinePointerInfo::getGOT(DAG.getMachineFunction())); + return getAddrGlobal(N, SDLoc(N), Ty, DAG, (ABI.IsN32() || ABI.IsN64()) ? MipsII::MO_GOT_DISP : MipsII::MO_GOT, DAG.getEntryNode(), MachinePointerInfo::getGOT(DAG.getMachineFunction())); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40d4302abbe9ff053b9574dac4d63cd2fbc144cf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,50 @@ +SDValue MipsTargetLowering::lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { + GlobalAddressSDNode *GA = cast(Op); + if (DAG.getTarget().useEmulatedTLS()) + return LowerToTLSEmulatedModel(GA, DAG); + SDLoc DL(GA); + const GlobalValue *GV = GA->getGlobal(); + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + TLSModel::Model model = getTargetMachine().getTLSModel(GV); + if (model == TLSModel::GeneralDynamic || model == TLSModel::LocalDynamic) { + unsigned Flag = (model == TLSModel::LocalDynamic) ? MipsII::MO_TLSLDM : MipsII::MO_TLSGD; + SDValue TGA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, Flag); + SDValue Argument = DAG.getNode(MipsISD::Wrapper, DL, PtrVT, getGlobalReg(DAG, PtrVT), TGA); + unsigned PtrSize = PtrVT.getSizeInBits(); + IntegerType *PtrTy = Type::getIntNTy(*DAG.getContext(), PtrSize); + SDValue TlsGetAddr = DAG.getExternalSymbol("__tls_get_addr", PtrVT); + ArgListTy Args; + ArgListEntry Entry; + Entry.Node = Argument; + Entry.Ty = PtrTy; + Args.push_back(Entry); + TargetLowering::CallLoweringInfo CLI(DAG); + CLI.setDebugLoc(DL).setChain(DAG.getEntryNode()).setLibCallee(CallingConv::C, PtrTy, TlsGetAddr, std::move(Args)); + std::pair CallResult = LowerCallTo(CLI); + SDValue Ret = CallResult.first; + if (model != TLSModel::LocalDynamic) + return Ret; + SDValue TGAHi = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_DTPREL_HI); + SDValue Hi = DAG.getNode(MipsISD::TlsHi, DL, PtrVT, TGAHi); + SDValue TGALo = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_DTPREL_LO); + SDValue Lo = DAG.getNode(MipsISD::Lo, DL, PtrVT, TGALo); + SDValue Add = DAG.getNode(ISD::ADD, DL, PtrVT, Hi, Ret); + return DAG.getNode(ISD::ADD, DL, PtrVT, Add, Lo); + } + SDValue Offset; + if (model == TLSModel::InitialExec) { + SDValue TGA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_GOTTPREL); + TGA = DAG.getNode(MipsISD::Wrapper, DL, PtrVT, getGlobalReg(DAG, PtrVT),TGA); + Offset = DAG.getLoad(PtrVT, DL, DAG.getEntryNode(), TGA, MachinePointerInfo()); + } + else { + assert(model == TLSModel::LocalExec); + SDValue TGAHi = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_TPREL_HI); + SDValue TGALo = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_TPREL_LO); + SDValue Hi = DAG.getNode(MipsISD::TlsHi, DL, PtrVT, TGAHi); + SDValue Lo = DAG.getNode(MipsISD::Lo, DL, PtrVT, TGALo); + Offset = DAG.getNode(ISD::ADD, DL, PtrVT, Hi, Lo); + } + SDValue ThreadPointer = DAG.getNode(MipsISD::ThreadPointer, DL, PtrVT); + return DAG.getNode(ISD::ADD, DL, PtrVT, ThreadPointer, Offset); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..150e8c0e72027acdaeeb3a046260a9210d8c6e7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,601 @@ +SDValue MipsSETargetLowering::lowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + unsigned Intrinsic = cast(Op->getOperand(0))->getZExtValue(); + switch (Intrinsic) { + default: + return SDValue(); + case Intrinsic::mips_shilo: + return lowerDSPIntr(Op, DAG, MipsISD::SHILO); + case Intrinsic::mips_dpau_h_qbl: + return lowerDSPIntr(Op, DAG, MipsISD::DPAU_H_QBL); + case Intrinsic::mips_dpau_h_qbr: + return lowerDSPIntr(Op, DAG, MipsISD::DPAU_H_QBR); + case Intrinsic::mips_dpsu_h_qbl: + return lowerDSPIntr(Op, DAG, MipsISD::DPSU_H_QBL); + case Intrinsic::mips_dpsu_h_qbr: + return lowerDSPIntr(Op, DAG, MipsISD::DPSU_H_QBR); + case Intrinsic::mips_dpa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPA_W_PH); + case Intrinsic::mips_dps_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPS_W_PH); + case Intrinsic::mips_dpax_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAX_W_PH); + case Intrinsic::mips_dpsx_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSX_W_PH); + case Intrinsic::mips_mulsa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::MULSA_W_PH); + case Intrinsic::mips_mult: + return lowerDSPIntr(Op, DAG, MipsISD::Mult); + case Intrinsic::mips_multu: + return lowerDSPIntr(Op, DAG, MipsISD::Multu); + case Intrinsic::mips_madd: + return lowerDSPIntr(Op, DAG, MipsISD::MAdd); + case Intrinsic::mips_maddu: + return lowerDSPIntr(Op, DAG, MipsISD::MAddu); + case Intrinsic::mips_msub: + return lowerDSPIntr(Op, DAG, MipsISD::MSub); + case Intrinsic::mips_msubu: + return lowerDSPIntr(Op, DAG, MipsISD::MSubu); + case Intrinsic::mips_addv_b: + case Intrinsic::mips_addv_h: + case Intrinsic::mips_addv_w: + case Intrinsic::mips_addv_d: + return DAG.getNode(ISD::ADD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_addvi_b: + case Intrinsic::mips_addvi_h: + case Intrinsic::mips_addvi_w: + case Intrinsic::mips_addvi_d: + return DAG.getNode(ISD::ADD, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_and_v: + return DAG.getNode(ISD::AND, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_andi_b: + return DAG.getNode(ISD::AND, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_bclr_b: + case Intrinsic::mips_bclr_h: + case Intrinsic::mips_bclr_w: + case Intrinsic::mips_bclr_d: + return lowerMSABitClear(Op, DAG); + case Intrinsic::mips_bclri_b: + case Intrinsic::mips_bclri_h: + case Intrinsic::mips_bclri_w: + case Intrinsic::mips_bclri_d: + return lowerMSABitClearImm(Op, DAG); + case Intrinsic::mips_binsli_b: + case Intrinsic::mips_binsli_h: + case Intrinsic::mips_binsli_w: + case Intrinsic::mips_binsli_d: { + EVT VecTy = Op->getValueType(0); + EVT EltTy = VecTy.getVectorElementType(); + if (Op->getConstantOperandVal(3) >= EltTy.getSizeInBits()) + report_fatal_error("Immediate out of range"); + APInt Mask = APInt::getHighBitsSet(EltTy.getSizeInBits(), Op->getConstantOperandVal(3) + 1); + return DAG.getNode(ISD::VSELECT, DL, VecTy, DAG.getConstant(Mask, DL, VecTy, true), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_binsri_b: + case Intrinsic::mips_binsri_h: + case Intrinsic::mips_binsri_w: + case Intrinsic::mips_binsri_d: { + EVT VecTy = Op->getValueType(0); + EVT EltTy = VecTy.getVectorElementType(); + if (Op->getConstantOperandVal(3) >= EltTy.getSizeInBits()) + report_fatal_error("Immediate out of range"); + APInt Mask = APInt::getLowBitsSet(EltTy.getSizeInBits(), Op->getConstantOperandVal(3) + 1); + return DAG.getNode(ISD::VSELECT, DL, VecTy, DAG.getConstant(Mask, DL, VecTy, true), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_bmnz_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(3), Op->getOperand(2), Op->getOperand(1)); + case Intrinsic::mips_bmnzi_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(2), Op->getOperand(1)); + case Intrinsic::mips_bmz_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(3), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_bmzi_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_bneg_b: + case Intrinsic::mips_bneg_h: + case Intrinsic::mips_bneg_w: + case Intrinsic::mips_bneg_d: { + EVT VecTy = Op->getValueType(0); + SDValue One = DAG.getConstant(1, DL, VecTy); + return DAG.getNode(ISD::XOR, DL, VecTy, Op->getOperand(1), DAG.getNode(ISD::SHL, DL, VecTy, One, truncateVecElts(Op, DAG))); + } + case Intrinsic::mips_bnegi_b: + case Intrinsic::mips_bnegi_h: + case Intrinsic::mips_bnegi_w: + case Intrinsic::mips_bnegi_d: + return lowerMSABinaryBitImmIntr(Op, DAG, ISD::XOR, Op->getOperand(2), !Subtarget.isLittle()); + case Intrinsic::mips_bnz_b: + case Intrinsic::mips_bnz_h: + case Intrinsic::mips_bnz_w: + case Intrinsic::mips_bnz_d: + return DAG.getNode(MipsISD::VALL_NONZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bnz_v: + return DAG.getNode(MipsISD::VANY_NONZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bsel_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(3), Op->getOperand(2)); + case Intrinsic::mips_bseli_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(2)); + case Intrinsic::mips_bset_b: + case Intrinsic::mips_bset_h: + case Intrinsic::mips_bset_w: + case Intrinsic::mips_bset_d: { + EVT VecTy = Op->getValueType(0); + SDValue One = DAG.getConstant(1, DL, VecTy); + return DAG.getNode(ISD::OR, DL, VecTy, Op->getOperand(1), DAG.getNode(ISD::SHL, DL, VecTy, One, truncateVecElts(Op, DAG))); + } + case Intrinsic::mips_bseti_b: + case Intrinsic::mips_bseti_h: + case Intrinsic::mips_bseti_w: + case Intrinsic::mips_bseti_d: + return lowerMSABinaryBitImmIntr(Op, DAG, ISD::OR, Op->getOperand(2), !Subtarget.isLittle()); + case Intrinsic::mips_bz_b: + case Intrinsic::mips_bz_h: + case Intrinsic::mips_bz_w: + case Intrinsic::mips_bz_d: + return DAG.getNode(MipsISD::VALL_ZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bz_v: + return DAG.getNode(MipsISD::VANY_ZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ceq_b: + case Intrinsic::mips_ceq_h: + case Intrinsic::mips_ceq_w: + case Intrinsic::mips_ceq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETEQ); + case Intrinsic::mips_ceqi_b: + case Intrinsic::mips_ceqi_h: + case Intrinsic::mips_ceqi_w: + case Intrinsic::mips_ceqi_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETEQ); + case Intrinsic::mips_cle_s_b: + case Intrinsic::mips_cle_s_h: + case Intrinsic::mips_cle_s_w: + case Intrinsic::mips_cle_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETLE); + case Intrinsic::mips_clei_s_b: + case Intrinsic::mips_clei_s_h: + case Intrinsic::mips_clei_s_w: + case Intrinsic::mips_clei_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETLE); + case Intrinsic::mips_cle_u_b: + case Intrinsic::mips_cle_u_h: + case Intrinsic::mips_cle_u_w: + case Intrinsic::mips_cle_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULE); + case Intrinsic::mips_clei_u_b: + case Intrinsic::mips_clei_u_h: + case Intrinsic::mips_clei_u_w: + case Intrinsic::mips_clei_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG), ISD::SETULE); + case Intrinsic::mips_clt_s_b: + case Intrinsic::mips_clt_s_h: + case Intrinsic::mips_clt_s_w: + case Intrinsic::mips_clt_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETLT); + case Intrinsic::mips_clti_s_b: + case Intrinsic::mips_clti_s_h: + case Intrinsic::mips_clti_s_w: + case Intrinsic::mips_clti_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETLT); + case Intrinsic::mips_clt_u_b: + case Intrinsic::mips_clt_u_h: + case Intrinsic::mips_clt_u_w: + case Intrinsic::mips_clt_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULT); + case Intrinsic::mips_clti_u_b: + case Intrinsic::mips_clti_u_h: + case Intrinsic::mips_clti_u_w: + case Intrinsic::mips_clti_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG), ISD::SETULT); + case Intrinsic::mips_copy_s_b: + case Intrinsic::mips_copy_s_h: + case Intrinsic::mips_copy_s_w: + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_SEXT_ELT); + case Intrinsic::mips_copy_s_d: + if (Subtarget.hasMips64()) + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_SEXT_ELT); + else { + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + } + case Intrinsic::mips_copy_u_b: + case Intrinsic::mips_copy_u_h: + case Intrinsic::mips_copy_u_w: + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_ZEXT_ELT); + case Intrinsic::mips_copy_u_d: + if (Subtarget.hasMips64()) + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_ZEXT_ELT); + else { + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + } + case Intrinsic::mips_div_s_b: + case Intrinsic::mips_div_s_h: + case Intrinsic::mips_div_s_w: + case Intrinsic::mips_div_s_d: + return DAG.getNode(ISD::SDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_div_u_b: + case Intrinsic::mips_div_u_h: + case Intrinsic::mips_div_u_w: + case Intrinsic::mips_div_u_d: + return DAG.getNode(ISD::UDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fadd_w: + case Intrinsic::mips_fadd_d: + return DAG.getNode(ISD::FADD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fceq_w: + case Intrinsic::mips_fceq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOEQ); + case Intrinsic::mips_fcle_w: + case Intrinsic::mips_fcle_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOLE); + case Intrinsic::mips_fclt_w: + case Intrinsic::mips_fclt_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOLT); + case Intrinsic::mips_fcne_w: + case Intrinsic::mips_fcne_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETONE); + case Intrinsic::mips_fcor_w: + case Intrinsic::mips_fcor_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETO); + case Intrinsic::mips_fcueq_w: + case Intrinsic::mips_fcueq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUEQ); + case Intrinsic::mips_fcule_w: + case Intrinsic::mips_fcule_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULE); + case Intrinsic::mips_fcult_w: + case Intrinsic::mips_fcult_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULT); + case Intrinsic::mips_fcun_w: + case Intrinsic::mips_fcun_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUO); + case Intrinsic::mips_fcune_w: + case Intrinsic::mips_fcune_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUNE); + case Intrinsic::mips_fdiv_w: + case Intrinsic::mips_fdiv_d: + return DAG.getNode(ISD::FDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ffint_u_w: + case Intrinsic::mips_ffint_u_d: + return DAG.getNode(ISD::UINT_TO_FP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ffint_s_w: + case Intrinsic::mips_ffint_s_d: + return DAG.getNode(ISD::SINT_TO_FP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fill_b: + case Intrinsic::mips_fill_h: + case Intrinsic::mips_fill_w: + case Intrinsic::mips_fill_d: { + EVT ResTy = Op->getValueType(0); + SmallVector Ops(ResTy.getVectorNumElements(), Op->getOperand(1)); + return DAG.getBuildVector(ResTy, DL, Ops); + } + case Intrinsic::mips_fexp2_w: + case Intrinsic::mips_fexp2_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::FMUL, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::FEXP2, SDLoc(Op), ResTy, Op->getOperand(2))); + } + case Intrinsic::mips_flog2_w: + case Intrinsic::mips_flog2_d: + return DAG.getNode(ISD::FLOG2, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fmadd_w: + case Intrinsic::mips_fmadd_d: + return DAG.getNode(ISD::FMA, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + case Intrinsic::mips_fmul_w: + case Intrinsic::mips_fmul_d: + return DAG.getNode(ISD::FMUL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fmsub_w: + case Intrinsic::mips_fmsub_d: { + return DAG.getNode(MipsISD::FMS, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + } + case Intrinsic::mips_frint_w: + case Intrinsic::mips_frint_d: + return DAG.getNode(ISD::FRINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fsqrt_w: + case Intrinsic::mips_fsqrt_d: + return DAG.getNode(ISD::FSQRT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fsub_w: + case Intrinsic::mips_fsub_d: + return DAG.getNode(ISD::FSUB, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ftrunc_u_w: + case Intrinsic::mips_ftrunc_u_d: + return DAG.getNode(ISD::FP_TO_UINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ftrunc_s_w: + case Intrinsic::mips_ftrunc_s_d: + return DAG.getNode(ISD::FP_TO_SINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ilvev_b: + case Intrinsic::mips_ilvev_h: + case Intrinsic::mips_ilvev_w: + case Intrinsic::mips_ilvev_d: + return DAG.getNode(MipsISD::ILVEV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvl_b: + case Intrinsic::mips_ilvl_h: + case Intrinsic::mips_ilvl_w: + case Intrinsic::mips_ilvl_d: + return DAG.getNode(MipsISD::ILVL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvod_b: + case Intrinsic::mips_ilvod_h: + case Intrinsic::mips_ilvod_w: + case Intrinsic::mips_ilvod_d: + return DAG.getNode(MipsISD::ILVOD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvr_b: + case Intrinsic::mips_ilvr_h: + case Intrinsic::mips_ilvr_w: + case Intrinsic::mips_ilvr_d: + return DAG.getNode(MipsISD::ILVR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_insert_b: + case Intrinsic::mips_insert_h: + case Intrinsic::mips_insert_w: + case Intrinsic::mips_insert_d: + return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(3), Op->getOperand(2)); + case Intrinsic::mips_insve_b: + case Intrinsic::mips_insve_h: + case Intrinsic::mips_insve_w: + case Intrinsic::mips_insve_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_insve_b: Max = 15; break; + case Intrinsic::mips_insve_h: Max = 7; break; + case Intrinsic::mips_insve_w: Max = 3; break; + case Intrinsic::mips_insve_d: Max = 1; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return DAG.getNode(MipsISD::INSVE, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3), DAG.getConstant(0, DL, MVT::i32)); + } + case Intrinsic::mips_ldi_b: + case Intrinsic::mips_ldi_h: + case Intrinsic::mips_ldi_w: + case Intrinsic::mips_ldi_d: + return lowerMSASplatImm(Op, 1, DAG, true); + case Intrinsic::mips_lsa: + case Intrinsic::mips_dlsa: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::ADD, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::SHL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_maddv_b: + case Intrinsic::mips_maddv_h: + case Intrinsic::mips_maddv_w: + case Intrinsic::mips_maddv_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::ADD, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::MUL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_max_s_b: + case Intrinsic::mips_max_s_h: + case Intrinsic::mips_max_s_w: + case Intrinsic::mips_max_s_d: + return DAG.getNode(ISD::SMAX, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_max_u_b: + case Intrinsic::mips_max_u_h: + case Intrinsic::mips_max_u_w: + case Intrinsic::mips_max_u_d: + return DAG.getNode(ISD::UMAX, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_maxi_s_b: + case Intrinsic::mips_maxi_s_h: + case Intrinsic::mips_maxi_s_w: + case Intrinsic::mips_maxi_s_d: + return DAG.getNode(ISD::SMAX, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true)); + case Intrinsic::mips_maxi_u_b: + case Intrinsic::mips_maxi_u_h: + case Intrinsic::mips_maxi_u_w: + case Intrinsic::mips_maxi_u_d: + return DAG.getNode(ISD::UMAX, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_min_s_b: + case Intrinsic::mips_min_s_h: + case Intrinsic::mips_min_s_w: + case Intrinsic::mips_min_s_d: + return DAG.getNode(ISD::SMIN, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_min_u_b: + case Intrinsic::mips_min_u_h: + case Intrinsic::mips_min_u_w: + case Intrinsic::mips_min_u_d: + return DAG.getNode(ISD::UMIN, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mini_s_b: + case Intrinsic::mips_mini_s_h: + case Intrinsic::mips_mini_s_w: + case Intrinsic::mips_mini_s_d: + return DAG.getNode(ISD::SMIN, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true)); + case Intrinsic::mips_mini_u_b: + case Intrinsic::mips_mini_u_h: + case Intrinsic::mips_mini_u_w: + case Intrinsic::mips_mini_u_d: + return DAG.getNode(ISD::UMIN, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_mod_s_b: + case Intrinsic::mips_mod_s_h: + case Intrinsic::mips_mod_s_w: + case Intrinsic::mips_mod_s_d: + return DAG.getNode(ISD::SREM, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mod_u_b: + case Intrinsic::mips_mod_u_h: + case Intrinsic::mips_mod_u_w: + case Intrinsic::mips_mod_u_d: + return DAG.getNode(ISD::UREM, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mulv_b: + case Intrinsic::mips_mulv_h: + case Intrinsic::mips_mulv_w: + case Intrinsic::mips_mulv_d: + return DAG.getNode(ISD::MUL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_msubv_b: + case Intrinsic::mips_msubv_h: + case Intrinsic::mips_msubv_w: + case Intrinsic::mips_msubv_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::SUB, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::MUL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_nlzc_b: + case Intrinsic::mips_nlzc_h: + case Intrinsic::mips_nlzc_w: + case Intrinsic::mips_nlzc_d: + return DAG.getNode(ISD::CTLZ, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_nor_v: { + SDValue Res = DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + return DAG.getNOT(DL, Res, Res->getValueType(0)); + } + case Intrinsic::mips_nori_b: { + SDValue Res = DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + return DAG.getNOT(DL, Res, Res->getValueType(0)); + } + case Intrinsic::mips_or_v: + return DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ori_b: + return DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_pckev_b: + case Intrinsic::mips_pckev_h: + case Intrinsic::mips_pckev_w: + case Intrinsic::mips_pckev_d: + return DAG.getNode(MipsISD::PCKEV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_pckod_b: + case Intrinsic::mips_pckod_h: + case Intrinsic::mips_pckod_w: + case Intrinsic::mips_pckod_d: + return DAG.getNode(MipsISD::PCKOD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_pcnt_b: + case Intrinsic::mips_pcnt_h: + case Intrinsic::mips_pcnt_w: + case Intrinsic::mips_pcnt_d: + return DAG.getNode(ISD::CTPOP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_sat_s_b: + case Intrinsic::mips_sat_s_h: + case Intrinsic::mips_sat_s_w: + case Intrinsic::mips_sat_s_d: + case Intrinsic::mips_sat_u_b: + case Intrinsic::mips_sat_u_h: + case Intrinsic::mips_sat_u_w: + case Intrinsic::mips_sat_u_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_sat_s_b: + case Intrinsic::mips_sat_u_b: Max = 7; break; + case Intrinsic::mips_sat_s_h: + case Intrinsic::mips_sat_u_h: Max = 15; break; + case Intrinsic::mips_sat_s_w: + case Intrinsic::mips_sat_u_w: Max = 31; break; + case Intrinsic::mips_sat_s_d: + case Intrinsic::mips_sat_u_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_shf_b: + case Intrinsic::mips_shf_h: + case Intrinsic::mips_shf_w: { + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > 255) + report_fatal_error("Immediate out of range"); + return DAG.getNode(MipsISD::SHF, DL, Op->getValueType(0), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_sldi_b: + case Intrinsic::mips_sldi_h: + case Intrinsic::mips_sldi_w: + case Intrinsic::mips_sldi_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_sldi_b: Max = 15; break; + case Intrinsic::mips_sldi_h: Max = 7; break; + case Intrinsic::mips_sldi_w: Max = 3; break; + case Intrinsic::mips_sldi_d: Max = 1; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(3))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_sll_b: + case Intrinsic::mips_sll_h: + case Intrinsic::mips_sll_w: + case Intrinsic::mips_sll_d: + return DAG.getNode(ISD::SHL, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_slli_b: + case Intrinsic::mips_slli_h: + case Intrinsic::mips_slli_w: + case Intrinsic::mips_slli_d: + return DAG.getNode(ISD::SHL, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_splat_b: + case Intrinsic::mips_splat_h: + case Intrinsic::mips_splat_w: + case Intrinsic::mips_splat_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), lowerMSASplatZExt(Op, 2, DAG), Op->getOperand(1), Op->getOperand(1)); + case Intrinsic::mips_splati_b: + case Intrinsic::mips_splati_h: + case Intrinsic::mips_splati_w: + case Intrinsic::mips_splati_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), lowerMSASplatImm(Op, 2, DAG), Op->getOperand(1), Op->getOperand(1)); + case Intrinsic::mips_sra_b: + case Intrinsic::mips_sra_h: + case Intrinsic::mips_sra_w: + case Intrinsic::mips_sra_d: + return DAG.getNode(ISD::SRA, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_srai_b: + case Intrinsic::mips_srai_h: + case Intrinsic::mips_srai_w: + case Intrinsic::mips_srai_d: + return DAG.getNode(ISD::SRA, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_srari_b: + case Intrinsic::mips_srari_h: + case Intrinsic::mips_srari_w: + case Intrinsic::mips_srari_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_srari_b: Max = 7; break; + case Intrinsic::mips_srari_h: Max = 15; break; + case Intrinsic::mips_srari_w: Max = 31; break; + case Intrinsic::mips_srari_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_srl_b: + case Intrinsic::mips_srl_h: + case Intrinsic::mips_srl_w: + case Intrinsic::mips_srl_d: + return DAG.getNode(ISD::SRL, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_srli_b: + case Intrinsic::mips_srli_h: + case Intrinsic::mips_srli_w: + case Intrinsic::mips_srli_d: + return DAG.getNode(ISD::SRL, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_srlri_b: + case Intrinsic::mips_srlri_h: + case Intrinsic::mips_srlri_w: + case Intrinsic::mips_srlri_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_srlri_b: Max = 7; break; + case Intrinsic::mips_srlri_h: Max = 15; break; + case Intrinsic::mips_srlri_w: Max = 31; break; + case Intrinsic::mips_srlri_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_subv_b: + case Intrinsic::mips_subv_h: + case Intrinsic::mips_subv_w: + case Intrinsic::mips_subv_d: + return DAG.getNode(ISD::SUB, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_subvi_b: + case Intrinsic::mips_subvi_h: + case Intrinsic::mips_subvi_w: + case Intrinsic::mips_subvi_d: + return DAG.getNode(ISD::SUB, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_vshf_b: + case Intrinsic::mips_vshf_h: + case Intrinsic::mips_vshf_w: + case Intrinsic::mips_vshf_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + case Intrinsic::mips_xor_v: + return DAG.getNode(ISD::XOR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_xori_b: + return DAG.getNode(ISD::XOR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::thread_pointer: { + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + return DAG.getNode(MipsISD::ThreadPointer, DL, PtrVT); + } + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4be9f6092250b32fead2a9800ea16544544f58f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp @@ -0,0 +1,52 @@ +SDValue MipsSETargetLowering::lowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const { + unsigned Intr = cast(Op->getOperand(1))->getZExtValue(); + switch (Intr) { + default: + return SDValue(); + case Intrinsic::mips_extp: + return lowerDSPIntr(Op, DAG, MipsISD::EXTP); + case Intrinsic::mips_extpdp: + return lowerDSPIntr(Op, DAG, MipsISD::EXTPDP); + case Intrinsic::mips_extr_w: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_W); + case Intrinsic::mips_extr_r_w: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_R_W); + case Intrinsic::mips_extr_rs_w: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_RS_W); + case Intrinsic::mips_extr_s_h: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_S_H); + case Intrinsic::mips_mthlip: + return lowerDSPIntr(Op, DAG, MipsISD::MTHLIP); + case Intrinsic::mips_mulsaq_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::MULSAQ_S_W_PH); + case Intrinsic::mips_maq_s_w_phl: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_S_W_PHL); + case Intrinsic::mips_maq_s_w_phr: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_S_W_PHR); + case Intrinsic::mips_maq_sa_w_phl: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_SA_W_PHL); + case Intrinsic::mips_maq_sa_w_phr: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_SA_W_PHR); + case Intrinsic::mips_dpaq_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQ_S_W_PH); + case Intrinsic::mips_dpsq_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQ_S_W_PH); + case Intrinsic::mips_dpaq_sa_l_w: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQ_SA_L_W); + case Intrinsic::mips_dpsq_sa_l_w: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQ_SA_L_W); + case Intrinsic::mips_dpaqx_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQX_S_W_PH); + case Intrinsic::mips_dpaqx_sa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQX_SA_W_PH); + case Intrinsic::mips_dpsqx_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQX_S_W_PH); + case Intrinsic::mips_dpsqx_sa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQX_SA_W_PH); + case Intrinsic::mips_ld_b: + case Intrinsic::mips_ld_h: + case Intrinsic::mips_ld_w: + case Intrinsic::mips_ld_d: + return lowerMSALoadIntr(Op, DAG, Intr, Subtarget); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c445b62394d8dd7ca699b85e09abca470d7e9eef --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerJumpTable(SDValue Op, SelectionDAG &DAG) const { + JumpTableSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbfe3d2f0ef29923975a86d495e1dd2120dba454 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,22 @@ +SDValue MipsSETargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { + switch(Op.getOpcode()) { + case ISD::LOAD: return lowerLOAD(Op, DAG); + case ISD::STORE: return lowerSTORE(Op, DAG); + case ISD::SMUL_LOHI: return lowerMulDiv(Op, MipsISD::Mult, true, true, DAG); + case ISD::UMUL_LOHI: return lowerMulDiv(Op, MipsISD::Multu, true, true, DAG); + case ISD::MULHS: return lowerMulDiv(Op, MipsISD::Mult, false, true, DAG); + case ISD::MULHU: return lowerMulDiv(Op, MipsISD::Multu, false, true, DAG); + case ISD::MUL: return lowerMulDiv(Op, MipsISD::Mult, true, false, DAG); + case ISD::SDIVREM: return lowerMulDiv(Op, MipsISD::DivRem, true, true, DAG); + case ISD::UDIVREM: return lowerMulDiv(Op, MipsISD::DivRemU, true, true, DAG); + case ISD::INTRINSIC_WO_CHAIN: return lowerINTRINSIC_WO_CHAIN(Op, DAG); + case ISD::INTRINSIC_W_CHAIN: return lowerINTRINSIC_W_CHAIN(Op, DAG); + case ISD::INTRINSIC_VOID: return lowerINTRINSIC_VOID(Op, DAG); + case ISD::EXTRACT_VECTOR_ELT: return lowerEXTRACT_VECTOR_ELT(Op, DAG); + case ISD::BUILD_VECTOR: return lowerBUILD_VECTOR(Op, DAG); + case ISD::VECTOR_SHUFFLE: return lowerVECTOR_SHUFFLE(Op, DAG); + case ISD::SELECT: return lowerSELECT(Op, DAG); + case ISD::BITCAST: return lowerBITCAST(Op, DAG); + } + return MipsTargetLowering::LowerOperation(Op, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ded637a4455513a16d891e39639e269a720641e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,15 @@ +SDValue MipsTargetLowering::lowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const { + if (verifyReturnAddressArgumentIsConstant(Op, DAG)) + return SDValue(); + if (cast(Op.getOperand(0))->getZExtValue() != 0) { + DAG.getContext()->emitError("return address can be determined only for current frame"); + return SDValue(); + } + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MVT VT = Op.getSimpleValueType(); + unsigned RA = ABI.IsN64() ? Mips::RA_64 : Mips::RA; + MFI.setReturnAddressIsTaken(true); + unsigned Reg = MF.addLiveIn(RA, getRegClassFor(VT)); + return DAG.getCopyFromReg(DAG.getEntryNode(), SDLoc(Op), Reg, VT); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ed075e6ccf9610456191789f39cad7dd5b16736 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,66 @@ +SDValue MipsTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, const SDLoc &DL, SelectionDAG &DAG) const { + SmallVector RVLocs; + MachineFunction &MF = DAG.getMachineFunction(); + MipsCCState CCInfo(CallConv, IsVarArg, MF, RVLocs, *DAG.getContext()); + CCInfo.AnalyzeReturn(Outs, RetCC_Mips); + SDValue Flag; + SmallVector RetOps(1, Chain); + for (unsigned i = 0; i != RVLocs.size(); ++i) { + SDValue Val = OutVals[i]; + CCValAssign &VA = RVLocs[i]; + assert(VA.isRegLoc() && "Can only return in registers!"); + bool UseUpperBits = false; + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + Val = DAG.getNode(ISD::BITCAST, DL, VA.getLocVT(), Val); + break; + case CCValAssign::AExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::AExt: + Val = DAG.getNode(ISD::ANY_EXTEND, DL, VA.getLocVT(), Val); + break; + case CCValAssign::ZExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::ZExt: + Val = DAG.getNode(ISD::ZERO_EXTEND, DL, VA.getLocVT(), Val); + break; + case CCValAssign::SExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::SExt: + Val = DAG.getNode(ISD::SIGN_EXTEND, DL, VA.getLocVT(), Val); + break; + } + if (UseUpperBits) { + unsigned ValSizeInBits = Outs[i].ArgVT.getSizeInBits(); + unsigned LocSizeInBits = VA.getLocVT().getSizeInBits(); + Val = DAG.getNode(ISD::SHL, DL, VA.getLocVT(), Val, DAG.getConstant(LocSizeInBits - ValSizeInBits, DL, VA.getLocVT())); + } + Chain = DAG.getCopyToReg(Chain, DL, VA.getLocReg(), Val, Flag); + Flag = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(VA.getLocReg(), VA.getLocVT())); + } + if (MF.getFunction().hasStructRetAttr()) { + MipsFunctionInfo *MipsFI = MF.getInfo(); + unsigned Reg = MipsFI->getSRetReturnReg(); + if (!Reg) + llvm_unreachable("sret virtual register not created in the entry block"); + SDValue Val = DAG.getCopyFromReg(Chain, DL, Reg, getPointerTy(DAG.getDataLayout())); + unsigned V0 = ABI.IsN64() ? Mips::V0_64 : Mips::V0; + Chain = DAG.getCopyToReg(Chain, DL, V0, Val, Flag); + Flag = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(V0, getPointerTy(DAG.getDataLayout()))); + } + RetOps[0] = Chain;. + if (Flag.getNode()) + RetOps.push_back(Flag); + if (DAG.getMachineFunction().getFunction().hasFnAttribute("interrupt")) + return LowerInterruptReturn(RetOps, DL, DAG); + return DAG.getNode(MipsISD::Ret, DL, MVT::Other, RetOps); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82c750e52dc286a4e812e266e95aad7444d81f06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,8 @@ +SDValue MipsTargetLowering::lowerVASTART(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachineFunction(); + MipsFunctionInfo *FuncInfo = MF.getInfo(); + SDLoc DL(Op); + SDValue FI = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), getPointerTy(MF.getDataLayout())); + const Value *SV = cast(Op.getOperand(2))->getValue(); + return DAG.getStore(Op.getOperand(0), DL, FI, Op.getOperand(1), MachinePointerInfo(SV)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a38352825f56aab99f061204881b1757052b6041 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,115 @@ +enum NodeType : unsigned { + FIRST_NUMBER = ISD::BUILTIN_OP_END, + JmpLink, + TailCall, + Highest, + Higher, + Hi, + Lo, + GotHi, + TlsHi, + GPRel, + ThreadPointer, + FMS, + FPBrcond, + FPCmp, + FSELECT, + MTC1_D64, + CMovFP_T, + CMovFP_F, + TruncIntFP, + Ret, + ERet, + EH_RETURN, + MFHI, + MFLO, + MTLOHI, + Mult, + Multu, + MAdd, + MAddu, + MSub, + MSubu, + DivRem, + DivRemU, + DivRem16, + DivRemU16, + BuildPairF64, + ExtractElementF64, + Wrapper, + DynAlloc, + Sync, + Ext, + Ins, + CIns, + EXTP, + EXTPDP, + EXTR_S_H, + EXTR_W, + EXTR_R_W, + EXTR_RS_W, + SHILO, + MTHLIP, + MULSAQ_S_W_PH, + MAQ_S_W_PHL, + MAQ_S_W_PHR, + MAQ_SA_W_PHL, + MAQ_SA_W_PHR, + DPAU_H_QBL, + DPAU_H_QBR, + DPSU_H_QBL, + DPSU_H_QBR, + DPAQ_S_W_PH, + DPSQ_S_W_PH, + DPAQ_SA_L_W, + DPSQ_SA_L_W, + DPA_W_PH, + DPS_W_PH, + DPAQX_S_W_PH, + DPAQX_SA_W_PH, + DPAX_W_PH, + DPSX_W_PH, + DPSQX_S_W_PH, + DPSQX_SA_W_PH, + MULSA_W_PH, + MULT, + MULTU, + MADD_DSP, + MADDU_DSP, + MSUB_DSP, + MSUBU_DSP, + SHLL_DSP, + SHRA_DSP, + SHRL_DSP, + SETCC_DSP, + SELECT_CC_DSP, + VALL_ZERO, + VANY_ZERO, + VALL_NONZERO, + VANY_NONZERO, + VCEQ, + VCLE_S, + VCLE_U, + VCLT_S, + VCLT_U, + VSHF, + SHF, + ILVEV, + ILVOD, + ILVL, + ILVR, + PCKEV, + PCKOD, + INSVE, + VNOR, + VEXTRACT_SEXT_ELT, + VEXTRACT_ZEXT_ELT, + LWL = ISD::FIRST_TARGET_MEMORY_OPCODE, + LWR, + SWL, + SWR, + LDL, + LDR, + SDL, + SDR +}; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4c27aab8d97ef85c9947073d81e7dab0609a8e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,34 @@ +SDValue MipsSETargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { + SelectionDAG &DAG = DCI.DAG; + SDValue Val; + switch (N->getOpcode()) { + case ISD::AND: + Val = performANDCombine(N, DAG, DCI, Subtarget); + break; + case ISD::OR: + Val = performORCombine(N, DAG, DCI, Subtarget); + break; + case ISD::MUL: + return performMULCombine(N, DAG, DCI, this, Subtarget); + case ISD::SHL: + Val = performSHLCombine(N, DAG, DCI, Subtarget); + break; + case ISD::SRA: + return performSRACombine(N, DAG, DCI, Subtarget); + case ISD::SRL: + return performSRLCombine(N, DAG, DCI, Subtarget); + case ISD::VSELECT: + return performVSELECTCombine(N, DAG); + case ISD::XOR: + Val = performXORCombine(N, DAG, Subtarget); + break; + case ISD::SETCC: + Val = performSETCCCombine(N, DAG); + break; + } + if (Val.getNode()) { + LLVM_DEBUG(dbgs() << "\nMipsSE DAG Combine:\n"; N->printrWithDepth(dbgs(), &DAG); dbgs() << "\n=> \n"; Val.getNode()->printrWithDepth(dbgs(), &DAG); dbgs() << "\n"); + return Val; + } + return MipsTargetLowering::PerformDAGCombine(N, DCI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e0b70bb9b6952f3748f9c7143aec894bfccf9c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,3 @@ +void MipsTargetLowering::ReplaceNodeResults(SDNode *N, SmallVectorImpl &Results, SelectionDAG &DAG) const { + return LowerOperationWrapper(N, Results, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b374c388335c1101e9b9313b761335931a0abe3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,173 @@ +MipsTargetLowering::MipsTargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI) : TargetLowering(TM), Subtarget(STI), ABI(TM.getABI()) { + setBooleanContents(ZeroOrOneBooleanContent); + setBooleanVectorContents(ZeroOrNegativeOneBooleanContent); + if (Subtarget.hasMips32r6()) + setBooleanContents(ZeroOrOneBooleanContent, ZeroOrNegativeOneBooleanContent); + for (MVT VT : MVT::integer_valuetypes()) { + setLoadExtAction(ISD::EXTLOAD, VT, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, VT, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, VT, MVT::i1, Promote); + } + for (MVT VT : MVT::fp_valuetypes()) { + setLoadExtAction(ISD::EXTLOAD, VT, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, VT, MVT::f16, Expand); + } + for (MVT VT : MVT::fp_fixedlen_vector_valuetypes()) { + MVT F16VT = MVT::getVectorVT(MVT::f16, VT.getVectorNumElements()); + if (F16VT.isValid()) + setLoadExtAction(ISD::EXTLOAD, VT, F16VT, Expand); + } + setTruncStoreAction(MVT::f32, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f32, Expand); + AddPromotedToType(ISD::SETCC, MVT::i1, MVT::i32); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); + setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); + setOperationAction(ISD::BlockAddress, MVT::i32, Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom); + setOperationAction(ISD::JumpTable, MVT::i32, Custom); + setOperationAction(ISD::ConstantPool, MVT::i32, Custom); + setOperationAction(ISD::SELECT, MVT::f32, Custom); + setOperationAction(ISD::SELECT, MVT::f64, Custom); + setOperationAction(ISD::SELECT, MVT::i32, Custom); + setOperationAction(ISD::SETCC, MVT::f32, Custom); + setOperationAction(ISD::SETCC, MVT::f64, Custom); + setOperationAction(ISD::BRCOND, MVT::Other, Custom); + setOperationAction(ISD::FCOPYSIGN, MVT::f32, Custom); + setOperationAction(ISD::FCOPYSIGN, MVT::f64, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); + if (!(TM.Options.NoNaNsFPMath || Subtarget.inAbs2008Mode())) { + setOperationAction(ISD::FABS, MVT::f32, Custom); + setOperationAction(ISD::FABS, MVT::f64, Custom); + } + if (Subtarget.isGP64bit()) { + setOperationAction(ISD::GlobalAddress, MVT::i64, Custom); + setOperationAction(ISD::BlockAddress, MVT::i64, Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom); + setOperationAction(ISD::JumpTable, MVT::i64, Custom); + setOperationAction(ISD::ConstantPool, MVT::i64, Custom); + setOperationAction(ISD::SELECT, MVT::i64, Custom); + setOperationAction(ISD::LOAD, MVT::i64, Custom); + setOperationAction(ISD::STORE, MVT::i64, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i64, Custom); + setOperationAction(ISD::SHL_PARTS, MVT::i64, Custom); + setOperationAction(ISD::SRA_PARTS, MVT::i64, Custom); + setOperationAction(ISD::SRL_PARTS, MVT::i64, Custom); + } + if (!Subtarget.isGP64bit()) { + setOperationAction(ISD::SHL_PARTS, MVT::i32, Custom); + setOperationAction(ISD::SRA_PARTS, MVT::i32, Custom); + setOperationAction(ISD::SRL_PARTS, MVT::i32, Custom); + } + setOperationAction(ISD::EH_DWARF_CFA, MVT::i32, Custom); + if (Subtarget.isGP64bit()) + setOperationAction(ISD::EH_DWARF_CFA, MVT::i64, Custom); + setOperationAction(ISD::SDIV, MVT::i32, Expand); + setOperationAction(ISD::SREM, MVT::i32, Expand); + setOperationAction(ISD::UDIV, MVT::i32, Expand); + setOperationAction(ISD::UREM, MVT::i32, Expand); + setOperationAction(ISD::SDIV, MVT::i64, Expand); + setOperationAction(ISD::SREM, MVT::i64, Expand); + setOperationAction(ISD::UDIV, MVT::i64, Expand); + setOperationAction(ISD::UREM, MVT::i64, Expand); + setOperationAction(ISD::BR_CC, MVT::f32, Expand); + setOperationAction(ISD::BR_CC, MVT::f64, Expand); + setOperationAction(ISD::BR_CC, MVT::i32, Expand); + setOperationAction(ISD::BR_CC, MVT::i64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::i32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::i64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f64, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i32, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i64, Expand); + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand); + setOperationAction(ISD::FP_TO_UINT, MVT::i64, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand); + if (Subtarget.hasCnMips()) { + setOperationAction(ISD::CTPOP, MVT::i32, Legal); + setOperationAction(ISD::CTPOP, MVT::i64, Legal); + } + else { + setOperationAction(ISD::CTPOP, MVT::i32, Expand); + setOperationAction(ISD::CTPOP, MVT::i64, Expand); + } + setOperationAction(ISD::CTTZ, MVT::i32, Expand); + setOperationAction(ISD::CTTZ, MVT::i64, Expand); + setOperationAction(ISD::ROTL, MVT::i32, Expand); + setOperationAction(ISD::ROTL, MVT::i64, Expand); + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64, Expand); + if (!Subtarget.hasMips32r2()) + setOperationAction(ISD::ROTR, MVT::i32, Expand); + if (!Subtarget.hasMips64r2()) + setOperationAction(ISD::ROTR, MVT::i64, Expand); + setOperationAction(ISD::FSIN, MVT::f32, Expand); + setOperationAction(ISD::FSIN, MVT::f64, Expand); + setOperationAction(ISD::FCOS, MVT::f32, Expand); + setOperationAction(ISD::FCOS, MVT::f64, Expand); + setOperationAction(ISD::FSINCOS, MVT::f32, Expand); + setOperationAction(ISD::FSINCOS, MVT::f64, Expand); + setOperationAction(ISD::FPOW, MVT::f32, Expand); + setOperationAction(ISD::FPOW, MVT::f64, Expand); + setOperationAction(ISD::FLOG, MVT::f32, Expand); + setOperationAction(ISD::FLOG2, MVT::f32, Expand); + setOperationAction(ISD::FLOG10, MVT::f32, Expand); + setOperationAction(ISD::FEXP, MVT::f32, Expand); + setOperationAction(ISD::FMA, MVT::f32, Expand); + setOperationAction(ISD::FMA, MVT::f64, Expand); + setOperationAction(ISD::FREM, MVT::f32, Expand); + setOperationAction(ISD::FREM, MVT::f64, Expand); + setOperationAction(ISD::FP16_TO_FP, MVT::f32, Expand); + setOperationAction(ISD::FP_TO_FP16, MVT::f32, Expand); + setOperationAction(ISD::FP16_TO_FP, MVT::f64, Expand); + setOperationAction(ISD::FP_TO_FP16, MVT::f64, Expand); + setOperationAction(ISD::EH_RETURN, MVT::Other, Custom); + setOperationAction(ISD::VASTART, MVT::Other, Custom); + setOperationAction(ISD::VAARG, MVT::Other, Custom); + setOperationAction(ISD::VACOPY, MVT::Other, Expand); + setOperationAction(ISD::VAEND, MVT::Other, Expand); + setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); + setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); + if (!Subtarget.isGP64bit()) { + setOperationAction(ISD::ATOMIC_LOAD, MVT::i64, Expand); + setOperationAction(ISD::ATOMIC_STORE, MVT::i64, Expand); + } + if (!Subtarget.hasMips32r2()) { + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand); + } + if (!Subtarget.hasMips32() || Subtarget.inMips16Mode()) + setOperationAction(ISD::CTLZ, MVT::i32, Expand); + if (!Subtarget.hasMips64()) + setOperationAction(ISD::CTLZ, MVT::i64, Expand); + if (!Subtarget.hasMips32r2()) + setOperationAction(ISD::BSWAP, MVT::i32, Expand); + if (!Subtarget.hasMips64r2()) + setOperationAction(ISD::BSWAP, MVT::i64, Expand); + if (Subtarget.isGP64bit()) { + setLoadExtAction(ISD::SEXTLOAD, MVT::i64, MVT::i32, Custom); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i64, MVT::i32, Custom); + setLoadExtAction(ISD::EXTLOAD, MVT::i64, MVT::i32, Custom); + setTruncStoreAction(MVT::i64, MVT::i32, Custom); + } + setOperationAction(ISD::TRAP, MVT::Other, Legal); + setTargetDAGCombine(ISD::SDIVREM); + setTargetDAGCombine(ISD::UDIVREM); + setTargetDAGCombine(ISD::SELECT); + setTargetDAGCombine(ISD::AND); + setTargetDAGCombine(ISD::OR); + setTargetDAGCombine(ISD::ADD); + setTargetDAGCombine(ISD::SUB); + setTargetDAGCombine(ISD::AssertZext); + setTargetDAGCombine(ISD::SHL); + if (ABI.IsO32()) { + setLibcallName(RTLIB::SHL_I128, nullptr); + setLibcallName(RTLIB::SRL_I128, nullptr); + setLibcallName(RTLIB::SRA_I128, nullptr); + } + setMinFunctionAlignment(Subtarget.isGP64bit() ? Align(8) : Align(4)); + setMinStackArgumentAlignment((ABI.IsN32() || ABI.IsN64()) ? Align(8) : Align(4)); + setStackPointerRegisterToSaveRestore(ABI.IsN64() ? Mips::SP_64 : Mips::SP); + MaxStoresPerMemcpy = 16; + isMicroMips = Subtarget.inMicroMipsMode(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e8b488397e8ffb971cb7c540a8516a91a44a93d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp @@ -0,0 +1,17 @@ +bool MipsSETargetLowering::allowsMisalignedMemoryAccesses(EVT VT, unsigned, unsigned, MachineMemOperand::Flags, bool *Fast) const { + MVT::SimpleValueType SVT = VT.getSimpleVT().SimpleTy; + if (Subtarget.systemSupportsUnalignedAccess()) { + if (Fast) + *Fast = true; + return true; + } + switch (SVT) { + case MVT::i64: + case MVT::i32: + if (Fast) + *Fast = true; + return true; + default: + return false; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getAddr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getAddr.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getConstraintType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8529203a68b93db156ea88f4c58badf30013605 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getConstraintType.cpp @@ -0,0 +1,19 @@ +MipsTargetLowering::ConstraintType MipsTargetLowering::getConstraintType(StringRef Constraint) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default : break; + case 'd': + case 'y': + case 'f': + case 'c': + case 'l': + case 'x': + return C_RegisterClass; + case 'R': + return C_Memory; + } + } + if (Constraint == "ZC") + return C_Memory; + return TargetLowering::getConstraintType(Constraint); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e1945b520bebcf77f44fd1b55ba871b480d9979 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp @@ -0,0 +1,3 @@ +Register getExceptionPointerRegister(const Constant *PersonalityFn) const override { + return ABI.IsN64() ? Mips::A0_64 : Mips::A0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..524ffc7c7a6f16e757f2bce1263a2c3b76aa8e7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp @@ -0,0 +1,3 @@ +Register getExceptionSelectorRegister(const Constant *PersonalityFn) const override { + return ABI.IsN64() ? Mips::A1_64 : Mips::A1; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2bdaa6084dd596ee35663f176faa01eba5d98abc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp @@ -0,0 +1,3 @@ +ISD::NodeType getExtendForAtomicOps() const override { + return ISD::SIGN_EXTEND; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04c12c2b8a5307ff84006a5e7df9df7f9f5c5066 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp @@ -0,0 +1,9 @@ +unsigned getInlineAsmMemConstraint(StringRef ConstraintCode) const override { + if (ConstraintCode == "o") + return InlineAsm::Constraint_o; + if (ConstraintCode == "R") + return InlineAsm::Constraint_R; + if (ConstraintCode == "ZC") + return InlineAsm::Constraint_ZC; + return TargetLowering::getInlineAsmMemConstraint(ConstraintCode); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPointerTy.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPointerTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPointerTy.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4d6cb04cdaf5d170a432c7141d5bcd31383559f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,56 @@ +std::pair MipsTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + case 'd': + case 'y': + case 'r': + if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8) { + if (Subtarget.inMips16Mode()) + return std::make_pair(0U, &Mips::CPU16RegsRegClass); + return std::make_pair(0U, &Mips::GPR32RegClass); + } + if (VT == MVT::i64 && !Subtarget.isGP64bit()) + return std::make_pair(0U, &Mips::GPR32RegClass); + if (VT == MVT::i64 && Subtarget.isGP64bit()) + return std::make_pair(0U, &Mips::GPR64RegClass); + return std::make_pair(0U, nullptr); + case 'f': + if (VT == MVT::v16i8) + return std::make_pair(0U, &Mips::MSA128BRegClass); + else if (VT == MVT::v8i16 || VT == MVT::v8f16) + return std::make_pair(0U, &Mips::MSA128HRegClass); + else if (VT == MVT::v4i32 || VT == MVT::v4f32) + return std::make_pair(0U, &Mips::MSA128WRegClass); + else if (VT == MVT::v2i64 || VT == MVT::v2f64) + return std::make_pair(0U, &Mips::MSA128DRegClass); + else if (VT == MVT::f32) + return std::make_pair(0U, &Mips::FGR32RegClass); + else if ((VT == MVT::f64) && (!Subtarget.isSingleFloat())) { + if (Subtarget.isFP64bit()) + return std::make_pair(0U, &Mips::FGR64RegClass); + return std::make_pair(0U, &Mips::AFGR64RegClass); + } + break; + case 'c': + if (VT == MVT::i32) + return std::make_pair((unsigned)Mips::T9, &Mips::GPR32RegClass); + if (VT == MVT::i64) + return std::make_pair((unsigned)Mips::T9_64, &Mips::GPR64RegClass); + return std::make_pair(0U, nullptr); + case 'l': + if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8) + return std::make_pair((unsigned)Mips::LO0, &Mips::LO32RegClass); + return std::make_pair((unsigned)Mips::LO0_64, &Mips::LO64RegClass); + case 'x': + return std::make_pair(0U, nullptr); + } + } + if (!Constraint.empty()) { + std::pair R; + R = parseRegForInlineAsmConstraint(Constraint, VT); + if (R.second) + return R; + } + return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1c5d4d71ea246662da31c1159df7bf2f85432788 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp @@ -0,0 +1,13 @@ +Register MipsTargetLowering::getRegisterByName(const char *RegName, LLT VT, const MachineFunction &MF) const { + if (Subtarget.isGP64bit()) { + Register Reg = StringSwitch(RegName).Case("$28", Mips::GP_64).Default(Register()); + if (Reg) + return Reg; + } + else { + Register Reg = StringSwitch(RegName).Case("$28", Mips::GP).Default(Register()); + if (Reg) + return Reg; + } + report_fatal_error("Invalid register name global variable"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..619cc9eaf53f1510ccde851e748b819574304f6d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp @@ -0,0 +1,3 @@ +MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override { + return MVT::i32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe00ebaa7cd5963c92ec9096a55e880e01f1a0fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp @@ -0,0 +1,6 @@ +EVT MipsTargetLowering::getSetCCResultType(const DataLayout &, LLVMContext &, EVT VT) const { + if (!VT.isVector()) { + return MVT::i32; + } + return VT.changeVectorElementTypeToInteger(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getSubtarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getSubtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getSubtarget.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..999d3eb5bc14010c14260323f1dcec49e3115019 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,118 @@ +const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const { + switch ((MipsISD::NodeType)Opcode) { + case MipsISD::FIRST_NUMBER: break; + case MipsISD::JmpLink: return "MipsISD::JmpLink"; + case MipsISD::TailCall: return "MipsISD::TailCall"; + case MipsISD::Highest: return "MipsISD::Highest"; + case MipsISD::Higher: return "MipsISD::Higher"; + case MipsISD::Hi: return "MipsISD::Hi"; + case MipsISD::Lo: return "MipsISD::Lo"; + case MipsISD::GotHi: return "MipsISD::GotHi"; + case MipsISD::TlsHi: return "MipsISD::TlsHi"; + case MipsISD::GPRel: return "MipsISD::GPRel"; + case MipsISD::ThreadPointer: return "MipsISD::ThreadPointer"; + case MipsISD::Ret: return "MipsISD::Ret"; + case MipsISD::ERet: return "MipsISD::ERet"; + case MipsISD::EH_RETURN: return "MipsISD::EH_RETURN"; + case MipsISD::FMS: return "MipsISD::FMS"; + case MipsISD::FPBrcond: return "MipsISD::FPBrcond"; + case MipsISD::FPCmp: return "MipsISD::FPCmp"; + case MipsISD::FSELECT: return "MipsISD::FSELECT"; + case MipsISD::MTC1_D64: return "MipsISD::MTC1_D64"; + case MipsISD::CMovFP_T: return "MipsISD::CMovFP_T"; + case MipsISD::CMovFP_F: return "MipsISD::CMovFP_F"; + case MipsISD::TruncIntFP: return "MipsISD::TruncIntFP"; + case MipsISD::MFHI: return "MipsISD::MFHI"; + case MipsISD::MFLO: return "MipsISD::MFLO"; + case MipsISD::MTLOHI: return "MipsISD::MTLOHI"; + case MipsISD::Mult: return "MipsISD::Mult"; + case MipsISD::Multu: return "MipsISD::Multu"; + case MipsISD::MAdd: return "MipsISD::MAdd"; + case MipsISD::MAddu: return "MipsISD::MAddu"; + case MipsISD::MSub: return "MipsISD::MSub"; + case MipsISD::MSubu: return "MipsISD::MSubu"; + case MipsISD::DivRem: return "MipsISD::DivRem"; + case MipsISD::DivRemU: return "MipsISD::DivRemU"; + case MipsISD::DivRem16: return "MipsISD::DivRem16"; + case MipsISD::DivRemU16: return "MipsISD::DivRemU16"; + case MipsISD::BuildPairF64: return "MipsISD::BuildPairF64"; + case MipsISD::ExtractElementF64: return "MipsISD::ExtractElementF64"; + case MipsISD::Wrapper: return "MipsISD::Wrapper"; + case MipsISD::DynAlloc: return "MipsISD::DynAlloc"; + case MipsISD::Sync: return "MipsISD::Sync"; + case MipsISD::Ext: return "MipsISD::Ext"; + case MipsISD::Ins: return "MipsISD::Ins"; + case MipsISD::CIns: return "MipsISD::CIns"; + case MipsISD::LWL: return "MipsISD::LWL"; + case MipsISD::LWR: return "MipsISD::LWR"; + case MipsISD::SWL: return "MipsISD::SWL"; + case MipsISD::SWR: return "MipsISD::SWR"; + case MipsISD::LDL: return "MipsISD::LDL"; + case MipsISD::LDR: return "MipsISD::LDR"; + case MipsISD::SDL: return "MipsISD::SDL"; + case MipsISD::SDR: return "MipsISD::SDR"; + case MipsISD::EXTP: return "MipsISD::EXTP"; + case MipsISD::EXTPDP: return "MipsISD::EXTPDP"; + case MipsISD::EXTR_S_H: return "MipsISD::EXTR_S_H"; + case MipsISD::EXTR_W: return "MipsISD::EXTR_W"; + case MipsISD::EXTR_R_W: return "MipsISD::EXTR_R_W"; + case MipsISD::EXTR_RS_W: return "MipsISD::EXTR_RS_W"; + case MipsISD::SHILO: return "MipsISD::SHILO"; + case MipsISD::MTHLIP: return "MipsISD::MTHLIP"; + case MipsISD::MULSAQ_S_W_PH: return "MipsISD::MULSAQ_S_W_PH"; + case MipsISD::MAQ_S_W_PHL: return "MipsISD::MAQ_S_W_PHL"; + case MipsISD::MAQ_S_W_PHR: return "MipsISD::MAQ_S_W_PHR"; + case MipsISD::MAQ_SA_W_PHL: return "MipsISD::MAQ_SA_W_PHL"; + case MipsISD::MAQ_SA_W_PHR: return "MipsISD::MAQ_SA_W_PHR"; + case MipsISD::DPAU_H_QBL: return "MipsISD::DPAU_H_QBL"; + case MipsISD::DPAU_H_QBR: return "MipsISD::DPAU_H_QBR"; + case MipsISD::DPSU_H_QBL: return "MipsISD::DPSU_H_QBL"; + case MipsISD::DPSU_H_QBR: return "MipsISD::DPSU_H_QBR"; + case MipsISD::DPAQ_S_W_PH: return "MipsISD::DPAQ_S_W_PH"; + case MipsISD::DPSQ_S_W_PH: return "MipsISD::DPSQ_S_W_PH"; + case MipsISD::DPAQ_SA_L_W: return "MipsISD::DPAQ_SA_L_W"; + case MipsISD::DPSQ_SA_L_W: return "MipsISD::DPSQ_SA_L_W"; + case MipsISD::DPA_W_PH: return "MipsISD::DPA_W_PH"; + case MipsISD::DPS_W_PH: return "MipsISD::DPS_W_PH"; + case MipsISD::DPAQX_S_W_PH: return "MipsISD::DPAQX_S_W_PH"; + case MipsISD::DPAQX_SA_W_PH: return "MipsISD::DPAQX_SA_W_PH"; + case MipsISD::DPAX_W_PH: return "MipsISD::DPAX_W_PH"; + case MipsISD::DPSX_W_PH: return "MipsISD::DPSX_W_PH"; + case MipsISD::DPSQX_S_W_PH: return "MipsISD::DPSQX_S_W_PH"; + case MipsISD::DPSQX_SA_W_PH: return "MipsISD::DPSQX_SA_W_PH"; + case MipsISD::MULSA_W_PH: return "MipsISD::MULSA_W_PH"; + case MipsISD::MULT: return "MipsISD::MULT"; + case MipsISD::MULTU: return "MipsISD::MULTU"; + case MipsISD::MADD_DSP: return "MipsISD::MADD_DSP"; + case MipsISD::MADDU_DSP: return "MipsISD::MADDU_DSP"; + case MipsISD::MSUB_DSP: return "MipsISD::MSUB_DSP"; + case MipsISD::MSUBU_DSP: return "MipsISD::MSUBU_DSP"; + case MipsISD::SHLL_DSP: return "MipsISD::SHLL_DSP"; + case MipsISD::SHRA_DSP: return "MipsISD::SHRA_DSP"; + case MipsISD::SHRL_DSP: return "MipsISD::SHRL_DSP"; + case MipsISD::SETCC_DSP: return "MipsISD::SETCC_DSP"; + case MipsISD::SELECT_CC_DSP: return "MipsISD::SELECT_CC_DSP"; + case MipsISD::VALL_ZERO: return "MipsISD::VALL_ZERO"; + case MipsISD::VANY_ZERO: return "MipsISD::VANY_ZERO"; + case MipsISD::VALL_NONZERO: return "MipsISD::VALL_NONZERO"; + case MipsISD::VANY_NONZERO: return "MipsISD::VANY_NONZERO"; + case MipsISD::VCEQ: return "MipsISD::VCEQ"; + case MipsISD::VCLE_S: return "MipsISD::VCLE_S"; + case MipsISD::VCLE_U: return "MipsISD::VCLE_U"; + case MipsISD::VCLT_S: return "MipsISD::VCLT_S"; + case MipsISD::VCLT_U: return "MipsISD::VCLT_U"; + case MipsISD::VEXTRACT_SEXT_ELT: return "MipsISD::VEXTRACT_SEXT_ELT"; + case MipsISD::VEXTRACT_ZEXT_ELT: return "MipsISD::VEXTRACT_ZEXT_ELT"; + case MipsISD::VNOR: return "MipsISD::VNOR"; + case MipsISD::VSHF: return "MipsISD::VSHF"; + case MipsISD::SHF: return "MipsISD::SHF"; + case MipsISD::ILVEV: return "MipsISD::ILVEV"; + case MipsISD::ILVOD: return "MipsISD::ILVOD"; + case MipsISD::ILVL: return "MipsISD::ILVL"; + case MipsISD::ILVR: return "MipsISD::ILVR"; + case MipsISD::PCKEV: return "MipsISD::PCKEV"; + case MipsISD::PCKOD: return "MipsISD::PCKOD"; + case MipsISD::INSVE: return "MipsISD::INSVE"; + } + return nullptr; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..427f606640a0f495babbc3c5472fed65979665f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp @@ -0,0 +1,3 @@ +bool MipsTargetLowering::isCheapToSpeculateCtlz() const { + return Subtarget.hasMips32(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..169d4b4109f983c5149a60aca7d2757d876881b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp @@ -0,0 +1,3 @@ +bool MipsTargetLowering::isCheapToSpeculateCttz() const { + return Subtarget.hasMips32(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a11da12c981206c45489e9ede21981c97f116aba --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp @@ -0,0 +1,9 @@ +bool MipsSETargetLowering::isEligibleForTailCallOptimization(const CCState &CCInfo, unsigned NextStackOffset, const MipsFunctionInfo &FI) const { + if (!UseMipsTailCalls) + return false; + if (FI.isISR()) + return false; + if (CCInfo.getInRegsParamsCount() > 0 || FI.hasByvalArg()) + return false; + return NextStackOffset <= FI.getIncomingArgSize(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9419a0fddfba1adb1a506c85ee0e7d6b360839c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp @@ -0,0 +1,7 @@ +bool MipsTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT, bool ForCodeSize) const { + if (VT != MVT::f32 && VT != MVT::f64) + return false; + if (Imm.isNegZero()) + return false; + return Imm.isZero(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bce29b2aa473dfb01a1adc6b39d25eec12f141ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,15 @@ +bool MipsTargetLowering::isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I) const { + if (AM.BaseGV) + return false; + switch (AM.Scale) { + case 0: + break; + case 1: + if (!AM.HasBaseReg) + break; + return false; + default: + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isZExtFree.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isZExtFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/isZExtFree.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7f0b8be13658b20f7e13eee561be03722d32593 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp @@ -0,0 +1,14 @@ +SDValue MipsSETargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT ResTy = Op->getValueType(0); + SDValue Op0 = Op->getOperand(0); + EVT VecTy = Op0->getValueType(0); + if (!VecTy.is128BitVector()) + return SDValue(); + if (ResTy.isInteger()) { + SDValue Op1 = Op->getOperand(1); + EVT EltTy = VecTy.getVectorElementType(); + return DAG.getNode(MipsISD::VEXTRACT_SEXT_ELT, DL, ResTy, Op0, Op1, DAG.getValueType(EltTy)); + } + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ccc7415a4e7fc3ff6f6faf8cb2df39facab5474 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerSELECT(SDValue Op, SelectionDAG &DAG) const { + assert(!Subtarget.hasMips32r6() && !Subtarget.hasMips64r6()); + SDValue Cond = createFPCmp(DAG, Op.getOperand(0)); + if (Cond.getOpcode() != MipsISD::FPCmp) + return Op; + return createCMovFP(DAG, Cond, Op.getOperand(1), Op.getOperand(2), SDLoc(Op)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc4822b4dace5d5d62f234df92749f851e92acbc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp @@ -0,0 +1,3 @@ +None + + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fa999e2c8ce2bc3c16770b5abd0a2f1aa9900a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp @@ -0,0 +1,17 @@ +SDValue MipsTargetLowering::lowerShiftLeftParts(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + MVT VT = Subtarget.isGP64bit() ? MVT::i64 : MVT::i32; + SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + SDValue Not = DAG.getNode(ISD::XOR, DL, MVT::i32, Shamt, DAG.getConstant(-1, DL, MVT::i32)); + SDValue ShiftRight1Lo = DAG.getNode(ISD::SRL, DL, VT, Lo, DAG.getConstant(1, DL, VT)); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, ShiftRight1Lo, Not); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, Hi, Shamt); + SDValue Or = DAG.getNode(ISD::OR, DL, VT, ShiftLeftHi, ShiftRightLo); + SDValue ShiftLeftLo = DAG.getNode(ISD::SHL, DL, VT, Lo, Shamt); + SDValue Cond = DAG.getNode(ISD::AND, DL, MVT::i32, Shamt, DAG.getConstant(VT.getSizeInBits(), DL, MVT::i32)); + Lo = DAG.getNode(ISD::SELECT, DL, VT, Cond, DAG.getConstant(0, DL, VT), ShiftLeftLo); + Hi = DAG.getNode(ISD::SELECT, DL, VT, Cond, ShiftLeftLo, Or); + SDValue Ops[2] = {Lo, Hi}; + return DAG.getMergeValues(Ops, DL); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b15ec88f4c37aaf44b6a8c2e28d3acfcac6e939a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp @@ -0,0 +1,22 @@ +SDValue MipsTargetLowering::lowerShiftRightParts(SDValue Op, SelectionDAG &DAG, bool IsSRA) const { + SDLoc DL(Op); + SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + MVT VT = Subtarget.isGP64bit() ? MVT::i64 : MVT::i32; + SDValue Not = DAG.getNode(ISD::XOR, DL, MVT::i32, Shamt, DAG.getConstant(-1, DL, MVT::i32)); + SDValue ShiftLeft1Hi = DAG.getNode(ISD::SHL, DL, VT, Hi, DAG.getConstant(1, DL, VT)); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, ShiftLeft1Hi, Not); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, Lo, Shamt); + SDValue Or = DAG.getNode(ISD::OR, DL, VT, ShiftLeftHi, ShiftRightLo); + SDValue ShiftRightHi = DAG.getNode(IsSRA ? ISD::SRA : ISD::SRL, DL, VT, Hi, Shamt); + SDValue Cond = DAG.getNode(ISD::AND, DL, MVT::i32, Shamt, DAG.getConstant(VT.getSizeInBits(), DL, MVT::i32)); + SDValue Ext = DAG.getNode(ISD::SRA, DL, VT, Hi, DAG.getConstant(VT.getSizeInBits() - 1, DL, VT)); + if (!(Subtarget.hasMips4() || Subtarget.hasMips32())) { + SDVTList VTList = DAG.getVTList(VT, VT); + return DAG.getNode(Subtarget.isGP64bit() ? Mips::PseudoD_SELECT_I64 : Mips::PseudoD_SELECT_I, DL, VTList, Cond, ShiftRightHi, IsSRA ? Ext : DAG.getConstant(0, DL, VT), Or, ShiftRightHi); + } + Lo = DAG.getNode(ISD::SELECT, DL, VT, Cond, ShiftRightHi, Or); + Hi = DAG.getNode(ISD::SELECT, DL, VT, Cond, IsSRA ? Ext : DAG.getConstant(0, DL, VT), ShiftRightHi); + SDValue Ops[2] = {Lo, Hi}; + return DAG.getMergeValues(Ops, DL); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f68f25a787d6d9d179404a12f57ee6bc55abf05a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp @@ -0,0 +1,2 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8633411d86591074b31a54b78e3486a650b9eb13 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp @@ -0,0 +1,3 @@ +bool shouldInsertFencesForAtomic(const Instruction *I) const override { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..959ee62f318ee63e3f1f4208c95ae43a1a6e7761 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp @@ -0,0 +1,5 @@ +bool MipsTargetLowering::shouldSignExtendTypeInLibCall(EVT Type, bool IsSigned) const { + if ((ABI.IsN32() || ABI.IsN64()) && Type == MVT::i32) + return true; + return IsSigned; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4dec9cfa317b44f43b2ec7db58442782f2df351e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp @@ -0,0 +1,9 @@ +MipsInstructionSelector::MipsInstructionSelector(const MipsTargetMachine &TM, const MipsSubtarget &STI, const MipsRegisterBankInfo &RBI) : InstructionSelector(), TM(TM), STI(STI), TII(*STI.getInstrInfo()), TRI(*STI.getRegisterInfo()), RBI(RBI), +#define GET_GLOBALISEL_PREDICATES_INIT +#include "MipsGenGlobalISel.inc" +#undef GET_GLOBALISEL_PREDICATES_INIT +#define GET_GLOBALISEL_TEMPORARIES_INIT +#include "MipsGenGlobalISel.inc" +#undef GET_GLOBALISEL_TEMPORARIES_INIT +{ +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dad172a8ea90b139f00256911eedcffbae14848d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *createMipsInstructionSelector(const MipsTargetMachine &TM, MipsSubtarget &Subtarget, MipsRegisterBankInfo &RBI) { + return new MipsInstructionSelector(TM, Subtarget, RBI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/getName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/getName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3070f67f8b2d72c6473a6bf2cc4639c82757caaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/getName.cpp @@ -0,0 +1,3 @@ +static const char *getName() { + return DEBUG_TYPE; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/select.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a17b427bb0cd822697fc1bb9f4a5c2c68b1a435 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/InstructionSelector/select.cpp @@ -0,0 +1,443 @@ +bool MipsInstructionSelector::select(MachineInstr &I) { + MachineBasicBlock &MBB = *I.getParent(); + MachineFunction &MF = *MBB.getParent(); + MachineRegisterInfo &MRI = MF.getRegInfo(); + if (!isPreISelGenericOpcode(I.getOpcode())) { + if (I.isCopy()) + return selectCopy(I, MRI); + return true; + } + if (I.getOpcode() == Mips::G_MUL && isRegInGprb(I.getOperand(0).getReg(), MRI)) { + MachineInstr *Mul = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::MUL)).add(I.getOperand(0)).add(I.getOperand(1)).add(I.getOperand(2)); + if (!constrainSelectedInstRegOperands(*Mul, TII, TRI, RBI)) + return false; + Mul->getOperand(3).setIsDead(true); + Mul->getOperand(4).setIsDead(true); + I.eraseFromParent(); + return true; + } + if (selectImpl(I, *CoverageInfo)) + return true; + MachineInstr *MI = nullptr; + using namespace TargetOpcode; + switch (I.getOpcode()) { + case G_UMULH: { + Register PseudoMULTuReg = MRI.createVirtualRegister(&Mips::ACC64RegClass); + MachineInstr *PseudoMULTu, *PseudoMove; + PseudoMULTu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoMULTu)).addDef(PseudoMULTuReg).add(I.getOperand(1)).add(I.getOperand(2)); + if (!constrainSelectedInstRegOperands(*PseudoMULTu, TII, TRI, RBI)) + return false; + PseudoMove = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoMFHI)).addDef(I.getOperand(0).getReg()).addUse(PseudoMULTuReg); + if (!constrainSelectedInstRegOperands(*PseudoMove, TII, TRI, RBI)) + return false; + + I.eraseFromParent(); + return true; + } + case G_PTR_ADD: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDu)).add(I.getOperand(0)).add(I.getOperand(1)).add(I.getOperand(2)); + break; + } + case G_INTTOPTR: + case G_PTRTOINT: { + I.setDesc(TII.get(COPY)); + return selectCopy(I, MRI); + } + case G_FRAME_INDEX: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).add(I.getOperand(0)).add(I.getOperand(1)).addImm(0); + break; + } + case G_BRCOND: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::BNE)).add(I.getOperand(0)).addUse(Mips::ZERO).add(I.getOperand(1)); + break; + } + case G_BRJT: { + unsigned EntrySize = MF.getJumpTableInfo()->getEntrySize(MF.getDataLayout()); + assert(isPowerOf2_32(EntrySize) && "Non-power-of-two jump-table entry size not supported."); + Register JTIndex = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *SLL = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::SLL)).addDef(JTIndex).addUse(I.getOperand(2).getReg()).addImm(Log2_32(EntrySize)); + if (!constrainSelectedInstRegOperands(*SLL, TII, TRI, RBI)) + return false; + Register DestAddress = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *ADDu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDu)).addDef(DestAddress).addUse(I.getOperand(0).getReg()).addUse(JTIndex); + if (!constrainSelectedInstRegOperands(*ADDu, TII, TRI, RBI)) + return false; + Register Dest = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *LW = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LW)).addDef(Dest).addUse(DestAddress).addJumpTableIndex(I.getOperand(1).getIndex(), MipsII::MO_ABS_LO).addMemOperand(MF.getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOLoad, 4, Align(4))); + if (!constrainSelectedInstRegOperands(*LW, TII, TRI, RBI)) + return false; + if (MF.getTarget().isPositionIndependent()) { + Register DestTmp = MRI.createVirtualRegister(&Mips::GPR32RegClass); + LW->getOperand(0).setReg(DestTmp); + MachineInstr *ADDu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDu)).addDef(Dest).addUse(DestTmp).addUse(MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)); + if (!constrainSelectedInstRegOperands(*ADDu, TII, TRI, RBI)) + return false; + } + MachineInstr *Branch = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoIndirectBranch)).addUse(Dest); + if (!constrainSelectedInstRegOperands(*Branch, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_BRINDIRECT: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoIndirectBranch)).add(I.getOperand(0)); + break; + } + case G_PHI: { + const Register DestReg = I.getOperand(0).getReg(); + const TargetRegisterClass *DefRC = nullptr; + if (Register::isPhysicalRegister(DestReg)) + DefRC = TRI.getRegClass(DestReg); + else + DefRC = getRegClassForTypeOnBank(DestReg, MRI); + I.setDesc(TII.get(TargetOpcode::PHI)); + return RBI.constrainGenericRegister(DestReg, *DefRC, MRI); + } + case G_STORE: + case G_LOAD: + case G_ZEXTLOAD: + case G_SEXTLOAD: { + auto MMO = *I.memoperands_begin(); + MachineOperand BaseAddr = I.getOperand(1); + int64_t SignedOffset = 0; + MachineInstr *Addr = MRI.getVRegDef(I.getOperand(1).getReg()); + if (Addr->getOpcode() == G_PTR_ADD) { + MachineInstr *Offset = MRI.getVRegDef(Addr->getOperand(2).getReg()); + if (Offset->getOpcode() == G_CONSTANT) { + APInt OffsetValue = Offset->getOperand(1).getCImm()->getValue(); + if (OffsetValue.isSignedIntN(16)) { + BaseAddr = Addr->getOperand(1); + SignedOffset = OffsetValue.getSExtValue(); + } + } + } + if (MMO->getAlign() < MMO->getSize() && + !STI.systemSupportsUnalignedAccess()) { + if (MMO->getSize() != 4 || !isRegInGprb(I.getOperand(0).getReg(), MRI)) + return false; + if (I.getOpcode() == G_STORE) { + if (!buildUnalignedStore(I, Mips::SWL, BaseAddr, SignedOffset + 3, MMO)) + return false; + if (!buildUnalignedStore(I, Mips::SWR, BaseAddr, SignedOffset, MMO)) + return false; + I.eraseFromParent(); + return true; + } + if (I.getOpcode() == G_LOAD) { + Register ImplDef = MRI.createVirtualRegister(&Mips::GPR32RegClass); + BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::IMPLICIT_DEF)).addDef(ImplDef); + Register Tmp = MRI.createVirtualRegister(&Mips::GPR32RegClass); + if (!buildUnalignedLoad(I, Mips::LWL, Tmp, BaseAddr, SignedOffset + 3,ImplDef, MMO)) + return false; + if (!buildUnalignedLoad(I, Mips::LWR, I.getOperand(0).getReg(), BaseAddr, SignedOffset, Tmp, MMO)) + return false; + I.eraseFromParent(); + return true; + } + return false; + } + const unsigned NewOpc = selectLoadStoreOpCode(I, MRI); + if (NewOpc == I.getOpcode()) + return false; + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(NewOpc)).add(I.getOperand(0)).add(BaseAddr).addImm(SignedOffset).addMemOperand(MMO); + break; + } + case G_UDIV: + case G_UREM: + case G_SDIV: + case G_SREM: { + Register HILOReg = MRI.createVirtualRegister(&Mips::ACC64RegClass); + bool IsSigned = I.getOpcode() == G_SREM || I.getOpcode() == G_SDIV; + bool IsDiv = I.getOpcode() == G_UDIV || I.getOpcode() == G_SDIV; + MachineInstr *PseudoDIV, *PseudoMove; + PseudoDIV = BuildMI(MBB, I, I.getDebugLoc(), TII.get(IsSigned ? Mips::PseudoSDIV : Mips::PseudoUDIV)).addDef(HILOReg).add(I.getOperand(1)).add(I.getOperand(2)); + if (!constrainSelectedInstRegOperands(*PseudoDIV, TII, TRI, RBI)) + return false; + PseudoMove = BuildMI(MBB, I, I.getDebugLoc(), TII.get(IsDiv ? Mips::PseudoMFLO : Mips::PseudoMFHI)).addDef(I.getOperand(0).getReg()).addUse(HILOReg); + if (!constrainSelectedInstRegOperands(*PseudoMove, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_SELECT: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::MOVN_I_I)).add(I.getOperand(0)).add(I.getOperand(2)).add(I.getOperand(1)).add(I.getOperand(3)); + break; + } + case G_UNMERGE_VALUES: { + if (I.getNumOperands() != 3) + return false; + Register Src = I.getOperand(2).getReg(); + Register Lo = I.getOperand(0).getReg(); + Register Hi = I.getOperand(1).getReg(); + if (!isRegInFprb(Src, MRI) || !(isRegInGprb(Lo, MRI) && isRegInGprb(Hi, MRI))) + return false; + unsigned Opcode = STI.isFP64bit() ? Mips::ExtractElementF64_64 : Mips::ExtractElementF64; + MachineInstr *ExtractLo = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Opcode)).addDef(Lo).addUse(Src).addImm(0); + if (!constrainSelectedInstRegOperands(*ExtractLo, TII, TRI, RBI)) + return false; + MachineInstr *ExtractHi = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Opcode)).addDef(Hi).addUse(Src).addImm(1); + if (!constrainSelectedInstRegOperands(*ExtractHi, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_IMPLICIT_DEF: { + Register Dst = I.getOperand(0).getReg(); + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::IMPLICIT_DEF)).addDef(Dst); + MRI.setRegClass(Dst, getRegClassForTypeOnBank(Dst, MRI)); + break; + } + case G_CONSTANT: { + MachineIRBuilder B(I); + if (!materialize32BitImm(I.getOperand(0).getReg(), I.getOperand(1).getCImm()->getValue(), B)) + return false; + I.eraseFromParent(); + return true; + } + case G_FCONSTANT: { + const APFloat &FPimm = I.getOperand(1).getFPImm()->getValueAPF(); + APInt APImm = FPimm.bitcastToAPInt(); + unsigned Size = MRI.getType(I.getOperand(0).getReg()).getSizeInBits(); + if (Size == 32) { + Register GPRReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineIRBuilder B(I); + if (!materialize32BitImm(GPRReg, APImm, B)) + return false; + MachineInstrBuilder MTC1 = B.buildInstr(Mips::MTC1, {I.getOperand(0).getReg()}, {GPRReg}); + if (!MTC1.constrainAllUses(TII, TRI, RBI)) + return false; + } + if (Size == 64) { + Register GPRRegHigh = MRI.createVirtualRegister(&Mips::GPR32RegClass); + Register GPRRegLow = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineIRBuilder B(I); + if (!materialize32BitImm(GPRRegHigh, APImm.getHiBits(32).trunc(32), B)) + return false; + if (!materialize32BitImm(GPRRegLow, APImm.getLoBits(32).trunc(32), B)) + return false; + MachineInstrBuilder PairF64 = B.buildInstr(STI.isFP64bit() ? Mips::BuildPairF64_64 : Mips::BuildPairF64, {I.getOperand(0).getReg()}, {GPRRegLow, GPRRegHigh}); + if (!PairF64.constrainAllUses(TII, TRI, RBI)) + return false; + } + I.eraseFromParent(); + return true; + } + case G_FABS: { + unsigned Size = MRI.getType(I.getOperand(0).getReg()).getSizeInBits(); + unsigned FABSOpcode = Size == 32 ? Mips::FABS_S : STI.isFP64bit() ? Mips::FABS_D64 : Mips::FABS_D32; + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(FABSOpcode)).add(I.getOperand(0)).add(I.getOperand(1)); + break; + } + case G_FPTOSI: { + unsigned FromSize = MRI.getType(I.getOperand(1).getReg()).getSizeInBits(); + unsigned ToSize = MRI.getType(I.getOperand(0).getReg()).getSizeInBits(); + (void)ToSize; + assert((ToSize == 32) && "Unsupported integer size for G_FPTOSI"); + assert((FromSize == 32 || FromSize == 64) && "Unsupported floating point size for G_FPTOSI"); + unsigned Opcode; + if (FromSize == 32) + Opcode = Mips::TRUNC_W_S; + else + Opcode = STI.isFP64bit() ? Mips::TRUNC_W_D64 : Mips::TRUNC_W_D32; + Register ResultInFPR = MRI.createVirtualRegister(&Mips::FGR32RegClass); + MachineInstr *Trunc = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Opcode)).addDef(ResultInFPR).addUse(I.getOperand(1).getReg()); + if (!constrainSelectedInstRegOperands(*Trunc, TII, TRI, RBI)) + return false; + MachineInstr *Move = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::MFC1)).addDef(I.getOperand(0).getReg()).addUse(ResultInFPR); + if (!constrainSelectedInstRegOperands(*Move, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_GLOBAL_VALUE: { + const llvm::GlobalValue *GVal = I.getOperand(1).getGlobal(); + if (MF.getTarget().isPositionIndependent()) { + MachineInstr *LWGOT = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LW)).addDef(I.getOperand(0).getReg()).addReg(MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)).addGlobalAddress(GVal); + if (I.getOperand(1).getTargetFlags() == MipsII::MO_GOT_CALL) + LWGOT->getOperand(2).setTargetFlags(MipsII::MO_GOT_CALL); + else + LWGOT->getOperand(2).setTargetFlags(MipsII::MO_GOT); + LWGOT->addMemOperand(MF, MF.getMachineMemOperand(MachinePointerInfo::getGOT(MF), MachineMemOperand::MOLoad, 4, Align(4))); + if (!constrainSelectedInstRegOperands(*LWGOT, TII, TRI, RBI)) + return false; + if (GVal->hasLocalLinkage()) { + Register LWGOTDef = MRI.createVirtualRegister(&Mips::GPR32RegClass); + LWGOT->getOperand(0).setReg(LWGOTDef); + MachineInstr *ADDiu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).addDef(I.getOperand(0).getReg()).addReg(LWGOTDef).addGlobalAddress(GVal); + ADDiu->getOperand(2).setTargetFlags(MipsII::MO_ABS_LO); + if (!constrainSelectedInstRegOperands(*ADDiu, TII, TRI, RBI)) + return false; + } + } + else { + Register LUiReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *LUi = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LUi)).addDef(LUiReg).addGlobalAddress(GVal); + LUi->getOperand(1).setTargetFlags(MipsII::MO_ABS_HI); + if (!constrainSelectedInstRegOperands(*LUi, TII, TRI, RBI)) + return false; + MachineInstr *ADDiu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).addDef(I.getOperand(0).getReg()).addUse(LUiReg).addGlobalAddress(GVal); + ADDiu->getOperand(2).setTargetFlags(MipsII::MO_ABS_LO); + if (!constrainSelectedInstRegOperands(*ADDiu, TII, TRI, RBI)) + return false; + } + I.eraseFromParent(); + return true; + } + case G_JUMP_TABLE: { + if (MF.getTarget().isPositionIndependent()) { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LW)).addDef(I.getOperand(0).getReg()).addReg(MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)).addJumpTableIndex(I.getOperand(1).getIndex(), MipsII::MO_GOT).addMemOperand(MF.getMachineMemOperand( MachinePointerInfo::getGOT(MF), MachineMemOperand::MOLoad, 4, Align(4))); + } + else { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LUi)).addDef(I.getOperand(0).getReg()).addJumpTableIndex(I.getOperand(1).getIndex(), MipsII::MO_ABS_HI); + } + break; + } + case G_ICMP: { + struct Instr { + unsigned Opcode; + Register Def, LHS, RHS; + Instr(unsigned Opcode, Register Def, Register LHS, Register RHS) : Opcode(Opcode), Def(Def), LHS(LHS), RHS(RHS){}; + bool hasImm() const { + if (Opcode == Mips::SLTiu || Opcode == Mips::XORi) + return true; + return false; + } + }; + SmallVector Instructions; + Register ICMPReg = I.getOperand(0).getReg(); + Register Temp = MRI.createVirtualRegister(&Mips::GPR32RegClass); + Register LHS = I.getOperand(2).getReg(); + Register RHS = I.getOperand(3).getReg(); + CmpInst::Predicate Cond = static_cast(I.getOperand(1).getPredicate()); + switch (Cond) { + case CmpInst::ICMP_EQ: + Instructions.emplace_back(Mips::XOR, Temp, LHS, RHS); + Instructions.emplace_back(Mips::SLTiu, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_NE: + Instructions.emplace_back(Mips::XOR, Temp, LHS, RHS); + Instructions.emplace_back(Mips::SLTu, ICMPReg, Mips::ZERO, Temp); + break; + case CmpInst::ICMP_UGT: + Instructions.emplace_back(Mips::SLTu, ICMPReg, RHS, LHS); + break; + case CmpInst::ICMP_UGE: + Instructions.emplace_back(Mips::SLTu, Temp, LHS, RHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_ULT: + Instructions.emplace_back(Mips::SLTu, ICMPReg, LHS, RHS); + break; + case CmpInst::ICMP_ULE: + Instructions.emplace_back(Mips::SLTu, Temp, RHS, LHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_SGT: + Instructions.emplace_back(Mips::SLT, ICMPReg, RHS, LHS); + break; + case CmpInst::ICMP_SGE: + Instructions.emplace_back(Mips::SLT, Temp, LHS, RHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_SLT: + Instructions.emplace_back(Mips::SLT, ICMPReg, LHS, RHS); + break; + case CmpInst::ICMP_SLE: + Instructions.emplace_back(Mips::SLT, Temp, RHS, LHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + default: + return false; + } + MachineIRBuilder B(I); + for (const struct Instr &Instruction : Instructions) { + MachineInstrBuilder MIB = B.buildInstr(Instruction.Opcode, {Instruction.Def}, {Instruction.LHS}); + if (Instruction.hasImm()) + MIB.addImm(Instruction.RHS); + else + MIB.addUse(Instruction.RHS); + if (!MIB.constrainAllUses(TII, TRI, RBI)) + return false; + } + I.eraseFromParent(); + return true; + } + case G_FCMP: { + unsigned MipsFCMPCondCode; + bool isLogicallyNegated; + switch (CmpInst::Predicate Cond = static_cast( I.getOperand(1).getPredicate())) { + case CmpInst::FCMP_UNO: + case CmpInst::FCMP_ORD: + MipsFCMPCondCode = Mips::FCOND_UN; + isLogicallyNegated = Cond != CmpInst::FCMP_UNO; + break; + case CmpInst::FCMP_OEQ: + case CmpInst::FCMP_UNE: + MipsFCMPCondCode = Mips::FCOND_OEQ; + isLogicallyNegated = Cond != CmpInst::FCMP_OEQ; + break; + case CmpInst::FCMP_UEQ: + case CmpInst::FCMP_ONE: + MipsFCMPCondCode = Mips::FCOND_UEQ; + isLogicallyNegated = Cond != CmpInst::FCMP_UEQ; + break; + case CmpInst::FCMP_OLT: + case CmpInst::FCMP_UGE: + MipsFCMPCondCode = Mips::FCOND_OLT; + isLogicallyNegated = Cond != CmpInst::FCMP_OLT; + break; + case CmpInst::FCMP_ULT: + case CmpInst::FCMP_OGE: + MipsFCMPCondCode = Mips::FCOND_ULT; + isLogicallyNegated = Cond != CmpInst::FCMP_ULT; + break; + case CmpInst::FCMP_OLE: + case CmpInst::FCMP_UGT: + MipsFCMPCondCode = Mips::FCOND_OLE; + isLogicallyNegated = Cond != CmpInst::FCMP_OLE; + break; + case CmpInst::FCMP_ULE: + case CmpInst::FCMP_OGT: + MipsFCMPCondCode = Mips::FCOND_ULE; + isLogicallyNegated = Cond != CmpInst::FCMP_ULE; + break; + default: + return false; + } + unsigned MoveOpcode = isLogicallyNegated ? Mips::MOVT_I : Mips::MOVF_I; + Register TrueInReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).addDef(TrueInReg).addUse(Mips::ZERO).addImm(1); + unsigned Size = MRI.getType(I.getOperand(2).getReg()).getSizeInBits(); + unsigned FCMPOpcode = Size == 32 ? Mips::FCMP_S32 : STI.isFP64bit() ? Mips::FCMP_D64 : Mips::FCMP_D32; + MachineInstr *FCMP = BuildMI(MBB, I, I.getDebugLoc(), TII.get(FCMPOpcode)).addUse(I.getOperand(2).getReg()).addUse(I.getOperand(3).getReg()).addImm(MipsFCMPCondCode); + if (!constrainSelectedInstRegOperands(*FCMP, TII, TRI, RBI)) + return false; + MachineInstr *Move = BuildMI(MBB, I, I.getDebugLoc(), TII.get(MoveOpcode)).addDef(I.getOperand(0).getReg()).addUse(Mips::ZERO).addUse(Mips::FCC0).addUse(TrueInReg); + if (!constrainSelectedInstRegOperands(*Move, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_FENCE: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::SYNC)).addImm(0); + break; + } + case G_VASTART: { + MipsFunctionInfo *FuncInfo = MF.getInfo(); + int FI = FuncInfo->getVarArgsFrameIndex(); + Register LeaReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *LEA_ADDiu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LEA_ADDiu)).addDef(LeaReg).addFrameIndex(FI).addImm(0); + if (!constrainSelectedInstRegOperands(*LEA_ADDiu, TII, TRI, RBI)) + return false; + MachineInstr *Store = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::SW)).addUse(LeaReg).addUse(I.getOperand(0).getReg()).addImm(0); + if (!constrainSelectedInstRegOperands(*Store, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + default: + return false; + } + I.eraseFromParent(); + return constrainSelectedInstRegOperands(*MI, TII, TRI, RBI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69fc5775fe04877af2fc98196e855a0a7b386a11 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp @@ -0,0 +1,62 @@ +MipsLegalizerInfo::MipsLegalizerInfo(const MipsSubtarget &ST) { + using namespace TargetOpcode; + const LLT s1 = LLT::scalar(1); + const LLT s32 = LLT::scalar(32); + const LLT s64 = LLT::scalar(64); + const LLT v16s8 = LLT::vector(16, 8); + const LLT v8s16 = LLT::vector(8, 16); + const LLT v4s32 = LLT::vector(4, 32); + const LLT v2s64 = LLT::vector(2, 64); + const LLT p0 = LLT::pointer(0, 32); + getActionDefinitionsBuilder({G_ADD, G_SUB, G_MUL}).legalIf([=, &ST](const LegalityQuery &Query) { if (CheckTyN(0, Query, {s32})) return true; if (ST.hasMSA() && CheckTyN(0, Query, {v16s8, v8s16, v4s32, v2s64})) return true; return false;}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_UADDO, G_UADDE, G_USUBO, G_USUBE, G_UMULO}).lowerFor({{s32, s1}}); + getActionDefinitionsBuilder(G_UMULH).legalFor({s32}).maxScalar(0, s32); + bool NoAlignRequirements = true; + unsigned Size = Query.Types[0].getSizeInBits(); unsigned QueryMemSize = Query.MMODescrs[0].SizeInBits; assert(QueryMemSize <= Size && "Scalar can't hold MemSize"); + if (Size > 64 || QueryMemSize > 64) return false; + if (!isPowerOf2_64(Query.MMODescrs[0].SizeInBits)) return true; + if (!ST.systemSupportsUnalignedAccess() && isUnalignedMemmoryAccess(QueryMemSize, Query.MMODescrs[0].AlignInBits)) { assert(QueryMemSize != 32 && "4 byte load and store are legal"); return true; } return false;}).minScalar(0, s32); + getActionDefinitionsBuilder(G_IMPLICIT_DEF).legalFor({s32, s64}); + getActionDefinitionsBuilder(G_UNMERGE_VALUES).legalFor({{s32, s64}}); + getActionDefinitionsBuilder(G_MERGE_VALUES).legalFor({{s64, s32}}); + getActionDefinitionsBuilder({G_ZEXTLOAD, G_SEXTLOAD}).legalForTypesWithMemDesc({{s32, p0, 8, 8}, {s32, p0, 16, 8}}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_ZEXT, G_SEXT, G_ANYEXT}).legalIf([](const LegalityQuery &Query) { return false; }).maxScalar(0, s32); + getActionDefinitionsBuilder(G_TRUNC).legalIf([](const LegalityQuery &Query) { return false; }).maxScalar(1, s32); + getActionDefinitionsBuilder(G_SELECT).legalForCartesianProduct({p0, s32, s64}, {s32}).minScalar(0, s32).minScalar(1, s32); + getActionDefinitionsBuilder(G_BRCOND).legalFor({s32}).minScalar(0, s32); + getActionDefinitionsBuilder(G_BRJT).legalFor({{p0, s32}}); + getActionDefinitionsBuilder(G_BRINDIRECT).legalFor({p0}); + getActionDefinitionsBuilder(G_PHI).legalFor({p0, s32, s64}).minScalar(0, s32); + getActionDefinitionsBuilder({G_AND, G_OR, G_XOR}).legalFor({s32}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_SDIV, G_SREM, G_UDIV, G_UREM}).legalIf([=, &ST](const LegalityQuery &Query) { if (CheckTyN(0, Query, {s32})) return true; if (ST.hasMSA() && CheckTyN(0, Query, {v16s8, v8s16, v4s32, v2s64})) return true; return false;}).minScalar(0, s32).libcallFor({s64}); + getActionDefinitionsBuilder({G_SHL, G_ASHR, G_LSHR}).legalFor({{s32, s32}}).clampScalar(1, s32, s32).clampScalar(0, s32, s32); + getActionDefinitionsBuilder(G_ICMP).legalForCartesianProduct({s32}, {s32, p0}).clampScalar(1, s32, s32).minScalar(0, s32); + getActionDefinitionsBuilder(G_CONSTANT).legalFor({s32}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_PTR_ADD, G_INTTOPTR}).legalFor({{p0, s32}}); + getActionDefinitionsBuilder(G_PTRTOINT).legalFor({{s32, p0}}); + getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({p0}); + getActionDefinitionsBuilder({G_GLOBAL_VALUE, G_JUMP_TABLE}).legalFor({p0}); + getActionDefinitionsBuilder(G_DYN_STACKALLOC).lowerFor({{p0, s32}}); + getActionDefinitionsBuilder(G_VASTART).legalFor({p0}); + getActionDefinitionsBuilder(G_BSWAP).legalIf([=, &ST](const LegalityQuery &Query) { if (ST.hasMips32r2() && CheckTyN(0, Query, {s32})) return true; return false;}).lowerIf([=, &ST](const LegalityQuery &Query) { if (!ST.hasMips32r2() && CheckTyN(0, Query, {s32})) return true; return false;}).maxScalar(0, s32); + getActionDefinitionsBuilder(G_BITREVERSE).lowerFor({s32}).maxScalar(0, s32); + getActionDefinitionsBuilder(G_CTLZ).legalFor({{s32, s32}}).maxScalar(0, s32).maxScalar(1, s32); + getActionDefinitionsBuilder(G_CTLZ_ZERO_UNDEF).lowerFor({{s32, s32}}); + getActionDefinitionsBuilder(G_CTTZ).lowerFor({{s32, s32}}).maxScalar(0, s32).maxScalar(1, s32); + getActionDefinitionsBuilder(G_CTTZ_ZERO_UNDEF).lowerFor({{s32, s32}, {s64, s64}}); + getActionDefinitionsBuilder(G_CTPOP).lowerFor({{s32, s32}}).clampScalar(0, s32, s32).clampScalar(1, s32, s32) + getActionDefinitionsBuilder(G_FCONSTANT).legalFor({s32, s64}); + getActionDefinitionsBuilder({G_FADD, G_FSUB, G_FMUL, G_FDIV, G_FABS, G_FSQRT}).legalIf([=, &ST](const LegalityQuery &Query) { if (CheckTyN(0, Query, {s32, s64})) return true; if (ST.hasMSA() && CheckTyN(0, Query, {v16s8, v8s16, v4s32, v2s64})) return true; return false;}); + getActionDefinitionsBuilder(G_FCMP).legalFor({{s32, s32}, {s32, s64}}).minScalar(0, s32); + getActionDefinitionsBuilder({G_FCEIL, G_FFLOOR}).libcallFor({s32, s64}); + getActionDefinitionsBuilder(G_FPEXT).legalFor({{s64, s32}}); + getActionDefinitionsBuilder(G_FPTRUNC).legalFor({{s32, s64}}); + getActionDefinitionsBuilder(G_FPTOSI).legalForCartesianProduct({s32}, {s64, s32}).libcallForCartesianProduct({s64}, {s64, s32}).minScalar(0, s32); + getActionDefinitionsBuilder(G_FPTOUI).libcallForCartesianProduct({s64}, {s64, s32}).lowerForCartesianProduct({s32}, {s64, s32}).minScalar(0, s32); + getActionDefinitionsBuilder(G_SITOFP).legalForCartesianProduct({s64, s32}, {s32}).libcallForCartesianProduct({s64, s32}, {s64}).minScalar(1, s32); + getActionDefinitionsBuilder(G_UITOFP).libcallForCartesianProduct({s64, s32}, {s64}).customForCartesianProduct({s64, s32}, {s32}).minScalar(1, s32); + getActionDefinitionsBuilder(G_SEXT_INREG).lower(); + getActionDefinitionsBuilder({G_MEMCPY, G_MEMMOVE, G_MEMSET}).libcall(); + computeTables(); + verify(*ST.getInstrInfo()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..815432f210488b2944aa43d51c6807b23840236b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp @@ -0,0 +1,124 @@ +MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO, MachineOperandType MOTy, int64_t Offset) const { + MCSymbolRefExpr::VariantKind Kind = MCSymbolRefExpr::VK_None; + MipsMCExpr::MipsExprKind TargetKind = MipsMCExpr::MEK_None; + bool IsGpOff = false; + const MCSymbol *Symbol; + switch(MO.getTargetFlags()) { + default: + llvm_unreachable("Invalid target flag!"); + case MipsII::MO_NO_FLAG: + break; + case MipsII::MO_GPREL: + TargetKind = MipsMCExpr::MEK_GPREL; + break; + case MipsII::MO_GOT_CALL: + TargetKind = MipsMCExpr::MEK_GOT_CALL; + break; + case MipsII::MO_GOT: + TargetKind = MipsMCExpr::MEK_GOT; + break; + case MipsII::MO_ABS_HI: + TargetKind = MipsMCExpr::MEK_HI; + break; + case MipsII::MO_ABS_LO: + TargetKind = MipsMCExpr::MEK_LO; + break; + case MipsII::MO_TLSGD: + TargetKind = MipsMCExpr::MEK_TLSGD; + break; + case MipsII::MO_TLSLDM: + TargetKind = MipsMCExpr::MEK_TLSLDM; + break; + case MipsII::MO_DTPREL_HI: + TargetKind = MipsMCExpr::MEK_DTPREL_HI; + break; + case MipsII::MO_DTPREL_LO: + TargetKind = MipsMCExpr::MEK_DTPREL_LO; + break; + case MipsII::MO_GOTTPREL: + TargetKind = MipsMCExpr::MEK_GOTTPREL; + break; + case MipsII::MO_TPREL_HI: + TargetKind = MipsMCExpr::MEK_TPREL_HI; + break; + case MipsII::MO_TPREL_LO: + TargetKind = MipsMCExpr::MEK_TPREL_LO; + break; + case MipsII::MO_GPOFF_HI: + TargetKind = MipsMCExpr::MEK_HI; + IsGpOff = true; + break; + case MipsII::MO_GPOFF_LO: + TargetKind = MipsMCExpr::MEK_LO; + IsGpOff = true; + break; + case MipsII::MO_GOT_DISP: + TargetKind = MipsMCExpr::MEK_GOT_DISP; + break; + case MipsII::MO_GOT_HI16: + TargetKind = MipsMCExpr::MEK_GOT_HI16; + break; + case MipsII::MO_GOT_LO16: + TargetKind = MipsMCExpr::MEK_GOT_LO16; + break; + case MipsII::MO_GOT_PAGE: + TargetKind = MipsMCExpr::MEK_GOT_PAGE; + break; + case MipsII::MO_GOT_OFST: + TargetKind = MipsMCExpr::MEK_GOT_OFST; + break; + case MipsII::MO_HIGHER: + TargetKind = MipsMCExpr::MEK_HIGHER; + break; + case MipsII::MO_HIGHEST: + TargetKind = MipsMCExpr::MEK_HIGHEST; + break; + case MipsII::MO_CALL_HI16: + TargetKind = MipsMCExpr::MEK_CALL_HI16; + break; + case MipsII::MO_CALL_LO16: + TargetKind = MipsMCExpr::MEK_CALL_LO16; + break; + case MipsII::MO_JALR: + return MCOperand(); + } + switch (MOTy) { + case MachineOperand::MO_MachineBasicBlock: + Symbol = MO.getMBB()->getSymbol(); + break; + case MachineOperand::MO_GlobalAddress: + Symbol = AsmPrinter.getSymbol(MO.getGlobal()); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_BlockAddress: + Symbol = AsmPrinter.GetBlockAddressSymbol(MO.getBlockAddress()); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_ExternalSymbol: + Symbol = AsmPrinter.GetExternalSymbolSymbol(MO.getSymbolName()); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_MCSymbol: + Symbol = MO.getMCSymbol(); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_JumpTableIndex: + Symbol = AsmPrinter.GetJTISymbol(MO.getIndex()); + break; + case MachineOperand::MO_ConstantPoolIndex: + Symbol = AsmPrinter.GetCPISymbol(MO.getIndex()); + Offset += MO.getOffset(); + break; + default: + llvm_unreachable(""); + } + const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, Kind, *Ctx); + if (Offset) { + Expr = MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(Offset, *Ctx), *Ctx); + } + if (IsGpOff) + Expr = MipsMCExpr::createGpOff(TargetKind, Expr, *Ctx); + else if (TargetKind != MipsMCExpr::MEK_None) + Expr = MipsMCExpr::create(TargetKind, Expr, *Ctx); + return MCOperand::createExpr(Expr); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..154620e398d7f0953efcca93ed80eb3382eec4d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp @@ -0,0 +1,2 @@ +MipsRegisterBankInfo::MipsRegisterBankInfo(const TargetRegisterInfo &TRI) : MipsGenRegisterBankInfo() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9e6f816b7f0ea865a533d9408fcc407f4cc146f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +MipsRegisterInfo::MipsRegisterInfo() : MipsGenRegisterInfo(Mips::RA) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80dcd82832876ef68c5dac162843caf8d669a919 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,10 @@ +void MipsRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS) const { + MachineInstr &MI = *II; + MachineFunction &MF = *MI.getParent()->getParent(); + LLVM_DEBUG(errs() << "\nFunction : " << MF.getName() << "\n"; errs() << "<--------->\n" << MI); + int FrameIndex = MI.getOperand(FIOperandNum).getIndex(); + uint64_t stackSize = MF.getFrameInfo().getStackSize(); + int64_t spOffset = MF.getFrameInfo().getObjectOffset(FrameIndex); + LLVM_DEBUG(errs() << "FrameIndex : " << FrameIndex << "\n" << "spOffset : " << spOffset << "\n" << "stackSize : " << stackSize << "\n" << "alignment : " << DebugStr(MF.getFrameInfo().getObjectAlign(FrameIndex)) << "\n"); + eliminateFI(MI, FIOperandNum, FrameIndex, stackSize, spOffset); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c237e572ddf1fb74501680c681b1277c0f939faa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp @@ -0,0 +1,14 @@ +const uint32_t *MipsRegisterInfo::getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const { + const MipsSubtarget &Subtarget = MF.getSubtarget(); + if (Subtarget.isSingleFloat()) + return CSR_SingleFloatOnly_RegMask; + if (Subtarget.isABI_N64()) + return CSR_N64_RegMask; + if (Subtarget.isABI_N32()) + return CSR_N32_RegMask; + if (Subtarget.isFP64bit()) + return CSR_O32_FP64_RegMask; + if (Subtarget.isFPXX()) + return CSR_O32_FPXX_RegMask; + return CSR_O32_RegMask; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee86b1ec364747b2b7adec2f4c7503435563ae61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,21 @@ +const MCPhysReg *MipsRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + const MipsSubtarget &Subtarget = MF->getSubtarget(); + const Function &F = MF->getFunction(); + if (F.hasFnAttribute("interrupt")) { + if (Subtarget.hasMips64()) + return Subtarget.hasMips64r6() ? CSR_Interrupt_64R6_SaveList : CSR_Interrupt_64_SaveList; + else + return Subtarget.hasMips32r6() ? CSR_Interrupt_32R6_SaveList : CSR_Interrupt_32_SaveList; + } + if (Subtarget.isSingleFloat()) + return CSR_SingleFloatOnly_SaveList; + if (Subtarget.isABI_N64()) + return CSR_N64_SaveList; + if (Subtarget.isABI_N32()) + return CSR_N32_SaveList; + if (Subtarget.isFP64bit()) + return CSR_O32_FP64_SaveList; + if (Subtarget.isFPXX()) + return CSR_O32_FPXX_SaveList; + return CSR_O32_SaveList; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5f8f103812c92122b87cb59e13c69048c13c8d7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,9 @@ +Register MipsRegisterInfo::getFrameRegister(const MachineFunction &MF) const { + const MipsSubtarget &Subtarget = MF.getSubtarget(); + const TargetFrameLowering *TFI = Subtarget.getFrameLowering(); + bool IsN64 = static_cast(MF.getTarget()).getABI().IsN64(); + if (Subtarget.inMips16Mode()) + return TFI->hasFP(MF) ? Mips::S0 : Mips::SP; + else + return TFI->hasFP(MF) ? (IsN64 ? Mips::FP_64 : Mips::FP) : (IsN64 ? Mips::SP_64 : Mips::SP); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..768c66e1a51386be2f8f561bf3a64986f6b8ec80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp @@ -0,0 +1,15 @@ +const TargetRegisterClass *MipsRegisterInfo::getPointerRegClass(const MachineFunction &MF, unsigned Kind) const { + MipsABIInfo ABI = MF.getSubtarget().getABI(); + MipsPtrClass PtrClassKind = static_cast(Kind); + switch (PtrClassKind) { + case MipsPtrClass::Default: + return ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + case MipsPtrClass::GPR16MM: + return &Mips::GPRMM16RegClass; + case MipsPtrClass::StackPointer: + return ABI.ArePtrs64bit() ? &Mips::SP64RegClass : &Mips::SP32RegClass; + case MipsPtrClass::GlobalPointer: + return ABI.ArePtrs64bit() ? &Mips::GP64RegClass : &Mips::GP32RegClass; + } + llvm_unreachable("Unknown pointer kind"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e54fad41cb6792bb287045716ad70601b8ede981 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,65 @@ +BitVector MipsRegisterInfo::getReservedRegs(const MachineFunction &MF) const { + static const MCPhysReg ReservedGPR32[] = { + Mips::ZERO, Mips::K0, Mips::K1, Mips::SP + }; + static const MCPhysReg ReservedGPR64[] = { + Mips::ZERO_64, Mips::K0_64, Mips::K1_64, Mips::SP_64 + }; + BitVector Reserved(getNumRegs()); + const MipsSubtarget &Subtarget = MF.getSubtarget(); + for (unsigned I = 0; I < array_lengthof(ReservedGPR32); ++I) + Reserved.set(ReservedGPR32[I]); + if (Subtarget.isTargetNaCl()) { + Reserved.set(Mips::T6); + Reserved.set(Mips::T7); + Reserved.set(Mips::T8); + } + for (unsigned I = 0; I < array_lengthof(ReservedGPR64); ++I) + Reserved.set(ReservedGPR64[I]); + if (!Subtarget.isABICalls()) { + Reserved.set(Mips::GP); + Reserved.set(Mips::GP_64); + } + if (Subtarget.isFP64bit()) { + for (MCPhysReg Reg : Mips::AFGR64RegClass) + Reserved.set(Reg); + } + else { + for (MCPhysReg Reg : Mips::FGR64RegClass) + Reserved.set(Reg); + } + if (Subtarget.getFrameLowering()->hasFP(MF)) { + if (Subtarget.inMips16Mode()) + Reserved.set(Mips::S0); + else { + Reserved.set(Mips::FP); + Reserved.set(Mips::FP_64); + if (needsStackRealignment(MF) && MF.getFrameInfo().hasVarSizedObjects()) { + Reserved.set(Mips::S7); + Reserved.set(Mips::S7_64); + } + } + } + Reserved.set(Mips::HWR29); + Reserved.set(Mips::DSPPos); + Reserved.set(Mips::DSPSCount); + Reserved.set(Mips::DSPCarry); + Reserved.set(Mips::DSPEFI); + Reserved.set(Mips::DSPOutFlag); + for (MCPhysReg Reg : Mips::MSACtrlRegClass) + Reserved.set(Reg); + if (Subtarget.inMips16Mode()) { + const MipsFunctionInfo *MipsFI = MF.getInfo(); + Reserved.set(Mips::RA); + Reserved.set(Mips::RA_64); + Reserved.set(Mips::T0); + Reserved.set(Mips::T1); + if (MF.getFunction().hasFnAttribute("saveS2") || MipsFI->hasSaveS2()) + Reserved.set(Mips::S2); + } + if (Subtarget.useSmallSection()) { + Reserved.set(Mips::GP); + Reserved.set(Mips::GP_64); + } + return Reserved; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e1497c8af968f9fb8df0d24aa0ec03d295b89d0b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp @@ -0,0 +1,3 @@ +bool Mips16RegisterInfo::requiresFrameIndexScavenging(const MachineFunction &MF) const { + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2682c40f6351c32f0b694fd849308d114c3a623b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,3 @@ +bool MipsRegisterInfo::requiresRegisterScavenging(const MachineFunction &MF) const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/AsmParser.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/AsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0024f46337cf0a1788c8f6d813e7962cf06aec64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/AsmParser.cpp @@ -0,0 +1,24 @@ +MipsAsmParser(const MCSubtargetInfo &sti, MCAsmParser &parser, const MCInstrInfo &MII, const MCTargetOptions &Options) : MCTargetAsmParser(Options, sti, MII), ABI(MipsABIInfo::computeTargetABI(Triple(sti.getTargetTriple()), sti.getCPU(), Options)) { + MCAsmParserExtension::Initialize(parser); + parser.addAliasForDirective(".asciiz", ".asciz"); + parser.addAliasForDirective(".hword", ".2byte"); + parser.addAliasForDirective(".word", ".4byte"); + parser.addAliasForDirective(".dword", ".8byte"); + setAvailableFeatures(ComputeAvailableFeatures(getSTI().getFeatureBits())); + AssemblerOptions.push_back(std::make_unique(getSTI().getFeatureBits())); + AssemblerOptions.push_back(std::make_unique(getSTI().getFeatureBits())); + getTargetStreamer().updateABIInfo(*this); + if (!isABI_O32() && !useOddSPReg() != 0) + report_fatal_error("-mno-odd-spreg requires the O32 ABI"); + CurrentFn = nullptr; + IsPicEnabled = getContext().getObjectFileInfo()->isPositionIndependent(); + IsCpRestoreSet = false; + CpRestoreOffset = -1; + GPReg = ABI.GetGlobalPtr(); + const Triple &TheTriple = sti.getTargetTriple(); + IsLittleEndian = TheTriple.isLittleEndian(); + if (getSTI().getCPU() == "mips64r6" && inMicroMipsMode()) + report_fatal_error("microMIPS64R6 is not supported", false); + if (!isABI_O32() && inMicroMipsMode()) + report_fatal_error("microMIPS64 is not supported", false); + } \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/KindTy.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/KindTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f4c302b6b8fa3a780b93821daa1a44f0536c32c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/KindTy.cpp @@ -0,0 +1,7 @@ +enum KindTy { + k_Immediate, + k_Memory, + k_RegisterIndex, + k_Token, + k_RegList, +} Kind; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03817d477c15f4208d1f063c8f12a417d900e788 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmParser() { + RegisterMCAsmParser X(getTheMipsTarget()); + RegisterMCAsmParser Y(getTheMipselTarget()); + RegisterMCAsmParser A(getTheMips64Target()); + RegisterMCAsmParser B(getTheMips64elTarget()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d5d91e4524a97a5a07f08a46e5da9ac9048942a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp @@ -0,0 +1,142 @@ +bool MipsAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, OperandVector &Operands, MCStreamer &Out, uint64_t &ErrorInfo, bool MatchingInlineAsm) { + MCInst Inst; + unsigned MatchResult = MatchInstructionImpl(Operands, Inst, ErrorInfo, MatchingInlineAsm); + switch (MatchResult) { + case Match_Success: + if (processInstruction(Inst, IDLoc, Out, STI)) + return true; + return false; + case Match_MissingFeature: + Error(IDLoc, "instruction requires a CPU feature not currently enabled"); + return true; + case Match_InvalidOperand: { + SMLoc ErrorLoc = IDLoc; + if (ErrorInfo != ~0ULL) { + if (ErrorInfo >= Operands.size()) + return Error(IDLoc, "too few operands for instruction"); + ErrorLoc = Operands[ErrorInfo]->getStartLoc(); + if (ErrorLoc == SMLoc()) + ErrorLoc = IDLoc; + } + return Error(ErrorLoc, "invalid operand for instruction"); + } + case Match_NonZeroOperandForSync: + return Error(IDLoc, "s-type must be zero or unspecified for pre-MIPS32 ISAs"); + case Match_NonZeroOperandForMTCX: + return Error(IDLoc, "selector must be zero for pre-MIPS32 ISAs"); + case Match_MnemonicFail: + return Error(IDLoc, "invalid instruction"); + case Match_RequiresDifferentSrcAndDst: + return Error(IDLoc, "source and destination must be different"); + case Match_RequiresDifferentOperands: + return Error(IDLoc, "registers must be different"); + case Match_RequiresNoZeroRegister: + return Error(IDLoc, "invalid operand ($zero) for instruction"); + case Match_RequiresSameSrcAndDst: + return Error(IDLoc, "source and destination must match"); + case Match_NoFCCRegisterForCurrentISA: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "non-zero fcc register doesn't exist in current ISA level"); + case Match_Immz: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected '0'"); + case Match_UImm1_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 1-bit unsigned immediate"); + case Match_UImm2_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 2-bit unsigned immediate"); + case Match_UImm2_1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 1 .. 4"); + case Match_UImm3_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 3-bit unsigned immediate"); + case Match_UImm4_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 4-bit unsigned immediate"); + case Match_SImm4_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 4-bit signed immediate"); + case Match_UImm5_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 5-bit unsigned immediate"); + case Match_SImm5_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 5-bit signed immediate"); + case Match_UImm5_1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 1 .. 32"); + case Match_UImm5_32: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 32 .. 63"); + case Match_UImm5_33: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 33 .. 64"); + case Match_UImm5_0_Report_UImm6: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 6-bit unsigned immediate"); + case Match_UImm5_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 7-bit unsigned immediate and multiple of 4"); + case Match_UImmRange2_64: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range 2 .. 64"); + case Match_UImm6_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 6-bit unsigned immediate"); + case Match_UImm6_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 8-bit unsigned immediate and multiple of 4"); + case Match_SImm6_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 6-bit signed immediate"); + case Match_UImm7_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 7-bit unsigned immediate"); + case Match_UImm7_N1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected immediate in range -1 .. 126"); + case Match_SImm7_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 9-bit signed immediate and multiple of 4"); + case Match_UImm8_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 8-bit unsigned immediate"); + case Match_UImm10_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 10-bit unsigned immediate"); + case Match_SImm10_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 10-bit signed immediate"); + case Match_SImm11_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 11-bit signed immediate"); + case Match_UImm16: + case Match_UImm16_Relaxed: + case Match_UImm16_AltRelaxed: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 16-bit unsigned immediate"); + case Match_SImm16: + case Match_SImm16_Relaxed: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 16-bit signed immediate"); + case Match_SImm19_Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 19-bit signed immediate and multiple of 4"); + case Match_UImm20_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 20-bit unsigned immediate"); + case Match_UImm26_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 26-bit unsigned immediate"); + case Match_SImm32: + case Match_SImm32_Relaxed: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 32-bit signed immediate"); + case Match_UImm32_Coerced: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected 32-bit immediate"); + case Match_MemSImm9: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 9-bit signed offset"); + case Match_MemSImm10: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 10-bit signed offset"); + case Match_MemSImm10Lsl1: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 11-bit signed offset and multiple of 2"); + case Match_MemSImm10Lsl2: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 12-bit signed offset and multiple of 4"); + case Match_MemSImm10Lsl3: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 13-bit signed offset and multiple of 8"); + case Match_MemSImm11: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 11-bit signed offset"); + case Match_MemSImm12: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 12-bit signed offset"); + case Match_MemSImm16: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 16-bit signed offset"); + case Match_MemSImmPtr: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected memory with 32-bit signed offset"); + case Match_RequiresPosSizeRange0_32: { + SMLoc ErrorStart = Operands[3]->getStartLoc(); + SMLoc ErrorEnd = Operands[4]->getEndLoc(); + return Error(ErrorStart, "size plus position are not in the range 0 .. 32", SMRange(ErrorStart, ErrorEnd)); + } + case Match_RequiresPosSizeUImm6: { + SMLoc ErrorStart = Operands[3]->getStartLoc(); + SMLoc ErrorEnd = Operands[4]->getEndLoc(); + return Error(ErrorStart, "size plus position are not in the range 1 .. 63", SMRange(ErrorStart, ErrorEnd)); + } + case Match_RequiresPosSizeRange33_64: { + SMLoc ErrorStart = Operands[3]->getStartLoc(); + SMLoc ErrorEnd = Operands[4]->getEndLoc(); + return Error(ErrorStart, "size plus position are not in the range 33 .. 64", SMRange(ErrorStart, ErrorEnd)); + } +} + llvm_unreachable("Implement any new match types added!"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/Operand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ea6992dcf8df85c16752926355da897ce7de63a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/Operand.cpp @@ -0,0 +1,2 @@ +MipsOperand(KindTy K, MipsAsmParser &Parser) : MCParsedAsmOperand(), Kind(K), AsmParser(Parser) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/Operand2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/Operand2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ea6992dcf8df85c16752926355da897ce7de63a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/Operand2.cpp @@ -0,0 +1,2 @@ +MipsOperand(KindTy K, MipsAsmParser &Parser) : MCParsedAsmOperand(), Kind(K), AsmParser(Parser) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp new file mode 100644 index 0000000000000000000000000000000000000000..759b5538a90a0648a7e34b1e218abc61944b5841 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp @@ -0,0 +1,243 @@ +bool MipsAsmParser::ParseDirective(AsmToken DirectiveID) { + MCAsmParser &Parser = getParser(); + StringRef IDVal = DirectiveID.getString(); + if (IDVal == ".cpadd") { + parseDirectiveCpAdd(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".cpload") { + parseDirectiveCpLoad(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".cprestore") { + parseDirectiveCpRestore(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".cplocal") { + parseDirectiveCpLocal(DirectiveID.getLoc()); + return false; + } + if (IDVal == ".ent") { + StringRef SymbolName; + if (Parser.parseIdentifier(SymbolName)) { + reportParseError("expected identifier after .ent"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + if (getLexer().isNot(AsmToken::Comma)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + Parser.Lex(); + const MCExpr *DummyNumber; + int64_t DummyNumberVal; + if (Parser.parseExpression(DummyNumber)) { + reportParseError("expected number after comma"); + return false; + } + if (!DummyNumber->evaluateAsAbsolute(DummyNumberVal)) { + reportParseError("expected an absolute expression after comma"); + return false; + } + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + MCSymbol *Sym = getContext().getOrCreateSymbol(SymbolName); + getTargetStreamer().emitDirectiveEnt(*Sym); + CurrentFn = Sym; + IsCpRestoreSet = false; + return false; + } + if (IDVal == ".end") { + StringRef SymbolName; + if (Parser.parseIdentifier(SymbolName)) { + reportParseError("expected identifier after .end"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + if (CurrentFn == nullptr) { + reportParseError(".end used without .ent"); + return false; + } + if ((SymbolName != CurrentFn->getName())) { + reportParseError(".end symbol does not match .ent symbol"); + return false; + } + getTargetStreamer().emitDirectiveEnd(SymbolName); + CurrentFn = nullptr; + IsCpRestoreSet = false; + return false; + } + if (IDVal == ".frame") { + SmallVector, 1> TmpReg; + OperandMatchResultTy ResTy = parseAnyRegister(TmpReg); + if (ResTy == MatchOperand_NoMatch || ResTy == MatchOperand_ParseFail) { + reportParseError("expected stack register"); + return false; + } + MipsOperand &StackRegOpnd = static_cast(*TmpReg[0]); + if (!StackRegOpnd.isGPRAsmReg()) { + reportParseError(StackRegOpnd.getStartLoc(), "expected general purpose register"); + return false; + } + unsigned StackReg = StackRegOpnd.getGPR32Reg(); + if (Parser.getTok().is(AsmToken::Comma)) + Parser.Lex(); + else { + reportParseError("unexpected token, expected comma"); + return false; + } + const MCExpr *FrameSize; + int64_t FrameSizeVal; + if (Parser.parseExpression(FrameSize)) { + reportParseError("expected frame size value"); + return false; + } + if (!FrameSize->evaluateAsAbsolute(FrameSizeVal)) { + reportParseError("frame size not an absolute expression"); + return false; + } + if (Parser.getTok().is(AsmToken::Comma)) + Parser.Lex(); + else { + reportParseError("unexpected token, expected comma"); + return false; + } + TmpReg.clear(); + ResTy = parseAnyRegister(TmpReg); + if (ResTy == MatchOperand_NoMatch || ResTy == MatchOperand_ParseFail) { + reportParseError("expected return register"); + return false; + } + MipsOperand &ReturnRegOpnd = static_cast(*TmpReg[0]); + if (!ReturnRegOpnd.isGPRAsmReg()) { + reportParseError(ReturnRegOpnd.getStartLoc(), "expected general purpose register"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + getTargetStreamer().emitFrame(StackReg, FrameSizeVal, ReturnRegOpnd.getGPR32Reg()); + IsCpRestoreSet = false; + return false; + } + if (IDVal == ".set") { + parseDirectiveSet(); + return false; + } + if (IDVal == ".mask" || IDVal == ".fmask") { + const MCExpr *BitMask; + int64_t BitMaskVal; + if (Parser.parseExpression(BitMask)) { + reportParseError("expected bitmask value"); + return false; + } + if (!BitMask->evaluateAsAbsolute(BitMaskVal)) { + reportParseError("bitmask not an absolute expression"); + return false; + } + if (Parser.getTok().is(AsmToken::Comma)) + Parser.Lex(); + else { + reportParseError("unexpected token, expected comma"); + return false; + } + const MCExpr *FrameOffset; + int64_t FrameOffsetVal; + if (Parser.parseExpression(FrameOffset)) { + reportParseError("expected frame offset value"); + return false; + } + if (!FrameOffset->evaluateAsAbsolute(FrameOffsetVal)) { + reportParseError("frame offset not an absolute expression"); + return false; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + reportParseError("unexpected token, expected end of statement"); + return false; + } + if (IDVal == ".mask") + getTargetStreamer().emitMask(BitMaskVal, FrameOffsetVal); + else + getTargetStreamer().emitFMask(BitMaskVal, FrameOffsetVal); + return false; + } + if (IDVal == ".nan") + return parseDirectiveNaN(); + + if (IDVal == ".gpword") { + parseDirectiveGpWord(); + return false; + } + if (IDVal == ".gpdword") { + parseDirectiveGpDWord(); + return false; + } + + if (IDVal == ".dtprelword") { + parseDirectiveDtpRelWord(); + return false; + } + if (IDVal == ".dtpreldword") { + parseDirectiveDtpRelDWord(); + return false; + } + if (IDVal == ".tprelword") { + parseDirectiveTpRelWord(); + return false; + } + if (IDVal == ".tpreldword") { + parseDirectiveTpRelDWord(); + return false; + } + if (IDVal == ".option") { + parseDirectiveOption(); + return false; + } + if (IDVal == ".abicalls") { + getTargetStreamer().emitDirectiveAbiCalls(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + return false; + } + if (IDVal == ".cpsetup") { + parseDirectiveCPSetup(); + return false; + } + if (IDVal == ".cpreturn") { + parseDirectiveCPReturn(); + return false; + } + if (IDVal == ".module") { + parseDirectiveModule(); + return false; + } + if (IDVal == ".llvm_internal_mips_reallow_module_directive") { + parseInternalDirectiveReallowModule(); + return false; + } + if (IDVal == ".insn") { + parseInsnDirective(); + return false; + } + if (IDVal == ".rdata") { + parseRSectionDirective(".rodata"); + return false; + } + if (IDVal == ".sbss") { + parseSSectionDirective(IDVal, ELF::SHT_NOBITS); + return false; + } + if (IDVal == ".sdata") { + parseSSectionDirective(IDVal, ELF::SHT_PROGBITS); + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2a508ccdd7784c61a69914df68dd816e913dd917 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp @@ -0,0 +1,38 @@ +bool MipsAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc, OperandVector &Operands) { + MCAsmParser &Parser = getParser(); + LLVM_DEBUG(dbgs() << "ParseInstruction\n"); + getTargetStreamer().forbidModuleDirective(); + if (!mnemonicIsValid(Name, 0)) { + FeatureBitset FBS = ComputeAvailableFeatures(getSTI().getFeatureBits()); + std::string Suggestion = MipsMnemonicSpellCheck(Name, FBS); + return Error(NameLoc, "unknown instruction" + Suggestion); + } + Operands.push_back(MipsOperand::CreateToken(Name, NameLoc, *this)); + if (getLexer().isNot(AsmToken::EndOfStatement)) { + if (parseOperand(Operands, Name)) { + SMLoc Loc = getLexer().getLoc(); + return Error(Loc, "unexpected token in argument list"); + } + if (getLexer().is(AsmToken::LBrac) && parseBracketSuffix(Name, Operands)) + return true; + while (getLexer().is(AsmToken::Comma)) { + Parser.Lex(); + if (parseOperand(Operands, Name)) { + SMLoc Loc = getLexer().getLoc(); + return Error(Loc, "unexpected token in argument list"); + } + if (getLexer().is(AsmToken::LBrac)) { + if (parseBracketSuffix(Name, Operands)) + return true; + } + else if (getLexer().is(AsmToken::LParen) && parseParenSuffix(Name, Operands)) + return true; + } + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + SMLoc Loc = getLexer().getLoc(); + return Error(Loc, "unexpected token in argument list"); + } + Parser.Lex(); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1c007833f59929cb9d0324e00d3040998464996 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp @@ -0,0 +1,3 @@ +bool MipsAsmParser::ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + return tryParseRegister(RegNo, StartLoc, EndLoc) != MatchOperand_Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d2a064b7a9d4fb757645ce723c9d45a4e21f59f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addExpr.cpp @@ -0,0 +1,8 @@ +void addExpr(MCInst &Inst, const MCExpr *Expr) const { + if (!Expr) + Inst.addOperand(MCOperand::createImm(0)); + else if (const MCConstantExpr *CE = dyn_cast(Expr)) + Inst.addOperand(MCOperand::createImm(CE->getValue())); + else + Inst.addOperand(MCOperand::createExpr(Expr)); + } \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..99f9c831995140cddadc166fd097ee368b5c5f2d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp @@ -0,0 +1,4 @@ +void addImmOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + addExpr(Inst, getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b5826e8ee5f4576985c9fdb509c547c63f4ec8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp @@ -0,0 +1,3 @@ +void addRegOperands(MCInst &Inst, unsigned N) const { + llvm_unreachable("Use a custom parser instead"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3da1052dc575118e5bbe16ca357f8c8a15196bdf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createImm.cpp @@ -0,0 +1,7 @@ +static std::unique_ptr createImm(const MCExpr *Val, SMLoc S, SMLoc E, MipsAsmParser &Parser) { + auto Op = std::make_unique(k_Immediate, Parser); + Op->Imm.Val = Val; + Op->StartLoc = S; + Op->EndLoc = E; + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3abcdf12ae77e0a78c900564055206a22187242 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createReg.cpp @@ -0,0 +1,11 @@ +static std::unique_ptr CreateReg(unsigned Index, StringRef Str, RegKind RegKind, const MCRegisterInfo *RegInfo, SMLoc S, SMLoc E, MipsAsmParser &Parser) { + auto Op = std::make_unique(k_RegisterIndex, Parser); + Op->RegIdx.Index = Index; + Op->RegIdx.RegInfo = RegInfo; + Op->RegIdx.Kind = RegKind; + Op->RegIdx.Tok.Data = Str.data(); + Op->RegIdx.Tok.Length = Str.size(); + Op->StartLoc = S; + Op->EndLoc = E; + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createSysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createSysReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createToken.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b32d17dd87c68e6be83414d2394197c68d1245e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createToken.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr CreateToken(StringRef Str, SMLoc S, MipsAsmParser &Parser) { + auto Op = std::make_unique(k_Token, Parser); + Op->Tok.Data = Str.data(); + Op->Tok.Length = Str.size(); + Op->StartLoc = S; + Op->EndLoc = S; + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createVType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/createVType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e9075c3fe891637688ed0ec5409f13457d6bbdd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getEndLoc() const override { + return EndLoc; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92325c487a33c523dd5549a7a6d810023646c31d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getImm.cpp @@ -0,0 +1,4 @@ +const MCExpr *getImm() const { + assert((Kind == k_Immediate) && "Invalid access!"); + return Imm.Val; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getLoc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getLoc.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..561fb299f3424c0fccbf96c162cdbc182753d4d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getReg.cpp @@ -0,0 +1,6 @@ +unsigned getReg() const override { + if (Kind == k_RegisterIndex && RegIdx.Index == 0 && RegIdx.Kind & RegKind_GPR) + return getGPR32Reg(); + llvm_unreachable("Invalid access!"); + return 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e36379a2af7e3a50c3295ec879be99ded34a75f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getStartLoc() const override { + return StartLoc; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getSysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getSysReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f0702cf4d0fc4fe32fcfe3d6382149cf4456f1ef --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp @@ -0,0 +1,5 @@ +MipsTargetStreamer &getTargetStreamer() { + assert(getParser().getStreamer().getTargetStreamer() && "do not have a target streamer"); + MCTargetStreamer &TS = *getParser().getStreamer().getTargetStreamer(); + return static_cast(TS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getToken.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e40c78da1e88d4186d87ae697481e4458dc6d09f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getToken.cpp @@ -0,0 +1,4 @@ +StringRef getToken() const { + assert(Kind == k_Token && "Invalid access!"); + return StringRef(Tok.Data, Tok.Length); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getVType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/getVType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isGPR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isGPR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97325e19a5f38a3dc2992126c618d96f7d7813b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isGPR.cpp @@ -0,0 +1,3 @@ +bool isGPRAsmReg() const { + return isRegIdx() && RegIdx.Kind & RegKind_GPR && RegIdx.Index <= 31; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e028f1acc0adc990eaaa7cd33412bb583aa50693 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const override { + return Kind == k_Immediate; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isMem.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isMem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..433c1871fb3ee7ace6d97413913de43c8c9fba2a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isMem.cpp @@ -0,0 +1,3 @@ +bool isMem() const override { + return Kind == k_Memory; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV32E.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV32E.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV64.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isRV64.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d367df6e72a1916e56ea13412e32c693d1dd119b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const override { + return isGPRAsmReg() && RegIdx.Index == 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm12.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm12.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm5.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm6.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm6.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4f3881c631162a15ddab6b7d7c34cc1d2b97656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp @@ -0,0 +1,3 @@ +template bool isSImm() const { + return isConstantImm() ? isInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isToken.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..434a02a9965ade469608f0cf55d543128efbe8ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isToken.cpp @@ -0,0 +1,3 @@ +bool isToken() const override { + return Kind == k_Token; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4482a7535ca80791bde428caeead9df38241b40b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm5.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7832961be9a3b8db581ef5ae22be8705c597938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp @@ -0,0 +1,3 @@ +template bool isUImm() const { + return isConstantImm() ? isUInt(getConstantImm()) : isImm(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isVType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isVType.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa71ede088179ac896028ca527da6898ad8c02dd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseOperand.cpp @@ -0,0 +1,36 @@ +bool MipsAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) { + MCAsmParser &Parser = getParser(); + LLVM_DEBUG(dbgs() << "parseOperand\n"); + OperandMatchResultTy ResTy = MatchOperandParserImpl(Operands, Mnemonic); + if (ResTy == MatchOperand_Success) + return false; + if (ResTy == MatchOperand_ParseFail) + return true; + LLVM_DEBUG(dbgs() << ".. Generic Parser\n"); + switch (getLexer().getKind()) { + case AsmToken::Dollar: { + SMLoc S = Parser.getTok().getLoc(); + if (parseAnyRegister(Operands) != MatchOperand_NoMatch) + return false; + StringRef Identifier; + if (Parser.parseIdentifier(Identifier)) + return true; + SMLoc E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); + MCSymbol *Sym = getContext().getOrCreateSymbol("$" + Identifier); + const MCExpr *Res = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext()); + Operands.push_back(MipsOperand::CreateImm(Res, S, E, *this)); + return false; + } + default: { + LLVM_DEBUG(dbgs() << ".. generic integer expression\n"); + const MCExpr *Expr; + SMLoc S = Parser.getTok().getLoc(); + if (getParser().parseExpression(Expr)) + return true; + SMLoc E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); + Operands.push_back(MipsOperand::CreateImm(Expr, S, E, *this)); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/print.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84efdd1c18cb87d13ff89482402cbc6dadca4b57 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/print.cpp @@ -0,0 +1,29 @@ +void print(raw_ostream &OS) const override { + switch (Kind) { + case k_Immediate: + OS << "Imm<"; + OS << *Imm.Val; + OS << ">"; + break; + case k_Memory: + OS << "Mem<"; + Mem.Base->print(OS); + OS << ", "; + OS << *Mem.Off; + OS << ">"; + break; + case k_RegisterIndex: + OS << "RegIdx<" << RegIdx.Index << ":" << RegIdx.Kind << ", " + << StringRef(RegIdx.Tok.Data, RegIdx.Tok.Length) << ">"; + break; + case k_Token: + OS << getToken(); + break; + case k_RegList: + OS << "RegList< "; + for (auto Reg : (*RegList.List)) + OS << Reg << " "; + OS << ">"; + break; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bd1a8cbc7b97359b66a58cc455ce07f739cf6627 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp @@ -0,0 +1,7 @@ +void setFeatureBits(uint64_t Feature, StringRef FeatureString) { + if (!(getSTI().getFeatureBits()[Feature])) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); + AssemblerOptions.back()->setFeatures(STI.getFeatureBits()); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b7da7ddacfdef727bd3c1256963779f4610d80b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp @@ -0,0 +1,16 @@ +OperandMatchResultTy MipsAsmParser::tryParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + SmallVector, 1> Operands; + OperandMatchResultTy ResTy = parseAnyRegister(Operands); + if (ResTy == MatchOperand_Success) { + assert(Operands.size() == 1); + MipsOperand &Operand = static_cast(*Operands.front()); + StartLoc = Operand.getStartLoc(); + EndLoc = Operand.getEndLoc(); + if (Operand.isGPRAsmReg()) { + RegNo = isGP64bit() ? Operand.getGPR64Reg() : Operand.getGPR32Reg(); + } + return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch : MatchOperand_Success; + } + assert(Operands.size() == 0); + return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch : MatchOperand_Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69363c6c07ac6569bb6adaa08ef2328e96b8a16f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit MipsAsmPrinter(TargetMachine &TM, std::unique_ptr Streamer) : AsmPrinter(TM, std::move(Streamer)), MCInstLowering(*this) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d4ab5bf715e86e02b908fb3cab0a9fd1fecee42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmPrinter() { + RegisterAsmPrinter X(getTheMipsTarget()); + RegisterAsmPrinter Y(getTheMipselTarget()); + RegisterAsmPrinter A(getTheMips64Target()); + RegisterAsmPrinter B(getTheMips64elTarget()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13d636aa596545eb1d4a0b5e90251d6ac7d5200a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,27 @@ +bool MipsAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) { + assert(OpNum + 1 < MI->getNumOperands() && "Insufficient operands"); + const MachineOperand &BaseMO = MI->getOperand(OpNum); + const MachineOperand &OffsetMO = MI->getOperand(OpNum + 1); + assert(BaseMO.isReg() && "Unexpected base pointer for inline asm memory operand."); + assert(OffsetMO.isImm() && "Unexpected offset for inline asm memory operand."); + int Offset = OffsetMO.getImm(); + if (ExtraCode) { + switch (ExtraCode[0]) { + case 'D': + Offset += 4; + break; + case 'M': + if (Subtarget->isLittle()) + Offset += 4; + break; + case 'L': + if (!Subtarget->isLittle()) + Offset += 4; + break; + default: + return true; + } + } + O << Offset << "($" << MipsInstPrinter::getRegisterName(BaseMO.getReg()) << ")"; + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79f3c9422c159809396fc8b54c7323732a4efe88 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,89 @@ +bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) { + if (ExtraCode && ExtraCode[0]) { + if (ExtraCode[1] != 0) return true; + const MachineOperand &MO = MI->getOperand(OpNum); + switch (ExtraCode[0]) { + default: + return AsmPrinter::PrintAsmOperand(MI, OpNum, ExtraCode, O); + case 'X': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << "0x" << Twine::utohexstr(MO.getImm()); + return false; + case 'x': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << "0x" << Twine::utohexstr(MO.getImm() & 0xffff); + return false; + case 'd': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << MO.getImm(); + return false; + case 'm': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << MO.getImm() - 1; + return false; + case 'y': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + if (!isPowerOf2_64(MO.getImm())) + return true; + O << Log2_64(MO.getImm()); + return false; + case 'z': + if (MO.getType() == MachineOperand::MO_Immediate && MO.getImm() == 0) { + O << "$0"; + return false; + } + break; + case 'D': + case 'L': + case 'M': + { + if (OpNum == 0) + return true; + const MachineOperand &FlagsOP = MI->getOperand(OpNum - 1); + if (!FlagsOP.isImm()) + return true; + unsigned Flags = FlagsOP.getImm(); + unsigned NumVals = InlineAsm::getNumOperandRegisters(Flags); + if (NumVals != 2) { + if (Subtarget->isGP64bit() && NumVals == 1 && MO.isReg()) { + Register Reg = MO.getReg(); + O << '$' << MipsInstPrinter::getRegisterName(Reg); + return false; + } + return true; + } + unsigned RegOp = OpNum; + if (!Subtarget->isGP64bit()){ + switch(ExtraCode[0]) { + case 'M': + RegOp = (Subtarget->isLittle()) ? OpNum + 1 : OpNum; + break; + case 'L': + RegOp = (Subtarget->isLittle()) ? OpNum : OpNum + 1; + break; + case 'D': + RegOp = OpNum + 1; + } + if (RegOp >= MI->getNumOperands()) + return true; + const MachineOperand &MO = MI->getOperand(RegOp); + if (!MO.isReg()) + return true; + Register Reg = MO.getReg(); + O << '$' << MipsInstPrinter::getRegisterName(Reg); + return false; + } + break; + } + case 'w': + break; + } + } + printOperand(MI, OpNum, O); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7146d50f3a4b68a80abd13882286d1c3d617f2b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,8 @@ +void MipsAsmPrinter::emitEndOfAsmFile(Module &M) { + for (std::map::const_iterator it = StubsNeeded.begin(); it != StubsNeeded.end(); ++it) { + const char *Symbol = it->first; + const Mips16HardFloatInfo::FuncSignature *Signature = it->second; + EmitFPCallStub(Symbol, Signature); + } + OutStreamer->SwitchSection(OutContext.getObjectFileInfo()->getTextSection()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52d759a06f0cc7d92fe9b7e4c9454e2fb460d219 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp @@ -0,0 +1,63 @@ +void MipsAsmPrinter::emitInstruction(const MachineInstr *MI) { + MipsTargetStreamer &TS = getTargetStreamer(); + unsigned Opc = MI->getOpcode(); + TS.forbidModuleDirective(); + if (MI->isDebugValue()) { + SmallString<128> Str; + raw_svector_ostream OS(Str); + PrintDebugValueComment(MI, OS); + return; + } + if (MI->isDebugLabel()) + return; + if (InConstantPool && Opc != Mips::CONSTPOOL_ENTRY) { + OutStreamer->emitDataRegion(MCDR_DataRegionEnd); + InConstantPool = false; + } + if (Opc == Mips::CONSTPOOL_ENTRY) { + unsigned LabelId = (unsigned)MI->getOperand(0).getImm(); + unsigned CPIdx = (unsigned)MI->getOperand(1).getIndex(); + if (!InConstantPool) { + OutStreamer->emitDataRegion(MCDR_DataRegion); + InConstantPool = true; + } + OutStreamer->emitLabel(GetCPISymbol(LabelId)); + const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPIdx]; + if (MCPE.isMachineConstantPoolEntry()) + emitMachineConstantPoolValue(MCPE.Val.MachineCPVal); + else + emitGlobalConstant(MF->getDataLayout(), MCPE.Val.ConstVal); + return; + } + switch (Opc) { + case Mips::PATCHABLE_FUNCTION_ENTER: + LowerPATCHABLE_FUNCTION_ENTER(*MI); + return; + case Mips::PATCHABLE_FUNCTION_EXIT: + LowerPATCHABLE_FUNCTION_EXIT(*MI); + return; + case Mips::PATCHABLE_TAIL_CALL: + LowerPATCHABLE_TAIL_CALL(*MI); + return; + } + if (EmitJalrReloc && (MI->isReturn() || MI->isCall() || MI->isIndirectBranch())) { + emitDirectiveRelocJalr(*MI, OutContext, TM, *OutStreamer, *Subtarget); + } + MachineBasicBlock::const_instr_iterator I = MI->getIterator(); + MachineBasicBlock::const_instr_iterator E = MI->getParent()->instr_end(); + do { + if (emitPseudoExpansionLowering(*OutStreamer, &*I)) + continue; + if (I->isBundle()) + continue; + if (I->getOpcode() == Mips::PseudoReturn || I->getOpcode() == Mips::PseudoReturn64 || I->getOpcode() == Mips::PseudoIndirectBranch || I->getOpcode() == Mips::PseudoIndirectBranch64 || I->getOpcode() == Mips::TAILCALLREG || I->getOpcode() == Mips::TAILCALLREG64) { + emitPseudoIndirectBranch(*OutStreamer, &*I); + continue; + } + if (I->isPseudo() && !Subtarget->inMips16Mode() && !isLongBranchPseudo(I->getOpcode())) + llvm_unreachable("Pseudo opcode found in emitInstruction()"); + MCInst TmpInst0; + MCInstLowering.Lower(&*I, TmpInst0); + EmitToStreamer(*OutStreamer, TmpInst0); + } while ((++I != E) && I->isInsideBundle()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..67253a3102205d65b0ab1e07350da6cc883fc27d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,8 @@ +void MipsAsmPrinter::emitInlineAsmStart() const { + MipsTargetStreamer &TS = getTargetStreamer(); + TS.emitDirectiveSetPush(); + TS.emitDirectiveSetAt(); + TS.emitDirectiveSetMacro(); + TS.emitDirectiveSetReorder(); + OutStreamer->AddBlankLine(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39ec07ec3d83ebefc05c0f7f720dba157cb08bb7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Assembly Printer"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..217416888da6098c0f3f5d5d508fa79919629b53 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp @@ -0,0 +1,4 @@ +bool MipsAsmPrinter::lowerOperand(const MachineOperand &MO, MCOperand &MCOp) { + MCOp = MCInstLowering.LowerOperand(MO); + return MCOp.isValid(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ea4e69b88d62186a605cf374ec7eb5204d98196 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,17 @@ +bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) { + Subtarget = &MF.getSubtarget(); + MipsFI = MF.getInfo(); + if (Subtarget->inMips16Mode()) + for (std::map::const_iterator it = MipsFI->StubsNeeded.begin(); it != MipsFI->StubsNeeded.end(); ++it) { + const char *Symbol = it->first; + const Mips16HardFloatInfo::FuncSignature *Signature = it->second; + if (StubsNeeded.find(Symbol) == StubsNeeded.end()) + StubsNeeded[Symbol] = Signature; + } + MCP = MF.getConstantPool(); + if (Subtarget->isTargetNaCl()) + NaClAlignIndirectJumpTargets(MF); + AsmPrinter::runOnMachineFunction(MF); + emitXRayTable(); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61b2928a98a3b89735c62a0242d23f47844cecbb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61b2928a98a3b89735c62a0242d23f47844cecbb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61b2928a98a3b89735c62a0242d23f47844cecbb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..950f52d398b103964a07e02830d6937798200f64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR64RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40fd65a586b4b9459534d9dadd3e4fad80e94d91 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeFGR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::FGR64RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ff7c7c69fefcdedcff7ad87e852bc482b75b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPRMM16MovePRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 7) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPRMM16MovePRegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa54d4bfd9313a9f0a99641dacadf1e355216ffb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPR32RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..289bc27b55c7aa92cbcaaaafea3aa7bfec1dc351 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp @@ -0,0 +1,2 @@ +MipsDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx, bool IsBigEndian) : MCDisassembler(STI, Ctx), IsMicroMips(STI.getFeatureBits()[Mips::FeatureMicroMips]), IsBigEndian(IsBigEndian) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aac362f8290944c06ffebaf290b8b64edc748283 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsDisassembler() { + TargetRegistry::RegisterMCDisassembler(getTheMipsTarget(), createMipsDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheMipselTarget(), createMipselDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheMips64Target(), createMipsDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheMips64elTarget(), createMipselDisassembler); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c9f23dc4c3675d6d55e1ff1b1517fc2d45acc8ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp @@ -0,0 +1,3 @@ +static MCDisassembler *createMipsDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) { + return new MipsDisassembler(STI, Ctx, true); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dc5ce568523000d9e6a9d150a81ec69f1c4be78 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp @@ -0,0 +1,7 @@ +static DecodeStatus DecodeGPR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) { + if (RegNo > 31) + return MCDisassembler::Fail; + unsigned Reg = getReg(Decoder, Mips::GPR64RegClassID, RegNo); + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4c2cab7aa576d3436889701317d4baac06b9654 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeSyncI(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + Inst.addOperand(MCOperand::createReg(Base)); + Inst.addOperand(MCOperand::createImm(Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c23a00c41dc130ecb77e4891a914a978975a57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp @@ -0,0 +1,8 @@ +template static DecodeStatus DecodeCRC(MCInst &MI, InsnType Insn, uint64_t Address, const void *Decoder) { + InsnType Rs = fieldFromInstruction(Insn, 21, 5); + InsnType Rt = fieldFromInstruction(Insn, 16, 5); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rs))); + MI.addOperand(MCOperand::createReg(getReg(Decoder, Mips::GPR32RegClassID, Rt))); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0282ae9b186c226781e9e8e2f3cc39a828d3ef17 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus DecodeSImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + int32_t Imm = SignExtend32(Value) * ScaleBy; + Inst.addOperand(MCOperand::createImm(Imm + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0282ae9b186c226781e9e8e2f3cc39a828d3ef17 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus DecodeSImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + int32_t Imm = SignExtend32(Value) * ScaleBy; + Inst.addOperand(MCOperand::createImm(Imm + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0282ae9b186c226781e9e8e2f3cc39a828d3ef17 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus DecodeSImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + int32_t Imm = SignExtend32(Value) * ScaleBy; + Inst.addOperand(MCOperand::createImm(Imm + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a030e0d8da7f3ccce562c0f64f602a27fac68994 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus DecodeUImmWithOffsetAndScale(MCInst &Inst, unsigned Value, uint64_t Address, const void *Decoder) { + Value &= ((1 << Bits) - 1); + Value *= Scale; + Inst.addOperand(MCOperand::createImm(Value + Offset)); + return MCDisassembler::Success; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97a894caca0ae1138b9d72b7014c73e34494b18c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp @@ -0,0 +1,114 @@ +DecodeStatus MipsDisassembler::getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, raw_ostream &CStream) const { + uint32_t Insn; + DecodeStatus Result; + Size = 0; + if (IsMicroMips) { + Result = readInstruction16(Bytes, Address, Size, Insn, IsBigEndian); + if (Result == MCDisassembler::Fail) + return MCDisassembler::Fail; + if (hasMips32r6()) { + LLVM_DEBUG(dbgs() << "Trying MicroMipsR616 table (16-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMipsR616, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + } + LLVM_DEBUG(dbgs() << "Trying MicroMips16 table (16-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMips16, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + Result = readInstruction32(Bytes, Address, Size, Insn, IsBigEndian, true); + if (Result == MCDisassembler::Fail) + return MCDisassembler::Fail; + if (hasMips32r6()) { + LLVM_DEBUG(dbgs() << "Trying MicroMips32r632 table (32-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMipsR632, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 4; + return Result; + } + } + LLVM_DEBUG(dbgs() << "Trying MicroMips32 table (32-bit instructions):\n"); + Result = decodeInstruction(DecoderTableMicroMips32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 4; + return Result; + } + if (isFP64()) { + LLVM_DEBUG(dbgs() << "Trying MicroMipsFP64 table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMicroMipsFP6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 4; + return Result; + } + } + Size = 2; + return MCDisassembler::Fail; + } + Result = readInstruction32(Bytes, Address, Size, Insn, IsBigEndian, false); + if (Result == MCDisassembler::Fail) + return MCDisassembler::Fail; + Size = 4; + if (hasCOP3()) { + LLVM_DEBUG(dbgs() << "Trying COP3_ table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableCOP3_32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips32r6() && isGP64()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 (GPR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32r6_64r6_GP6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips32r6() && isPTR64()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 (PTR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32r6_64r6_PTR6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips32r6()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32r6_64r632, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasMips2() && isPTR64()) { + LLVM_DEBUG(dbgs() << "Trying Mips32r6_64r6 (PTR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32_64_PTR6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasCnMips()) { + LLVM_DEBUG(dbgs() << "Trying CnMips table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableCnMips32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (hasCnMipsP()) { + LLVM_DEBUG(dbgs() << "Trying CnMipsP table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableCnMipsP32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (isGP64()) { + LLVM_DEBUG(dbgs() << "Trying Mips64 (GPR64) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + if (isFP64()) { + LLVM_DEBUG(dbgs() << "Trying MipsFP64 (64 bit FPU) table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMipsFP6432, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + } + LLVM_DEBUG(dbgs() << "Trying Mips table (32-bit opcodes):\n"); + Result = decodeInstruction(DecoderTableMips32, Instr, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) + return Result; + return MCDisassembler::Fail; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7ae0321d2626e19fa5446eb52df8fbb49738d2df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp @@ -0,0 +1,2 @@ +MipsAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU, bool N32) : MCAsmBackend(TT.isLittleEndian() ? support::little : support::big), TheTriple(TT), IsN32(N32) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e955e760b17b32c034de715643494327c2cb575e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp @@ -0,0 +1,144 @@ +static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value, MCContext &Ctx) { + unsigned Kind = Fixup.getKind(); + switch (Kind) { + default: + return 0; + case FK_Data_2: + case Mips::fixup_Mips_LO16: + case Mips::fixup_Mips_GPREL16: + case Mips::fixup_Mips_GPOFF_HI: + case Mips::fixup_Mips_GPOFF_LO: + case Mips::fixup_Mips_GOT_PAGE: + case Mips::fixup_Mips_GOT_OFST: + case Mips::fixup_Mips_GOT_DISP: + case Mips::fixup_Mips_GOT_LO16: + case Mips::fixup_Mips_CALL_LO16: + case Mips::fixup_MICROMIPS_GPOFF_HI: + case Mips::fixup_MICROMIPS_GPOFF_LO: + case Mips::fixup_MICROMIPS_LO16: + case Mips::fixup_MICROMIPS_GOT_PAGE: + case Mips::fixup_MICROMIPS_GOT_OFST: + case Mips::fixup_MICROMIPS_GOT_DISP: + case Mips::fixup_MIPS_PCLO16: + Value &= 0xffff; + break; + case FK_DTPRel_4: + case FK_DTPRel_8: + case FK_TPRel_4: + case FK_TPRel_8: + case FK_GPRel_4: + case FK_Data_4: + case FK_Data_8: + case Mips::fixup_Mips_SUB: + case Mips::fixup_MICROMIPS_SUB: + break; + case Mips::fixup_Mips_PC16: + Value = (int64_t)Value / 4; + if (!isInt<16>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC16 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC19_S2: + case Mips::fixup_MICROMIPS_PC19_S2: + Value = (int64_t)Value / 4; + if (!isInt<19>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC19 fixup"); + return 0; + } + break; + case Mips::fixup_Mips_26: + Value >>= 2; + break; + case Mips::fixup_Mips_HI16: + case Mips::fixup_Mips_GOT: + case Mips::fixup_MICROMIPS_GOT16: + case Mips::fixup_Mips_GOT_HI16: + case Mips::fixup_Mips_CALL_HI16: + case Mips::fixup_MICROMIPS_HI16: + case Mips::fixup_MIPS_PCHI16: + Value = ((Value + 0x8000) >> 16) & 0xffff; + break; + case Mips::fixup_Mips_HIGHER: + case Mips::fixup_MICROMIPS_HIGHER: + Value = ((Value + 0x80008000LL) >> 32) & 0xffff; + break; + case Mips::fixup_Mips_HIGHEST: + case Mips::fixup_MICROMIPS_HIGHEST: + Value = ((Value + 0x800080008000LL) >> 48) & 0xffff; + break; + case Mips::fixup_MICROMIPS_26_S1: + Value >>= 1; + break; + case Mips::fixup_MICROMIPS_PC7_S1: + Value -= 4; + Value = (int64_t) Value / 2; + if (!isInt<7>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC7 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC10_S1: + Value -= 2; + Value = (int64_t) Value / 2; + if (!isInt<10>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC10 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC16_S1: + Value -= 4; + Value = (int64_t)Value / 2; + if (!isInt<16>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC16 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC18_S3: + Value = (int64_t)Value / 8; + if (!isInt<18>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC18 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC18_S3: + if ((Value & 7)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC18 fixup"); + } + Value = (int64_t)Value / 8; + if (!isInt<18>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC18 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC21_S2: + Value = (int64_t) Value / 4; + if (!isInt<21>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC21 fixup"); + return 0; + } + break; + case Mips::fixup_MIPS_PC26_S2: + Value = (int64_t) Value / 4; + if (!isInt<26>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC26 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC26_S1: + Value = (int64_t)Value / 2; + if (!isInt<26>(Value)) { + Ctx.reportFatalError(Fixup.getLoc(), "out of range PC26 fixup"); + return 0; + } + break; + case Mips::fixup_MICROMIPS_PC21_S1: + Value = (int64_t)Value / 2; + if (!isInt<21>(Value)) { + Ctx.reportError(Fixup.getLoc(), "out of range PC21 fixup"); + return 0; + } + break; + } + return Value; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/applyFixup.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/applyFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9211dcecd9d0b897b105d23d99f75b18563bee0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/applyFixup.cpp @@ -0,0 +1,37 @@ +void MipsAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target, MutableArrayRef Data, uint64_t Value, bool IsResolved, const MCSubtargetInfo *STI) const { + MCFixupKind Kind = Fixup.getKind(); + MCContext &Ctx = Asm.getContext(); + Value = adjustFixupValue(Fixup, Value, Ctx); + if (!Value) + return; + unsigned Offset = Fixup.getOffset(); + unsigned NumBytes = (getFixupKindInfo(Kind).TargetSize + 7) / 8; + unsigned FullSize; + switch ((unsigned)Kind) { + case FK_Data_2: + case Mips::fixup_Mips_16: + case Mips::fixup_MICROMIPS_PC10_S1: + FullSize = 2; + break; + case FK_Data_8: + case Mips::fixup_Mips_64: + FullSize = 8; + break; + case FK_Data_4: + default: + FullSize = 4; + break; + } + uint64_t CurVal = 0; + bool microMipsLEByteOrder = needsMMLEByteOrder((unsigned) Kind); + for (unsigned i = 0; i != NumBytes; ++i) { + unsigned Idx = Endian == support::little ? (microMipsLEByteOrder ? calculateMMLEIndex(i) : i) : (FullSize - 1 - i); + CurVal |= (uint64_t)((uint8_t)Data[Offset + Idx]) << (i*8); + } + uint64_t Mask = ((uint64_t)(-1) >> (64 - getFixupKindInfo(Kind).TargetSize)); + CurVal |= Value & Mask; + for (unsigned i = 0; i != NumBytes; ++i) { + unsigned Idx = Endian == support::little ? (microMipsLEByteOrder ? calculateMMLEIndex(i) : i): (FullSize - 1 - i); + Data[Offset + Idx] = (uint8_t)((CurVal >> (i*8)) & 0xff); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea5dcd4a2c2d8d9b3c9e7a32fdfd9f44242047f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp @@ -0,0 +1,4 @@ +MCAsmBackend *llvm::createMipsAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) { + MipsABIInfo ABI = MipsABIInfo::computeTargetABI(STI.getTargetTriple(), STI.getCPU(), Options); + return new MipsAsmBackend(T, MRI, STI.getTargetTriple(), STI.getCPU(), ABI.IsN32()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..00f1fa1f26067758af5e13abbd8903b7c44a4d89 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp @@ -0,0 +1,4 @@ +std::unique_ptr MipsAsmBackend::createObjectTargetWriter() const { + return createMipsELFObjectWriter(TheTriple, IsN32); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a92b79f89ec89f4e0b16dfd5b04b822a41bfa98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp @@ -0,0 +1,36 @@ +Optional MipsAsmBackend::getFixupKind(StringRef Name) const { + return StringSwitch>(Name) + .Case("R_MIPS_NONE", FK_NONE) + .Case("R_MIPS_32", FK_Data_4) + .Case("R_MIPS_CALL_HI16", (MCFixupKind)Mips::fixup_Mips_CALL_HI16) + .Case("R_MIPS_CALL_LO16", (MCFixupKind)Mips::fixup_Mips_CALL_LO16) + .Case("R_MIPS_CALL16", (MCFixupKind)Mips::fixup_Mips_CALL16) + .Case("R_MIPS_GOT16", (MCFixupKind)Mips::fixup_Mips_GOT) + .Case("R_MIPS_GOT_PAGE", (MCFixupKind)Mips::fixup_Mips_GOT_PAGE) + .Case("R_MIPS_GOT_OFST", (MCFixupKind)Mips::fixup_Mips_GOT_OFST) + .Case("R_MIPS_GOT_DISP", (MCFixupKind)Mips::fixup_Mips_GOT_DISP) + .Case("R_MIPS_GOT_HI16", (MCFixupKind)Mips::fixup_Mips_GOT_HI16) + .Case("R_MIPS_GOT_LO16", (MCFixupKind)Mips::fixup_Mips_GOT_LO16) + .Case("R_MIPS_TLS_GOTTPREL", (MCFixupKind)Mips::fixup_Mips_GOTTPREL) + .Case("R_MIPS_TLS_DTPREL_HI16", (MCFixupKind)Mips::fixup_Mips_DTPREL_HI) + .Case("R_MIPS_TLS_DTPREL_LO16", (MCFixupKind)Mips::fixup_Mips_DTPREL_LO) + .Case("R_MIPS_TLS_GD", (MCFixupKind)Mips::fixup_Mips_TLSGD) + .Case("R_MIPS_TLS_LDM", (MCFixupKind)Mips::fixup_Mips_TLSLDM) + .Case("R_MIPS_TLS_TPREL_HI16", (MCFixupKind)Mips::fixup_Mips_TPREL_HI) + .Case("R_MIPS_TLS_TPREL_LO16", (MCFixupKind)Mips::fixup_Mips_TPREL_LO) + .Case("R_MICROMIPS_CALL16", (MCFixupKind)Mips::fixup_MICROMIPS_CALL16) + .Case("R_MICROMIPS_GOT_DISP", (MCFixupKind)Mips::fixup_MICROMIPS_GOT_DISP) + .Case("R_MICROMIPS_GOT_PAGE", (MCFixupKind)Mips::fixup_MICROMIPS_GOT_PAGE) + .Case("R_MICROMIPS_GOT_OFST", (MCFixupKind)Mips::fixup_MICROMIPS_GOT_OFST) + .Case("R_MICROMIPS_GOT16", (MCFixupKind)Mips::fixup_MICROMIPS_GOT16) + .Case("R_MICROMIPS_TLS_GOTTPREL", (MCFixupKind)Mips::fixup_MICROMIPS_GOTTPREL) + .Case("R_MICROMIPS_TLS_DTPREL_HI16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_DTPREL_HI16) + .Case("R_MICROMIPS_TLS_DTPREL_LO16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_DTPREL_LO16) + .Case("R_MICROMIPS_TLS_GD", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_GD) + .Case("R_MICROMIPS_TLS_LDM", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_LDM) + .Case("R_MICROMIPS_TLS_TPREL_HI16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_TPREL_HI16) + .Case("R_MICROMIPS_TLS_TPREL_LO16", (MCFixupKind)Mips::fixup_MICROMIPS_TLS_TPREL_LO16) + .Case("R_MIPS_JALR", (MCFixupKind)Mips::fixup_Mips_JALR) + .Case("R_MICROMIPS_JALR", (MCFixupKind)Mips::fixup_MICROMIPS_JALR) + .Default(MCAsmBackend::getFixupKind(Name)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63f50b02cd845c04f7ac393ce134edd753ac4c6e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp @@ -0,0 +1,154 @@ +const MCFixupKindInfo &MipsAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { + const static MCFixupKindInfo LittleEndianInfos[] = { + { "fixup_Mips_16", 0, 16, 0 }, + { "fixup_Mips_32", 0, 32, 0 }, + { "fixup_Mips_REL32", 0, 32, 0 }, + { "fixup_Mips_26", 0, 26, 0 }, + { "fixup_Mips_HI16", 0, 16, 0 }, + { "fixup_Mips_LO16", 0, 16, 0 }, + { "fixup_Mips_GPREL16", 0, 16, 0 }, + { "fixup_Mips_LITERAL", 0, 16, 0 }, + { "fixup_Mips_GOT", 0, 16, 0 }, + { "fixup_Mips_PC16", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_CALL16", 0, 16, 0 }, + { "fixup_Mips_GPREL32", 0, 32, 0 }, + { "fixup_Mips_SHIFT5", 6, 5, 0 }, + { "fixup_Mips_SHIFT6", 6, 5, 0 }, + { "fixup_Mips_64", 0, 64, 0 }, + { "fixup_Mips_TLSGD", 0, 16, 0 }, + { "fixup_Mips_GOTTPREL", 0, 16, 0 }, + { "fixup_Mips_TPREL_HI", 0, 16, 0 }, + { "fixup_Mips_TPREL_LO", 0, 16, 0 }, + { "fixup_Mips_TLSLDM", 0, 16, 0 }, + { "fixup_Mips_DTPREL_HI", 0, 16, 0 }, + { "fixup_Mips_DTPREL_LO", 0, 16, 0 }, + { "fixup_Mips_Branch_PCRel", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_GPOFF_HI", 0, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_HI",0, 16, 0 }, + { "fixup_Mips_GPOFF_LO", 0, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_LO",0, 16, 0 }, + { "fixup_Mips_GOT_PAGE", 0, 16, 0 }, + { "fixup_Mips_GOT_OFST", 0, 16, 0 }, + { "fixup_Mips_GOT_DISP", 0, 16, 0 }, + { "fixup_Mips_HIGHER", 0, 16, 0 }, + { "fixup_MICROMIPS_HIGHER", 0, 16, 0 }, + { "fixup_Mips_HIGHEST", 0, 16, 0 }, + { "fixup_MICROMIPS_HIGHEST", 0, 16, 0 }, + { "fixup_Mips_GOT_HI16", 0, 16, 0 }, + { "fixup_Mips_GOT_LO16", 0, 16, 0 }, + { "fixup_Mips_CALL_HI16", 0, 16, 0 }, + { "fixup_Mips_CALL_LO16", 0, 16, 0 }, + { "fixup_Mips_PC18_S3", 0, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC19_S2", 0, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC21_S2", 0, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC26_S2", 0, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCHI16", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCLO16", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_26_S1", 0, 26, 0 }, + { "fixup_MICROMIPS_HI16", 0, 16, 0 }, + { "fixup_MICROMIPS_LO16", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT16", 0, 16, 0 }, + { "fixup_MICROMIPS_PC7_S1", 0, 7, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC10_S1", 0, 10, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC16_S1", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC26_S1", 0, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC19_S2", 0, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC18_S3", 0, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC21_S1", 0, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_CALL16", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT_DISP", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT_PAGE", 0, 16, 0 }, + { "fixup_MICROMIPS_GOT_OFST", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_GD", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_LDM", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_HI16", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_LO16", 0, 16, 0 }, + { "fixup_MICROMIPS_GOTTPREL", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_HI16", 0, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_LO16", 0, 16, 0 }, + { "fixup_Mips_SUB", 0, 64, 0 }, + { "fixup_MICROMIPS_SUB", 0, 64, 0 }, + { "fixup_Mips_JALR", 0, 32, 0 }, + { "fixup_MICROMIPS_JALR", 0, 32, 0 } + }; + static_assert(array_lengthof(LittleEndianInfos) == Mips::NumTargetFixupKinds, "Not all MIPS little endian fixup kinds added!"); + const static MCFixupKindInfo BigEndianInfos[] = { + { "fixup_Mips_16", 16, 16, 0 }, + { "fixup_Mips_32", 0, 32, 0 }, + { "fixup_Mips_REL32", 0, 32, 0 }, + { "fixup_Mips_26", 6, 26, 0 }, + { "fixup_Mips_HI16", 16, 16, 0 }, + { "fixup_Mips_LO16", 16, 16, 0 }, + { "fixup_Mips_GPREL16", 16, 16, 0 }, + { "fixup_Mips_LITERAL", 16, 16, 0 }, + { "fixup_Mips_GOT", 16, 16, 0 }, + { "fixup_Mips_PC16", 16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_CALL16", 16, 16, 0 }, + { "fixup_Mips_GPREL32", 0, 32, 0 }, + { "fixup_Mips_SHIFT5", 21, 5, 0 }, + { "fixup_Mips_SHIFT6", 21, 5, 0 }, + { "fixup_Mips_64", 0, 64, 0 }, + { "fixup_Mips_TLSGD", 16, 16, 0 }, + { "fixup_Mips_GOTTPREL", 16, 16, 0 }, + { "fixup_Mips_TPREL_HI", 16, 16, 0 }, + { "fixup_Mips_TPREL_LO", 16, 16, 0 }, + { "fixup_Mips_TLSLDM", 16, 16, 0 }, + { "fixup_Mips_DTPREL_HI", 16, 16, 0 }, + { "fixup_Mips_DTPREL_LO", 16, 16, 0 }, + { "fixup_Mips_Branch_PCRel",16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_Mips_GPOFF_HI", 16, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_HI", 16, 16, 0 }, + { "fixup_Mips_GPOFF_LO", 16, 16, 0 }, + { "fixup_MICROMIPS_GPOFF_LO", 16, 16, 0 }, + { "fixup_Mips_GOT_PAGE", 16, 16, 0 }, + { "fixup_Mips_GOT_OFST", 16, 16, 0 }, + { "fixup_Mips_GOT_DISP", 16, 16, 0 }, + { "fixup_Mips_HIGHER", 16, 16, 0 }, + { "fixup_MICROMIPS_HIGHER", 16, 16, 0 }, + { "fixup_Mips_HIGHEST", 16, 16, 0 }, + { "fixup_MICROMIPS_HIGHEST",16, 16, 0 }, + { "fixup_Mips_GOT_HI16", 16, 16, 0 }, + { "fixup_Mips_GOT_LO16", 16, 16, 0 }, + { "fixup_Mips_CALL_HI16", 16, 16, 0 }, + { "fixup_Mips_CALL_LO16", 16, 16, 0 }, + { "fixup_Mips_PC18_S3", 14, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC19_S2", 13, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC21_S2", 11, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PC26_S2", 6, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCHI16", 16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MIPS_PCLO16", 16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_26_S1", 6, 26, 0 }, + { "fixup_MICROMIPS_HI16", 16, 16, 0 }, + { "fixup_MICROMIPS_LO16", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT16", 16, 16, 0 }, + { "fixup_MICROMIPS_PC7_S1", 9, 7, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC10_S1", 6, 10, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC16_S1",16, 16, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC26_S1", 6, 26, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC19_S2",13, 19, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC18_S3",14, 18, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_PC21_S1",11, 21, MCFixupKindInfo::FKF_IsPCRel }, + { "fixup_MICROMIPS_CALL16", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT_DISP", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT_PAGE", 16, 16, 0 }, + { "fixup_MICROMIPS_GOT_OFST", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_GD", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_LDM", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_HI16", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_DTPREL_LO16", 16, 16, 0 }, + { "fixup_MICROMIPS_GOTTPREL", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_HI16", 16, 16, 0 }, + { "fixup_MICROMIPS_TLS_TPREL_LO16", 16, 16, 0 }, + { "fixup_Mips_SUB", 0, 64, 0 }, + { "fixup_MICROMIPS_SUB", 0, 64, 0 }, + { "fixup_Mips_JALR", 0, 32, 0 }, + { "fixup_MICROMIPS_JALR", 0, 32, 0 } + }; + static_assert(array_lengthof(BigEndianInfos) == Mips::NumTargetFixupKinds, "Not all MIPS big endian fixup kinds added!"); + if (Kind < FirstTargetFixupKind) + return MCAsmBackend::getFixupKindInfo(Kind); + assert(unsigned(Kind - FirstTargetFixupKind) < getNumFixupKinds() && "Invalid kind!"); + if (Endian == support::little) + return LittleEndianInfos[Kind - FirstTargetFixupKind]; + return BigEndianInfos[Kind - FirstTargetFixupKind]; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..707ad9a7adfa30dd4cdbb7e4406787776f6689a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp @@ -0,0 +1,38 @@ +bool MipsAsmBackend::shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target) { + const unsigned FixupKind = Fixup.getKind(); + switch (FixupKind) { + default: + return false; + case Mips::fixup_Mips_CALL_HI16: + case Mips::fixup_Mips_CALL_LO16: + case Mips::fixup_Mips_CALL16: + case Mips::fixup_Mips_GOT: + case Mips::fixup_Mips_GOT_PAGE: + case Mips::fixup_Mips_GOT_OFST: + case Mips::fixup_Mips_GOT_DISP: + case Mips::fixup_Mips_GOT_HI16: + case Mips::fixup_Mips_GOT_LO16: + case Mips::fixup_Mips_GOTTPREL: + case Mips::fixup_Mips_DTPREL_HI: + case Mips::fixup_Mips_DTPREL_LO: + case Mips::fixup_Mips_TLSGD: + case Mips::fixup_Mips_TLSLDM: + case Mips::fixup_Mips_TPREL_HI: + case Mips::fixup_Mips_TPREL_LO: + case Mips::fixup_Mips_JALR: + case Mips::fixup_MICROMIPS_CALL16: + case Mips::fixup_MICROMIPS_GOT_DISP: + case Mips::fixup_MICROMIPS_GOT_PAGE: + case Mips::fixup_MICROMIPS_GOT_OFST: + case Mips::fixup_MICROMIPS_GOT16: + case Mips::fixup_MICROMIPS_GOTTPREL: + case Mips::fixup_MICROMIPS_TLS_DTPREL_HI16: + case Mips::fixup_MICROMIPS_TLS_DTPREL_LO16: + case Mips::fixup_MICROMIPS_TLS_GD: + case Mips::fixup_MICROMIPS_TLS_LDM: + case Mips::fixup_MICROMIPS_TLS_TPREL_HI16: + case Mips::fixup_MICROMIPS_TLS_TPREL_LO16: + case Mips::fixup_MICROMIPS_JALR: + return true; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/writeNopData.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/writeNopData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..624acfd8a76919adf6444d864bc4f6716cb589bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/writeNopData.cpp @@ -0,0 +1,4 @@ +bool MipsAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const { + OS.write_zeros(Count); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3dbf2eaf5993d301dc8ae0720319683c2860d3d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,28 @@ +MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple, const MCTargetOptions &Options) { + IsLittleEndian = TheTriple.isLittleEndian(); + MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TheTriple, "", Options); + if (TheTriple.isMIPS64() && !ABI.IsN32()) + CodePointerSize = CalleeSaveStackSlotSize = 8; + if (ABI.IsO32()) + PrivateGlobalPrefix = "$"; + else if (ABI.IsN32() || ABI.IsN64()) + PrivateGlobalPrefix = ".L"; + PrivateLabelPrefix = PrivateGlobalPrefix; + AlignmentIsInBytes = false; + Data16bitsDirective = "\t.2byte\t"; + Data32bitsDirective = "\t.4byte\t"; + Data64bitsDirective = "\t.8byte\t"; + CommentString = "#"; + ZeroDirective = "\t.space\t"; + GPRel32Directive = "\t.gpword\t"; + GPRel64Directive = "\t.gpdword\t"; + DTPRel32Directive = "\t.dtprelword\t"; + DTPRel64Directive = "\t.dtpreldword\t"; + TPRel32Directive = "\t.tprelword\t"; + TPRel64Directive = "\t.tpreldword\t"; + UseAssignmentForEHBegin = true; + SupportsDebugInformation = true; + ExceptionsType = ExceptionHandling::DwarfCFI; + DwarfRegNumForCFI = true; + HasMipsExpressions = true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/anchor.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f2b70e5a457a170f552b5d40557e5769efd425f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/anchor.cpp @@ -0,0 +1,2 @@ +void MipsMCAsmInfo::anchor() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/ABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/ABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/ABI.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/FenceField.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/FenceField.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/FenceField.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/II.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/II.cpp new file mode 100644 index 0000000000000000000000000000000000000000..daadf4bba15edd51d62b76f8a5f2922cd3dfb63b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/II.cpp @@ -0,0 +1,42 @@ +namespace MipsII { + enum TOF { + MO_NO_FLAG, + MO_GOT, + MO_GOT_CALL, + MO_GPREL, + MO_ABS_HI, + MO_ABS_LO, + MO_TLSGD, + MO_TLSLDM, + MO_DTPREL_HI, + MO_DTPREL_LO, + MO_GOTTPREL, + MO_TPREL_HI, + MO_TPREL_LO, + MO_GPOFF_HI, + MO_GPOFF_LO, + MO_GOT_DISP, + MO_GOT_PAGE, + MO_GOT_OFST, + MO_HIGHER, + MO_HIGHEST, + MO_GOT_HI16, + MO_GOT_LO16, + MO_CALL_HI16, + MO_CALL_LO16, + MO_JALR + }; + enum { + Pseudo = 0, + FrmR = 1, + FrmI = 2, + FrmJ = 3, + FrmFR = 4, + FrmFI = 5, + FrmOther = 6, + FormMask = 15, + IsCTI = 1 << 4, + HasForbiddenSlot = 1 << 5, + HasFCCRegOperand = 1 << 6 + }; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/OperandType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/OperandType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19db91538f2257839ecb2a14d1c12740760ec25d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/OperandType.cpp @@ -0,0 +1,5 @@ +enum OperandType : unsigned { + OPERAND_FIRST_MIPS_MEM_IMM = MCOI::OPERAND_FIRST_TARGET, + OPERAND_MEM_SIMM9 = OPERAND_FIRST_MIPS_MEM_IMM, + OPERAND_LAST_MIPS_MEM_IMM = OPERAND_MEM_SIMM9 +}; diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/VLMUL.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/VLMUL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/VLMUL.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/VMTs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/VMTs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/VMTs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d6853920e499f673dd13662b1ce142b45fd480d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp @@ -0,0 +1,14 @@ +MipsABIInfo MipsABIInfo::computeTargetABI(const Triple &TT, StringRef CPU, const MCTargetOptions &Options) { + if (Options.getABIName().startswith("o32")) + return MipsABIInfo::O32(); + if (Options.getABIName().startswith("n32")) + return MipsABIInfo::N32(); + if (Options.getABIName().startswith("n64")) + return MipsABIInfo::N64(); + if (TT.getEnvironment() == llvm::Triple::GNUABIN32) + return MipsABIInfo::N32(); + assert(Options.getABIName().empty() && "Unknown ABI option for MIPS"); + if (TT.isMIPS64()) + return MipsABIInfo::N64(); + return MipsABIInfo::O32(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/validate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/validate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/BaseInfo/validate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88f55f07a55f5d6e27aacf8f610dbab4444a2d20 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +MipsELFObjectWriter::MipsELFObjectWriter(uint8_t OSABI, bool HasRelocationAddend, bool Is64) : MCELFObjectTargetWriter(Is64, OSABI, ELF::EM_MIPS, HasRelocationAddend) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86e17ba3612af05cf31412d2f7693b9925ecc958 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp @@ -0,0 +1,6 @@ +std::unique_ptrllvm::createMipsELFObjectWriter(const Triple &TT, bool IsN32) { + uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS()); + bool IsN64 = TT.isArch64Bit() && !IsN32; + bool HasRelocationAddend = TT.isArch64Bit(); + return std::make_unique(OSABI, HasRelocationAddend, IsN64); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d8b4ed83f6a2bbf608dac997f973ba4486b27c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp @@ -0,0 +1,160 @@ +unsigned MipsELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const { + unsigned Kind = Fixup.getTargetKind(); + switch (Kind) { + case FK_NONE: + return ELF::R_MIPS_NONE; + case FK_Data_1: + Ctx.reportError(Fixup.getLoc(), "MIPS does not support one byte relocations"); + return ELF::R_MIPS_NONE; + case Mips::fixup_Mips_16: + case FK_Data_2: + return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; + case Mips::fixup_Mips_32: + case FK_Data_4: + return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32; + case Mips::fixup_Mips_64: + case FK_Data_8: + return IsPCRel ? setRTypes(ELF::R_MIPS_PC32, ELF::R_MIPS_64, ELF::R_MIPS_NONE) : (unsigned)ELF::R_MIPS_64; + } + if (IsPCRel) { + switch (Kind) { + case Mips::fixup_Mips_Branch_PCRel: + case Mips::fixup_Mips_PC16: + return ELF::R_MIPS_PC16; + case Mips::fixup_MICROMIPS_PC7_S1: + return ELF::R_MICROMIPS_PC7_S1; + case Mips::fixup_MICROMIPS_PC10_S1: + return ELF::R_MICROMIPS_PC10_S1; + case Mips::fixup_MICROMIPS_PC16_S1: + return ELF::R_MICROMIPS_PC16_S1; + case Mips::fixup_MICROMIPS_PC26_S1: + return ELF::R_MICROMIPS_PC26_S1; + case Mips::fixup_MICROMIPS_PC19_S2: + return ELF::R_MICROMIPS_PC19_S2; + case Mips::fixup_MICROMIPS_PC18_S3: + return ELF::R_MICROMIPS_PC18_S3; + case Mips::fixup_MICROMIPS_PC21_S1: + return ELF::R_MICROMIPS_PC21_S1; + case Mips::fixup_MIPS_PC19_S2: + return ELF::R_MIPS_PC19_S2; + case Mips::fixup_MIPS_PC18_S3: + return ELF::R_MIPS_PC18_S3; + case Mips::fixup_MIPS_PC21_S2: + return ELF::R_MIPS_PC21_S2; + case Mips::fixup_MIPS_PC26_S2: + return ELF::R_MIPS_PC26_S2; + case Mips::fixup_MIPS_PCHI16: + return ELF::R_MIPS_PCHI16; + case Mips::fixup_MIPS_PCLO16: + return ELF::R_MIPS_PCLO16; + } + llvm_unreachable("invalid PC-relative fixup kind!"); + } + switch (Kind) { + case FK_DTPRel_4: + return ELF::R_MIPS_TLS_DTPREL32; + case FK_DTPRel_8: + return ELF::R_MIPS_TLS_DTPREL64; + case FK_TPRel_4: + return ELF::R_MIPS_TLS_TPREL32; + case FK_TPRel_8: + return ELF::R_MIPS_TLS_TPREL64; + case FK_GPRel_4: + return setRTypes(ELF::R_MIPS_GPREL32, is64Bit() ? ELF::R_MIPS_64 : ELF::R_MIPS_NONE, ELF::R_MIPS_NONE); + case Mips::fixup_Mips_GPREL16: + return ELF::R_MIPS_GPREL16; + case Mips::fixup_Mips_26: + return ELF::R_MIPS_26; + case Mips::fixup_Mips_CALL16: + return ELF::R_MIPS_CALL16; + case Mips::fixup_Mips_GOT: + return ELF::R_MIPS_GOT16; + case Mips::fixup_Mips_HI16: + return ELF::R_MIPS_HI16; + case Mips::fixup_Mips_LO16: + return ELF::R_MIPS_LO16; + case Mips::fixup_Mips_TLSGD: + return ELF::R_MIPS_TLS_GD; + case Mips::fixup_Mips_GOTTPREL: + return ELF::R_MIPS_TLS_GOTTPREL; + case Mips::fixup_Mips_TPREL_HI: + return ELF::R_MIPS_TLS_TPREL_HI16; + case Mips::fixup_Mips_TPREL_LO: + return ELF::R_MIPS_TLS_TPREL_LO16; + case Mips::fixup_Mips_TLSLDM: + return ELF::R_MIPS_TLS_LDM; + case Mips::fixup_Mips_DTPREL_HI: + return ELF::R_MIPS_TLS_DTPREL_HI16; + case Mips::fixup_Mips_DTPREL_LO: + return ELF::R_MIPS_TLS_DTPREL_LO16; + case Mips::fixup_Mips_GOT_PAGE: + return ELF::R_MIPS_GOT_PAGE; + case Mips::fixup_Mips_GOT_OFST: + return ELF::R_MIPS_GOT_OFST; + case Mips::fixup_Mips_GOT_DISP: + return ELF::R_MIPS_GOT_DISP; + case Mips::fixup_Mips_GPOFF_HI: + return setRTypes(ELF::R_MIPS_GPREL16, ELF::R_MIPS_SUB, ELF::R_MIPS_HI16); + case Mips::fixup_MICROMIPS_GPOFF_HI: + return setRTypes(ELF::R_MICROMIPS_GPREL16, ELF::R_MICROMIPS_SUB, ELF::R_MICROMIPS_HI16); + case Mips::fixup_Mips_GPOFF_LO: + return setRTypes(ELF::R_MIPS_GPREL16, ELF::R_MIPS_SUB, ELF::R_MIPS_LO16); + case Mips::fixup_MICROMIPS_GPOFF_LO: + return setRTypes(ELF::R_MICROMIPS_GPREL16, ELF::R_MICROMIPS_SUB, ELF::R_MICROMIPS_LO16); + case Mips::fixup_Mips_HIGHER: + return ELF::R_MIPS_HIGHER; + case Mips::fixup_Mips_HIGHEST: + return ELF::R_MIPS_HIGHEST; + case Mips::fixup_Mips_SUB: + return ELF::R_MIPS_SUB; + case Mips::fixup_Mips_GOT_HI16: + return ELF::R_MIPS_GOT_HI16; + case Mips::fixup_Mips_GOT_LO16: + return ELF::R_MIPS_GOT_LO16; + case Mips::fixup_Mips_CALL_HI16: + return ELF::R_MIPS_CALL_HI16; + case Mips::fixup_Mips_CALL_LO16: + return ELF::R_MIPS_CALL_LO16; + case Mips::fixup_MICROMIPS_26_S1: + return ELF::R_MICROMIPS_26_S1; + case Mips::fixup_MICROMIPS_HI16: + return ELF::R_MICROMIPS_HI16; + case Mips::fixup_MICROMIPS_LO16: + return ELF::R_MICROMIPS_LO16; + case Mips::fixup_MICROMIPS_GOT16: + return ELF::R_MICROMIPS_GOT16; + case Mips::fixup_MICROMIPS_CALL16: + return ELF::R_MICROMIPS_CALL16; + case Mips::fixup_MICROMIPS_GOT_DISP: + return ELF::R_MICROMIPS_GOT_DISP; + case Mips::fixup_MICROMIPS_GOT_PAGE: + return ELF::R_MICROMIPS_GOT_PAGE; + case Mips::fixup_MICROMIPS_GOT_OFST: + return ELF::R_MICROMIPS_GOT_OFST; + case Mips::fixup_MICROMIPS_TLS_GD: + return ELF::R_MICROMIPS_TLS_GD; + case Mips::fixup_MICROMIPS_TLS_LDM: + return ELF::R_MICROMIPS_TLS_LDM; + case Mips::fixup_MICROMIPS_TLS_DTPREL_HI16: + return ELF::R_MICROMIPS_TLS_DTPREL_HI16; + case Mips::fixup_MICROMIPS_TLS_DTPREL_LO16: + return ELF::R_MICROMIPS_TLS_DTPREL_LO16; + case Mips::fixup_MICROMIPS_GOTTPREL: + return ELF::R_MICROMIPS_TLS_GOTTPREL; + case Mips::fixup_MICROMIPS_TLS_TPREL_HI16: + return ELF::R_MICROMIPS_TLS_TPREL_HI16; + case Mips::fixup_MICROMIPS_TLS_TPREL_LO16: + return ELF::R_MICROMIPS_TLS_TPREL_LO16; + case Mips::fixup_MICROMIPS_SUB: + return ELF::R_MICROMIPS_SUB; + case Mips::fixup_MICROMIPS_HIGHER: + return ELF::R_MICROMIPS_HIGHER; + case Mips::fixup_MICROMIPS_HIGHEST: + return ELF::R_MICROMIPS_HIGHEST; + case Mips::fixup_Mips_JALR: + return ELF::R_MIPS_JALR; + case Mips::fixup_MICROMIPS_JALR: + return ELF::R_MICROMIPS_JALR; + } + llvm_unreachable("invalid fixup kind!"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f531ea4250537c4a6213a42e7766c1c17828d3f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp @@ -0,0 +1,130 @@ +bool MipsELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &Sym, unsigned Type) const { + if (!isUInt<8>(Type)) + return needsRelocateWithSymbol(Sym, Type & 0xff) || needsRelocateWithSymbol(Sym, (Type >> 8) & 0xff) || needsRelocateWithSymbol(Sym, (Type >> 16) & 0xff); + switch (Type) { + default: + errs() << Type << "\n"; + llvm_unreachable("Unexpected relocation"); + return true; + case ELF::R_MIPS_NONE: + return false; + case ELF::R_MIPS_GOT16: + case ELF::R_MIPS16_GOT16: + case ELF::R_MICROMIPS_GOT16: + case ELF::R_MIPS_HIGHER: + case ELF::R_MIPS_HIGHEST: + case ELF::R_MIPS_HI16: + case ELF::R_MIPS16_HI16: + case ELF::R_MICROMIPS_HI16: + case ELF::R_MIPS_LO16: + case ELF::R_MIPS16_LO16: + case ELF::R_MICROMIPS_LO16: + if (cast(Sym).getOther() & ELF::STO_MIPS_MICROMIPS) + return true; + return false; + case ELF::R_MIPS_GOT_PAGE: + case ELF::R_MICROMIPS_GOT_PAGE: + case ELF::R_MIPS_GOT_OFST: + case ELF::R_MICROMIPS_GOT_OFST: + case ELF::R_MIPS_16: + case ELF::R_MIPS_32: + case ELF::R_MIPS_GPREL32: + if (cast(Sym).getOther() & ELF::STO_MIPS_MICROMIPS) + return true; + LLVM_FALLTHROUGH; + case ELF::R_MIPS_26: + case ELF::R_MIPS_64: + case ELF::R_MIPS_GPREL16: + case ELF::R_MIPS_PC16: + case ELF::R_MIPS_SUB: + return false; + case ELF::R_MIPS_REL32: + case ELF::R_MIPS_LITERAL: + case ELF::R_MIPS_CALL16: + case ELF::R_MIPS_SHIFT5: + case ELF::R_MIPS_SHIFT6: + case ELF::R_MIPS_GOT_DISP: + case ELF::R_MIPS_GOT_HI16: + case ELF::R_MIPS_GOT_LO16: + case ELF::R_MIPS_INSERT_A: + case ELF::R_MIPS_INSERT_B: + case ELF::R_MIPS_DELETE: + case ELF::R_MIPS_CALL_HI16: + case ELF::R_MIPS_CALL_LO16: + case ELF::R_MIPS_SCN_DISP: + case ELF::R_MIPS_REL16: + case ELF::R_MIPS_ADD_IMMEDIATE: + case ELF::R_MIPS_PJUMP: + case ELF::R_MIPS_RELGOT: + case ELF::R_MIPS_JALR: + case ELF::R_MIPS_TLS_DTPMOD32: + case ELF::R_MIPS_TLS_DTPREL32: + case ELF::R_MIPS_TLS_DTPMOD64: + case ELF::R_MIPS_TLS_DTPREL64: + case ELF::R_MIPS_TLS_GD: + case ELF::R_MIPS_TLS_LDM: + case ELF::R_MIPS_TLS_DTPREL_HI16: + case ELF::R_MIPS_TLS_DTPREL_LO16: + case ELF::R_MIPS_TLS_GOTTPREL: + case ELF::R_MIPS_TLS_TPREL32: + case ELF::R_MIPS_TLS_TPREL64: + case ELF::R_MIPS_TLS_TPREL_HI16: + case ELF::R_MIPS_TLS_TPREL_LO16: + case ELF::R_MIPS_GLOB_DAT: + case ELF::R_MIPS_PC21_S2: + case ELF::R_MIPS_PC26_S2: + case ELF::R_MIPS_PC18_S3: + case ELF::R_MIPS_PC19_S2: + case ELF::R_MIPS_PCHI16: + case ELF::R_MIPS_PCLO16: + case ELF::R_MIPS_COPY: + case ELF::R_MIPS_JUMP_SLOT: + case ELF::R_MIPS_NUM: + case ELF::R_MIPS_PC32: + case ELF::R_MIPS_EH: + case ELF::R_MICROMIPS_26_S1: + case ELF::R_MICROMIPS_GPREL16: + case ELF::R_MICROMIPS_LITERAL: + case ELF::R_MICROMIPS_PC7_S1: + case ELF::R_MICROMIPS_PC10_S1: + case ELF::R_MICROMIPS_PC16_S1: + case ELF::R_MICROMIPS_CALL16: + case ELF::R_MICROMIPS_GOT_DISP: + case ELF::R_MICROMIPS_GOT_HI16: + case ELF::R_MICROMIPS_GOT_LO16: + case ELF::R_MICROMIPS_SUB: + case ELF::R_MICROMIPS_HIGHER: + case ELF::R_MICROMIPS_HIGHEST: + case ELF::R_MICROMIPS_CALL_HI16: + case ELF::R_MICROMIPS_CALL_LO16: + case ELF::R_MICROMIPS_SCN_DISP: + case ELF::R_MICROMIPS_JALR: + case ELF::R_MICROMIPS_HI0_LO16: + case ELF::R_MICROMIPS_TLS_GD: + case ELF::R_MICROMIPS_TLS_LDM: + case ELF::R_MICROMIPS_TLS_DTPREL_HI16: + case ELF::R_MICROMIPS_TLS_DTPREL_LO16: + case ELF::R_MICROMIPS_TLS_GOTTPREL: + case ELF::R_MICROMIPS_TLS_TPREL_HI16: + case ELF::R_MICROMIPS_TLS_TPREL_LO16: + case ELF::R_MICROMIPS_GPREL7_S2: + case ELF::R_MICROMIPS_PC23_S2: + case ELF::R_MICROMIPS_PC21_S1: + case ELF::R_MICROMIPS_PC26_S1: + case ELF::R_MICROMIPS_PC18_S3: + case ELF::R_MICROMIPS_PC19_S2: + return true; + case ELF::R_MIPS16_26: + case ELF::R_MIPS16_GPREL: + case ELF::R_MIPS16_CALL16: + case ELF::R_MIPS16_TLS_GD: + case ELF::R_MIPS16_TLS_LDM: + case ELF::R_MIPS16_TLS_DTPREL_HI16: + case ELF::R_MIPS16_TLS_DTPREL_LO16: + case ELF::R_MIPS16_TLS_GOTTPREL: + case ELF::R_MIPS16_TLS_TPREL_HI16: + case ELF::R_MIPS16_TLS_TPREL_LO16: + llvm_unreachable("Unsupported MIPS16 relocation"); + return true; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dba92c27146b58cdb0e204902db70262196e9b1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp @@ -0,0 +1,34 @@ +MipsTargetELFStreamer::MipsTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI) : MipsTargetStreamer(S), MicroMipsEnabled(false), STI(STI) { + MCAssembler &MCA = getStreamer().getAssembler(); + Pic = MCA.getContext().getObjectFileInfo()->isPositionIndependent(); + const FeatureBitset &Features = STI.getFeatureBits(); + unsigned EFlags = MCA.getELFHeaderEFlags(); + ABI = MipsABIInfo(STI.getTargetTriple().getArch() == Triple::ArchType::mipsel || STI.getTargetTriple().getArch() == Triple::ArchType::mips ? MipsABIInfo::O32() : MipsABIInfo::N64()); + if (Features[Mips::FeatureMips64r6]) + EFlags |= ELF::EF_MIPS_ARCH_64R6; + else if (Features[Mips::FeatureMips64r2] || Features[Mips::FeatureMips64r3] || Features[Mips::FeatureMips64r5]) + EFlags |= ELF::EF_MIPS_ARCH_64R2; + else if (Features[Mips::FeatureMips64]) + EFlags |= ELF::EF_MIPS_ARCH_64; + else if (Features[Mips::FeatureMips5]) + EFlags |= ELF::EF_MIPS_ARCH_5; + else if (Features[Mips::FeatureMips4]) + EFlags |= ELF::EF_MIPS_ARCH_4; + else if (Features[Mips::FeatureMips3]) + EFlags |= ELF::EF_MIPS_ARCH_3; + else if (Features[Mips::FeatureMips32r6]) + EFlags |= ELF::EF_MIPS_ARCH_32R6; + else if (Features[Mips::FeatureMips32r2] || Features[Mips::FeatureMips32r3] || Features[Mips::FeatureMips32r5]) + EFlags |= ELF::EF_MIPS_ARCH_32R2; + else if (Features[Mips::FeatureMips32]) + EFlags |= ELF::EF_MIPS_ARCH_32; + else if (Features[Mips::FeatureMips2]) + EFlags |= ELF::EF_MIPS_ARCH_2; + else + EFlags |= ELF::EF_MIPS_ARCH_1; + if (Features[Mips::FeatureCnMips]) + EFlags |= ELF::EF_MIPS_MACH_OCTEON; + if (Features[Mips::FeatureNaN2008]) + EFlags |= ELF::EF_MIPS_NAN2008; + MCA.setELFHeaderEFlags(EFlags); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e5832effab9cb77d0b82db906e766fed26e295c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveSetMicroMips() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..169a904a234aa96ead39b9536240237025564fdf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp @@ -0,0 +1,3 @@ +MCELFStreamer &MipsTargetELFStreamer::getStreamer() { + return static_cast(Streamer); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/FixupKind/enumFixups.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/FixupKind/enumFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d35d8d0bcb890e7cd11ff4ce19ee49ce8fd56641 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/FixupKind/enumFixups.cpp @@ -0,0 +1,74 @@ +enum Fixups { + fixup_Mips_16 = FirstTargetFixupKind, + fixup_Mips_32, + fixup_Mips_REL32, + fixup_Mips_26, + fixup_Mips_HI16, + fixup_Mips_LO16, + fixup_Mips_GPREL16, + fixup_Mips_LITERAL, + fixup_Mips_GOT, + fixup_Mips_PC16, + fixup_Mips_CALL16, + fixup_Mips_GPREL32, + fixup_Mips_SHIFT5, + fixup_Mips_SHIFT6, + fixup_Mips_64, + fixup_Mips_TLSGD, + fixup_Mips_GOTTPREL, + fixup_Mips_TPREL_HI, + fixup_Mips_TPREL_LO, + fixup_Mips_TLSLDM, + fixup_Mips_DTPREL_HI, + fixup_Mips_DTPREL_LO, + fixup_Mips_Branch_PCRel, + fixup_Mips_GPOFF_HI, + fixup_MICROMIPS_GPOFF_HI, + fixup_Mips_GPOFF_LO, + fixup_MICROMIPS_GPOFF_LO, + fixup_Mips_GOT_PAGE, + fixup_Mips_GOT_OFST, + fixup_Mips_GOT_DISP, + fixup_Mips_HIGHER, + fixup_MICROMIPS_HIGHER, + fixup_Mips_HIGHEST, + fixup_MICROMIPS_HIGHEST, + fixup_Mips_GOT_HI16, + fixup_Mips_GOT_LO16, + fixup_Mips_CALL_HI16, + fixup_Mips_CALL_LO16, + fixup_MIPS_PC18_S3, + fixup_MIPS_PC19_S2, + fixup_MIPS_PC21_S2, + fixup_MIPS_PC26_S2, + fixup_MIPS_PCHI16, + fixup_MIPS_PCLO16, + fixup_MICROMIPS_26_S1, + fixup_MICROMIPS_HI16, + fixup_MICROMIPS_LO16, + fixup_MICROMIPS_GOT16, + fixup_MICROMIPS_PC7_S1, + fixup_MICROMIPS_PC10_S1, + fixup_MICROMIPS_PC16_S1, + fixup_MICROMIPS_PC26_S1, + fixup_MICROMIPS_PC19_S2, + fixup_MICROMIPS_PC18_S3, + fixup_MICROMIPS_PC21_S1, + fixup_MICROMIPS_CALL16, + fixup_MICROMIPS_GOT_DISP, + fixup_MICROMIPS_GOT_PAGE, + fixup_MICROMIPS_GOT_OFST, + fixup_MICROMIPS_TLS_GD, + fixup_MICROMIPS_TLS_LDM, + fixup_MICROMIPS_TLS_DTPREL_HI16, + fixup_MICROMIPS_TLS_DTPREL_LO16, + fixup_MICROMIPS_GOTTPREL, + fixup_MICROMIPS_TLS_TPREL_HI16, + fixup_MICROMIPS_TLS_TPREL_LO16, + fixup_Mips_SUB, + fixup_MICROMIPS_SUB, + fixup_Mips_JALR, + fixup_MICROMIPS_JALR, + LastTargetFixupKind, + NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind + }; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c883a428f10b83a397704285295212b9d6aa78f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp @@ -0,0 +1,2 @@ +MipsInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) : MCInstPrinter(MAI, MII, MRI) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6febf95d372d6ef3759047b96191a4f8d15d48d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c2e2fe2d155616e4b721b21af96e900ec321a28 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp @@ -0,0 +1,5 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70f5f37e80cc471496d5af941591d8998271fd72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printInst.cpp @@ -0,0 +1,41 @@ +void MipsInstPrinter::printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) { + switch (MI->getOpcode()) { + default: + break; + case Mips::RDHWR: + case Mips::RDHWR64: + O << "\t.set\tpush\n"; + O << "\t.set\tmips32r2\n"; + break; + case Mips::Save16: + O << "\tsave\t"; + printSaveRestore(MI, O); + O << " # 16 bit inst\n"; + return; + case Mips::SaveX16: + O << "\tsave\t"; + printSaveRestore(MI, O); + O << "\n"; + return; + case Mips::Restore16: + O << "\trestore\t"; + printSaveRestore(MI, O); + O << " # 16 bit inst\n"; + return; + case Mips::RestoreX16: + O << "\trestore\t"; + printSaveRestore(MI, O); + O << "\n"; + return; + } + if (!printAliasInstr(MI, Address, O) && !printAlias(*MI, O)) + printInstruction(MI, Address, O); + printAnnotation(O, Annot); + switch (MI->getOpcode()) { + default: + break; + case Mips::RDHWR: + case Mips::RDHWR64: + O << "\n\t.set\tpop"; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca8f19bc8f4f6fc50ae215ec71e28772be6a4589 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printOperand.cpp @@ -0,0 +1,13 @@ +void MipsInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) { + const MCOperand &Op = MI->getOperand(OpNo); + if (Op.isReg()) { + printRegName(O, Op.getReg()); + return; + } + if (Op.isImm()) { + O << formatImm(Op.getImm()); + return; + } + assert(Op.isExpr() && "unknown operand kind in printOperand"); + Op.getExpr()->print(O, &MAI, true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printRegName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printRegName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26b28de5ee26164ed0644e6397f6fe42a83f0610 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printRegName.cpp @@ -0,0 +1,3 @@ +void MipsInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { + OS << '$' << StringRef(getRegisterName(RegNo)).lower(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f7f9d577eb80771550e1b6a37ed0e03a59a19c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp @@ -0,0 +1,4 @@ +void MipsInstPrinter::printFCCOperand(const MCInst *MI, int opNum, raw_ostream &O) { + const MCOperand& MO = MI->getOperand(opNum); + O << MipsFCCToString((Mips::CondCode)MO.getImm()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d80f585e9e89d79aa6714d871030005b94ba0ecc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +MipsMCCodeEmitter(const MCInstrInfo &mcii, MCContext &Ctx_, bool IsLittle) : MCII(mcii), Ctx(Ctx_), IsLittleEndian(IsLittle) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..372156d0e033b36f8cdce99d9225b6cc7cd64e00 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp @@ -0,0 +1,3 @@ +MCCodeEmitter *createMipsMCCodeEmitterEL(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx) { + return new MipsMCCodeEmitter(MCII, Ctx, true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59427e05cfb3b9c5884cb26981fdac565f23caa6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp @@ -0,0 +1,52 @@ +void MipsMCCodeEmitter::encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + MCInst TmpInst = MI; + switch (MI.getOpcode()) { + case Mips::DSLL: + case Mips::DSRL: + case Mips::DSRA: + case Mips::DROTR: + LowerLargeShift(TmpInst); + break; + case Mips::BEQC: + case Mips::BNEC: + case Mips::BEQC64: + case Mips::BNEC64: + case Mips::BOVC: + case Mips::BOVC_MMR6: + case Mips::BNVC: + case Mips::BNVC_MMR6: + LowerCompactBranch(TmpInst); + } + unsigned long N = Fixups.size(); + uint32_t Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + const unsigned Opcode = TmpInst.getOpcode(); + if ((Opcode != Mips::NOP) && (Opcode != Mips::SLL) && (Opcode != Mips::SLL_MM) && (Opcode != Mips::SLL_MMR6) && !Binary) + llvm_unreachable("unimplemented opcode in encodeInstruction()"); + int NewOpcode = -1; + if (isMicroMips(STI)) { + if (isMips32r6(STI)) { + NewOpcode = Mips::MipsR62MicroMipsR6(Opcode, Mips::Arch_micromipsr6); + if (NewOpcode == -1) + NewOpcode = Mips::Std2MicroMipsR6(Opcode, Mips::Arch_micromipsr6); + } + else + NewOpcode = Mips::Std2MicroMips(Opcode, Mips::Arch_micromips); + if (NewOpcode == -1) + NewOpcode = Mips::Dsp2MicroMips(Opcode, Mips::Arch_mmdsp); + if (NewOpcode != -1) { + if (Fixups.size() > N) + Fixups.pop_back(); + TmpInst.setOpcode (NewOpcode); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + } + if (((MI.getOpcode() == Mips::MOVEP_MM) || (MI.getOpcode() == Mips::MOVEP_MMR6))) { + unsigned RegPair = getMovePRegPairOpValue(MI, 0, Fixups, STI); + Binary = (Binary & 0xFFFFFC7F) | (RegPair << 7); + } + } + const MCInstrDesc &Desc = MCII.get(TmpInst.getOpcode()); + unsigned Size = Desc.getSize(); + if (!Size) + llvm_unreachable("Desc.getSize() returns 0"); + emitInstruction(Binary, Size, STI, OS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb189232a33043c90a46e56fd801fda68c47150e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp @@ -0,0 +1,15 @@ +unsigned MipsMCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + if (MO.isReg()) { + unsigned Reg = MO.getReg(); + unsigned RegNo = Ctx.getRegisterInfo()->getEncodingValue(Reg); + return RegNo; + } + else if (MO.isImm()) { + return static_cast(MO.getImm()); + } + else if (MO.isFPImm()) { + return static_cast(APFloat(MO.getFPImm()).bitcastToAPInt().getHiBits(32).getLimitedValue()); + } + assert(MO.isExpr()); + return getExprOpValue(MO.getExpr(),Fixups, STI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/MCExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/MCExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ebc24eb5d0635cf958da238e89ee965268122ac9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/MCExpr.cpp @@ -0,0 +1,2 @@ +explicit MipsMCExpr(MipsExprKind Kind, const MCExpr *Expr) : Kind(Kind), Expr(Expr) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/classof1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/classof1.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/classof2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/classof2.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/create.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/create.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3094fed7f989b1117507901af1e6037af93072b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/create.cpp @@ -0,0 +1,3 @@ +const MipsMCExpr *MipsMCExpr::create(MipsMCExpr::MipsExprKind Kind, const MCExpr *Expr, MCContext &Ctx) { + return new (Ctx) MipsMCExpr(Kind, Expr); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27c457d66a9d950c263ecd8db1e0cc53834ab166 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp @@ -0,0 +1,29 @@ +enum MipsExprKind { + MEK_None, + MEK_CALL_HI16, + MEK_CALL_LO16, + MEK_DTPREL, + MEK_DTPREL_HI, + MEK_DTPREL_LO, + MEK_GOT, + MEK_GOTTPREL, + MEK_GOT_CALL, + MEK_GOT_DISP, + MEK_GOT_HI16, + MEK_GOT_LO16, + MEK_GOT_OFST, + MEK_GOT_PAGE, + MEK_GPREL, + MEK_HI, + MEK_HIGHER, + MEK_HIGHEST, + MEK_LO, + MEK_NEG, + MEK_PCREL_HI16, + MEK_PCREL_LO16, + MEK_TLSGD, + MEK_TLSLDM, + MEK_TPREL_HI, + MEK_TPREL_LO, + MEK_Special, +}; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..670c710ada9b1fb33725c09e83b7683e32a4776f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp @@ -0,0 +1,62 @@ +bool MipsMCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const { + if (isGpOff()) { + const MCExpr *SubExpr = cast(cast(getSubExpr())->getSubExpr())->getSubExpr(); + if (!SubExpr->evaluateAsRelocatable(Res, Layout, Fixup)) + return false; + Res = MCValue::get(Res.getSymA(), Res.getSymB(), Res.getConstant(), MEK_Special); + return true; + } + if (!getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup)) + return false; + if (Res.getRefKind() != MCSymbolRefExpr::VK_None) + return false; + if (Res.isAbsolute() && Fixup == nullptr) { + int64_t AbsVal = Res.getConstant(); + switch (Kind) { + case MEK_None: + case MEK_Special: + llvm_unreachable("MEK_None and MEK_Special are invalid"); + case MEK_DTPREL: + return getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup); + case MEK_DTPREL_HI: + case MEK_DTPREL_LO: + case MEK_GOT: + case MEK_GOTTPREL: + case MEK_GOT_CALL: + case MEK_GOT_DISP: + case MEK_GOT_HI16: + case MEK_GOT_LO16: + case MEK_GOT_OFST: + case MEK_GOT_PAGE: + case MEK_GPREL: + case MEK_PCREL_HI16: + case MEK_PCREL_LO16: + case MEK_TLSGD: + case MEK_TLSLDM: + case MEK_TPREL_HI: + case MEK_TPREL_LO: + return false; + case MEK_LO: + case MEK_CALL_LO16: + AbsVal = SignExtend64<16>(AbsVal); + break; + case MEK_CALL_HI16: + case MEK_HI: + AbsVal = SignExtend64<16>((AbsVal + 0x8000) >> 16); + break; + case MEK_HIGHER: + AbsVal = SignExtend64<16>((AbsVal + 0x80008000LL) >> 32); + break; + case MEK_HIGHEST: + AbsVal = SignExtend64<16>((AbsVal + 0x800080008000LL) >> 48); + break; + case MEK_NEG: + AbsVal = -AbsVal; + break; + } + Res = MCValue::get(AbsVal); + return true; + } + Res = MCValue::get(Res.getSymA(), Res.getSymB(), Res.getConstant(), getKind()); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08da2eccf295202e12e9442a7e9eb5f68e318ec8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp @@ -0,0 +1,3 @@ +MCFragment *findAssociatedFragment() const override { + return getSubExpr()->findAssociatedFragment(); + } \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc1b15aad7b4dd5503f3f01be4930b6d0030989f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp @@ -0,0 +1,38 @@ +void MipsMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const { + switch (getKind()) { + case MEK_None: + case MEK_Special: + llvm_unreachable("MEK_None and MEK_Special are invalid"); + break; + case MEK_CALL_HI16: + case MEK_CALL_LO16: + case MEK_GOT: + case MEK_GOT_CALL: + case MEK_GOT_DISP: + case MEK_GOT_HI16: + case MEK_GOT_LO16: + case MEK_GOT_OFST: + case MEK_GOT_PAGE: + case MEK_GPREL: + case MEK_HI: + case MEK_HIGHER: + case MEK_HIGHEST: + case MEK_LO: + case MEK_NEG: + case MEK_PCREL_HI16: + case MEK_PCREL_LO16: + if (const MipsMCExpr *E = dyn_cast(getSubExpr())) + E->fixELFSymbolsInTLSFixups(Asm); + break; + case MEK_DTPREL: + case MEK_DTPREL_HI: + case MEK_DTPREL_LO: + case MEK_TLSLDM: + case MEK_TLSGD: + case MEK_GOTTPREL: + case MEK_TPREL_HI: + case MEK_TPREL_LO: + fixELFSymbolsInTLSFixupsImpl(getSubExpr(), Asm); + break; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e9ca0c40060014e6baba99f4f067c0ffd884676 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp @@ -0,0 +1,23 @@ +static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm) { + switch (Expr->getKind()) { + case MCExpr::Target: + fixELFSymbolsInTLSFixupsImpl(cast(Expr)->getSubExpr(), Asm); + break; + case MCExpr::Constant: + break; + case MCExpr::Binary: { + const MCBinaryExpr *BE = cast(Expr); + fixELFSymbolsInTLSFixupsImpl(BE->getLHS(), Asm); + fixELFSymbolsInTLSFixupsImpl(BE->getRHS(), Asm); + break; + } + case MCExpr::SymbolRef: { + const MCSymbolRefExpr &SymRef = *cast(Expr); + cast(SymRef.getSymbol()).setType(ELF::STT_TLS); + break; + } + case MCExpr::Unary: + fixELFSymbolsInTLSFixupsImpl(cast(Expr)->getSubExpr(), Asm); + break; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getKind.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fca267923e392a3304df0e777f53b17ec30c814 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getKind.cpp @@ -0,0 +1,3 @@ +MipsExprKind getKind() const { + return Kind; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getSubExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getSubExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c70598c07f1d0625d598037483c5a146ef4feaa5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getSubExpr.cpp @@ -0,0 +1,3 @@ +const MCExpr *getSubExpr() const { + return Expr; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/printImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/printImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47538cb3613642553049ed964b24bf4d4b25031d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/printImpl.cpp @@ -0,0 +1,90 @@ +void MipsMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const { + int64_t AbsVal; + switch (Kind) { + case MEK_None: + case MEK_Special: + llvm_unreachable("MEK_None and MEK_Special are invalid"); + break; + case MEK_DTPREL: + getSubExpr()->print(OS, MAI, true); + return; + case MEK_CALL_HI16: + OS << "%call_hi"; + break; + case MEK_CALL_LO16: + OS << "%call_lo"; + break; + case MEK_DTPREL_HI: + OS << "%dtprel_hi"; + break; + case MEK_DTPREL_LO: + OS << "%dtprel_lo"; + break; + case MEK_GOT: + OS << "%got"; + break; + case MEK_GOTTPREL: + OS << "%gottprel"; + break; + case MEK_GOT_CALL: + OS << "%call16"; + break; + case MEK_GOT_DISP: + OS << "%got_disp"; + break; + case MEK_GOT_HI16: + OS << "%got_hi"; + break; + case MEK_GOT_LO16: + OS << "%got_lo"; + break; + case MEK_GOT_PAGE: + OS << "%got_page"; + break; + case MEK_GOT_OFST: + OS << "%got_ofst"; + break; + case MEK_GPREL: + OS << "%gp_rel"; + break; + case MEK_HI: + OS << "%hi"; + break; + case MEK_HIGHER: + OS << "%higher"; + break; + case MEK_HIGHEST: + OS << "%highest"; + break; + case MEK_LO: + OS << "%lo"; + break; + case MEK_NEG: + OS << "%neg"; + break; + case MEK_PCREL_HI16: + OS << "%pcrel_hi"; + break; + case MEK_PCREL_LO16: + OS << "%pcrel_lo"; + break; + case MEK_TLSGD: + OS << "%tlsgd"; + break; + case MEK_TLSLDM: + OS << "%tlsldm"; + break; + case MEK_TPREL_HI: + OS << "%tprel_hi"; + break; + case MEK_TPREL_LO: + OS << "%tprel_lo"; + break; + } + OS << '('; + if (Expr->evaluateAsAbsolute(AbsVal)) + OS << AbsVal; + else + Expr->print(OS, MAI, true); + OS << ')'; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8372a7ff589eca544f1df8088f54e8b8b2b114fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp @@ -0,0 +1,3 @@ +void MipsMCExpr::visitUsedExpr(MCStreamer &Streamer) const { + Streamer.visitUsedExpr(*getSubExpr()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5658244ea718376f3d69b7fbc49854fa42668962 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp @@ -0,0 +1,2 @@ +MipsMCInstrAnalysis(const MCInstrInfo *Info) : MCInstrAnalysis(Info) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b01b2aad777f0e33601f9c86bac72b81a8343d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,19 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetMC() { + for (Target *T : {&getTheMipsTarget(), &getTheMipselTarget(), &getTheMips64Target(), &getTheMips64elTarget()}) { + RegisterMCAsmInfoFn X(*T, createMipsMCAsmInfo); + TargetRegistry::RegisterMCInstrInfo(*T, createMipsMCInstrInfo); + TargetRegistry::RegisterMCRegInfo(*T, createMipsMCRegisterInfo); + TargetRegistry::RegisterELFStreamer(*T, createMCStreamer); + TargetRegistry::RegisterAsmTargetStreamer(*T, createMipsAsmTargetStreamer); + TargetRegistry::RegisterNullTargetStreamer(*T, createMipsNullTargetStreamer); + TargetRegistry::RegisterMCSubtargetInfo(*T, createMipsMCSubtargetInfo); + TargetRegistry::RegisterMCInstrAnalysis(*T, createMipsMCInstrAnalysis); + TargetRegistry::RegisterMCInstPrinter(*T, createMipsMCInstPrinter); + TargetRegistry::RegisterObjectTargetStreamer(*T, createMipsObjectTargetStreamer); + TargetRegistry::RegisterMCAsmBackend(*T, createMipsAsmBackend); + } + for (Target *T : {&getTheMipsTarget(), &getTheMips64Target()}) + TargetRegistry::RegisterMCCodeEmitter(*T, createMipsMCCodeEmitterEB); + for (Target *T : {&getTheMipselTarget(), &getTheMips64elTarget()}) + TargetRegistry::RegisterMCCodeEmitter(*T, createMipsMCCodeEmitterEL); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98ebbf2d49c4647aed8ecd64155f39e30e2d242a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createMipsAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool isVerboseAsm) { + return new MipsTargetAsmStreamer(S, OS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2a5cba504ed7a086ff506e9d8e6bc2f4fde5991 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp @@ -0,0 +1,3 @@ +static MCInstrAnalysis *createMipsMCInstrAnalysis(const MCInstrInfo *Info) { + return new MipsMCInstrAnalysis(Info); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..837b9167e024dfc0068281dbe50fc9ad3064ca21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,7 @@ +static MCAsmInfo *createMipsMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options) { + MCAsmInfo *MAI = new MipsMCAsmInfo(TT, Options); + unsigned SP = MRI.getDwarfRegNum(Mips::SP, true); + MCCFIInstruction Inst = MCCFIInstruction::createDefCfaRegister(nullptr, SP); + MAI->addInitialFrameState(Inst); + return MAI; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..df05a3cab536755996ee2967e89aee556fc9d7aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp @@ -0,0 +1,3 @@ +static MCInstPrinter *createMipsMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) { + return new MipsInstPrinter(MAI, MII, MRI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d50ca24c8cac1fc0d6821b37c8cea1728525d7a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,5 @@ +static MCInstrInfo *createMipsMCInstrInfo() { + MCInstrInfo *X = new MCInstrInfo(); + InitMipsMCInstrInfo(X); + return X; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39b142645d1a74904b92b3d82dd3360575145767 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,5 @@ +static MCRegisterInfo *createMipsMCRegisterInfo(const Triple &TT) { + MCRegisterInfo *X = new MCRegisterInfo(); + InitMipsMCRegisterInfo(X, Mips::RA); + return X; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c05371de5a90f36670a3dbf3f15208b2ffbee21f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,4 @@ +static MCSubtargetInfo *createMipsMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { + CPU = MIPS_MC::selectMipsCPU(TT, CPU); + return createMipsMCSubtargetInfoImpl(TT, CPU, CPU, FS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf2f5e7108d8aa4cf1b43892131f3f21abecdd36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createMipsNullTargetStreamer(MCStreamer &S) { + return new MipsTargetStreamer(S); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10ee25d3af46cc3570b3f04fcd7ca01c661f6f81 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createMipsObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) { + return new MipsTargetELFStreamer(S, STI); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b84c6fb1759fb7beed2dd8b743d221a44f24ed8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp @@ -0,0 +1,18 @@ +bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size, uint64_t &Target) const override { + unsigned NumOps = Inst.getNumOperands(); + if (NumOps == 0) + return false; + switch (Info->get(Inst.getOpcode()).OpInfo[NumOps - 1].OperandType) { + case MCOI::OPERAND_UNKNOWN: + case MCOI::OPERAND_IMMEDIATE: { + uint64_t Region = Addr & ~uint64_t(0xfffffff); + Target = Region + Inst.getOperand(NumOps - 1).getImm(); + return true; + } + case MCOI::OPERAND_PCREL: + Target = Addr + Inst.getOperand(NumOps - 1).getImm(); + return true; + default: + return false; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/generateInstSeq.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/generateInstSeq.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/generateInstSeq.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/getIntMatCost.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/getIntMatCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/getIntMatCost.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/structInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/structInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/MatInt/structInst.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee43d3cfc20af7f5ce81d111b7c1eb270406abca --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp @@ -0,0 +1,2 @@ +MipsTargetAsmStreamer::MipsTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS) : MipsTargetStreamer(S), OS(OS) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6e217f82aee591bb534adeb6d7253244f98d5f09 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp @@ -0,0 +1,3 @@ +MipsTargetStreamer::MipsTargetStreamer(MCStreamer &S) : MCTargetStreamer(S), GPReg(Mips::GP), ModuleDirectiveAllowed(true) { + GPRInfoSet = FPRInfoSet = FrameInfoSet = false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf64c8323e7b7238f06effee213a19639b43ba4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp @@ -0,0 +1,2 @@ +void MipsTargetStreamer::emitDirectiveModuleCRC() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23a6029df8553c9ec55644c6e53170c37b3cf87d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp @@ -0,0 +1,3 @@ +void MipsTargetAsmStreamer::emitDirectiveOptionPic0() { + OS << "\t.option\tpic0\n"; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finish.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finish.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d532f0f886a4e984cb24aea1e0b94a27c8f44b31 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finish.cpp @@ -0,0 +1,47 @@ +void MipsTargetELFStreamer::finish() { + MCAssembler &MCA = getStreamer().getAssembler(); + const MCObjectFileInfo &OFI = *MCA.getContext().getObjectFileInfo(); + MCSection &TextSection = *OFI.getTextSection(); + MCA.registerSection(TextSection); + MCSection &DataSection = *OFI.getDataSection(); + MCA.registerSection(DataSection); + MCSection &BSSSection = *OFI.getBSSSection(); + MCA.registerSection(BSSSection); + TextSection.setAlignment(Align(std::max(16u, TextSection.getAlignment()))); + DataSection.setAlignment(Align(std::max(16u, DataSection.getAlignment()))); + BSSSection.setAlignment(Align(std::max(16u, BSSSection.getAlignment()))); + if (RoundSectionSizes) { + MCStreamer &OS = getStreamer(); + for (MCSection &S : MCA) { + MCSectionELF &Section = static_cast(S); + unsigned Alignment = Section.getAlignment(); + if (Alignment) { + OS.SwitchSection(&Section); + if (Section.UseCodeAlign()) + OS.emitCodeAlignment(Alignment, Alignment); + else + OS.emitValueToAlignment(Alignment, 0, 1, Alignment); + } + } + } + const FeatureBitset &Features = STI.getFeatureBits(); + unsigned EFlags = MCA.getELFHeaderEFlags(); + if (getABI().IsO32()) + EFlags |= ELF::EF_MIPS_ABI_O32; + else if (getABI().IsN32()) + EFlags |= ELF::EF_MIPS_ABI2; + if (Features[Mips::FeatureGP64Bit]) { + if (getABI().IsO32()) + EFlags |= ELF::EF_MIPS_32BITMODE; /* Compatibility Mode */ + } + else if (Features[Mips::FeatureMips64r2] || Features[Mips::FeatureMips64]) + EFlags |= ELF::EF_MIPS_32BITMODE; + if (!Features[Mips::FeatureNoABICalls]) + EFlags |= ELF::EF_MIPS_CPIC; + if (Pic) + EFlags |= ELF::EF_MIPS_PIC | ELF::EF_MIPS_CPIC; + MCA.setELFHeaderEFlags(EFlags); + MipsELFStreamer &MEF = static_cast(Streamer); + MEF.EmitMipsOptionRecords(); + emitMipsAbiFlags(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c75653867ef66dd435b2ea7205493d823d8fbb30 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::NoVRegs); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77e28c673af82e311aad8811a99167bc300e4849 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp @@ -0,0 +1,49 @@ +bool MipsDelaySlotFiller::runOnMachineBasicBlock(MachineBasicBlock &MBB) { + bool Changed = false; + const MipsSubtarget &STI = MBB.getParent()->getSubtarget(); + bool InMicroMipsMode = STI.inMicroMipsMode(); + const MipsInstrInfo *TII = STI.getInstrInfo(); + for (Iter I = MBB.begin(); I != MBB.end(); ++I) { + if (!hasUnoccupiedSlot(&*I)) + continue; + if (!DisableDelaySlotFiller && (TM->getOptLevel() != CodeGenOpt::None) && !(InMicroMipsMode && STI.hasMips32r6())) { + bool Filled = false; + if (MipsCompactBranchPolicy.getValue() != CB_Always || !TII->getEquivalentCompactForm(I)) { + if (searchBackward(MBB, *I)) { + LLVM_DEBUG(dbgs() << DEBUG_TYPE ": found instruction for delay slot in backwards search.\n"); + Filled = true; + } + else if (I->isTerminator()) { + if (searchSuccBBs(MBB, I)) { + Filled = true; + LLVM_DEBUG(dbgs() << DEBUG_TYPE ": found instruction for delay slot in successor BB search.\n"); + } + } + else if (searchForward(MBB, I)) { + LLVM_DEBUG(dbgs() << DEBUG_TYPE ": found instruction for delay slot in forwards search.\n"); + Filled = true; + } + } + if (Filled) { + MachineBasicBlock::instr_iterator DSI = I.getInstrIterator(); + if (InMicroMipsMode && TII->getInstSizeInBytes(*std::next(DSI)) == 2 && DSI->isCall()) { + DSI->setDesc(TII->get(getEquivalentCallShort(DSI->getOpcode()))); + } + ++FilledSlots; + Changed = true; + continue; + } + } + if ((InMicroMipsMode || (STI.hasMips32r6() && MipsCompactBranchPolicy != CB_Never)) && TII->getEquivalentCompactForm(I)) { + I = replaceWithCompactBranch(MBB, I, I->getDebugLoc()); + Changed = true; + continue; + } + LLVM_DEBUG(dbgs() << DEBUG_TYPE << ": could not fill delay slot for "; I->dump()); + BuildMI(MBB, std::next(I), I->getDebugLoc(), TII->get(Mips::NOP)); + MIBundleBuilder(MBB, I, std::next(I, 2)); + ++FilledSlots; + Changed = true; + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e591da793babbe33581e2a658ea7c9a09e93dedb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool MipsExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..687810462f4fad5e6d8ad2e77820cb9e1a0aac2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp @@ -0,0 +1,60 @@ +bool MipsExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NMBB) { + bool Modified = false; + switch (MBBI->getOpcode()) { + case Mips::ATOMIC_CMP_SWAP_I32_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I64_POSTRA: + return expandAtomicCmpSwap(MBB, MBBI, NMBB); + case Mips::ATOMIC_CMP_SWAP_I8_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I16_POSTRA: + return expandAtomicCmpSwapSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_SWAP_I8_POSTRA: + case Mips::ATOMIC_SWAP_I16_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I8_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I16_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I8_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I16_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I8_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I16_POSTRA: + case Mips::ATOMIC_LOAD_AND_I8_POSTRA: + case Mips::ATOMIC_LOAD_AND_I16_POSTRA: + case Mips::ATOMIC_LOAD_OR_I8_POSTRA: + case Mips::ATOMIC_LOAD_OR_I16_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I8_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I16_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I16_POSTRA: + return expandAtomicBinOpSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_LOAD_ADD_I32_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I32_POSTRA: + case Mips::ATOMIC_LOAD_AND_I32_POSTRA: + case Mips::ATOMIC_LOAD_OR_I32_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I32_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I32_POSTRA: + case Mips::ATOMIC_SWAP_I32_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I32_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 4); + case Mips::ATOMIC_LOAD_ADD_I64_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I64_POSTRA: + case Mips::ATOMIC_LOAD_AND_I64_POSTRA: + case Mips::ATOMIC_LOAD_OR_I64_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I64_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I64_POSTRA: + case Mips::ATOMIC_SWAP_I64_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I64_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 8); + default: + return Modified; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e591da793babbe33581e2a658ea7c9a09e93dedb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool MipsExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..687810462f4fad5e6d8ad2e77820cb9e1a0aac2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp @@ -0,0 +1,60 @@ +bool MipsExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NMBB) { + bool Modified = false; + switch (MBBI->getOpcode()) { + case Mips::ATOMIC_CMP_SWAP_I32_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I64_POSTRA: + return expandAtomicCmpSwap(MBB, MBBI, NMBB); + case Mips::ATOMIC_CMP_SWAP_I8_POSTRA: + case Mips::ATOMIC_CMP_SWAP_I16_POSTRA: + return expandAtomicCmpSwapSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_SWAP_I8_POSTRA: + case Mips::ATOMIC_SWAP_I16_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I8_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I16_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I8_POSTRA: + case Mips::ATOMIC_LOAD_ADD_I16_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I8_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I16_POSTRA: + case Mips::ATOMIC_LOAD_AND_I8_POSTRA: + case Mips::ATOMIC_LOAD_AND_I16_POSTRA: + case Mips::ATOMIC_LOAD_OR_I8_POSTRA: + case Mips::ATOMIC_LOAD_OR_I16_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I8_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I16_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I16_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I8_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I16_POSTRA: + return expandAtomicBinOpSubword(MBB, MBBI, NMBB); + case Mips::ATOMIC_LOAD_ADD_I32_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I32_POSTRA: + case Mips::ATOMIC_LOAD_AND_I32_POSTRA: + case Mips::ATOMIC_LOAD_OR_I32_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I32_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I32_POSTRA: + case Mips::ATOMIC_SWAP_I32_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I32_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I32_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 4); + case Mips::ATOMIC_LOAD_ADD_I64_POSTRA: + case Mips::ATOMIC_LOAD_SUB_I64_POSTRA: + case Mips::ATOMIC_LOAD_AND_I64_POSTRA: + case Mips::ATOMIC_LOAD_OR_I64_POSTRA: + case Mips::ATOMIC_LOAD_XOR_I64_POSTRA: + case Mips::ATOMIC_LOAD_NAND_I64_POSTRA: + case Mips::ATOMIC_SWAP_I64_POSTRA: + case Mips::ATOMIC_LOAD_MIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_MAX_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMIN_I64_POSTRA: + case Mips::ATOMIC_LOAD_UMAX_I64_POSTRA: + return expandAtomicBinOp(MBB, MBBI, NMBB, 8); + default: + return Modified; + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c75653867ef66dd435b2ea7205493d823d8fbb30 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::NoVRegs); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66c7b3864fbc88610507a3b57469c33cbe7067a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89ef265a73d366c9fe3f2c94f235af727e8b5dcd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +MipsInstrInfo::MipsInstrInfo(const MipsSubtarget &STI, unsigned UncondBr) : MipsGenInstrInfo(Mips::ADJCALLSTACKDOWN, Mips::ADJCALLSTACKUP), Subtarget(STI), UncondBrOpc(UncondBr) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..492da016718b9b6f818e0f34a01596e175c6affb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,5 @@ +bool MipsInstrInfo::analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, bool AllowModify) const { + SmallVector BranchInstrs; + BranchType BT = analyzeBranch(MBB, TBB, FBB, Cond, AllowModify, BranchInstrs); + return (BT == BT_None) || (BT == BT_Indirect); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5fc2c1a67373b362485a1ac80c16cbe10ca55a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,92 @@ +void MipsSEInstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc) const { + unsigned Opc = 0, ZeroReg = 0; + bool isMicroMips = Subtarget.inMicroMipsMode(); + if (Mips::GPR32RegClass.contains(DestReg)) { + if (Mips::GPR32RegClass.contains(SrcReg)) { + if (isMicroMips) + Opc = Mips::MOVE16_MM; + else + Opc = Mips::OR, ZeroReg = Mips::ZERO; + } + else if (Mips::CCRRegClass.contains(SrcReg)) + Opc = Mips::CFC1; + else if (Mips::FGR32RegClass.contains(SrcReg)) + Opc = Mips::MFC1; + else if (Mips::HI32RegClass.contains(SrcReg)) { + Opc = isMicroMips ? Mips::MFHI16_MM : Mips::MFHI; + SrcReg = 0; + } + else if (Mips::LO32RegClass.contains(SrcReg)) { + Opc = isMicroMips ? Mips::MFLO16_MM : Mips::MFLO; + SrcReg = 0; + } + else if (Mips::HI32DSPRegClass.contains(SrcReg)) + Opc = Mips::MFHI_DSP; + else if (Mips::LO32DSPRegClass.contains(SrcReg)) + Opc = Mips::MFLO_DSP; + else if (Mips::DSPCCRegClass.contains(SrcReg)) { + BuildMI(MBB, I, DL, get(Mips::RDDSP), DestReg).addImm(1 << 4).addReg(SrcReg, RegState::Implicit | getKillRegState(KillSrc)); + return; + } + else if (Mips::MSACtrlRegClass.contains(SrcReg)) + Opc = Mips::CFCMSA; + } + else if (Mips::GPR32RegClass.contains(SrcReg)) { + if (Mips::CCRRegClass.contains(DestReg)) + Opc = Mips::CTC1; + else if (Mips::FGR32RegClass.contains(DestReg)) + Opc = Mips::MTC1; + else if (Mips::HI32RegClass.contains(DestReg)) + Opc = Mips::MTHI, DestReg = 0; + else if (Mips::LO32RegClass.contains(DestReg)) + Opc = Mips::MTLO, DestReg = 0; + else if (Mips::HI32DSPRegClass.contains(DestReg)) + Opc = Mips::MTHI_DSP; + else if (Mips::LO32DSPRegClass.contains(DestReg)) + Opc = Mips::MTLO_DSP; + else if (Mips::DSPCCRegClass.contains(DestReg)) { + BuildMI(MBB, I, DL, get(Mips::WRDSP)).addReg(SrcReg, getKillRegState(KillSrc)).addImm(1 << 4).addReg(DestReg, RegState::ImplicitDefine); + return; + } + else if (Mips::MSACtrlRegClass.contains(DestReg)) { + BuildMI(MBB, I, DL, get(Mips::CTCMSA)).addReg(DestReg).addReg(SrcReg, getKillRegState(KillSrc)); + return; + } + } + else if (Mips::FGR32RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_S; + else if (Mips::AFGR64RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_D32; + else if (Mips::FGR64RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_D64; + else if (Mips::GPR64RegClass.contains(DestReg)) { + if (Mips::GPR64RegClass.contains(SrcReg)) + Opc = Mips::OR64, ZeroReg = Mips::ZERO_64; + else if (Mips::HI64RegClass.contains(SrcReg)) + Opc = Mips::MFHI64, SrcReg = 0; + else if (Mips::LO64RegClass.contains(SrcReg)) + Opc = Mips::MFLO64, SrcReg = 0; + else if (Mips::FGR64RegClass.contains(SrcReg)) + Opc = Mips::DMFC1; + } + else if (Mips::GPR64RegClass.contains(SrcReg)) { + if (Mips::HI64RegClass.contains(DestReg)) + Opc = Mips::MTHI64, DestReg = 0; + else if (Mips::LO64RegClass.contains(DestReg)) + Opc = Mips::MTLO64, DestReg = 0; + else if (Mips::FGR64RegClass.contains(DestReg)) + Opc = Mips::DMTC1; + } + else if (Mips::MSA128BRegClass.contains(DestReg)) { + if (Mips::MSA128BRegClass.contains(SrcReg)) + Opc = Mips::MOVE_V; + } + assert(Opc && "Cannot copy registers"); + MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(Opc)); + if (DestReg) + MIB.addReg(DestReg, RegState::Define); + if (SrcReg) + MIB.addReg(SrcReg, getKillRegState(KillSrc)); + if (ZeroReg) + MIB.addReg(ZeroReg); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..597c42a46327b8073dd001d24e93dda00be2781e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp @@ -0,0 +1,3 @@ +std::pair MipsInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { + return std::make_pair(TF, 0u); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6a73118f0d98feb321a30df73ba2e80992df4ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp @@ -0,0 +1,5 @@ +ArrayRef> MipsInstrInfo::getSerializableDirectMachineOperandTargetFlags() const { + using namespace MipsII; + static const std::pair Flags[] = {{MO_GOT, "mips-got"}, {MO_GOT_CALL, "mips-got-call"}, {MO_GPREL, "mips-gprel"}, {MO_ABS_HI, "mips-abs-hi"}, {MO_ABS_LO, "mips-abs-lo"}, {MO_TLSGD, "mips-tlsgd"}, {MO_TLSLDM, "mips-tlsldm"}, {MO_DTPREL_HI, "mips-dtprel-hi"}, {MO_DTPREL_LO, "mips-dtprel-lo"}, {MO_GOTTPREL, "mips-gottprel"}, {MO_TPREL_HI, "mips-tprel-hi"}, {MO_TPREL_LO, "mips-tprel-lo"}, {MO_GPOFF_HI, "mips-gpoff-hi"}, {MO_GPOFF_LO, "mips-gpoff-lo"}, {MO_GOT_DISP, "mips-got-disp"}, {MO_GOT_PAGE, "mips-got-page"}, {MO_GOT_OFST, "mips-got-ofst"}, {MO_HIGHER, "mips-higher"}, {MO_HIGHEST, "mips-highest"}, {MO_GOT_HI16, "mips-got-hi16"}, {MO_GOT_LO16, "mips-got-lo16"}, {MO_CALL_HI16, "mips-call-hi16"}, {MO_CALL_LO16, "mips-call-lo16"}, {MO_JALR, "mips-jalr"}}; + return makeArrayRef(Flags); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7aadd2573c6e9b7e1703c86ae78cd84d2f384d34 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,15 @@ +unsigned MipsInstrInfo::insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef Cond, const DebugLoc &DL, int *BytesAdded) const { + assert(TBB && "insertBranch must not be told to insert a fallthrough"); + assert(!BytesAdded && "code size not handled"); + assert((Cond.size() <= 3) && "# of Mips branch conditions must be <= 3!"); + if (FBB) { + BuildCondBr(MBB, TBB, DL, Cond); + BuildMI(&MBB, DL, get(UncondBrOpc)).addMBB(FBB); + return 2; + } + if (Cond.empty()) + BuildMI(&MBB, DL, get(UncondBrOpc)).addMBB(TBB); + else + BuildCondBr(MBB, TBB, DL, Cond); + return 1; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp new file mode 100644 index 0000000000000000000000000000000000000000..387646d147fa990d12248ab10485109553457415 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp @@ -0,0 +1,134 @@ +bool MipsInstrInfo::isBranchOffsetInRange(unsigned BranchOpc, int64_t BrOffset) const { + switch (BranchOpc) { + case Mips::B: + case Mips::BAL: + case Mips::BAL_BR: + case Mips::BAL_BR_MM: + case Mips::BC1F: + case Mips::BC1FL: + case Mips::BC1T: + case Mips::BC1TL: + case Mips::BEQ: case Mips::BEQ64: + case Mips::BEQL: + case Mips::BGEZ: case Mips::BGEZ64: + case Mips::BGEZL: + case Mips::BGEZAL: + case Mips::BGEZALL: + case Mips::BGTZ: case Mips::BGTZ64: + case Mips::BGTZL: + case Mips::BLEZ: case Mips::BLEZ64: + case Mips::BLEZL: + case Mips::BLTZ: case Mips::BLTZ64: + case Mips::BLTZL: + case Mips::BLTZAL: + case Mips::BLTZALL: + case Mips::BNE: case Mips::BNE64: + case Mips::BNEL: + return isInt<18>(BrOffset); + case Mips::B_MM: + case Mips::BC1F_MM: + case Mips::BC1T_MM: + case Mips::BEQ_MM: + case Mips::BGEZ_MM: + case Mips::BGEZAL_MM: + case Mips::BGTZ_MM: + case Mips::BLEZ_MM: + case Mips::BLTZ_MM: + case Mips::BLTZAL_MM: + case Mips::BNE_MM: + case Mips::BEQZC_MM: + case Mips::BNEZC_MM: + return isInt<17>(BrOffset); + case Mips::B16_MM: + return isInt<11>(BrOffset); + case Mips::BEQZ16_MM: + case Mips::BNEZ16_MM: + return isInt<8>(BrOffset); + case Mips::BALC: + case Mips::BC: + return isInt<28>(BrOffset); + case Mips::BC1EQZ: + case Mips::BC1NEZ: + case Mips::BC2EQZ: + case Mips::BC2NEZ: + case Mips::BEQC: case Mips::BEQC64: + case Mips::BNEC: case Mips::BNEC64: + case Mips::BGEC: case Mips::BGEC64: + case Mips::BGEUC: case Mips::BGEUC64: + case Mips::BGEZC: case Mips::BGEZC64: + case Mips::BGTZC: case Mips::BGTZC64: + case Mips::BLEZC: case Mips::BLEZC64: + case Mips::BLTC: case Mips::BLTC64: + case Mips::BLTUC: case Mips::BLTUC64: + case Mips::BLTZC: case Mips::BLTZC64: + case Mips::BNVC: + case Mips::BOVC: + case Mips::BGEZALC: + case Mips::BEQZALC: + case Mips::BGTZALC: + case Mips::BLEZALC: + case Mips::BLTZALC: + case Mips::BNEZALC: + return isInt<18>(BrOffset); + case Mips::BEQZC: case Mips::BEQZC64: + case Mips::BNEZC: case Mips::BNEZC64: + return isInt<23>(BrOffset); + case Mips::BC16_MMR6: + return isInt<11>(BrOffset); + case Mips::BEQZC16_MMR6: + case Mips::BNEZC16_MMR6: + return isInt<8>(BrOffset); + case Mips::BALC_MMR6: + case Mips::BC_MMR6: + return isInt<27>(BrOffset); + case Mips::BC1EQZC_MMR6: + case Mips::BC1NEZC_MMR6: + case Mips::BC2EQZC_MMR6: + case Mips::BC2NEZC_MMR6: + case Mips::BGEZALC_MMR6: + case Mips::BEQZALC_MMR6: + case Mips::BGTZALC_MMR6: + case Mips::BLEZALC_MMR6: + case Mips::BLTZALC_MMR6: + case Mips::BNEZALC_MMR6: + case Mips::BNVC_MMR6: + case Mips::BOVC_MMR6: + return isInt<17>(BrOffset); + case Mips::BEQC_MMR6: + case Mips::BNEC_MMR6: + case Mips::BGEC_MMR6: + case Mips::BGEUC_MMR6: + case Mips::BGEZC_MMR6: + case Mips::BGTZC_MMR6: + case Mips::BLEZC_MMR6: + case Mips::BLTC_MMR6: + case Mips::BLTUC_MMR6: + case Mips::BLTZC_MMR6: + return isInt<18>(BrOffset); + case Mips::BEQZC_MMR6: + case Mips::BNEZC_MMR6: + return isInt<23>(BrOffset); + case Mips::BPOSGE32: + return isInt<18>(BrOffset); + case Mips::BPOSGE32_MM: + case Mips::BPOSGE32C_MMR3: + return isInt<17>(BrOffset); + case Mips::BBIT0: + case Mips::BBIT032: + case Mips::BBIT1: + case Mips::BBIT132: + return isInt<18>(BrOffset); + case Mips::BZ_B: + case Mips::BZ_H: + case Mips::BZ_W: + case Mips::BZ_D: + case Mips::BZ_V: + case Mips::BNZ_B: + case Mips::BNZ_H: + case Mips::BNZ_W: + case Mips::BNZ_D: + case Mips::BNZ_V: + return isInt<18>(BrOffset); + } + llvm_unreachable("Unknown branch instruction!"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcd4b976e92def26b6c872ee0f07b832132ded3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp @@ -0,0 +1,17 @@ +Optional MipsSEInstrInfo::isCopyInstrImpl(const MachineInstr &MI) const { + bool isDSPControlWrite = false; + if (isReadOrWriteToDSPReg(MI, isDSPControlWrite)) { + if (!MI.getOperand(1).isImm() || MI.getOperand(1).getImm() != (1 << 4)) + return None; + else if (isDSPControlWrite) { + return DestSourcePair{MI.getOperand(2), MI.getOperand(0)}; + } + else { + return DestSourcePair{MI.getOperand(0), MI.getOperand(2)}; + } + } + else if (MI.isMoveReg() || isORCopyInst(MI)) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + return None; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2d8d63900cd69f173695b130359cfe1d18aa693 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,10 @@ +unsigned MipsSEInstrInfo::isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const { + unsigned Opc = MI.getOpcode(); + if ((Opc == Mips::LW) || (Opc == Mips::LD) || (Opc == Mips::LWC1) || (Opc == Mips::LDC1) || (Opc == Mips::LDC164)) { + if ((MI.getOperand(1).isFI()) && (MI.getOperand(2).isImm()) && (isZeroImm(MI.getOperand(2)))) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + return 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..049c3f11016793dd29d3fb81bb7172132b37b96d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,11 @@ +unsigned MipsSEInstrInfo::isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const { + unsigned Opc = MI.getOpcode(); + if ((Opc == Mips::SW) || (Opc == Mips::SD) || (Opc == Mips::SWC1) || (Opc == Mips::SDC1) || (Opc == Mips::SDC164)) { + if ((MI.getOperand(1).isFI()) && (MI.getOperand(2).isImm()) && (isZeroImm(MI.getOperand(2)))) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + return 0; +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0dbe9a6a32e51bc601900a9635c3d6376933a144 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,62 @@ +void MipsSEInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register DestReg, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, int64_t Offset) const { + DebugLoc DL; + if (I != MBB.end()) DL = I->getDebugLoc(); + MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOLoad); + unsigned Opc = 0; + const Function &Func = MBB.getParent()->getFunction(); + bool ReqIndirectLoad = Func.hasFnAttribute("interrupt") && (DestReg == Mips::LO0 || DestReg == Mips::LO0_64 || DestReg == Mips::HI0 || DestReg == Mips::HI0_64); + if (Mips::GPR32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::GPR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::ACC64RegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC64; + else if (Mips::ACC64DSPRegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC64DSP; + else if (Mips::ACC128RegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC128; + else if (Mips::DSPCCRegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_CCOND_DSP; + else if (Mips::FGR32RegClass.hasSubClassEq(RC)) + Opc = Mips::LWC1; + else if (Mips::AFGR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LDC1; + else if (Mips::FGR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LDC164; + else if (TRI->isTypeLegalForClass(*RC, MVT::v16i8)) + Opc = Mips::LD_B; + else if (TRI->isTypeLegalForClass(*RC, MVT::v8i16) || TRI->isTypeLegalForClass(*RC, MVT::v8f16)) + Opc = Mips::LD_H; + else if (TRI->isTypeLegalForClass(*RC, MVT::v4i32) || TRI->isTypeLegalForClass(*RC, MVT::v4f32)) + Opc = Mips::LD_W; + else if (TRI->isTypeLegalForClass(*RC, MVT::v2i64) || TRI->isTypeLegalForClass(*RC, MVT::v2f64)) + Opc = Mips::LD_D; + else if (Mips::HI32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::HI64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::LO32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::LO64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::DSPRRegClass.hasSubClassEq(RC)) + Opc = Mips::LWDSP; + assert(Opc && "Register class not handled!"); + if (!ReqIndirectLoad) + BuildMI(MBB, I, DL, get(Opc), DestReg).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); + else { + unsigned Reg = Mips::K0; + unsigned LdOp = Mips::MTLO; + if (DestReg == Mips::HI0) + LdOp = Mips::MTHI; + if (Subtarget.getABI().ArePtrs64bit()) { + Reg = Mips::K0_64; + if (DestReg == Mips::HI0_64) + LdOp = Mips::MTHI64; + else + LdOp = Mips::MTLO64; + } + BuildMI(MBB, I, DL, get(Opc), Reg).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); + BuildMI(MBB, I, DL, get(LdOp)).addReg(Reg); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/movImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/movImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/movImm.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cef1e08a42cd47a219a08a7b03df1b62305453b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,17 @@ +unsigned MipsInstrInfo::removeBranch(MachineBasicBlock &MBB, int *BytesRemoved) const { + assert(!BytesRemoved && "code size not handled"); + MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend(); + unsigned removed = 0; + while (I != REnd && removed < 2) { + if (I->isDebugInstr()) { + ++I; + continue; + } + if (!getAnalyzableBrOpc(I->getOpcode())) + break; + I->eraseFromParent(); + I = MBB.rbegin(); + ++removed; + } + return removed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf4c73519980083d2273651b2680171851c4d0a1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,5 @@ +bool MipsInstrInfo::reverseBranchCondition(SmallVectorImpl &Cond) const { + assert( (Cond.size() && Cond.size() <= 3) && "Invalid Mips branch condition!"); + Cond[0].setImm(getOppositeBranchOpc(Cond[0].getImm())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b46bd40f8ae60038cbce551cc210dfdc0d86cc72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,10 @@ +void Mips16InstrInfo::storeRegToStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register SrcReg, bool isKill, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, int64_t Offset) const { + DebugLoc DL; + if (I != MBB.end()) DL = I->getDebugLoc(); + MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOStore); + unsigned Opc = 0; + if (Mips::CPU16RegsRegClass.hasSubClassEq(RC)) + Opc = Mips::SwRxSpImmX16; + assert(Opc && "Register class not handled!"); + BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4e70d6cfccd0aae1635f5ad95610e11da64d4f0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp @@ -0,0 +1,34 @@ +bool MipsInstrInfo::verifyInstruction(const MachineInstr &MI, StringRef &ErrInfo) const { + switch (MI.getOpcode()) { + case Mips::EXT: + case Mips::EXT_MM: + case Mips::INS: + case Mips::INS_MM: + case Mips::DINS: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 0, 32, 0, 32); + case Mips::DINSM: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 1, 64, 32, 64); + case Mips::DINSU: + return verifyInsExtInstruction(MI, ErrInfo, 32, 64, 0, 32, 32, 64); + case Mips::DEXT: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 0, 32, 0, 63); + case Mips::DEXTM: + return verifyInsExtInstruction(MI, ErrInfo, 0, 32, 32, 64, 32, 64); + case Mips::DEXTU: + return verifyInsExtInstruction(MI, ErrInfo, 32, 64, 0, 32, 32, 64); + case Mips::TAILCALLREG: + case Mips::PseudoIndirectBranch: + case Mips::JR: + case Mips::JR64: + case Mips::JALR: + case Mips::JALR64: + case Mips::JALRPseudo: + if (!Subtarget.useIndirectJumpsHazard()) + return true; + ErrInfo = "invalid instruction when using jump guards!"; + return false; + default: + return true; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f7bafbb1b297ac62ef58faf3ebbc3ba088ae838 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp @@ -0,0 +1,2 @@ +MipsFunctionInfo(MachineFunction &MF) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..815700881400f3e2610e1d74e0907493d5ea7898 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex() const { + return VarArgsFrameIndex; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f453600ffb2d2bf1e86883efc8373719fb63f8ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex(int Index) { + VarArgsFrameIndex = Index; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8dbe9393d5f502927a51bf3bd6e31b2ef5a0ed3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,89 @@ +MipsSubtarget::MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS, bool little, const MipsTargetMachine &TM, MaybeAlign StackAlignOverride): MipsGenSubtargetInfo(TT, CPU, CPU, FS), MipsArchVersion(MipsDefault), IsLittle(little), IsSoftFloat(false), IsSingleFloat(false), IsFPXX(false), NoABICalls(false), Abs2008(false), IsFP64bit(false), UseOddSPReg(true), IsNaN2008bit(false), IsGP64bit(false), HasVFPU(false), HasCnMips(false), HasCnMipsP(false), HasMips3_32(false), HasMips3_32r2(false), HasMips4_32(false), HasMips4_32r2(false), HasMips5_32r2(false), InMips16Mode(false), InMips16HardFloat(Mips16HardFloat), InMicroMipsMode(false), HasDSP(false), HasDSPR2(false), HasDSPR3(false), AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16), HasMSA(false), UseTCCInDIV(false), HasSym32(false), HasEVA(false), DisableMadd4(false), HasMT(false), HasCRC(false), HasVirt(false), HasGINV(false), UseIndirectJumpsHazard(false), StackAlignOverride(StackAlignOverride), TM(TM), TargetTriple(TT), TSInfo(), InstrInfo(MipsInstrInfo::create( initializeSubtargetDependencies(CPU, FS, TM))), FrameLowering(MipsFrameLowering::create(*this)), TLInfo(MipsTargetLowering::create(TM, *this)) { + if (MipsArchVersion == MipsDefault) + MipsArchVersion = Mips32; + if (MipsArchVersion == Mips1) + report_fatal_error("Code generation for MIPS-I is not implemented", false); + if (MipsArchVersion == Mips5) + report_fatal_error("Code generation for MIPS-V is not implemented", false); + assert(((!isGP64bit() && isABI_O32()) || (isGP64bit() && (isABI_N32() || isABI_N64()))) && "Invalid Arch & ABI pair."); + if (hasMSA() && !isFP64bit()) + report_fatal_error("MSA requires a 64-bit FPU register file (FR=1 mode). See -mattr=+fp64.", false); + if (isFP64bit() && !hasMips64() && hasMips32() && !hasMips32r2()) + report_fatal_error("FPU with 64-bit registers is not available on MIPS32 pre revision 2. Use -mcpu=mips32r2 or greater."); + if (!isABI_O32() && !useOddSPReg()) + report_fatal_error("-mattr=+nooddspreg requires the O32 ABI.", false); + if (IsFPXX && (isABI_N32() || isABI_N64())) + report_fatal_error("FPXX is not permitted for the N32/N64 ABI's.", false); + if (hasMips64r6() && InMicroMipsMode) + report_fatal_error("microMIPS64R6 is not supported", false); + if (!isABI_O32() && InMicroMipsMode) + report_fatal_error("microMIPS64 is not supported.", false); + if (UseIndirectJumpsHazard) { + if (InMicroMipsMode) + report_fatal_error("cannot combine indirect jumps with hazard barriers and microMIPS"); + if (!hasMips32r2()) + report_fatal_error("indirect jumps with hazard barriers requires MIPS32R2 or later"); + } + if (inAbs2008Mode() && hasMips32() && !hasMips32r2()) { + report_fatal_error("IEEE 754-2008 abs.fmt is not supported for the given architecture.", false); + } + if (hasMips32r6()) { + StringRef ISA = hasMips64r6() ? "MIPS64r6" : "MIPS32r6"; + assert(isFP64bit()); + assert(isNaN2008()); + assert(inAbs2008Mode()); + if (hasDSP()) + report_fatal_error(ISA + " is not compatible with the DSP ASE", false); + } + if (NoABICalls && TM.isPositionIndependent()) + report_fatal_error("position-independent code requires '-mabicalls'"); + if (isABI_N64() && !TM.isPositionIndependent() && !hasSym32()) + NoABICalls = true; + UseSmallSection = GPOpt; + if (!NoABICalls && GPOpt) { + errs() << "warning: cannot use small-data accesses for '-mabicalls'" << "\n"; + UseSmallSection = false; + } + if (hasDSPR2() && !DspWarningPrinted) { + if (hasMips64() && !hasMips64r2()) { + errs() << "warning: the 'dspr2' ASE requires MIPS64 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + else if (hasMips32() && !hasMips32r2()) { + errs() << "warning: the 'dspr2' ASE requires MIPS32 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + } + else if (hasDSP() && !DspWarningPrinted) { + if (hasMips64() && !hasMips64r2()) { + errs() << "warning: the 'dsp' ASE requires MIPS64 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + else if (hasMips32() && !hasMips32r2()) { + errs() << "warning: the 'dsp' ASE requires MIPS32 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + } + StringRef ArchName = hasMips64() ? "MIPS64" : "MIPS32"; + if (!hasMips32r5() && hasMSA() && !MSAWarningPrinted) { + errs() << "warning: the 'msa' ASE requires " << ArchName << " revision 5 or greater\n"; + MSAWarningPrinted = true; + } + if (!hasMips32r5() && hasVirt() && !VirtWarningPrinted) { + errs() << "warning: the 'virt' ASE requires " << ArchName << " revision 5 or greater\n"; + VirtWarningPrinted = true; + } + if (!hasMips32r6() && hasCRC() && !CRCWarningPrinted) { + errs() << "warning: the 'crc' ASE requires " << ArchName << " revision 6 or greater\n"; + CRCWarningPrinted = true; + } + if (!hasMips32r6() && hasGINV() && !GINVWarningPrinted) { + errs() << "warning: the 'ginv' ASE requires " << ArchName << " revision 6 or greater\n"; + GINVWarningPrinted = true; + } + CallLoweringInfo.reset(new MipsCallLowering(*getTargetLowering())); + Legalizer.reset(new MipsLegalizerInfo(*this)); + auto *RBI = new MipsRegisterBankInfo(*getRegisterInfo()); + RegBankInfo.reset(RBI); + InstSelector.reset(createMipsInstructionSelector(*static_cast(&TM), *this, *RBI)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/anchor.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..436736c15924b75b84b927d41c944ede3edceaa0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/anchor.cpp @@ -0,0 +1,2 @@ +void MipsSubtarget::anchor() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp new file mode 100644 index 0000000000000000000000000000000000000000..430d9de4ff5dc9452edc2d5d727d8f5bf4687563 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp @@ -0,0 +1,3 @@ +bool MipsSubtarget::enablePostRAScheduler() const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa3fad473e1b3246c8f94087b5fbbd169058d219 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp @@ -0,0 +1,3 @@ +const CallLowering *MipsSubtarget::getCallLowering() const { + return CallLoweringInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46facc9d53d8ed20463a68f1486618473e216322 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const TargetFrameLowering *getFrameLowering() const override { + return FrameLowering.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e800e2a8b4f1864f21678597f1942ae03a8a6ab2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp @@ -0,0 +1,3 @@ +const MipsInstrInfo *getInstrInfo() const override { + return InstrInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62e906d17d51ea4764241fa71a10f28d9159bfbd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *MipsSubtarget::getInstructionSelector() const { + return InstSelector.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe91271b193b048bfbdd2a0096116ff7350be978 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp @@ -0,0 +1,3 @@ +const LegalizerInfo *MipsSubtarget::getLegalizerInfo() const { + return Legalizer.get(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5417d779e8304c5adaad1f053b6982c7a2dcd37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp @@ -0,0 +1,3 @@ +const RegisterBankInfo *MipsSubtarget::getRegBankInfo() const { + return RegBankInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70e4b467269f9a62a119d78ba8756d15153967e2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const MipsRegisterInfo *getRegisterInfo() const override { + return &InstrInfo->getRegisterInfo(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9cec09b2f3127f3d36917798ff8d808237620f9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +const SelectionDAGTargetInfo *getSelectionDAGInfo() const override { + return &TSInfo; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6a80a497f8d2bee84fc660d8e8cdfcfe7048369 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp @@ -0,0 +1,3 @@ +const MipsTargetLowering *getTargetLowering() const override { + return TLInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getXLen.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getXLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..619cc9eaf53f1510ccde851e748b819574304f6d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getXLen.cpp @@ -0,0 +1,3 @@ +MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override { + return MVT::i32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..619cc9eaf53f1510ccde851e748b819574304f6d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp @@ -0,0 +1,3 @@ +MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override { + return MVT::i32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adfcb499f53835d900b7597d97c88f12f4336b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp @@ -0,0 +1,3 @@ +bool hasMips4_32() const { + return HasMips4_32; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a9e9e37c3feac2354466675ef429eee1bf53c525 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp @@ -0,0 +1,18 @@ +MipsSubtarget &MipsSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS, const TargetMachine &TM) { + StringRef CPUName = MIPS_MC::selectMipsCPU(TM.getTargetTriple(), CPU); + ParseSubtargetFeatures(CPUName, CPUName, FS); + InstrItins = getInstrItineraryForCPU(CPUName); + if (InMips16Mode && !IsSoftFloat) + InMips16HardFloat = true; + if (StackAlignOverride) + stackAlignment = *StackAlignOverride; + else if (isABI_N32() || isABI_N64()) + stackAlignment = Align(16); + else { + assert(isABI_O32() && "Unknown ABI for stack alignment!"); + stackAlignment = Align(8); + } + if ((isABI_N32() || isABI_N64()) && !isGP64bit()) + report_fatal_error("64-bit code requested on a subtarget that doesn't support it!"); + return *this; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2d28ef868387af51863de445769ffa8d848320d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp @@ -0,0 +1,3 @@ +bool isPTR64bit() const { + return IsPTR64bit; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1f93561d2032e25cd18ca3d71c412c8891819cf5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isGP32bit() const { + return !IsGP64bit; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa19b102fcb9d571a36a08f83de9e63d0dad45af --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetInfo() { + RegisterTarget X(getTheMipsTarget(), "mips", "MIPS (32-bit big endian)", "Mips"); + RegisterTarget Y(getTheMipselTarget(), "mipsel", "MIPS (32-bit little endian)", "Mips"); + RegisterTarget A(getTheMips64Target(), "mips64", "MIPS (64-bit big endian)", "Mips"); + RegisterTarget B(getTheMips64elTarget(), "mips64el", "MIPS (64-bit little endian)","Mips"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d029fee31d59b7b7e4c2d46eb1753cc207e1a386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheMipsTarget() { + static Target TheMipsTarget; + return TheMipsTarget; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a203a8b0cb4ad6485ee57f457ac01c93bb38bca7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheMips64Target() { + static Target TheMips64Target; + return TheMips64Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cebec48b8e7e252d90044f50cbef0210c65c5fa2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,13 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTarget() { + RegisterTargetMachine X(getTheMipsTarget()); + RegisterTargetMachine Y(getTheMipselTarget()); + RegisterTargetMachine A(getTheMips64Target()); + RegisterTargetMachine B(getTheMips64elTarget()); + PassRegistry *PR = PassRegistry::getPassRegistry(); + initializeGlobalISel(*PR); + initializeMipsDelaySlotFillerPass(*PR); + initializeMipsBranchExpansionPass(*PR); + initializeMicroMipsSizeReducePass(*PR); + initializeMipsPreLegalizerCombinerPass(*PR); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20da95a9d216fe1c9fd7a5ecdd41da237b1d474b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp @@ -0,0 +1,3 @@ +MipsPassConfig(MipsTargetMachine &TM, PassManagerBase &PM) : TargetPassConfig(TM, PM) { + EnableTailMerge = !getMipsSubtarget().enableLongBranchPass(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb7a4b12d46b90e267a11d089bac3205f01c869d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,5 @@ +MipsTargetMachine::MipsTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional RM, Optional CM, CodeGenOpt::Level OL, bool JIT, bool isLittle) : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options, isLittle), TT, CPU, FS, Options, getEffectiveRelocModel(JIT, RM), getEffectiveCodeModel(CM, CodeModel::Small), OL), isLittle(isLittle), TLOF(std::make_unique()), ABI(MipsABIInfo::computeTargetABI(TT, CPU, Options.MCOptions)), Subtarget(nullptr), DefaultSubtarget(TT, CPU, FS, isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)), NoMips16Subtarget(TT, CPU, FS.empty() ? "-mips16" : FS.str() + ",-mips16", isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)), Mips16Subtarget(TT, CPU, FS.empty() ? "+mips16" : FS.str() + ",+mips16", isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)) { + Subtarget = &DefaultSubtarget; + initAsmInfo(); + setSupportsDebugEntryValues(true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a5d768ad0a3e96bbc37e8565f6c69e6eb507228 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addGlobalInstructionSelect() { + addPass(new InstructionSelect()); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..33f91a1a415e698013c6df506516503925f5c3c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp @@ -0,0 +1,8 @@ +void MipsPassConfig::addIRPasses() { + TargetPassConfig::addIRPasses(); + addPass(createAtomicExpandPass()); + if (getMipsSubtarget().os16()) + addPass(createMipsOs16Pass()); + if (getMipsSubtarget().inMips16HardFloat()) + addPass(createMips16HardFloatPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a41c67c0603be6e9b5672f4fc565ac21ee5ce3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addIRTranslator() { + addPass(new IRTranslator(getOptLevel())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fed7400583c9fc2fb0ebb7485b3e4058b93f7c8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,6 @@ +bool MipsPassConfig::addInstSelector() { + addPass(createMipsModuleISelDagPass()); + addPass(createMips16ISelDag(getMipsTargetMachine(), getOptLevel())); + addPass(createMipsSEISelDag(getMipsTargetMachine(), getOptLevel())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c0f208a88cac1846e74f7f3e819d7d6bf6406f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addLegalizeMachineIR() { + addPass(new Legalizer()); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06d033e3b1fed3f9944e982215833add08185065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,7 @@ +void MipsPassConfig::addPreEmitPass() { + addPass(createMipsExpandPseudoPass()); + addPass(createMicroMipsSizeReducePass()); + addPass(createMipsDelaySlotFillerPass()); + addPass(createMipsBranchExpansion()); + addPass(createMipsConstantIslandPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06d033e3b1fed3f9944e982215833add08185065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp @@ -0,0 +1,7 @@ +void MipsPassConfig::addPreEmitPass() { + addPass(createMipsExpandPseudoPass()); + addPass(createMicroMipsSizeReducePass()); + addPass(createMipsDelaySlotFillerPass()); + addPass(createMipsBranchExpansion()); + addPass(createMipsConstantIslandPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4fd1e966f2f6f1aa1e1720c3be90df4ac59f83e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp @@ -0,0 +1,3 @@ +void MipsPassConfig::addPreRegAlloc() { + addPass(createMipsOptimizePICCallPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..496fa0d237ac7a067970ee6482c4710e8643aa15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp @@ -0,0 +1,4 @@ +bool MipsPassConfig::addRegBankSelect() { + addPass(new RegBankSelect()); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp new file mode 100644 index 0000000000000000000000000000000000000000..779e0541abcede80b44734c783ecdbab4e2a47ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp @@ -0,0 +1,20 @@ +static std::string computeDataLayout(const Triple &TT, StringRef CPU, const TargetOptions &Options, bool isLittle) { + std::string Ret; + MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TT, CPU, Options.MCOptions); + if (isLittle) + Ret += "e"; + else + Ret += "E"; + if (ABI.IsO32()) + Ret += "-m:m"; + else + Ret += "-m:e"; + if (!ABI.IsN64()) + Ret += "-p:32:32"; + Ret += "-i8:8:32-i16:16:32-i64:64"; + if (ABI.IsN64() || ABI.IsN32()) + Ret += "-n32:64-S128"; + else + Ret += "-n32-S64"; + return Ret; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28c6d90decc8dea3f4e8ff897e48ef6d66908345 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp @@ -0,0 +1,3 @@ +TargetPassConfig *MipsTargetMachine::createPassConfig(PassManagerBase &PM) { + return new MipsPassConfig(*this, PM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5e25a02cd5a11b44924270ee2dfbdb9e9292cf63 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp @@ -0,0 +1,5 @@ +static Reloc::Model getEffectiveRelocModel(bool JIT, Optional RM) { + if (!RM.hasValue() || JIT) + return Reloc::Static; + return *RM; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1c1365ba51f49fb7fb122c5b7afd2635513e01d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp @@ -0,0 +1,3 @@ +TargetLoweringObjectFile *getObjFileLowering() const override { + return TLOF.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72a6aa9b0b63f9e9fcc02d673c5a32c466330d21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,27 @@ +const MipsSubtarget *MipsTargetMachine::getSubtargetImpl(const Function &F) const { + Attribute CPUAttr = F.getFnAttribute("target-cpu"); + Attribute FSAttr = F.getFnAttribute("target-features"); + std::string CPU = CPUAttr.isValid() ? CPUAttr.getValueAsString().str() : TargetCPU; + std::string FS = FSAttr.isValid() ? FSAttr.getValueAsString().str() : TargetFS; + bool hasMips16Attr = F.getFnAttribute("mips16").isValid(); + bool hasNoMips16Attr = F.getFnAttribute("nomips16").isValid(); + bool HasMicroMipsAttr = F.getFnAttribute("micromips").isValid(); + bool HasNoMicroMipsAttr = F.getFnAttribute("nomicromips").isValid(); + bool softFloat = F.hasFnAttribute("use-soft-float") && F.getFnAttribute("use-soft-float").getValueAsString() == "true"; + if (hasMips16Attr) + FS += FS.empty() ? "+mips16" : ",+mips16"; + else if (hasNoMips16Attr) + FS += FS.empty() ? "-mips16" : ",-mips16"; + if (HasMicroMipsAttr) + FS += FS.empty() ? "+micromips" : ",+micromips"; + else if (HasNoMicroMipsAttr) + FS += FS.empty() ? "-micromips" : ",-micromips"; + if (softFloat) + FS += FS.empty() ? "+soft-float" : ",+soft-float"; + auto &I = SubtargetMap[CPU + FS]; + if (!I) { + resetTargetOptions(F); + I = std::make_unique(TargetTriple, CPU, FS, isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)); + } + return I.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3dc48d3b86556ea44b4a72126e4ab9c2dde73782 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp @@ -0,0 +1,3 @@ +MipsTargetMachine &getMipsTargetMachine() const { + return getTM(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65f11723367b31e66f2c9629d33d19297544e2f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp @@ -0,0 +1,8 @@ +TargetTransformInfo MipsTargetMachine::getTargetTransformInfo(const Function &F) { + if (Subtarget->allowMixed16_32()) { + LLVM_DEBUG(errs() << "No Target Transform Info Pass Added\n"); + return TargetTransformInfo(F.getParent()->getDataLayout()); + } + LLVM_DEBUG(errs() << "Target Transform Info Pass Added\n"); + return TargetTransformInfo(BasicTTIImpl(this, F)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e50de996547528d432f64de320d37eb30e46f396 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp @@ -0,0 +1,3 @@ +bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const override { + return SrcAS < 256 && DestAS < 256; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0d8533856448921babe3c7b5cab65e7ceeebca3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,6 @@ +void MipsTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){ + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + SmallDataSection = getContext().getELFSection(".sdata", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_MIPS_GPREL); + SmallBSSSection = getContext().getELFSection(".sbss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_MIPS_GPREL); + this->TM = &static_cast(TM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcb179748f251dd885c72ec65ea012aa51523e27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,12 @@ +MCSection *MipsTargetObjectFile::SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { + if (Kind.isBSS() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallBSSSection; + } + if (Kind.isData() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallDataSection; + } + if (Kind.isReadOnly() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallDataSection; + } + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2aa9fc13963d18be314c20bb620b4fea6a394505 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,5 @@ +MCSection *MipsTargetObjectFile::getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const { + if (IsConstantInSmallSection(DL, C, *TM)) + return SmallDataSection; + return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Alignment); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58b216236a3eef9c2fcf8becb5197f101875eb40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp @@ -0,0 +1,3 @@ +bool MipsTargetObjectFile::IsConstantInSmallSection(const DataLayout &DL, const Constant *CN, const TargetMachine &TM) const { + return (static_cast(TM).getSubtargetImpl()->useSmallSection() && LocalSData && IsInSmallSection(DL.getTypeAllocSize(CN->getType()))); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69f774302db816d7d0bc6b0b821abfc8a844636a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp @@ -0,0 +1,5 @@ +bool MipsTargetObjectFile::IsGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const { + if (GO->isDeclaration() || GO->hasAvailableExternallyLinkage()) + return IsGlobalInSmallSectionImpl(GO, TM); + return IsGlobalInSmallSection(GO, TM, getKindForGlobal(GO, TM)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3bf6ffdc320b495882842e7acb341a1969b06a0c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp @@ -0,0 +1,3 @@ +static bool IsInSmallSection(uint64_t Size) { + return Size > 0 && Size <= SSThreshold; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/CallLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/CallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90829bbc2f32e1f7018b1e63e73338c2bb6df8d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/CallLowering.cpp @@ -0,0 +1,2 @@ +MipsCallLowering::MipsCallLowering(const MipsTargetLowering &TLI) : CallLowering(&TLI) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..99874c4d2466cbcdbe62fc4abe7ad4b4a0994fb8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerCall.cpp @@ -0,0 +1,95 @@ +bool MipsCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const { + if (Info.CallConv != CallingConv::C) + return false; + for (auto &Arg : Info.OrigArgs) { + if (!isSupportedArgumentType(Arg.Ty)) + return false; + if (Arg.Flags[0].isByVal()) + return false; + if (Arg.Flags[0].isSRet() && !Arg.Ty->isPointerTy()) + return false; + } + if (!Info.OrigRet.Ty->isVoidTy() && !isSupportedReturnType(Info.OrigRet.Ty)) + return false; + MachineFunction &MF = MIRBuilder.getMF(); + const Function &F = MF.getFunction(); + const DataLayout &DL = MF.getDataLayout(); + const MipsTargetLowering &TLI = *getTLI(); + const MipsTargetMachine &TM = static_cast(MF.getTarget()); + const MipsABIInfo &ABI = TM.getABI(); + MachineInstrBuilder CallSeqStart = MIRBuilder.buildInstr(Mips::ADJCALLSTACKDOWN); + const bool IsCalleeGlobalPIC = Info.Callee.isGlobal() && TM.isPositionIndependent(); + MachineInstrBuilder MIB = MIRBuilder.buildInstrNoInsert(Info.Callee.isReg() || IsCalleeGlobalPIC ? Mips::JALRPseudo : Mips::JAL); + MIB.addDef(Mips::SP, RegState::Implicit); + if (IsCalleeGlobalPIC) { + Register CalleeReg = MF.getRegInfo().createGenericVirtualRegister(LLT::pointer(0, 32)); + MachineInstr *CalleeGlobalValue = MIRBuilder.buildGlobalValue(CalleeReg, Info.Callee.getGlobal()); + if (!Info.Callee.getGlobal()->hasLocalLinkage()) + CalleeGlobalValue->getOperand(1).setTargetFlags(MipsII::MO_GOT_CALL); + MIB.addUse(CalleeReg); + } + else + MIB.add(Info.Callee); + const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); + MIB.addRegMask(TRI->getCallPreservedMask(MF, F.getCallingConv())); + TargetLowering::ArgListTy FuncOrigArgs; + FuncOrigArgs.reserve(Info.OrigArgs.size()); + SmallVector ArgInfos; + SmallVector OrigArgIndices; + unsigned i = 0; + for (auto &Arg : Info.OrigArgs) { + TargetLowering::ArgListEntry Entry; + Entry.Ty = Arg.Ty; + FuncOrigArgs.push_back(Entry); + ArgInfos.push_back(Arg); + OrigArgIndices.push_back(i); + ++i; + } + SmallVector Outs; + subTargetRegTypeForCallingConv(F, ArgInfos, OrigArgIndices, Outs); + SmallVector ArgLocs; + bool IsCalleeVarArg = false; + if (Info.Callee.isGlobal()) { + const Function *CF = static_cast(Info.Callee.getGlobal()); + IsCalleeVarArg = CF->isVarArg(); + } + MipsCCState CCInfo(F.getCallingConv(), IsCalleeVarArg, MF, ArgLocs, F.getContext()); + CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(Info.CallConv), Align(1)); + const char *Call = Info.Callee.isSymbol() ? Info.Callee.getSymbolName() : nullptr; + CCInfo.AnalyzeCallOperands(Outs, TLI.CCAssignFnForCall(), FuncOrigArgs, Call); + setLocInfo(ArgLocs, Outs); + MipsOutgoingValueHandler RetHandler(MIRBuilder, MF.getRegInfo(), MIB); + if (!RetHandler.handle(ArgLocs, ArgInfos)) { + return false; + } + unsigned NextStackOffset = CCInfo.getNextStackOffset(); + const TargetFrameLowering *TFL = MF.getSubtarget().getFrameLowering(); + unsigned StackAlignment = TFL->getStackAlignment(); + NextStackOffset = alignTo(NextStackOffset, StackAlignment); + CallSeqStart.addImm(NextStackOffset).addImm(0); + if (IsCalleeGlobalPIC) { + MIRBuilder.buildCopy(Register(Mips::GP), MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)); + MIB.addDef(Mips::GP, RegState::Implicit); + } + MIRBuilder.insertInstr(MIB); + if (MIB->getOpcode() == Mips::JALRPseudo) { + const MipsSubtarget &STI = static_cast(MIRBuilder.getMF().getSubtarget()); + MIB.constrainAllUses(MIRBuilder.getTII(), *STI.getRegisterInfo(), *STI.getRegBankInfo()); + } + if (!Info.OrigRet.Ty->isVoidTy()) { + ArgInfos.clear(); + SmallVector OrigRetIndices; + splitToValueTypes(DL, Info.OrigRet, 0, ArgInfos, OrigRetIndices); + SmallVector Ins; + subTargetRegTypeForCallingConv(F, ArgInfos, OrigRetIndices, Ins); + SmallVector ArgLocs; + MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext()); + CCInfo.AnalyzeCallResult(Ins, TLI.CCAssignFnForReturn(), Info.OrigRet.Ty, Call); + setLocInfo(ArgLocs, Ins); + CallReturnHandler Handler(MIRBuilder, MF.getRegInfo(), MIB); + if (!Handler.handle(ArgLocs, ArgInfos)) + return false; + } + MIRBuilder.buildInstr(Mips::ADJCALLSTACKUP).addImm(NextStackOffset).addImm(0); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4868c10586ca16cd0b682161b6b5ac7e1e639036 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp @@ -0,0 +1,57 @@ +bool MipsCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef> VRegs, FunctionLoweringInfo &FLI) const { + if (F.arg_empty()) + return true; + for (auto &Arg : F.args()) { + if (!isSupportedArgumentType(Arg.getType())) + return false; + } + MachineFunction &MF = MIRBuilder.getMF(); + const DataLayout &DL = MF.getDataLayout(); + const MipsTargetLowering &TLI = *getTLI(); + SmallVector ArgInfos; + SmallVector OrigArgIndices; + unsigned i = 0; + for (auto &Arg : F.args()) { + ArgInfo AInfo(VRegs[i], Arg.getType()); + setArgFlags(AInfo, i + AttributeList::FirstArgIndex, DL, F); + ArgInfos.push_back(AInfo); + OrigArgIndices.push_back(i); + ++i; + } + SmallVector Ins; + subTargetRegTypeForCallingConv(F, ArgInfos, OrigArgIndices, Ins); + SmallVector ArgLocs; + MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext()); + const MipsTargetMachine &TM = static_cast(MF.getTarget()); + const MipsABIInfo &ABI = TM.getABI(); + CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(F.getCallingConv()), Align(1)); + CCInfo.AnalyzeFormalArguments(Ins, TLI.CCAssignFnForCall()); + setLocInfo(ArgLocs, Ins); + MipsIncomingValueHandler Handler(MIRBuilder, MF.getRegInfo()); + if (!Handler.handle(ArgLocs, ArgInfos)) + return false; + if (F.isVarArg()) { + ArrayRef ArgRegs = ABI.GetVarArgRegs(); + unsigned Idx = CCInfo.getFirstUnallocated(ArgRegs); + int VaArgOffset; + unsigned RegSize = 4; + if (ArgRegs.size() == Idx) + VaArgOffset = alignTo(CCInfo.getNextStackOffset(), RegSize); + else { + VaArgOffset = (int)ABI.GetCalleeAllocdArgSizeInBytes(CCInfo.getCallingConv()) - (int)(RegSize * (ArgRegs.size() - Idx)); + } + MachineFrameInfo &MFI = MF.getFrameInfo(); + int FI = MFI.CreateFixedObject(RegSize, VaArgOffset, true); + MF.getInfo()->setVarArgsFrameIndex(FI); + for (unsigned I = Idx; I < ArgRegs.size(); ++I, VaArgOffset += RegSize) { + MIRBuilder.getMBB().addLiveIn(ArgRegs[I]); + MachineInstrBuilder Copy = MIRBuilder.buildCopy(LLT::scalar(RegSize * 8), Register(ArgRegs[I])); + FI = MFI.CreateFixedObject(RegSize, VaArgOffset, true); + MachinePointerInfo MPO = MachinePointerInfo::getFixedStack(MF, FI); + MachineInstrBuilder FrameIndex = MIRBuilder.buildFrameIndex(LLT::pointer(MPO.getAddrSpace(), 32), FI); + MachineMemOperand *MMO = MF.getMachineMemOperand(MPO, MachineMemOperand::MOStore, RegSize, Align(RegSize)); + MIRBuilder.buildStore(Copy, FrameIndex, *MMO); + } + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66034aff8f85ce0f2fd76b08013c3be1992ec37d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/CallLowering/lowerReturn.cpp @@ -0,0 +1,28 @@ +bool MipsCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef VRegs, FunctionLoweringInfo &FLI) const { + MachineInstrBuilder Ret = MIRBuilder.buildInstrNoInsert(Mips::RetRA); + if (Val != nullptr && !isSupportedReturnType(Val->getType())) + return false; + if (!VRegs.empty()) { + MachineFunction &MF = MIRBuilder.getMF(); + const Function &F = MF.getFunction(); + const DataLayout &DL = MF.getDataLayout(); + const MipsTargetLowering &TLI = *getTLI(); + SmallVector RetInfos; + SmallVector OrigArgIndices; + ArgInfo ArgRetInfo(VRegs, Val->getType()); + setArgFlags(ArgRetInfo, AttributeList::ReturnIndex, DL, F); + splitToValueTypes(DL, ArgRetInfo, 0, RetInfos, OrigArgIndices); + SmallVector Outs; + subTargetRegTypeForCallingConv(F, RetInfos, OrigArgIndices, Outs); + SmallVector ArgLocs; + MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext()); + CCInfo.AnalyzeReturn(Outs, TLI.CCAssignFnForReturn()); + setLocInfo(ArgLocs, Outs); + MipsOutgoingValueHandler RetHandler(MIRBuilder, MF.getRegInfo(), Ret); + if (!RetHandler.handle(ArgLocs, RetInfos)) { + return false; + } + } + MIRBuilder.insertInstr(Ret); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b384d32685bad5866f04b66f1bea348030208c0d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +explicit MipsFrameLowering(const MipsSubtarget &sti, Align Alignment) : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) { +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/adjustReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/adjustReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/adjustReg.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c7be3a46a081dd318f6d9cb6c1c8652f9ee3d8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp @@ -0,0 +1,31 @@ +void MipsSEFrameLowering::determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const { + TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS); + const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + MipsABIInfo ABI = STI.getABI(); + unsigned RA = ABI.IsN64() ? Mips::RA_64 : Mips::RA; + unsigned FP = ABI.GetFramePtr(); + unsigned BP = ABI.IsN64() ? Mips::S7_64 : Mips::S7; + if (hasFP(MF)) { + setAliasRegs(MF, SavedRegs, RA); + setAliasRegs(MF, SavedRegs, FP); + } + if (hasBP(MF)) + setAliasRegs(MF, SavedRegs, BP); + if (MipsFI->callsEhReturn()) + MipsFI->createEhDataRegsFI(MF); + if (MipsFI->isISR()) + MipsFI->createISRRegFI(MF); + if (ExpandPseudo(MF).expand()) { + const TargetRegisterClass &RC = STI.isGP64bit() ? Mips::GPR64RegClass : Mips::GPR32RegClass; + int FI = MF.getFrameInfo().CreateStackObject(TRI->getSpillSize(RC), TRI->getSpillAlign(RC), false); + RS->addScavengingFrameIndex(FI); + } + uint64_t MaxSPOffset = estimateStackSize(MF); + if (isIntN(STI.hasMSA() ? 10 : 16, MaxSPOffset) && !MF.getFrameInfo().hasVarSizedObjects()) + return; + const TargetRegisterClass &RC = ABI.ArePtrs64bit() ? Mips::GPR64RegClass : Mips::GPR32RegClass; + int FI = MF.getFrameInfo().CreateStackObject(TRI->getSpillSize(RC),TRI->getSpillAlign(RC), false); + RS->addScavengingFrameIndex(FI); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b1f59ca8eacf87fd0c630d96c6589f6dca5e270 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,10 @@ +MachineBasicBlock::iterator MipsFrameLowering::eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { + unsigned SP = STI.getABI().IsN64() ? Mips::SP_64 : Mips::SP; + if (!hasReservedCallFrame(MF)) { + int64_t Amount = I->getOperand(0).getImm(); + if (I->getOpcode() == Mips::ADJCALLSTACKDOWN) + Amount = -Amount; + STI.getInstrInfo()->adjustStackPtr(SP, Amount, MBB, I); + } + return MBB.erase(I); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fecd648fee2494cb011a5cd242be9efbd0d7efe2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,35 @@ +void MipsSEFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + const MipsSEInstrInfo &TII = *static_cast(STI.getInstrInfo()); + const MipsRegisterInfo &RegInfo = *static_cast(STI.getRegisterInfo()); + DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); + MipsABIInfo ABI = STI.getABI(); + unsigned SP = ABI.GetStackPtr(); + unsigned FP = ABI.GetFramePtr(); + unsigned ZERO = ABI.GetNullPtr(); + unsigned MOVE = ABI.GetGPRMoveOp(); + if (hasFP(MF)) { + MachineBasicBlock::iterator I = MBBI; + for (unsigned i = 0; i < MFI.getCalleeSavedInfo().size(); ++i) + --I; + BuildMI(MBB, I, DL, TII.get(MOVE), SP).addReg(FP).addReg(ZERO); + } + if (MipsFI->callsEhReturn()) { + const TargetRegisterClass *RC = ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + MachineBasicBlock::iterator I = MBBI; + for (unsigned i = 0; i < MFI.getCalleeSavedInfo().size(); ++i) + --I; + for (int J = 0; J < 4; ++J) { + TII.loadRegFromStackSlot(MBB, I, ABI.GetEhDataReg(J), MipsFI->getEhDataRegFI(J), RC, &RegInfo); + } + } + if (MF.getFunction().hasFnAttribute("interrupt")) + emitInterruptEpilogueStub(MF, MBB); + uint64_t StackSize = MFI.getStackSize(); + if (!StackSize) + return; + TII.adjustStackPtr(SP, StackSize, MBB, MBBI); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04cc5f5bac4d52157c1c5891a8c7a3810d0c6ef0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,88 @@ +void MipsSEFrameLowering::emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + const MipsSEInstrInfo &TII = *static_cast(STI.getInstrInfo()); + const MipsRegisterInfo &RegInfo = *static_cast(STI.getRegisterInfo()); + MachineBasicBlock::iterator MBBI = MBB.begin(); + DebugLoc dl; + MipsABIInfo ABI = STI.getABI(); + unsigned SP = ABI.GetStackPtr(); + unsigned FP = ABI.GetFramePtr(); + unsigned ZERO = ABI.GetNullPtr(); + unsigned MOVE = ABI.GetGPRMoveOp(); + unsigned ADDiu = ABI.GetPtrAddiuOp(); + unsigned AND = ABI.IsN64() ? Mips::AND64 : Mips::AND; + const TargetRegisterClass *RC = ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + uint64_t StackSize = MFI.getStackSize(); + if (StackSize == 0 && !MFI.adjustsStack()) + return; + MachineModuleInfo &MMI = MF.getMMI(); + const MCRegisterInfo *MRI = MMI.getContext().getRegisterInfo(); + TII.adjustStackPtr(SP, -StackSize, MBB, MBBI); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, StackSize)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + if (MF.getFunction().hasFnAttribute("interrupt")) + emitInterruptPrologueStub(MF, MBB); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + if (!CSI.empty()) { + for (unsigned i = 0; i < CSI.size(); ++i) + ++MBBI; + for (std::vector::const_iterator I = CSI.begin(), E = CSI.end(); I != E; ++I) { + int64_t Offset = MFI.getObjectOffset(I->getFrameIdx()); + unsigned Reg = I->getReg(); + if (Mips::AFGR64RegClass.contains(Reg)) { + unsigned Reg0 = MRI->getDwarfRegNum(RegInfo.getSubReg(Reg, Mips::sub_lo), true); + unsigned Reg1 = MRI->getDwarfRegNum(RegInfo.getSubReg(Reg, Mips::sub_hi), true); + if (!STI.isLittle()) + std::swap(Reg0, Reg1); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg0, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg1, Offset + 4)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + else if (Mips::FGR64RegClass.contains(Reg)) { + unsigned Reg0 = MRI->getDwarfRegNum(Reg, true); + unsigned Reg1 = MRI->getDwarfRegNum(Reg, true) + 1; + if (!STI.isLittle()) + std::swap(Reg0, Reg1); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg0, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg1, Offset + 4)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + else { + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, MRI->getDwarfRegNum(Reg, true), Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + } + if (MipsFI->callsEhReturn()) { + for (int I = 0; I < 4; ++I) { + if (!MBB.isLiveIn(ABI.GetEhDataReg(I))) + MBB.addLiveIn(ABI.GetEhDataReg(I)); + TII.storeRegToStackSlot(MBB, MBBI, ABI.GetEhDataReg(I), false, MipsFI->getEhDataRegFI(I), RC, &RegInfo); + } + for (int I = 0; I < 4; ++I) { + int64_t Offset = MFI.getObjectOffset(MipsFI->getEhDataRegFI(I)); + unsigned Reg = MRI->getDwarfRegNum(ABI.GetEhDataReg(I), true); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + if (hasFP(MF)) { + BuildMI(MBB, MBBI, dl, TII.get(MOVE), FP).addReg(SP).addReg(ZERO).setMIFlag(MachineInstr::FrameSetup); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createDefCfaRegister( nullptr, MRI->getDwarfRegNum(FP, true))); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + if (RegInfo.needsStackRealignment(MF)) { + Register VR = MF.getRegInfo().createVirtualRegister(RC); + assert((Log2(MFI.getMaxAlign()) < 16) && "Function's alignment size requirement is not supported."); + int64_t MaxAlign = -(int64_t)MFI.getMaxAlign().value(); + BuildMI(MBB, MBBI, dl, TII.get(ADDiu), VR).addReg(ZERO).addImm(MaxAlign); + BuildMI(MBB, MBBI, dl, TII.get(AND), SP).addReg(SP).addReg(VR); + if (hasBP(MF)) { + unsigned BP = STI.isABI_N64() ? Mips::S7_64 : Mips::S7; + BuildMI(MBB, MBBI, dl, TII.get(MOVE), BP).addReg(SP).addReg(ZERO); + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96cd6c3b3e00e732bf4cc98667e6b6cc7d664c40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp @@ -0,0 +1,9 @@ +StackOffset MipsSEFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsABIInfo ABI = STI.getABI(); + if (MFI.isFixedObjectIndex(FI)) + FrameReg = hasFP(MF) ? ABI.GetFramePtr() : ABI.GetStackPtr(); + else + FrameReg = hasBP(MF) ? ABI.GetBasePtr() : ABI.GetStackPtr(); + return StackOffset::getFixed(MFI.getObjectOffset(FI) + MFI.getStackSize() - getOffsetOfLocalArea() + MFI.getOffsetAdjustment()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasBP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasBP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a6469c7a278c038c82567ff8856bedb6dadf7202 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasBP.cpp @@ -0,0 +1,5 @@ +bool MipsFrameLowering::hasBP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + return MFI.hasVarSizedObjects() && TRI->needsStackRealignment(MF); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2984a24fb87e41d561111fe745a031a4ae00d2f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,5 @@ +bool MipsFrameLowering::hasFP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + return MF.getTarget().Options.DisableFramePointerElim(MF) || MFI.hasVarSizedObjects() || MFI.isFrameAddressTaken() || TRI->needsStackRealignment(MF); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97a97d73efcd689066a40c08ef80ad03f0f94706 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp @@ -0,0 +1,4 @@ +bool MipsSEFrameLowering::hasReservedCallFrame(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + return isInt<16>(MFI.getMaxCallFrameSize() + getStackAlignment()) && !MFI.hasVarSizedObjects(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39a52f6a3ffb6bddaec5669406257eaaf8382c20 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,3 @@ +bool Mips16FrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef CSI, const TargetRegisterInfo *TRI) const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7ccdfa1edf7514e9f46b468c4a170614877a6c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,29 @@ +bool MipsSEFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef CSI, const TargetRegisterInfo *TRI) const { + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *STI.getInstrInfo(); + for (unsigned i = 0, e = CSI.size(); i != e; ++i) { + unsigned Reg = CSI[i].getReg(); + bool IsRAAndRetAddrIsTaken = (Reg == Mips::RA || Reg == Mips::RA_64) && MF->getFrameInfo().isReturnAddressTaken(); + if (!IsRAAndRetAddrIsTaken) + MBB.addLiveIn(Reg); + bool IsLOHI = (Reg == Mips::LO0 || Reg == Mips::LO0_64 || Reg == Mips::HI0 || Reg == Mips::HI0_64); + const Function &Func = MBB.getParent()->getFunction(); + if (IsLOHI && Func.hasFnAttribute("interrupt")) { + DebugLoc DL = MI->getDebugLoc(); + unsigned Op = 0; + if (!STI.getABI().ArePtrs64bit()) { + Op = (Reg == Mips::HI0) ? Mips::MFHI : Mips::MFLO; + Reg = Mips::K0; + } + else { + Op = (Reg == Mips::HI0) ? Mips::MFHI64 : Mips::MFLO64; + Reg = Mips::K0_64; + } + BuildMI(MBB, MI, DL, TII.get(Op), Mips::K0).setMIFlag(MachineInstr::FrameSetup); + } + bool IsKill = !IsRAAndRetAddrIsTaken; + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.storeRegToStackSlot(MBB, MI, Reg, IsKill, CSI[i].getFrameIdx(), RC, TRI); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a7fcbbf66a18053cbb09eb170938804acb78987 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +explicit MipsSEDAGToDAGISel(MipsTargetMachine &TM, CodeGenOpt::Level OL) : MipsDAGToDAGISel(TM, OL) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d342f74eef8e6835cb6a33677db55fb78cb5d785 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,50 @@ +bool MipsSEDAGToDAGISel::SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, std::vector &OutOps) { + SDValue Base, Offset; + switch(ConstraintID) { + default: + llvm_unreachable("Unexpected asm memory constraint"); + case InlineAsm::Constraint_m: + case InlineAsm::Constraint_o: + if (selectAddrRegImm16(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + case InlineAsm::Constraint_R: + if (selectAddrRegImm9(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + case InlineAsm::Constraint_ZC: + if (Subtarget->inMicroMipsMode()) { + if (selectAddrRegImm12(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + } + else if (Subtarget->hasMips32r6()) { + if (selectAddrRegImm9(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + } + else if (selectAddrRegImm16(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36e8855eb544200582451f8c21a565df6b7b9a48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createMipsSEISelDag(MipsTargetMachine &TM, CodeGenOpt::Level OptLevel) { + return new MipsSEDAGToDAGISel(TM, OptLevel); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5049e898a5b33a064ed6484e2e7cf1667997bef8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "MIPS DAG->DAG Pattern Instruction Selection"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23043d2db6c9d6e9b1f35cdf3b44609cf5975340 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp @@ -0,0 +1,7 @@ +bool MipsModuleDAGToDAGISel::runOnMachineFunction(MachineFunction &MF) { + LLVM_DEBUG(errs() << "In MipsModuleDAGToDAGISel::runMachineFunction\n"); + auto &TPC = getAnalysis(); + auto &TM = TPC.getTM(); + TM.resetSubtarget(&MF); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ddc959d5cec6fb8668b07d516cd6e866a0989a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp @@ -0,0 +1,14 @@ +bool MipsSEDAGToDAGISel::selectVSplat(SDNode *N, APInt &Imm, unsigned MinSizeInBits) const { + if (!Subtarget->hasMSA()) + return false; + BuildVectorSDNode *Node = dyn_cast(N); + if (!Node) + return false; + APInt SplatValue, SplatUndef; + unsigned SplatBitSize; + bool HasAnyUndefs; + if (!Node->isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs, MinSizeInBits, !Subtarget->isLittle())) + return false; + Imm = SplatValue; + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e86a8153fbab9c79b9ea14bfbc050c061ff370fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp @@ -0,0 +1,4 @@ +bool MipsDAGToDAGISel::selectVSplatSimm5(SDValue N, SDValue &Imm) const { + llvm_unreachable("Unimplemented function."); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..02c4b950f0aa45a72a3ed3b1bce2af4f5eb6cd6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp @@ -0,0 +1,4 @@ +bool MipsDAGToDAGISel::selectVSplatUimm5(SDValue N, SDValue &Imm) const { + llvm_unreachable("Unimplemented function."); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e857257cc58f086519f5aa8fb47b84c794ac83d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,5 @@ +bool MipsTargetLowering::CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg, const SmallVectorImpl &Outs, LLVMContext &Context) const { + SmallVector RVLocs; + MipsCCState CCInfo(CallConv, IsVarArg, MF, RVLocs, Context); + return CCInfo.CheckReturn(Outs, RetCC_Mips); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7a577133ff50ac6ce86af208c82aec90f270744 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,154 @@ +MachineBasicBlock *MipsTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *BB) const { + switch (MI.getOpcode()) { + default: + llvm_unreachable("Unexpected instr type to insert"); + case Mips::ATOMIC_LOAD_ADD_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_ADD_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_ADD_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_ADD_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_AND_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_AND_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_AND_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_AND_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_OR_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_OR_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_OR_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_OR_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_XOR_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_XOR_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_XOR_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_XOR_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_NAND_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_NAND_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_NAND_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_NAND_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_SUB_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_SUB_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_SUB_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_SUB_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_SWAP_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_SWAP_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_SWAP_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_SWAP_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_CMP_SWAP_I8: + return emitAtomicCmpSwapPartword(MI, BB, 1); + case Mips::ATOMIC_CMP_SWAP_I16: + return emitAtomicCmpSwapPartword(MI, BB, 2); + case Mips::ATOMIC_CMP_SWAP_I32: + return emitAtomicCmpSwap(MI, BB); + case Mips::ATOMIC_CMP_SWAP_I64: + return emitAtomicCmpSwap(MI, BB); + case Mips::ATOMIC_LOAD_MIN_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_MIN_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_MIN_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MIN_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MAX_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_MAX_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_MAX_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MAX_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMIN_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_UMIN_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_UMIN_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMIN_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMAX_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_UMAX_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_UMAX_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMAX_I64: + return emitAtomicBinary(MI, BB); + case Mips::PseudoSDIV: + case Mips::PseudoUDIV: + case Mips::DIV: + case Mips::DIVU: + case Mips::MOD: + case Mips::MODU: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), false, false); + case Mips::SDIV_MM_Pseudo: + case Mips::UDIV_MM_Pseudo: + case Mips::SDIV_MM: + case Mips::UDIV_MM: + case Mips::DIV_MMR6: + case Mips::DIVU_MMR6: + case Mips::MOD_MMR6: + case Mips::MODU_MMR6: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), false, true); + case Mips::PseudoDSDIV: + case Mips::PseudoDUDIV: + case Mips::DDIV: + case Mips::DDIVU: + case Mips::DMOD: + case Mips::DMODU: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), true, false); + case Mips::PseudoSELECT_I: + case Mips::PseudoSELECT_I64: + case Mips::PseudoSELECT_S: + case Mips::PseudoSELECT_D32: + case Mips::PseudoSELECT_D64: + return emitPseudoSELECT(MI, BB, false, Mips::BNE); + case Mips::PseudoSELECTFP_F_I: + case Mips::PseudoSELECTFP_F_I64: + case Mips::PseudoSELECTFP_F_S: + case Mips::PseudoSELECTFP_F_D32: + case Mips::PseudoSELECTFP_F_D64: + return emitPseudoSELECT(MI, BB, true, Mips::BC1F); + case Mips::PseudoSELECTFP_T_I: + case Mips::PseudoSELECTFP_T_I64: + case Mips::PseudoSELECTFP_T_S: + case Mips::PseudoSELECTFP_T_D32: + case Mips::PseudoSELECTFP_T_D64: + return emitPseudoSELECT(MI, BB, true, Mips::BC1T); + case Mips::PseudoD_SELECT_I: + case Mips::PseudoD_SELECT_I64: + return emitPseudoD_SELECT(MI, BB); + case Mips::LDR_W: + return emitLDR_W(MI, BB); + case Mips::LDR_D: + return emitLDR_D(MI, BB); + case Mips::STR_W: + return emitSTR_W(MI, BB); + case Mips::STR_D: + return emitSTR_D(MI, BB); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a35f0f7b2528752ec8bf1cb35bc8dac3d13de61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp @@ -0,0 +1,86 @@ +void MipsTargetLowering::LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector&Ops, SelectionDAG &DAG) const { + SDLoc DL(Op); + SDValue Result; + if (Constraint.length() > 1) + return; + char ConstraintLetter = Constraint[0]; + switch (ConstraintLetter) { + default: + break; + case 'I': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if (isInt<16>(Val)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'J': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getZExtValue(); + if (Val == 0) { + Result = DAG.getTargetConstant(0, DL, Type); + break; + } + } + return; + case 'K': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + uint64_t Val = (uint64_t)C->getZExtValue(); + if (isUInt<16>(Val)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'L': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((isInt<32>(Val)) && ((Val & 0xffff) == 0)){ + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'N': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((Val >= -65535) && (Val <= -1)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'O': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((isInt<15>(Val))) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + case 'P': + if (ConstantSDNode *C = dyn_cast(Op)) { + EVT Type = Op.getValueType(); + int64_t Val = C->getSExtValue(); + if ((Val <= 65535) && (Val >= 1)) { + Result = DAG.getTargetConstant(Val, DL, Type); + break; + } + } + return; + } + if (Result.getNode()) { + Ops.push_back(Result); + return; + } + TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63faa865e7326bef8f45aeceafcb0fa0a1c608eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { + BlockAddressSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e452e8db8b1f84d438f35752f0c4f697f1ca6bd3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,194 @@ +SDValue MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl &InVals) const { + SelectionDAG &DAG = CLI.DAG; + SDLoc DL = CLI.DL; + SmallVectorImpl &Outs = CLI.Outs; + SmallVectorImpl &OutVals = CLI.OutVals; + SmallVectorImpl &Ins = CLI.Ins; + SDValue Chain = CLI.Chain; + SDValue Callee = CLI.Callee; + bool &IsTailCall = CLI.IsTailCall; + CallingConv::ID CallConv = CLI.CallConv; + bool IsVarArg = CLI.IsVarArg; + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetFrameLowering *TFL = Subtarget.getFrameLowering(); + MipsFunctionInfo *FuncInfo = MF.getInfo(); + bool IsPIC = isPositionIndependent(); + SmallVector ArgLocs; + MipsCCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), ArgLocs, *DAG.getContext(), MipsCCState::getSpecialCallingConvForCallee(Callee.getNode(), Subtarget)); + const ExternalSymbolSDNode *ES = dyn_cast_or_null(Callee.getNode()); + bool MemcpyInByVal = ES && StringRef(ES->getSymbol()) == StringRef("memcpy") && CallConv != CallingConv::Fast && Chain.getOpcode() == ISD::CALLSEQ_START; + unsigned ReservedArgArea = MemcpyInByVal ? 0 : ABI.GetCalleeAllocdArgSizeInBytes(CallConv); + CCInfo.AllocateStack(ReservedArgArea, Align(1)); + CCInfo.AnalyzeCallOperands(Outs, CC_Mips, CLI.getArgs(), ES ? ES->getSymbol() : nullptr); + unsigned NextStackOffset = CCInfo.getNextStackOffset(); + MachineFunction::CallSiteInfo CSInfo; + bool InternalLinkage = false; + if (IsTailCall) { + IsTailCall = isEligibleForTailCallOptimization(CCInfo, NextStackOffset, *MF.getInfo()); + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + InternalLinkage = G->getGlobal()->hasInternalLinkage(); + IsTailCall &= (InternalLinkage || G->getGlobal()->hasLocalLinkage() || G->getGlobal()->hasPrivateLinkage() || G->getGlobal()->hasHiddenVisibility() || G->getGlobal()->hasProtectedVisibility()); + } + } + if (!IsTailCall && CLI.CB && CLI.CB->isMustTailCall()) + report_fatal_error("failed to perform tail call elimination on a call site marked musttail"); + if (IsTailCall) + ++NumTailCalls; + unsigned StackAlignment = TFL->getStackAlignment(); + NextStackOffset = alignTo(NextStackOffset, StackAlignment); + SDValue NextStackOffsetVal = DAG.getIntPtrConstant(NextStackOffset, DL, true); + if (!(IsTailCall || MemcpyInByVal)) + Chain = DAG.getCALLSEQ_START(Chain, NextStackOffset, 0, DL); + SDValue StackPtr = DAG.getCopyFromReg(Chain, DL, ABI.IsN64() ? Mips::SP_64 : Mips::SP, getPointerTy(DAG.getDataLayout())); + std::deque> RegsToPass; + SmallVector MemOpChains; + CCInfo.rewindByValRegsInfo(); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + SDValue Arg = OutVals[i]; + CCValAssign &VA = ArgLocs[i]; + MVT ValVT = VA.getValVT(), LocVT = VA.getLocVT(); + ISD::ArgFlagsTy Flags = Outs[i].Flags; + bool UseUpperBits = false; + if (Flags.isByVal()) { + unsigned FirstByValReg, LastByValReg; + unsigned ByValIdx = CCInfo.getInRegsParamsProcessed(); + CCInfo.getInRegsParamInfo(ByValIdx, FirstByValReg, LastByValReg); + assert(Flags.getByValSize() && "ByVal args of size 0 should have been ignored by front-end."); + assert(ByValIdx < CCInfo.getInRegsParamsCount()); + assert(!IsTailCall && "Do not tail-call optimize if there is a byval argument."); + passByValArg(Chain, DL, RegsToPass, MemOpChains, StackPtr, MFI, DAG, Arg, FirstByValReg, LastByValReg, Flags, Subtarget.isLittle(), VA); + CCInfo.nextInRegsParam(); + continue; + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: + if (VA.isRegLoc()) { + if ((ValVT == MVT::f32 && LocVT == MVT::i32) || (ValVT == MVT::f64 && LocVT == MVT::i64) || (ValVT == MVT::i64 && LocVT == MVT::f64)) + Arg = DAG.getNode(ISD::BITCAST, DL, LocVT, Arg); + else if (ValVT == MVT::f64 && LocVT == MVT::i32) { + SDValue Lo = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Arg, DAG.getConstant(0, DL, MVT::i32)); + SDValue Hi = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Arg, DAG.getConstant(1, DL, MVT::i32)); + if (!Subtarget.isLittle()) + std::swap(Lo, Hi); + Register LocRegLo = VA.getLocReg(); + unsigned LocRegHigh = getNextIntArgReg(LocRegLo); + RegsToPass.push_back(std::make_pair(LocRegLo, Lo)); + RegsToPass.push_back(std::make_pair(LocRegHigh, Hi)); + continue; + } + } + break; + case CCValAssign::BCvt: + Arg = DAG.getNode(ISD::BITCAST, DL, LocVT, Arg); + break; + case CCValAssign::SExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::SExt: + Arg = DAG.getNode(ISD::SIGN_EXTEND, DL, LocVT, Arg); + break; + case CCValAssign::ZExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::ZExt: + Arg = DAG.getNode(ISD::ZERO_EXTEND, DL, LocVT, Arg); + break; + case CCValAssign::AExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::AExt: + Arg = DAG.getNode(ISD::ANY_EXTEND, DL, LocVT, Arg); + break; + } + if (UseUpperBits) { + unsigned ValSizeInBits = Outs[i].ArgVT.getSizeInBits(); + unsigned LocSizeInBits = VA.getLocVT().getSizeInBits(); + Arg = DAG.getNode(ISD::SHL, DL, VA.getLocVT(), Arg, DAG.getConstant(LocSizeInBits - ValSizeInBits, DL, VA.getLocVT())); + } + if (VA.isRegLoc()) { + RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); + if (Mips::AFGR64RegClass.contains(VA.getLocReg())) + continue; + const TargetOptions &Options = DAG.getTarget().Options; + if (Options.SupportsDebugEntryValues) + CSInfo.emplace_back(VA.getLocReg(), i); + continue; + } + assert(VA.isMemLoc()); + MemOpChains.push_back(passArgOnStack(StackPtr, VA.getLocMemOffset(), Chain, Arg, DL, IsTailCall, DAG)); + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, MemOpChains); + EVT Ty = Callee.getValueType(); + bool GlobalOrExternal = false, IsCallReloc = false; + if (!Subtarget.isABICalls() && !IsPIC) { + if (auto *N = dyn_cast(Callee)) { + if (Subtarget.useLongCalls()) + Callee = Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + else if (auto *N = dyn_cast(Callee)) { + bool UseLongCalls = Subtarget.useLongCalls(); + if (auto *F = dyn_cast(N->getGlobal())) { + if (F->hasFnAttribute("long-call")) + UseLongCalls = true; + else if (F->hasFnAttribute("short-call")) + UseLongCalls = false; + } + if (UseLongCalls) + Callee = Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + } + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + if (IsPIC) { + const GlobalValue *Val = G->getGlobal(); + InternalLinkage = Val->hasInternalLinkage(); + if (InternalLinkage) + Callee = getAddrLocal(G, DL, Ty, DAG, ABI.IsN32() || ABI.IsN64()); + else if (Subtarget.useXGOT()) { + Callee = getAddrGlobalLargeGOT(G, DL, Ty, DAG, MipsII::MO_CALL_HI16, MipsII::MO_CALL_LO16, Chain, FuncInfo->callPtrInfo(MF, Val)); + IsCallReloc = true; + } + else { + Callee = getAddrGlobal(G, DL, Ty, DAG, MipsII::MO_GOT_CALL, Chain, FuncInfo->callPtrInfo(MF, Val)); + IsCallReloc = true; + } + } + else + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), DL, getPointerTy(DAG.getDataLayout()), 0, MipsII::MO_NO_FLAG); + GlobalOrExternal = true; + } + else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { + const char *Sym = S->getSymbol(); + if (!IsPIC) + Callee = DAG.getTargetExternalSymbol( Sym, getPointerTy(DAG.getDataLayout()), MipsII::MO_NO_FLAG); + else if (Subtarget.useXGOT()) { + Callee = getAddrGlobalLargeGOT(S, DL, Ty, DAG, MipsII::MO_CALL_HI16, MipsII::MO_CALL_LO16, Chain, FuncInfo->callPtrInfo(MF, Sym)); + IsCallReloc = true; + } + else { + Callee = getAddrGlobal(S, DL, Ty, DAG, MipsII::MO_GOT_CALL, Chain, FuncInfo->callPtrInfo(MF, Sym)); + IsCallReloc = true; + } + GlobalOrExternal = true; + } + SmallVector Ops(1, Chain); + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); + getOpndList(Ops, RegsToPass, IsPIC, GlobalOrExternal, InternalLinkage, IsCallReloc, CLI, Callee, Chain); + if (IsTailCall) { + MF.getFrameInfo().setHasTailCall(); + SDValue Ret = DAG.getNode(MipsISD::TailCall, DL, MVT::Other, Ops); + DAG.addCallSiteInfo(Ret.getNode(), std::move(CSInfo)); + return Ret; + } + Chain = DAG.getNode(MipsISD::JmpLink, DL, NodeTys, Ops); + SDValue InFlag = Chain.getValue(1); + DAG.addCallSiteInfo(Chain.getNode(), std::move(CSInfo)); + if (!(MemcpyInByVal)) { + Chain = DAG.getCALLSEQ_END(Chain, NextStackOffsetVal, DAG.getIntPtrConstant(0, DL, true), InFlag, DL); + InFlag = Chain.getValue(1); + } + return LowerCallResult(Chain, InFlag, CallConv, IsVarArg, Ins, DL, DAG, InVals, CLI); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a118c8fea23e323e770a810738ac56de09cca15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,11 @@ +SDValue MipsTargetLowering::lowerConstantPool(SDValue Op, SelectionDAG &DAG) const { + ConstantPoolSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) { + const MipsTargetObjectFile *TLOF = static_cast(getTargetMachine().getObjFileLowering()); + if (TLOF->IsConstantInSmallSection(DAG.getDataLayout(), N->getConstVal(), getTargetMachine())) + return getAddrGPRel(N, SDLoc(N), Ty, DAG, ABI.IsN64()); + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55304c0e002c25426cac915e340d397c57564694 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,12 @@ +SDValue MipsTargetLowering::lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { + if (cast(Op.getOperand(0))->getZExtValue() != 0) { + DAG.getContext()->emitError("return address can be determined only for current frame"); + return SDValue(); + } + MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo(); + MFI.setFrameAddressIsTaken(true); + EVT VT = Op.getValueType(); + SDLoc DL(Op); + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), DL, ABI.IsN64() ? Mips::FP_64 : Mips::FP, VT); + return FrameAddr; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbb9efff7eb46b474008aab70f4ce03c006a5618 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,90 @@ +SDValue MipsTargetLowering::LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Ins, const SDLoc &DL, SelectionDAG &DAG, SmallVectorImpl &InVals) const { + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + MipsFI->setVarArgsFrameIndex(0); + std::vector OutChains; + SmallVector ArgLocs; + MipsCCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), ArgLocs, *DAG.getContext()); + CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(CallConv), Align(1)); + const Function &Func = DAG.getMachineFunction().getFunction(); + Function::const_arg_iterator FuncArg = Func.arg_begin(); + if (Func.hasFnAttribute("interrupt") && !Func.arg_empty()) + report_fatal_error("Functions with the interrupt attribute cannot have arguments!"); + CCInfo.AnalyzeFormalArguments(Ins, CC_Mips_FixedArg); + MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(), CCInfo.getInRegsParamsCount() > 0); + unsigned CurArgIdx = 0; + CCInfo.rewindByValRegsInfo(); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + if (Ins[i].isOrigArg()) { + std::advance(FuncArg, Ins[i].getOrigArgIndex() - CurArgIdx); + CurArgIdx = Ins[i].getOrigArgIndex(); + } + EVT ValVT = VA.getValVT(); + ISD::ArgFlagsTy Flags = Ins[i].Flags; + bool IsRegLoc = VA.isRegLoc(); + if (Flags.isByVal()) { + assert(Ins[i].isOrigArg() && "Byval arguments cannot be implicit"); + unsigned FirstByValReg, LastByValReg; + unsigned ByValIdx = CCInfo.getInRegsParamsProcessed(); + CCInfo.getInRegsParamInfo(ByValIdx, FirstByValReg, LastByValReg); + assert(Flags.getByValSize() && "ByVal args of size 0 should have been ignored by front-end."); + assert(ByValIdx < CCInfo.getInRegsParamsCount()); + copyByValRegs(Chain, DL, OutChains, DAG, Flags, InVals, &*FuncArg, FirstByValReg, LastByValReg, VA, CCInfo); + CCInfo.nextInRegsParam(); + continue; + } + if (IsRegLoc) { + MVT RegVT = VA.getLocVT(); + Register ArgReg = VA.getLocReg(); + const TargetRegisterClass *RC = getRegClassFor(RegVT); + unsigned Reg = addLiveIn(DAG.getMachineFunction(), ArgReg, RC); + SDValue ArgValue = DAG.getCopyFromReg(Chain, DL, Reg, RegVT); + ArgValue = UnpackFromArgumentSlot(ArgValue, VA, Ins[i].ArgVT, DL, DAG); + if ((RegVT == MVT::i32 && ValVT == MVT::f32) || (RegVT == MVT::i64 && ValVT == MVT::f64) || (RegVT == MVT::f64 && ValVT == MVT::i64)) + ArgValue = DAG.getNode(ISD::BITCAST, DL, ValVT, ArgValue); + else if (ABI.IsO32() && RegVT == MVT::i32 && ValVT == MVT::f64) { + unsigned Reg2 = addLiveIn(DAG.getMachineFunction(), getNextIntArgReg(ArgReg), RC); + SDValue ArgValue2 = DAG.getCopyFromReg(Chain, DL, Reg2, RegVT); + if (!Subtarget.isLittle()) + std::swap(ArgValue, ArgValue2); + ArgValue = DAG.getNode(MipsISD::BuildPairF64, DL, MVT::f64, ArgValue, ArgValue2); + } + InVals.push_back(ArgValue); + } + else { + MVT LocVT = VA.getLocVT(); + if (ABI.IsO32()) { + if (VA.getValVT().isFloatingPoint() && !Subtarget.useSoftFloat()) + LocVT = VA.getValVT(); + } + assert(VA.isMemLoc()); + int FI = MFI.CreateFixedObject(LocVT.getSizeInBits() / 8, VA.getLocMemOffset(), true); + SDValue FIN = DAG.getFrameIndex(FI, getPointerTy(DAG.getDataLayout())); + SDValue ArgValue = DAG.getLoad(LocVT, DL, Chain, FIN, MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FI)); + OutChains.push_back(ArgValue.getValue(1)); + ArgValue = UnpackFromArgumentSlot(ArgValue, VA, Ins[i].ArgVT, DL, DAG); + InVals.push_back(ArgValue); + } + } + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + if (Ins[i].Flags.isSRet()) { + unsigned Reg = MipsFI->getSRetReturnReg(); + if (!Reg) { + Reg = MF.getRegInfo().createVirtualRegister(getRegClassFor(ABI.IsN64() ? MVT::i64 : MVT::i32)); + MipsFI->setSRetReturnReg(Reg); + } + SDValue Copy = DAG.getCopyToReg(DAG.getEntryNode(), DL, Reg, InVals[i]); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Copy, Chain); + break; + } + } + if (IsVarArg) + writeVarArgRegs(OutChains, Chain, DL, DAG, CCInfo); + if (!OutChains.empty()) { + OutChains.push_back(Chain); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, OutChains); + } + return Chain; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3bc241861141aeaf0155e6e05b289a3c4232fdc8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,17 @@ +SDValue MipsTargetLowering::lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { + EVT Ty = Op.getValueType(); + GlobalAddressSDNode *N = cast(Op); + const GlobalValue *GV = N->getGlobal(); + if (!isPositionIndependent()) { + const MipsTargetObjectFile *TLOF = static_cast(getTargetMachine().getObjFileLowering()); + const GlobalObject *GO = GV->getBaseObject(); + if (GO && TLOF->IsGlobalInSmallSection(GO, getTargetMachine())) + return getAddrGPRel(N, SDLoc(N), Ty, DAG, ABI.IsN64()); + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + if (GV->hasLocalLinkage()) + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); + if (Subtarget.useXGOT()) + return getAddrGlobalLargeGOT(N, SDLoc(N), Ty, DAG, MipsII::MO_GOT_HI16, MipsII::MO_GOT_LO16, DAG.getEntryNode(), MachinePointerInfo::getGOT(DAG.getMachineFunction())); + return getAddrGlobal(N, SDLoc(N), Ty, DAG, (ABI.IsN32() || ABI.IsN64()) ? MipsII::MO_GOT_DISP : MipsII::MO_GOT, DAG.getEntryNode(), MachinePointerInfo::getGOT(DAG.getMachineFunction())); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40d4302abbe9ff053b9574dac4d63cd2fbc144cf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,50 @@ +SDValue MipsTargetLowering::lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { + GlobalAddressSDNode *GA = cast(Op); + if (DAG.getTarget().useEmulatedTLS()) + return LowerToTLSEmulatedModel(GA, DAG); + SDLoc DL(GA); + const GlobalValue *GV = GA->getGlobal(); + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + TLSModel::Model model = getTargetMachine().getTLSModel(GV); + if (model == TLSModel::GeneralDynamic || model == TLSModel::LocalDynamic) { + unsigned Flag = (model == TLSModel::LocalDynamic) ? MipsII::MO_TLSLDM : MipsII::MO_TLSGD; + SDValue TGA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, Flag); + SDValue Argument = DAG.getNode(MipsISD::Wrapper, DL, PtrVT, getGlobalReg(DAG, PtrVT), TGA); + unsigned PtrSize = PtrVT.getSizeInBits(); + IntegerType *PtrTy = Type::getIntNTy(*DAG.getContext(), PtrSize); + SDValue TlsGetAddr = DAG.getExternalSymbol("__tls_get_addr", PtrVT); + ArgListTy Args; + ArgListEntry Entry; + Entry.Node = Argument; + Entry.Ty = PtrTy; + Args.push_back(Entry); + TargetLowering::CallLoweringInfo CLI(DAG); + CLI.setDebugLoc(DL).setChain(DAG.getEntryNode()).setLibCallee(CallingConv::C, PtrTy, TlsGetAddr, std::move(Args)); + std::pair CallResult = LowerCallTo(CLI); + SDValue Ret = CallResult.first; + if (model != TLSModel::LocalDynamic) + return Ret; + SDValue TGAHi = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_DTPREL_HI); + SDValue Hi = DAG.getNode(MipsISD::TlsHi, DL, PtrVT, TGAHi); + SDValue TGALo = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_DTPREL_LO); + SDValue Lo = DAG.getNode(MipsISD::Lo, DL, PtrVT, TGALo); + SDValue Add = DAG.getNode(ISD::ADD, DL, PtrVT, Hi, Ret); + return DAG.getNode(ISD::ADD, DL, PtrVT, Add, Lo); + } + SDValue Offset; + if (model == TLSModel::InitialExec) { + SDValue TGA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_GOTTPREL); + TGA = DAG.getNode(MipsISD::Wrapper, DL, PtrVT, getGlobalReg(DAG, PtrVT),TGA); + Offset = DAG.getLoad(PtrVT, DL, DAG.getEntryNode(), TGA, MachinePointerInfo()); + } + else { + assert(model == TLSModel::LocalExec); + SDValue TGAHi = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_TPREL_HI); + SDValue TGALo = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_TPREL_LO); + SDValue Hi = DAG.getNode(MipsISD::TlsHi, DL, PtrVT, TGAHi); + SDValue Lo = DAG.getNode(MipsISD::Lo, DL, PtrVT, TGALo); + Offset = DAG.getNode(ISD::ADD, DL, PtrVT, Hi, Lo); + } + SDValue ThreadPointer = DAG.getNode(MipsISD::ThreadPointer, DL, PtrVT); + return DAG.getNode(ISD::ADD, DL, PtrVT, ThreadPointer, Offset); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..150e8c0e72027acdaeeb3a046260a9210d8c6e7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,601 @@ +SDValue MipsSETargetLowering::lowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + unsigned Intrinsic = cast(Op->getOperand(0))->getZExtValue(); + switch (Intrinsic) { + default: + return SDValue(); + case Intrinsic::mips_shilo: + return lowerDSPIntr(Op, DAG, MipsISD::SHILO); + case Intrinsic::mips_dpau_h_qbl: + return lowerDSPIntr(Op, DAG, MipsISD::DPAU_H_QBL); + case Intrinsic::mips_dpau_h_qbr: + return lowerDSPIntr(Op, DAG, MipsISD::DPAU_H_QBR); + case Intrinsic::mips_dpsu_h_qbl: + return lowerDSPIntr(Op, DAG, MipsISD::DPSU_H_QBL); + case Intrinsic::mips_dpsu_h_qbr: + return lowerDSPIntr(Op, DAG, MipsISD::DPSU_H_QBR); + case Intrinsic::mips_dpa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPA_W_PH); + case Intrinsic::mips_dps_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPS_W_PH); + case Intrinsic::mips_dpax_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAX_W_PH); + case Intrinsic::mips_dpsx_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSX_W_PH); + case Intrinsic::mips_mulsa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::MULSA_W_PH); + case Intrinsic::mips_mult: + return lowerDSPIntr(Op, DAG, MipsISD::Mult); + case Intrinsic::mips_multu: + return lowerDSPIntr(Op, DAG, MipsISD::Multu); + case Intrinsic::mips_madd: + return lowerDSPIntr(Op, DAG, MipsISD::MAdd); + case Intrinsic::mips_maddu: + return lowerDSPIntr(Op, DAG, MipsISD::MAddu); + case Intrinsic::mips_msub: + return lowerDSPIntr(Op, DAG, MipsISD::MSub); + case Intrinsic::mips_msubu: + return lowerDSPIntr(Op, DAG, MipsISD::MSubu); + case Intrinsic::mips_addv_b: + case Intrinsic::mips_addv_h: + case Intrinsic::mips_addv_w: + case Intrinsic::mips_addv_d: + return DAG.getNode(ISD::ADD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_addvi_b: + case Intrinsic::mips_addvi_h: + case Intrinsic::mips_addvi_w: + case Intrinsic::mips_addvi_d: + return DAG.getNode(ISD::ADD, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_and_v: + return DAG.getNode(ISD::AND, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_andi_b: + return DAG.getNode(ISD::AND, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_bclr_b: + case Intrinsic::mips_bclr_h: + case Intrinsic::mips_bclr_w: + case Intrinsic::mips_bclr_d: + return lowerMSABitClear(Op, DAG); + case Intrinsic::mips_bclri_b: + case Intrinsic::mips_bclri_h: + case Intrinsic::mips_bclri_w: + case Intrinsic::mips_bclri_d: + return lowerMSABitClearImm(Op, DAG); + case Intrinsic::mips_binsli_b: + case Intrinsic::mips_binsli_h: + case Intrinsic::mips_binsli_w: + case Intrinsic::mips_binsli_d: { + EVT VecTy = Op->getValueType(0); + EVT EltTy = VecTy.getVectorElementType(); + if (Op->getConstantOperandVal(3) >= EltTy.getSizeInBits()) + report_fatal_error("Immediate out of range"); + APInt Mask = APInt::getHighBitsSet(EltTy.getSizeInBits(), Op->getConstantOperandVal(3) + 1); + return DAG.getNode(ISD::VSELECT, DL, VecTy, DAG.getConstant(Mask, DL, VecTy, true), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_binsri_b: + case Intrinsic::mips_binsri_h: + case Intrinsic::mips_binsri_w: + case Intrinsic::mips_binsri_d: { + EVT VecTy = Op->getValueType(0); + EVT EltTy = VecTy.getVectorElementType(); + if (Op->getConstantOperandVal(3) >= EltTy.getSizeInBits()) + report_fatal_error("Immediate out of range"); + APInt Mask = APInt::getLowBitsSet(EltTy.getSizeInBits(), Op->getConstantOperandVal(3) + 1); + return DAG.getNode(ISD::VSELECT, DL, VecTy, DAG.getConstant(Mask, DL, VecTy, true), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_bmnz_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(3), Op->getOperand(2), Op->getOperand(1)); + case Intrinsic::mips_bmnzi_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(2), Op->getOperand(1)); + case Intrinsic::mips_bmz_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(3), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_bmzi_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_bneg_b: + case Intrinsic::mips_bneg_h: + case Intrinsic::mips_bneg_w: + case Intrinsic::mips_bneg_d: { + EVT VecTy = Op->getValueType(0); + SDValue One = DAG.getConstant(1, DL, VecTy); + return DAG.getNode(ISD::XOR, DL, VecTy, Op->getOperand(1), DAG.getNode(ISD::SHL, DL, VecTy, One, truncateVecElts(Op, DAG))); + } + case Intrinsic::mips_bnegi_b: + case Intrinsic::mips_bnegi_h: + case Intrinsic::mips_bnegi_w: + case Intrinsic::mips_bnegi_d: + return lowerMSABinaryBitImmIntr(Op, DAG, ISD::XOR, Op->getOperand(2), !Subtarget.isLittle()); + case Intrinsic::mips_bnz_b: + case Intrinsic::mips_bnz_h: + case Intrinsic::mips_bnz_w: + case Intrinsic::mips_bnz_d: + return DAG.getNode(MipsISD::VALL_NONZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bnz_v: + return DAG.getNode(MipsISD::VANY_NONZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bsel_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(3), Op->getOperand(2)); + case Intrinsic::mips_bseli_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(2)); + case Intrinsic::mips_bset_b: + case Intrinsic::mips_bset_h: + case Intrinsic::mips_bset_w: + case Intrinsic::mips_bset_d: { + EVT VecTy = Op->getValueType(0); + SDValue One = DAG.getConstant(1, DL, VecTy); + return DAG.getNode(ISD::OR, DL, VecTy, Op->getOperand(1), DAG.getNode(ISD::SHL, DL, VecTy, One, truncateVecElts(Op, DAG))); + } + case Intrinsic::mips_bseti_b: + case Intrinsic::mips_bseti_h: + case Intrinsic::mips_bseti_w: + case Intrinsic::mips_bseti_d: + return lowerMSABinaryBitImmIntr(Op, DAG, ISD::OR, Op->getOperand(2), !Subtarget.isLittle()); + case Intrinsic::mips_bz_b: + case Intrinsic::mips_bz_h: + case Intrinsic::mips_bz_w: + case Intrinsic::mips_bz_d: + return DAG.getNode(MipsISD::VALL_ZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bz_v: + return DAG.getNode(MipsISD::VANY_ZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ceq_b: + case Intrinsic::mips_ceq_h: + case Intrinsic::mips_ceq_w: + case Intrinsic::mips_ceq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETEQ); + case Intrinsic::mips_ceqi_b: + case Intrinsic::mips_ceqi_h: + case Intrinsic::mips_ceqi_w: + case Intrinsic::mips_ceqi_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETEQ); + case Intrinsic::mips_cle_s_b: + case Intrinsic::mips_cle_s_h: + case Intrinsic::mips_cle_s_w: + case Intrinsic::mips_cle_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETLE); + case Intrinsic::mips_clei_s_b: + case Intrinsic::mips_clei_s_h: + case Intrinsic::mips_clei_s_w: + case Intrinsic::mips_clei_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETLE); + case Intrinsic::mips_cle_u_b: + case Intrinsic::mips_cle_u_h: + case Intrinsic::mips_cle_u_w: + case Intrinsic::mips_cle_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULE); + case Intrinsic::mips_clei_u_b: + case Intrinsic::mips_clei_u_h: + case Intrinsic::mips_clei_u_w: + case Intrinsic::mips_clei_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG), ISD::SETULE); + case Intrinsic::mips_clt_s_b: + case Intrinsic::mips_clt_s_h: + case Intrinsic::mips_clt_s_w: + case Intrinsic::mips_clt_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETLT); + case Intrinsic::mips_clti_s_b: + case Intrinsic::mips_clti_s_h: + case Intrinsic::mips_clti_s_w: + case Intrinsic::mips_clti_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETLT); + case Intrinsic::mips_clt_u_b: + case Intrinsic::mips_clt_u_h: + case Intrinsic::mips_clt_u_w: + case Intrinsic::mips_clt_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULT); + case Intrinsic::mips_clti_u_b: + case Intrinsic::mips_clti_u_h: + case Intrinsic::mips_clti_u_w: + case Intrinsic::mips_clti_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG), ISD::SETULT); + case Intrinsic::mips_copy_s_b: + case Intrinsic::mips_copy_s_h: + case Intrinsic::mips_copy_s_w: + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_SEXT_ELT); + case Intrinsic::mips_copy_s_d: + if (Subtarget.hasMips64()) + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_SEXT_ELT); + else { + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + } + case Intrinsic::mips_copy_u_b: + case Intrinsic::mips_copy_u_h: + case Intrinsic::mips_copy_u_w: + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_ZEXT_ELT); + case Intrinsic::mips_copy_u_d: + if (Subtarget.hasMips64()) + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_ZEXT_ELT); + else { + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + } + case Intrinsic::mips_div_s_b: + case Intrinsic::mips_div_s_h: + case Intrinsic::mips_div_s_w: + case Intrinsic::mips_div_s_d: + return DAG.getNode(ISD::SDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_div_u_b: + case Intrinsic::mips_div_u_h: + case Intrinsic::mips_div_u_w: + case Intrinsic::mips_div_u_d: + return DAG.getNode(ISD::UDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fadd_w: + case Intrinsic::mips_fadd_d: + return DAG.getNode(ISD::FADD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fceq_w: + case Intrinsic::mips_fceq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOEQ); + case Intrinsic::mips_fcle_w: + case Intrinsic::mips_fcle_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOLE); + case Intrinsic::mips_fclt_w: + case Intrinsic::mips_fclt_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOLT); + case Intrinsic::mips_fcne_w: + case Intrinsic::mips_fcne_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETONE); + case Intrinsic::mips_fcor_w: + case Intrinsic::mips_fcor_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETO); + case Intrinsic::mips_fcueq_w: + case Intrinsic::mips_fcueq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUEQ); + case Intrinsic::mips_fcule_w: + case Intrinsic::mips_fcule_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULE); + case Intrinsic::mips_fcult_w: + case Intrinsic::mips_fcult_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULT); + case Intrinsic::mips_fcun_w: + case Intrinsic::mips_fcun_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUO); + case Intrinsic::mips_fcune_w: + case Intrinsic::mips_fcune_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUNE); + case Intrinsic::mips_fdiv_w: + case Intrinsic::mips_fdiv_d: + return DAG.getNode(ISD::FDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ffint_u_w: + case Intrinsic::mips_ffint_u_d: + return DAG.getNode(ISD::UINT_TO_FP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ffint_s_w: + case Intrinsic::mips_ffint_s_d: + return DAG.getNode(ISD::SINT_TO_FP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fill_b: + case Intrinsic::mips_fill_h: + case Intrinsic::mips_fill_w: + case Intrinsic::mips_fill_d: { + EVT ResTy = Op->getValueType(0); + SmallVector Ops(ResTy.getVectorNumElements(), Op->getOperand(1)); + return DAG.getBuildVector(ResTy, DL, Ops); + } + case Intrinsic::mips_fexp2_w: + case Intrinsic::mips_fexp2_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::FMUL, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::FEXP2, SDLoc(Op), ResTy, Op->getOperand(2))); + } + case Intrinsic::mips_flog2_w: + case Intrinsic::mips_flog2_d: + return DAG.getNode(ISD::FLOG2, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fmadd_w: + case Intrinsic::mips_fmadd_d: + return DAG.getNode(ISD::FMA, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + case Intrinsic::mips_fmul_w: + case Intrinsic::mips_fmul_d: + return DAG.getNode(ISD::FMUL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fmsub_w: + case Intrinsic::mips_fmsub_d: { + return DAG.getNode(MipsISD::FMS, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + } + case Intrinsic::mips_frint_w: + case Intrinsic::mips_frint_d: + return DAG.getNode(ISD::FRINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fsqrt_w: + case Intrinsic::mips_fsqrt_d: + return DAG.getNode(ISD::FSQRT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fsub_w: + case Intrinsic::mips_fsub_d: + return DAG.getNode(ISD::FSUB, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ftrunc_u_w: + case Intrinsic::mips_ftrunc_u_d: + return DAG.getNode(ISD::FP_TO_UINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ftrunc_s_w: + case Intrinsic::mips_ftrunc_s_d: + return DAG.getNode(ISD::FP_TO_SINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ilvev_b: + case Intrinsic::mips_ilvev_h: + case Intrinsic::mips_ilvev_w: + case Intrinsic::mips_ilvev_d: + return DAG.getNode(MipsISD::ILVEV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvl_b: + case Intrinsic::mips_ilvl_h: + case Intrinsic::mips_ilvl_w: + case Intrinsic::mips_ilvl_d: + return DAG.getNode(MipsISD::ILVL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvod_b: + case Intrinsic::mips_ilvod_h: + case Intrinsic::mips_ilvod_w: + case Intrinsic::mips_ilvod_d: + return DAG.getNode(MipsISD::ILVOD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvr_b: + case Intrinsic::mips_ilvr_h: + case Intrinsic::mips_ilvr_w: + case Intrinsic::mips_ilvr_d: + return DAG.getNode(MipsISD::ILVR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_insert_b: + case Intrinsic::mips_insert_h: + case Intrinsic::mips_insert_w: + case Intrinsic::mips_insert_d: + return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(3), Op->getOperand(2)); + case Intrinsic::mips_insve_b: + case Intrinsic::mips_insve_h: + case Intrinsic::mips_insve_w: + case Intrinsic::mips_insve_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_insve_b: Max = 15; break; + case Intrinsic::mips_insve_h: Max = 7; break; + case Intrinsic::mips_insve_w: Max = 3; break; + case Intrinsic::mips_insve_d: Max = 1; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return DAG.getNode(MipsISD::INSVE, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3), DAG.getConstant(0, DL, MVT::i32)); + } + case Intrinsic::mips_ldi_b: + case Intrinsic::mips_ldi_h: + case Intrinsic::mips_ldi_w: + case Intrinsic::mips_ldi_d: + return lowerMSASplatImm(Op, 1, DAG, true); + case Intrinsic::mips_lsa: + case Intrinsic::mips_dlsa: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::ADD, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::SHL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_maddv_b: + case Intrinsic::mips_maddv_h: + case Intrinsic::mips_maddv_w: + case Intrinsic::mips_maddv_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::ADD, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::MUL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_max_s_b: + case Intrinsic::mips_max_s_h: + case Intrinsic::mips_max_s_w: + case Intrinsic::mips_max_s_d: + return DAG.getNode(ISD::SMAX, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_max_u_b: + case Intrinsic::mips_max_u_h: + case Intrinsic::mips_max_u_w: + case Intrinsic::mips_max_u_d: + return DAG.getNode(ISD::UMAX, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_maxi_s_b: + case Intrinsic::mips_maxi_s_h: + case Intrinsic::mips_maxi_s_w: + case Intrinsic::mips_maxi_s_d: + return DAG.getNode(ISD::SMAX, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true)); + case Intrinsic::mips_maxi_u_b: + case Intrinsic::mips_maxi_u_h: + case Intrinsic::mips_maxi_u_w: + case Intrinsic::mips_maxi_u_d: + return DAG.getNode(ISD::UMAX, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_min_s_b: + case Intrinsic::mips_min_s_h: + case Intrinsic::mips_min_s_w: + case Intrinsic::mips_min_s_d: + return DAG.getNode(ISD::SMIN, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_min_u_b: + case Intrinsic::mips_min_u_h: + case Intrinsic::mips_min_u_w: + case Intrinsic::mips_min_u_d: + return DAG.getNode(ISD::UMIN, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mini_s_b: + case Intrinsic::mips_mini_s_h: + case Intrinsic::mips_mini_s_w: + case Intrinsic::mips_mini_s_d: + return DAG.getNode(ISD::SMIN, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true)); + case Intrinsic::mips_mini_u_b: + case Intrinsic::mips_mini_u_h: + case Intrinsic::mips_mini_u_w: + case Intrinsic::mips_mini_u_d: + return DAG.getNode(ISD::UMIN, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_mod_s_b: + case Intrinsic::mips_mod_s_h: + case Intrinsic::mips_mod_s_w: + case Intrinsic::mips_mod_s_d: + return DAG.getNode(ISD::SREM, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mod_u_b: + case Intrinsic::mips_mod_u_h: + case Intrinsic::mips_mod_u_w: + case Intrinsic::mips_mod_u_d: + return DAG.getNode(ISD::UREM, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mulv_b: + case Intrinsic::mips_mulv_h: + case Intrinsic::mips_mulv_w: + case Intrinsic::mips_mulv_d: + return DAG.getNode(ISD::MUL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_msubv_b: + case Intrinsic::mips_msubv_h: + case Intrinsic::mips_msubv_w: + case Intrinsic::mips_msubv_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::SUB, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::MUL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_nlzc_b: + case Intrinsic::mips_nlzc_h: + case Intrinsic::mips_nlzc_w: + case Intrinsic::mips_nlzc_d: + return DAG.getNode(ISD::CTLZ, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_nor_v: { + SDValue Res = DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + return DAG.getNOT(DL, Res, Res->getValueType(0)); + } + case Intrinsic::mips_nori_b: { + SDValue Res = DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + return DAG.getNOT(DL, Res, Res->getValueType(0)); + } + case Intrinsic::mips_or_v: + return DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ori_b: + return DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_pckev_b: + case Intrinsic::mips_pckev_h: + case Intrinsic::mips_pckev_w: + case Intrinsic::mips_pckev_d: + return DAG.getNode(MipsISD::PCKEV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_pckod_b: + case Intrinsic::mips_pckod_h: + case Intrinsic::mips_pckod_w: + case Intrinsic::mips_pckod_d: + return DAG.getNode(MipsISD::PCKOD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_pcnt_b: + case Intrinsic::mips_pcnt_h: + case Intrinsic::mips_pcnt_w: + case Intrinsic::mips_pcnt_d: + return DAG.getNode(ISD::CTPOP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_sat_s_b: + case Intrinsic::mips_sat_s_h: + case Intrinsic::mips_sat_s_w: + case Intrinsic::mips_sat_s_d: + case Intrinsic::mips_sat_u_b: + case Intrinsic::mips_sat_u_h: + case Intrinsic::mips_sat_u_w: + case Intrinsic::mips_sat_u_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_sat_s_b: + case Intrinsic::mips_sat_u_b: Max = 7; break; + case Intrinsic::mips_sat_s_h: + case Intrinsic::mips_sat_u_h: Max = 15; break; + case Intrinsic::mips_sat_s_w: + case Intrinsic::mips_sat_u_w: Max = 31; break; + case Intrinsic::mips_sat_s_d: + case Intrinsic::mips_sat_u_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_shf_b: + case Intrinsic::mips_shf_h: + case Intrinsic::mips_shf_w: { + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > 255) + report_fatal_error("Immediate out of range"); + return DAG.getNode(MipsISD::SHF, DL, Op->getValueType(0), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_sldi_b: + case Intrinsic::mips_sldi_h: + case Intrinsic::mips_sldi_w: + case Intrinsic::mips_sldi_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_sldi_b: Max = 15; break; + case Intrinsic::mips_sldi_h: Max = 7; break; + case Intrinsic::mips_sldi_w: Max = 3; break; + case Intrinsic::mips_sldi_d: Max = 1; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(3))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_sll_b: + case Intrinsic::mips_sll_h: + case Intrinsic::mips_sll_w: + case Intrinsic::mips_sll_d: + return DAG.getNode(ISD::SHL, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_slli_b: + case Intrinsic::mips_slli_h: + case Intrinsic::mips_slli_w: + case Intrinsic::mips_slli_d: + return DAG.getNode(ISD::SHL, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_splat_b: + case Intrinsic::mips_splat_h: + case Intrinsic::mips_splat_w: + case Intrinsic::mips_splat_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), lowerMSASplatZExt(Op, 2, DAG), Op->getOperand(1), Op->getOperand(1)); + case Intrinsic::mips_splati_b: + case Intrinsic::mips_splati_h: + case Intrinsic::mips_splati_w: + case Intrinsic::mips_splati_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), lowerMSASplatImm(Op, 2, DAG), Op->getOperand(1), Op->getOperand(1)); + case Intrinsic::mips_sra_b: + case Intrinsic::mips_sra_h: + case Intrinsic::mips_sra_w: + case Intrinsic::mips_sra_d: + return DAG.getNode(ISD::SRA, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_srai_b: + case Intrinsic::mips_srai_h: + case Intrinsic::mips_srai_w: + case Intrinsic::mips_srai_d: + return DAG.getNode(ISD::SRA, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_srari_b: + case Intrinsic::mips_srari_h: + case Intrinsic::mips_srari_w: + case Intrinsic::mips_srari_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_srari_b: Max = 7; break; + case Intrinsic::mips_srari_h: Max = 15; break; + case Intrinsic::mips_srari_w: Max = 31; break; + case Intrinsic::mips_srari_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_srl_b: + case Intrinsic::mips_srl_h: + case Intrinsic::mips_srl_w: + case Intrinsic::mips_srl_d: + return DAG.getNode(ISD::SRL, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_srli_b: + case Intrinsic::mips_srli_h: + case Intrinsic::mips_srli_w: + case Intrinsic::mips_srli_d: + return DAG.getNode(ISD::SRL, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_srlri_b: + case Intrinsic::mips_srlri_h: + case Intrinsic::mips_srlri_w: + case Intrinsic::mips_srlri_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_srlri_b: Max = 7; break; + case Intrinsic::mips_srlri_h: Max = 15; break; + case Intrinsic::mips_srlri_w: Max = 31; break; + case Intrinsic::mips_srlri_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_subv_b: + case Intrinsic::mips_subv_h: + case Intrinsic::mips_subv_w: + case Intrinsic::mips_subv_d: + return DAG.getNode(ISD::SUB, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_subvi_b: + case Intrinsic::mips_subvi_h: + case Intrinsic::mips_subvi_w: + case Intrinsic::mips_subvi_d: + return DAG.getNode(ISD::SUB, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_vshf_b: + case Intrinsic::mips_vshf_h: + case Intrinsic::mips_vshf_w: + case Intrinsic::mips_vshf_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + case Intrinsic::mips_xor_v: + return DAG.getNode(ISD::XOR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_xori_b: + return DAG.getNode(ISD::XOR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::thread_pointer: { + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + return DAG.getNode(MipsISD::ThreadPointer, DL, PtrVT); + } + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4be9f6092250b32fead2a9800ea16544544f58f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp @@ -0,0 +1,52 @@ +SDValue MipsSETargetLowering::lowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const { + unsigned Intr = cast(Op->getOperand(1))->getZExtValue(); + switch (Intr) { + default: + return SDValue(); + case Intrinsic::mips_extp: + return lowerDSPIntr(Op, DAG, MipsISD::EXTP); + case Intrinsic::mips_extpdp: + return lowerDSPIntr(Op, DAG, MipsISD::EXTPDP); + case Intrinsic::mips_extr_w: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_W); + case Intrinsic::mips_extr_r_w: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_R_W); + case Intrinsic::mips_extr_rs_w: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_RS_W); + case Intrinsic::mips_extr_s_h: + return lowerDSPIntr(Op, DAG, MipsISD::EXTR_S_H); + case Intrinsic::mips_mthlip: + return lowerDSPIntr(Op, DAG, MipsISD::MTHLIP); + case Intrinsic::mips_mulsaq_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::MULSAQ_S_W_PH); + case Intrinsic::mips_maq_s_w_phl: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_S_W_PHL); + case Intrinsic::mips_maq_s_w_phr: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_S_W_PHR); + case Intrinsic::mips_maq_sa_w_phl: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_SA_W_PHL); + case Intrinsic::mips_maq_sa_w_phr: + return lowerDSPIntr(Op, DAG, MipsISD::MAQ_SA_W_PHR); + case Intrinsic::mips_dpaq_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQ_S_W_PH); + case Intrinsic::mips_dpsq_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQ_S_W_PH); + case Intrinsic::mips_dpaq_sa_l_w: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQ_SA_L_W); + case Intrinsic::mips_dpsq_sa_l_w: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQ_SA_L_W); + case Intrinsic::mips_dpaqx_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQX_S_W_PH); + case Intrinsic::mips_dpaqx_sa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAQX_SA_W_PH); + case Intrinsic::mips_dpsqx_s_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQX_S_W_PH); + case Intrinsic::mips_dpsqx_sa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSQX_SA_W_PH); + case Intrinsic::mips_ld_b: + case Intrinsic::mips_ld_h: + case Intrinsic::mips_ld_w: + case Intrinsic::mips_ld_d: + return lowerMSALoadIntr(Op, DAG, Intr, Subtarget); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c445b62394d8dd7ca699b85e09abca470d7e9eef --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerJumpTable(SDValue Op, SelectionDAG &DAG) const { + JumpTableSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbfe3d2f0ef29923975a86d495e1dd2120dba454 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,22 @@ +SDValue MipsSETargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { + switch(Op.getOpcode()) { + case ISD::LOAD: return lowerLOAD(Op, DAG); + case ISD::STORE: return lowerSTORE(Op, DAG); + case ISD::SMUL_LOHI: return lowerMulDiv(Op, MipsISD::Mult, true, true, DAG); + case ISD::UMUL_LOHI: return lowerMulDiv(Op, MipsISD::Multu, true, true, DAG); + case ISD::MULHS: return lowerMulDiv(Op, MipsISD::Mult, false, true, DAG); + case ISD::MULHU: return lowerMulDiv(Op, MipsISD::Multu, false, true, DAG); + case ISD::MUL: return lowerMulDiv(Op, MipsISD::Mult, true, false, DAG); + case ISD::SDIVREM: return lowerMulDiv(Op, MipsISD::DivRem, true, true, DAG); + case ISD::UDIVREM: return lowerMulDiv(Op, MipsISD::DivRemU, true, true, DAG); + case ISD::INTRINSIC_WO_CHAIN: return lowerINTRINSIC_WO_CHAIN(Op, DAG); + case ISD::INTRINSIC_W_CHAIN: return lowerINTRINSIC_W_CHAIN(Op, DAG); + case ISD::INTRINSIC_VOID: return lowerINTRINSIC_VOID(Op, DAG); + case ISD::EXTRACT_VECTOR_ELT: return lowerEXTRACT_VECTOR_ELT(Op, DAG); + case ISD::BUILD_VECTOR: return lowerBUILD_VECTOR(Op, DAG); + case ISD::VECTOR_SHUFFLE: return lowerVECTOR_SHUFFLE(Op, DAG); + case ISD::SELECT: return lowerSELECT(Op, DAG); + case ISD::BITCAST: return lowerBITCAST(Op, DAG); + } + return MipsTargetLowering::LowerOperation(Op, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ded637a4455513a16d891e39639e269a720641e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,15 @@ +SDValue MipsTargetLowering::lowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const { + if (verifyReturnAddressArgumentIsConstant(Op, DAG)) + return SDValue(); + if (cast(Op.getOperand(0))->getZExtValue() != 0) { + DAG.getContext()->emitError("return address can be determined only for current frame"); + return SDValue(); + } + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MVT VT = Op.getSimpleValueType(); + unsigned RA = ABI.IsN64() ? Mips::RA_64 : Mips::RA; + MFI.setReturnAddressIsTaken(true); + unsigned Reg = MF.addLiveIn(RA, getRegClassFor(VT)); + return DAG.getCopyFromReg(DAG.getEntryNode(), SDLoc(Op), Reg, VT); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ed075e6ccf9610456191789f39cad7dd5b16736 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,66 @@ +SDValue MipsTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, const SDLoc &DL, SelectionDAG &DAG) const { + SmallVector RVLocs; + MachineFunction &MF = DAG.getMachineFunction(); + MipsCCState CCInfo(CallConv, IsVarArg, MF, RVLocs, *DAG.getContext()); + CCInfo.AnalyzeReturn(Outs, RetCC_Mips); + SDValue Flag; + SmallVector RetOps(1, Chain); + for (unsigned i = 0; i != RVLocs.size(); ++i) { + SDValue Val = OutVals[i]; + CCValAssign &VA = RVLocs[i]; + assert(VA.isRegLoc() && "Can only return in registers!"); + bool UseUpperBits = false; + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + Val = DAG.getNode(ISD::BITCAST, DL, VA.getLocVT(), Val); + break; + case CCValAssign::AExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::AExt: + Val = DAG.getNode(ISD::ANY_EXTEND, DL, VA.getLocVT(), Val); + break; + case CCValAssign::ZExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::ZExt: + Val = DAG.getNode(ISD::ZERO_EXTEND, DL, VA.getLocVT(), Val); + break; + case CCValAssign::SExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::SExt: + Val = DAG.getNode(ISD::SIGN_EXTEND, DL, VA.getLocVT(), Val); + break; + } + if (UseUpperBits) { + unsigned ValSizeInBits = Outs[i].ArgVT.getSizeInBits(); + unsigned LocSizeInBits = VA.getLocVT().getSizeInBits(); + Val = DAG.getNode(ISD::SHL, DL, VA.getLocVT(), Val, DAG.getConstant(LocSizeInBits - ValSizeInBits, DL, VA.getLocVT())); + } + Chain = DAG.getCopyToReg(Chain, DL, VA.getLocReg(), Val, Flag); + Flag = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(VA.getLocReg(), VA.getLocVT())); + } + if (MF.getFunction().hasStructRetAttr()) { + MipsFunctionInfo *MipsFI = MF.getInfo(); + unsigned Reg = MipsFI->getSRetReturnReg(); + if (!Reg) + llvm_unreachable("sret virtual register not created in the entry block"); + SDValue Val = DAG.getCopyFromReg(Chain, DL, Reg, getPointerTy(DAG.getDataLayout())); + unsigned V0 = ABI.IsN64() ? Mips::V0_64 : Mips::V0; + Chain = DAG.getCopyToReg(Chain, DL, V0, Val, Flag); + Flag = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(V0, getPointerTy(DAG.getDataLayout()))); + } + RetOps[0] = Chain;. + if (Flag.getNode()) + RetOps.push_back(Flag); + if (DAG.getMachineFunction().getFunction().hasFnAttribute("interrupt")) + return LowerInterruptReturn(RetOps, DL, DAG); + return DAG.getNode(MipsISD::Ret, DL, MVT::Other, RetOps); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82c750e52dc286a4e812e266e95aad7444d81f06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,8 @@ +SDValue MipsTargetLowering::lowerVASTART(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachineFunction(); + MipsFunctionInfo *FuncInfo = MF.getInfo(); + SDLoc DL(Op); + SDValue FI = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), getPointerTy(MF.getDataLayout())); + const Value *SV = cast(Op.getOperand(2))->getValue(); + return DAG.getStore(Op.getOperand(0), DL, FI, Op.getOperand(1), MachinePointerInfo(SV)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a38352825f56aab99f061204881b1757052b6041 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,115 @@ +enum NodeType : unsigned { + FIRST_NUMBER = ISD::BUILTIN_OP_END, + JmpLink, + TailCall, + Highest, + Higher, + Hi, + Lo, + GotHi, + TlsHi, + GPRel, + ThreadPointer, + FMS, + FPBrcond, + FPCmp, + FSELECT, + MTC1_D64, + CMovFP_T, + CMovFP_F, + TruncIntFP, + Ret, + ERet, + EH_RETURN, + MFHI, + MFLO, + MTLOHI, + Mult, + Multu, + MAdd, + MAddu, + MSub, + MSubu, + DivRem, + DivRemU, + DivRem16, + DivRemU16, + BuildPairF64, + ExtractElementF64, + Wrapper, + DynAlloc, + Sync, + Ext, + Ins, + CIns, + EXTP, + EXTPDP, + EXTR_S_H, + EXTR_W, + EXTR_R_W, + EXTR_RS_W, + SHILO, + MTHLIP, + MULSAQ_S_W_PH, + MAQ_S_W_PHL, + MAQ_S_W_PHR, + MAQ_SA_W_PHL, + MAQ_SA_W_PHR, + DPAU_H_QBL, + DPAU_H_QBR, + DPSU_H_QBL, + DPSU_H_QBR, + DPAQ_S_W_PH, + DPSQ_S_W_PH, + DPAQ_SA_L_W, + DPSQ_SA_L_W, + DPA_W_PH, + DPS_W_PH, + DPAQX_S_W_PH, + DPAQX_SA_W_PH, + DPAX_W_PH, + DPSX_W_PH, + DPSQX_S_W_PH, + DPSQX_SA_W_PH, + MULSA_W_PH, + MULT, + MULTU, + MADD_DSP, + MADDU_DSP, + MSUB_DSP, + MSUBU_DSP, + SHLL_DSP, + SHRA_DSP, + SHRL_DSP, + SETCC_DSP, + SELECT_CC_DSP, + VALL_ZERO, + VANY_ZERO, + VALL_NONZERO, + VANY_NONZERO, + VCEQ, + VCLE_S, + VCLE_U, + VCLT_S, + VCLT_U, + VSHF, + SHF, + ILVEV, + ILVOD, + ILVL, + ILVR, + PCKEV, + PCKOD, + INSVE, + VNOR, + VEXTRACT_SEXT_ELT, + VEXTRACT_ZEXT_ELT, + LWL = ISD::FIRST_TARGET_MEMORY_OPCODE, + LWR, + SWL, + SWR, + LDL, + LDR, + SDL, + SDR +}; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4c27aab8d97ef85c9947073d81e7dab0609a8e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,34 @@ +SDValue MipsSETargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { + SelectionDAG &DAG = DCI.DAG; + SDValue Val; + switch (N->getOpcode()) { + case ISD::AND: + Val = performANDCombine(N, DAG, DCI, Subtarget); + break; + case ISD::OR: + Val = performORCombine(N, DAG, DCI, Subtarget); + break; + case ISD::MUL: + return performMULCombine(N, DAG, DCI, this, Subtarget); + case ISD::SHL: + Val = performSHLCombine(N, DAG, DCI, Subtarget); + break; + case ISD::SRA: + return performSRACombine(N, DAG, DCI, Subtarget); + case ISD::SRL: + return performSRLCombine(N, DAG, DCI, Subtarget); + case ISD::VSELECT: + return performVSELECTCombine(N, DAG); + case ISD::XOR: + Val = performXORCombine(N, DAG, Subtarget); + break; + case ISD::SETCC: + Val = performSETCCCombine(N, DAG); + break; + } + if (Val.getNode()) { + LLVM_DEBUG(dbgs() << "\nMipsSE DAG Combine:\n"; N->printrWithDepth(dbgs(), &DAG); dbgs() << "\n=> \n"; Val.getNode()->printrWithDepth(dbgs(), &DAG); dbgs() << "\n"); + return Val; + } + return MipsTargetLowering::PerformDAGCombine(N, DCI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e0b70bb9b6952f3748f9c7143aec894bfccf9c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,3 @@ +void MipsTargetLowering::ReplaceNodeResults(SDNode *N, SmallVectorImpl &Results, SelectionDAG &DAG) const { + return LowerOperationWrapper(N, Results, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b374c388335c1101e9b9313b761335931a0abe3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,173 @@ +MipsTargetLowering::MipsTargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI) : TargetLowering(TM), Subtarget(STI), ABI(TM.getABI()) { + setBooleanContents(ZeroOrOneBooleanContent); + setBooleanVectorContents(ZeroOrNegativeOneBooleanContent); + if (Subtarget.hasMips32r6()) + setBooleanContents(ZeroOrOneBooleanContent, ZeroOrNegativeOneBooleanContent); + for (MVT VT : MVT::integer_valuetypes()) { + setLoadExtAction(ISD::EXTLOAD, VT, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, VT, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, VT, MVT::i1, Promote); + } + for (MVT VT : MVT::fp_valuetypes()) { + setLoadExtAction(ISD::EXTLOAD, VT, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, VT, MVT::f16, Expand); + } + for (MVT VT : MVT::fp_fixedlen_vector_valuetypes()) { + MVT F16VT = MVT::getVectorVT(MVT::f16, VT.getVectorNumElements()); + if (F16VT.isValid()) + setLoadExtAction(ISD::EXTLOAD, VT, F16VT, Expand); + } + setTruncStoreAction(MVT::f32, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f32, Expand); + AddPromotedToType(ISD::SETCC, MVT::i1, MVT::i32); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); + setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); + setOperationAction(ISD::BlockAddress, MVT::i32, Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom); + setOperationAction(ISD::JumpTable, MVT::i32, Custom); + setOperationAction(ISD::ConstantPool, MVT::i32, Custom); + setOperationAction(ISD::SELECT, MVT::f32, Custom); + setOperationAction(ISD::SELECT, MVT::f64, Custom); + setOperationAction(ISD::SELECT, MVT::i32, Custom); + setOperationAction(ISD::SETCC, MVT::f32, Custom); + setOperationAction(ISD::SETCC, MVT::f64, Custom); + setOperationAction(ISD::BRCOND, MVT::Other, Custom); + setOperationAction(ISD::FCOPYSIGN, MVT::f32, Custom); + setOperationAction(ISD::FCOPYSIGN, MVT::f64, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); + if (!(TM.Options.NoNaNsFPMath || Subtarget.inAbs2008Mode())) { + setOperationAction(ISD::FABS, MVT::f32, Custom); + setOperationAction(ISD::FABS, MVT::f64, Custom); + } + if (Subtarget.isGP64bit()) { + setOperationAction(ISD::GlobalAddress, MVT::i64, Custom); + setOperationAction(ISD::BlockAddress, MVT::i64, Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom); + setOperationAction(ISD::JumpTable, MVT::i64, Custom); + setOperationAction(ISD::ConstantPool, MVT::i64, Custom); + setOperationAction(ISD::SELECT, MVT::i64, Custom); + setOperationAction(ISD::LOAD, MVT::i64, Custom); + setOperationAction(ISD::STORE, MVT::i64, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i64, Custom); + setOperationAction(ISD::SHL_PARTS, MVT::i64, Custom); + setOperationAction(ISD::SRA_PARTS, MVT::i64, Custom); + setOperationAction(ISD::SRL_PARTS, MVT::i64, Custom); + } + if (!Subtarget.isGP64bit()) { + setOperationAction(ISD::SHL_PARTS, MVT::i32, Custom); + setOperationAction(ISD::SRA_PARTS, MVT::i32, Custom); + setOperationAction(ISD::SRL_PARTS, MVT::i32, Custom); + } + setOperationAction(ISD::EH_DWARF_CFA, MVT::i32, Custom); + if (Subtarget.isGP64bit()) + setOperationAction(ISD::EH_DWARF_CFA, MVT::i64, Custom); + setOperationAction(ISD::SDIV, MVT::i32, Expand); + setOperationAction(ISD::SREM, MVT::i32, Expand); + setOperationAction(ISD::UDIV, MVT::i32, Expand); + setOperationAction(ISD::UREM, MVT::i32, Expand); + setOperationAction(ISD::SDIV, MVT::i64, Expand); + setOperationAction(ISD::SREM, MVT::i64, Expand); + setOperationAction(ISD::UDIV, MVT::i64, Expand); + setOperationAction(ISD::UREM, MVT::i64, Expand); + setOperationAction(ISD::BR_CC, MVT::f32, Expand); + setOperationAction(ISD::BR_CC, MVT::f64, Expand); + setOperationAction(ISD::BR_CC, MVT::i32, Expand); + setOperationAction(ISD::BR_CC, MVT::i64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::i32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::i64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f64, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i32, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i64, Expand); + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand); + setOperationAction(ISD::FP_TO_UINT, MVT::i64, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand); + if (Subtarget.hasCnMips()) { + setOperationAction(ISD::CTPOP, MVT::i32, Legal); + setOperationAction(ISD::CTPOP, MVT::i64, Legal); + } + else { + setOperationAction(ISD::CTPOP, MVT::i32, Expand); + setOperationAction(ISD::CTPOP, MVT::i64, Expand); + } + setOperationAction(ISD::CTTZ, MVT::i32, Expand); + setOperationAction(ISD::CTTZ, MVT::i64, Expand); + setOperationAction(ISD::ROTL, MVT::i32, Expand); + setOperationAction(ISD::ROTL, MVT::i64, Expand); + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64, Expand); + if (!Subtarget.hasMips32r2()) + setOperationAction(ISD::ROTR, MVT::i32, Expand); + if (!Subtarget.hasMips64r2()) + setOperationAction(ISD::ROTR, MVT::i64, Expand); + setOperationAction(ISD::FSIN, MVT::f32, Expand); + setOperationAction(ISD::FSIN, MVT::f64, Expand); + setOperationAction(ISD::FCOS, MVT::f32, Expand); + setOperationAction(ISD::FCOS, MVT::f64, Expand); + setOperationAction(ISD::FSINCOS, MVT::f32, Expand); + setOperationAction(ISD::FSINCOS, MVT::f64, Expand); + setOperationAction(ISD::FPOW, MVT::f32, Expand); + setOperationAction(ISD::FPOW, MVT::f64, Expand); + setOperationAction(ISD::FLOG, MVT::f32, Expand); + setOperationAction(ISD::FLOG2, MVT::f32, Expand); + setOperationAction(ISD::FLOG10, MVT::f32, Expand); + setOperationAction(ISD::FEXP, MVT::f32, Expand); + setOperationAction(ISD::FMA, MVT::f32, Expand); + setOperationAction(ISD::FMA, MVT::f64, Expand); + setOperationAction(ISD::FREM, MVT::f32, Expand); + setOperationAction(ISD::FREM, MVT::f64, Expand); + setOperationAction(ISD::FP16_TO_FP, MVT::f32, Expand); + setOperationAction(ISD::FP_TO_FP16, MVT::f32, Expand); + setOperationAction(ISD::FP16_TO_FP, MVT::f64, Expand); + setOperationAction(ISD::FP_TO_FP16, MVT::f64, Expand); + setOperationAction(ISD::EH_RETURN, MVT::Other, Custom); + setOperationAction(ISD::VASTART, MVT::Other, Custom); + setOperationAction(ISD::VAARG, MVT::Other, Custom); + setOperationAction(ISD::VACOPY, MVT::Other, Expand); + setOperationAction(ISD::VAEND, MVT::Other, Expand); + setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); + setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); + if (!Subtarget.isGP64bit()) { + setOperationAction(ISD::ATOMIC_LOAD, MVT::i64, Expand); + setOperationAction(ISD::ATOMIC_STORE, MVT::i64, Expand); + } + if (!Subtarget.hasMips32r2()) { + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand); + } + if (!Subtarget.hasMips32() || Subtarget.inMips16Mode()) + setOperationAction(ISD::CTLZ, MVT::i32, Expand); + if (!Subtarget.hasMips64()) + setOperationAction(ISD::CTLZ, MVT::i64, Expand); + if (!Subtarget.hasMips32r2()) + setOperationAction(ISD::BSWAP, MVT::i32, Expand); + if (!Subtarget.hasMips64r2()) + setOperationAction(ISD::BSWAP, MVT::i64, Expand); + if (Subtarget.isGP64bit()) { + setLoadExtAction(ISD::SEXTLOAD, MVT::i64, MVT::i32, Custom); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i64, MVT::i32, Custom); + setLoadExtAction(ISD::EXTLOAD, MVT::i64, MVT::i32, Custom); + setTruncStoreAction(MVT::i64, MVT::i32, Custom); + } + setOperationAction(ISD::TRAP, MVT::Other, Legal); + setTargetDAGCombine(ISD::SDIVREM); + setTargetDAGCombine(ISD::UDIVREM); + setTargetDAGCombine(ISD::SELECT); + setTargetDAGCombine(ISD::AND); + setTargetDAGCombine(ISD::OR); + setTargetDAGCombine(ISD::ADD); + setTargetDAGCombine(ISD::SUB); + setTargetDAGCombine(ISD::AssertZext); + setTargetDAGCombine(ISD::SHL); + if (ABI.IsO32()) { + setLibcallName(RTLIB::SHL_I128, nullptr); + setLibcallName(RTLIB::SRL_I128, nullptr); + setLibcallName(RTLIB::SRA_I128, nullptr); + } + setMinFunctionAlignment(Subtarget.isGP64bit() ? Align(8) : Align(4)); + setMinStackArgumentAlignment((ABI.IsN32() || ABI.IsN64()) ? Align(8) : Align(4)); + setStackPointerRegisterToSaveRestore(ABI.IsN64() ? Mips::SP_64 : Mips::SP); + MaxStoresPerMemcpy = 16; + isMicroMips = Subtarget.inMicroMipsMode(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24252a436720a3ccdecb69c990fff58341ff97c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp @@ -0,0 +1,2 @@ +None + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getAddr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getAddr.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8529203a68b93db156ea88f4c58badf30013605 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp @@ -0,0 +1,19 @@ +MipsTargetLowering::ConstraintType MipsTargetLowering::getConstraintType(StringRef Constraint) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default : break; + case 'd': + case 'y': + case 'f': + case 'c': + case 'l': + case 'x': + return C_RegisterClass; + case 'R': + return C_Memory; + } + } + if (Constraint == "ZC") + return C_Memory; + return TargetLowering::getConstraintType(Constraint); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e1945b520bebcf77f44fd1b55ba871b480d9979 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp @@ -0,0 +1,3 @@ +Register getExceptionPointerRegister(const Constant *PersonalityFn) const override { + return ABI.IsN64() ? Mips::A0_64 : Mips::A0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..524ffc7c7a6f16e757f2bce1263a2c3b76aa8e7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp @@ -0,0 +1,3 @@ +Register getExceptionSelectorRegister(const Constant *PersonalityFn) const override { + return ABI.IsN64() ? Mips::A1_64 : Mips::A1; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2bdaa6084dd596ee35663f176faa01eba5d98abc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp @@ -0,0 +1,3 @@ +ISD::NodeType getExtendForAtomicOps() const override { + return ISD::SIGN_EXTEND; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04c12c2b8a5307ff84006a5e7df9df7f9f5c5066 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp @@ -0,0 +1,9 @@ +unsigned getInlineAsmMemConstraint(StringRef ConstraintCode) const override { + if (ConstraintCode == "o") + return InlineAsm::Constraint_o; + if (ConstraintCode == "R") + return InlineAsm::Constraint_R; + if (ConstraintCode == "ZC") + return InlineAsm::Constraint_ZC; + return TargetLowering::getInlineAsmMemConstraint(ConstraintCode); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4d6cb04cdaf5d170a432c7141d5bcd31383559f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,56 @@ +std::pair MipsTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + case 'd': + case 'y': + case 'r': + if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8) { + if (Subtarget.inMips16Mode()) + return std::make_pair(0U, &Mips::CPU16RegsRegClass); + return std::make_pair(0U, &Mips::GPR32RegClass); + } + if (VT == MVT::i64 && !Subtarget.isGP64bit()) + return std::make_pair(0U, &Mips::GPR32RegClass); + if (VT == MVT::i64 && Subtarget.isGP64bit()) + return std::make_pair(0U, &Mips::GPR64RegClass); + return std::make_pair(0U, nullptr); + case 'f': + if (VT == MVT::v16i8) + return std::make_pair(0U, &Mips::MSA128BRegClass); + else if (VT == MVT::v8i16 || VT == MVT::v8f16) + return std::make_pair(0U, &Mips::MSA128HRegClass); + else if (VT == MVT::v4i32 || VT == MVT::v4f32) + return std::make_pair(0U, &Mips::MSA128WRegClass); + else if (VT == MVT::v2i64 || VT == MVT::v2f64) + return std::make_pair(0U, &Mips::MSA128DRegClass); + else if (VT == MVT::f32) + return std::make_pair(0U, &Mips::FGR32RegClass); + else if ((VT == MVT::f64) && (!Subtarget.isSingleFloat())) { + if (Subtarget.isFP64bit()) + return std::make_pair(0U, &Mips::FGR64RegClass); + return std::make_pair(0U, &Mips::AFGR64RegClass); + } + break; + case 'c': + if (VT == MVT::i32) + return std::make_pair((unsigned)Mips::T9, &Mips::GPR32RegClass); + if (VT == MVT::i64) + return std::make_pair((unsigned)Mips::T9_64, &Mips::GPR64RegClass); + return std::make_pair(0U, nullptr); + case 'l': + if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8) + return std::make_pair((unsigned)Mips::LO0, &Mips::LO32RegClass); + return std::make_pair((unsigned)Mips::LO0_64, &Mips::LO64RegClass); + case 'x': + return std::make_pair(0U, nullptr); + } + } + if (!Constraint.empty()) { + std::pair R; + R = parseRegForInlineAsmConstraint(Constraint, VT); + if (R.second) + return R; + } + return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1c5d4d71ea246662da31c1159df7bf2f85432788 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp @@ -0,0 +1,13 @@ +Register MipsTargetLowering::getRegisterByName(const char *RegName, LLT VT, const MachineFunction &MF) const { + if (Subtarget.isGP64bit()) { + Register Reg = StringSwitch(RegName).Case("$28", Mips::GP_64).Default(Register()); + if (Reg) + return Reg; + } + else { + Register Reg = StringSwitch(RegName).Case("$28", Mips::GP).Default(Register()); + if (Reg) + return Reg; + } + report_fatal_error("Invalid register name global variable"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe00ebaa7cd5963c92ec9096a55e880e01f1a0fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp @@ -0,0 +1,6 @@ +EVT MipsTargetLowering::getSetCCResultType(const DataLayout &, LLVMContext &, EVT VT) const { + if (!VT.isVector()) { + return MVT::i32; + } + return VT.changeVectorElementTypeToInteger(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..999d3eb5bc14010c14260323f1dcec49e3115019 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,118 @@ +const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const { + switch ((MipsISD::NodeType)Opcode) { + case MipsISD::FIRST_NUMBER: break; + case MipsISD::JmpLink: return "MipsISD::JmpLink"; + case MipsISD::TailCall: return "MipsISD::TailCall"; + case MipsISD::Highest: return "MipsISD::Highest"; + case MipsISD::Higher: return "MipsISD::Higher"; + case MipsISD::Hi: return "MipsISD::Hi"; + case MipsISD::Lo: return "MipsISD::Lo"; + case MipsISD::GotHi: return "MipsISD::GotHi"; + case MipsISD::TlsHi: return "MipsISD::TlsHi"; + case MipsISD::GPRel: return "MipsISD::GPRel"; + case MipsISD::ThreadPointer: return "MipsISD::ThreadPointer"; + case MipsISD::Ret: return "MipsISD::Ret"; + case MipsISD::ERet: return "MipsISD::ERet"; + case MipsISD::EH_RETURN: return "MipsISD::EH_RETURN"; + case MipsISD::FMS: return "MipsISD::FMS"; + case MipsISD::FPBrcond: return "MipsISD::FPBrcond"; + case MipsISD::FPCmp: return "MipsISD::FPCmp"; + case MipsISD::FSELECT: return "MipsISD::FSELECT"; + case MipsISD::MTC1_D64: return "MipsISD::MTC1_D64"; + case MipsISD::CMovFP_T: return "MipsISD::CMovFP_T"; + case MipsISD::CMovFP_F: return "MipsISD::CMovFP_F"; + case MipsISD::TruncIntFP: return "MipsISD::TruncIntFP"; + case MipsISD::MFHI: return "MipsISD::MFHI"; + case MipsISD::MFLO: return "MipsISD::MFLO"; + case MipsISD::MTLOHI: return "MipsISD::MTLOHI"; + case MipsISD::Mult: return "MipsISD::Mult"; + case MipsISD::Multu: return "MipsISD::Multu"; + case MipsISD::MAdd: return "MipsISD::MAdd"; + case MipsISD::MAddu: return "MipsISD::MAddu"; + case MipsISD::MSub: return "MipsISD::MSub"; + case MipsISD::MSubu: return "MipsISD::MSubu"; + case MipsISD::DivRem: return "MipsISD::DivRem"; + case MipsISD::DivRemU: return "MipsISD::DivRemU"; + case MipsISD::DivRem16: return "MipsISD::DivRem16"; + case MipsISD::DivRemU16: return "MipsISD::DivRemU16"; + case MipsISD::BuildPairF64: return "MipsISD::BuildPairF64"; + case MipsISD::ExtractElementF64: return "MipsISD::ExtractElementF64"; + case MipsISD::Wrapper: return "MipsISD::Wrapper"; + case MipsISD::DynAlloc: return "MipsISD::DynAlloc"; + case MipsISD::Sync: return "MipsISD::Sync"; + case MipsISD::Ext: return "MipsISD::Ext"; + case MipsISD::Ins: return "MipsISD::Ins"; + case MipsISD::CIns: return "MipsISD::CIns"; + case MipsISD::LWL: return "MipsISD::LWL"; + case MipsISD::LWR: return "MipsISD::LWR"; + case MipsISD::SWL: return "MipsISD::SWL"; + case MipsISD::SWR: return "MipsISD::SWR"; + case MipsISD::LDL: return "MipsISD::LDL"; + case MipsISD::LDR: return "MipsISD::LDR"; + case MipsISD::SDL: return "MipsISD::SDL"; + case MipsISD::SDR: return "MipsISD::SDR"; + case MipsISD::EXTP: return "MipsISD::EXTP"; + case MipsISD::EXTPDP: return "MipsISD::EXTPDP"; + case MipsISD::EXTR_S_H: return "MipsISD::EXTR_S_H"; + case MipsISD::EXTR_W: return "MipsISD::EXTR_W"; + case MipsISD::EXTR_R_W: return "MipsISD::EXTR_R_W"; + case MipsISD::EXTR_RS_W: return "MipsISD::EXTR_RS_W"; + case MipsISD::SHILO: return "MipsISD::SHILO"; + case MipsISD::MTHLIP: return "MipsISD::MTHLIP"; + case MipsISD::MULSAQ_S_W_PH: return "MipsISD::MULSAQ_S_W_PH"; + case MipsISD::MAQ_S_W_PHL: return "MipsISD::MAQ_S_W_PHL"; + case MipsISD::MAQ_S_W_PHR: return "MipsISD::MAQ_S_W_PHR"; + case MipsISD::MAQ_SA_W_PHL: return "MipsISD::MAQ_SA_W_PHL"; + case MipsISD::MAQ_SA_W_PHR: return "MipsISD::MAQ_SA_W_PHR"; + case MipsISD::DPAU_H_QBL: return "MipsISD::DPAU_H_QBL"; + case MipsISD::DPAU_H_QBR: return "MipsISD::DPAU_H_QBR"; + case MipsISD::DPSU_H_QBL: return "MipsISD::DPSU_H_QBL"; + case MipsISD::DPSU_H_QBR: return "MipsISD::DPSU_H_QBR"; + case MipsISD::DPAQ_S_W_PH: return "MipsISD::DPAQ_S_W_PH"; + case MipsISD::DPSQ_S_W_PH: return "MipsISD::DPSQ_S_W_PH"; + case MipsISD::DPAQ_SA_L_W: return "MipsISD::DPAQ_SA_L_W"; + case MipsISD::DPSQ_SA_L_W: return "MipsISD::DPSQ_SA_L_W"; + case MipsISD::DPA_W_PH: return "MipsISD::DPA_W_PH"; + case MipsISD::DPS_W_PH: return "MipsISD::DPS_W_PH"; + case MipsISD::DPAQX_S_W_PH: return "MipsISD::DPAQX_S_W_PH"; + case MipsISD::DPAQX_SA_W_PH: return "MipsISD::DPAQX_SA_W_PH"; + case MipsISD::DPAX_W_PH: return "MipsISD::DPAX_W_PH"; + case MipsISD::DPSX_W_PH: return "MipsISD::DPSX_W_PH"; + case MipsISD::DPSQX_S_W_PH: return "MipsISD::DPSQX_S_W_PH"; + case MipsISD::DPSQX_SA_W_PH: return "MipsISD::DPSQX_SA_W_PH"; + case MipsISD::MULSA_W_PH: return "MipsISD::MULSA_W_PH"; + case MipsISD::MULT: return "MipsISD::MULT"; + case MipsISD::MULTU: return "MipsISD::MULTU"; + case MipsISD::MADD_DSP: return "MipsISD::MADD_DSP"; + case MipsISD::MADDU_DSP: return "MipsISD::MADDU_DSP"; + case MipsISD::MSUB_DSP: return "MipsISD::MSUB_DSP"; + case MipsISD::MSUBU_DSP: return "MipsISD::MSUBU_DSP"; + case MipsISD::SHLL_DSP: return "MipsISD::SHLL_DSP"; + case MipsISD::SHRA_DSP: return "MipsISD::SHRA_DSP"; + case MipsISD::SHRL_DSP: return "MipsISD::SHRL_DSP"; + case MipsISD::SETCC_DSP: return "MipsISD::SETCC_DSP"; + case MipsISD::SELECT_CC_DSP: return "MipsISD::SELECT_CC_DSP"; + case MipsISD::VALL_ZERO: return "MipsISD::VALL_ZERO"; + case MipsISD::VANY_ZERO: return "MipsISD::VANY_ZERO"; + case MipsISD::VALL_NONZERO: return "MipsISD::VALL_NONZERO"; + case MipsISD::VANY_NONZERO: return "MipsISD::VANY_NONZERO"; + case MipsISD::VCEQ: return "MipsISD::VCEQ"; + case MipsISD::VCLE_S: return "MipsISD::VCLE_S"; + case MipsISD::VCLE_U: return "MipsISD::VCLE_U"; + case MipsISD::VCLT_S: return "MipsISD::VCLT_S"; + case MipsISD::VCLT_U: return "MipsISD::VCLT_U"; + case MipsISD::VEXTRACT_SEXT_ELT: return "MipsISD::VEXTRACT_SEXT_ELT"; + case MipsISD::VEXTRACT_ZEXT_ELT: return "MipsISD::VEXTRACT_ZEXT_ELT"; + case MipsISD::VNOR: return "MipsISD::VNOR"; + case MipsISD::VSHF: return "MipsISD::VSHF"; + case MipsISD::SHF: return "MipsISD::SHF"; + case MipsISD::ILVEV: return "MipsISD::ILVEV"; + case MipsISD::ILVOD: return "MipsISD::ILVOD"; + case MipsISD::ILVL: return "MipsISD::ILVL"; + case MipsISD::ILVR: return "MipsISD::ILVR"; + case MipsISD::PCKEV: return "MipsISD::PCKEV"; + case MipsISD::PCKOD: return "MipsISD::PCKOD"; + case MipsISD::INSVE: return "MipsISD::INSVE"; + } + return nullptr; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..427f606640a0f495babbc3c5472fed65979665f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp @@ -0,0 +1,3 @@ +bool MipsTargetLowering::isCheapToSpeculateCtlz() const { + return Subtarget.hasMips32(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..169d4b4109f983c5149a60aca7d2757d876881b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp @@ -0,0 +1,3 @@ +bool MipsTargetLowering::isCheapToSpeculateCttz() const { + return Subtarget.hasMips32(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a11da12c981206c45489e9ede21981c97f116aba --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp @@ -0,0 +1,9 @@ +bool MipsSETargetLowering::isEligibleForTailCallOptimization(const CCState &CCInfo, unsigned NextStackOffset, const MipsFunctionInfo &FI) const { + if (!UseMipsTailCalls) + return false; + if (FI.isISR()) + return false; + if (CCInfo.getInRegsParamsCount() > 0 || FI.hasByvalArg()) + return false; + return NextStackOffset <= FI.getIncomingArgSize(); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9419a0fddfba1adb1a506c85ee0e7d6b360839c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp @@ -0,0 +1,7 @@ +bool MipsTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT, bool ForCodeSize) const { + if (VT != MVT::f32 && VT != MVT::f64) + return false; + if (Imm.isNegZero()) + return false; + return Imm.isZero(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bce29b2aa473dfb01a1adc6b39d25eec12f141ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,15 @@ +bool MipsTargetLowering::isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I) const { + if (AM.BaseGV) + return false; + switch (AM.Scale) { + case 0: + break; + case 1: + if (!AM.HasBaseReg) + break; + return false; + default: + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7f0b8be13658b20f7e13eee561be03722d32593 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp @@ -0,0 +1,14 @@ +SDValue MipsSETargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT ResTy = Op->getValueType(0); + SDValue Op0 = Op->getOperand(0); + EVT VecTy = Op0->getValueType(0); + if (!VecTy.is128BitVector()) + return SDValue(); + if (ResTy.isInteger()) { + SDValue Op1 = Op->getOperand(1); + EVT EltTy = VecTy.getVectorElementType(); + return DAG.getNode(MipsISD::VEXTRACT_SEXT_ELT, DL, ResTy, Op0, Op1, DAG.getValueType(EltTy)); + } + return Op; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ccc7415a4e7fc3ff6f6faf8cb2df39facab5474 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerSELECT(SDValue Op, SelectionDAG &DAG) const { + assert(!Subtarget.hasMips32r6() && !Subtarget.hasMips64r6()); + SDValue Cond = createFPCmp(DAG, Op.getOperand(0)); + if (Cond.getOpcode() != MipsISD::FPCmp) + return Op; + return createCMovFP(DAG, Cond, Op.getOperand(1), Op.getOperand(2), SDLoc(Op)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc4822b4dace5d5d62f234df92749f851e92acbc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp @@ -0,0 +1,3 @@ +None + + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fa999e2c8ce2bc3c16770b5abd0a2f1aa9900a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp @@ -0,0 +1,17 @@ +SDValue MipsTargetLowering::lowerShiftLeftParts(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + MVT VT = Subtarget.isGP64bit() ? MVT::i64 : MVT::i32; + SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + SDValue Not = DAG.getNode(ISD::XOR, DL, MVT::i32, Shamt, DAG.getConstant(-1, DL, MVT::i32)); + SDValue ShiftRight1Lo = DAG.getNode(ISD::SRL, DL, VT, Lo, DAG.getConstant(1, DL, VT)); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, ShiftRight1Lo, Not); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, Hi, Shamt); + SDValue Or = DAG.getNode(ISD::OR, DL, VT, ShiftLeftHi, ShiftRightLo); + SDValue ShiftLeftLo = DAG.getNode(ISD::SHL, DL, VT, Lo, Shamt); + SDValue Cond = DAG.getNode(ISD::AND, DL, MVT::i32, Shamt, DAG.getConstant(VT.getSizeInBits(), DL, MVT::i32)); + Lo = DAG.getNode(ISD::SELECT, DL, VT, Cond, DAG.getConstant(0, DL, VT), ShiftLeftLo); + Hi = DAG.getNode(ISD::SELECT, DL, VT, Cond, ShiftLeftLo, Or); + SDValue Ops[2] = {Lo, Hi}; + return DAG.getMergeValues(Ops, DL); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b15ec88f4c37aaf44b6a8c2e28d3acfcac6e939a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp @@ -0,0 +1,22 @@ +SDValue MipsTargetLowering::lowerShiftRightParts(SDValue Op, SelectionDAG &DAG, bool IsSRA) const { + SDLoc DL(Op); + SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + MVT VT = Subtarget.isGP64bit() ? MVT::i64 : MVT::i32; + SDValue Not = DAG.getNode(ISD::XOR, DL, MVT::i32, Shamt, DAG.getConstant(-1, DL, MVT::i32)); + SDValue ShiftLeft1Hi = DAG.getNode(ISD::SHL, DL, VT, Hi, DAG.getConstant(1, DL, VT)); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, ShiftLeft1Hi, Not); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, Lo, Shamt); + SDValue Or = DAG.getNode(ISD::OR, DL, VT, ShiftLeftHi, ShiftRightLo); + SDValue ShiftRightHi = DAG.getNode(IsSRA ? ISD::SRA : ISD::SRL, DL, VT, Hi, Shamt); + SDValue Cond = DAG.getNode(ISD::AND, DL, MVT::i32, Shamt, DAG.getConstant(VT.getSizeInBits(), DL, MVT::i32)); + SDValue Ext = DAG.getNode(ISD::SRA, DL, VT, Hi, DAG.getConstant(VT.getSizeInBits() - 1, DL, VT)); + if (!(Subtarget.hasMips4() || Subtarget.hasMips32())) { + SDVTList VTList = DAG.getVTList(VT, VT); + return DAG.getNode(Subtarget.isGP64bit() ? Mips::PseudoD_SELECT_I64 : Mips::PseudoD_SELECT_I, DL, VTList, Cond, ShiftRightHi, IsSRA ? Ext : DAG.getConstant(0, DL, VT), Or, ShiftRightHi); + } + Lo = DAG.getNode(ISD::SELECT, DL, VT, Cond, ShiftRightHi, Or); + Hi = DAG.getNode(ISD::SELECT, DL, VT, Cond, IsSRA ? Ext : DAG.getConstant(0, DL, VT), ShiftRightHi); + SDValue Ops[2] = {Lo, Hi}; + return DAG.getMergeValues(Ops, DL); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f68f25a787d6d9d179404a12f57ee6bc55abf05a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp @@ -0,0 +1,2 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8633411d86591074b31a54b78e3486a650b9eb13 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp @@ -0,0 +1,3 @@ +bool shouldInsertFencesForAtomic(const Instruction *I) const override { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..959ee62f318ee63e3f1f4208c95ae43a1a6e7761 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp @@ -0,0 +1,5 @@ +bool MipsTargetLowering::shouldSignExtendTypeInLibCall(EVT Type, bool IsSigned) const { + if ((ABI.IsN32() || ABI.IsN64()) && Type == MVT::i32) + return true; + return IsSigned; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4dec9cfa317b44f43b2ec7db58442782f2df351e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp @@ -0,0 +1,9 @@ +MipsInstructionSelector::MipsInstructionSelector(const MipsTargetMachine &TM, const MipsSubtarget &STI, const MipsRegisterBankInfo &RBI) : InstructionSelector(), TM(TM), STI(STI), TII(*STI.getInstrInfo()), TRI(*STI.getRegisterInfo()), RBI(RBI), +#define GET_GLOBALISEL_PREDICATES_INIT +#include "MipsGenGlobalISel.inc" +#undef GET_GLOBALISEL_PREDICATES_INIT +#define GET_GLOBALISEL_TEMPORARIES_INIT +#include "MipsGenGlobalISel.inc" +#undef GET_GLOBALISEL_TEMPORARIES_INIT +{ +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dad172a8ea90b139f00256911eedcffbae14848d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *createMipsInstructionSelector(const MipsTargetMachine &TM, MipsSubtarget &Subtarget, MipsRegisterBankInfo &RBI) { + return new MipsInstructionSelector(TM, Subtarget, RBI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/getName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/getName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3070f67f8b2d72c6473a6bf2cc4639c82757caaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/getName.cpp @@ -0,0 +1,3 @@ +static const char *getName() { + return DEBUG_TYPE; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/select.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a17b427bb0cd822697fc1bb9f4a5c2c68b1a435 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/InstructionSelector/select.cpp @@ -0,0 +1,443 @@ +bool MipsInstructionSelector::select(MachineInstr &I) { + MachineBasicBlock &MBB = *I.getParent(); + MachineFunction &MF = *MBB.getParent(); + MachineRegisterInfo &MRI = MF.getRegInfo(); + if (!isPreISelGenericOpcode(I.getOpcode())) { + if (I.isCopy()) + return selectCopy(I, MRI); + return true; + } + if (I.getOpcode() == Mips::G_MUL && isRegInGprb(I.getOperand(0).getReg(), MRI)) { + MachineInstr *Mul = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::MUL)).add(I.getOperand(0)).add(I.getOperand(1)).add(I.getOperand(2)); + if (!constrainSelectedInstRegOperands(*Mul, TII, TRI, RBI)) + return false; + Mul->getOperand(3).setIsDead(true); + Mul->getOperand(4).setIsDead(true); + I.eraseFromParent(); + return true; + } + if (selectImpl(I, *CoverageInfo)) + return true; + MachineInstr *MI = nullptr; + using namespace TargetOpcode; + switch (I.getOpcode()) { + case G_UMULH: { + Register PseudoMULTuReg = MRI.createVirtualRegister(&Mips::ACC64RegClass); + MachineInstr *PseudoMULTu, *PseudoMove; + PseudoMULTu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoMULTu)).addDef(PseudoMULTuReg).add(I.getOperand(1)).add(I.getOperand(2)); + if (!constrainSelectedInstRegOperands(*PseudoMULTu, TII, TRI, RBI)) + return false; + PseudoMove = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoMFHI)).addDef(I.getOperand(0).getReg()).addUse(PseudoMULTuReg); + if (!constrainSelectedInstRegOperands(*PseudoMove, TII, TRI, RBI)) + return false; + + I.eraseFromParent(); + return true; + } + case G_PTR_ADD: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDu)).add(I.getOperand(0)).add(I.getOperand(1)).add(I.getOperand(2)); + break; + } + case G_INTTOPTR: + case G_PTRTOINT: { + I.setDesc(TII.get(COPY)); + return selectCopy(I, MRI); + } + case G_FRAME_INDEX: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).add(I.getOperand(0)).add(I.getOperand(1)).addImm(0); + break; + } + case G_BRCOND: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::BNE)).add(I.getOperand(0)).addUse(Mips::ZERO).add(I.getOperand(1)); + break; + } + case G_BRJT: { + unsigned EntrySize = MF.getJumpTableInfo()->getEntrySize(MF.getDataLayout()); + assert(isPowerOf2_32(EntrySize) && "Non-power-of-two jump-table entry size not supported."); + Register JTIndex = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *SLL = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::SLL)).addDef(JTIndex).addUse(I.getOperand(2).getReg()).addImm(Log2_32(EntrySize)); + if (!constrainSelectedInstRegOperands(*SLL, TII, TRI, RBI)) + return false; + Register DestAddress = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *ADDu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDu)).addDef(DestAddress).addUse(I.getOperand(0).getReg()).addUse(JTIndex); + if (!constrainSelectedInstRegOperands(*ADDu, TII, TRI, RBI)) + return false; + Register Dest = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *LW = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LW)).addDef(Dest).addUse(DestAddress).addJumpTableIndex(I.getOperand(1).getIndex(), MipsII::MO_ABS_LO).addMemOperand(MF.getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOLoad, 4, Align(4))); + if (!constrainSelectedInstRegOperands(*LW, TII, TRI, RBI)) + return false; + if (MF.getTarget().isPositionIndependent()) { + Register DestTmp = MRI.createVirtualRegister(&Mips::GPR32RegClass); + LW->getOperand(0).setReg(DestTmp); + MachineInstr *ADDu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDu)).addDef(Dest).addUse(DestTmp).addUse(MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)); + if (!constrainSelectedInstRegOperands(*ADDu, TII, TRI, RBI)) + return false; + } + MachineInstr *Branch = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoIndirectBranch)).addUse(Dest); + if (!constrainSelectedInstRegOperands(*Branch, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_BRINDIRECT: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::PseudoIndirectBranch)).add(I.getOperand(0)); + break; + } + case G_PHI: { + const Register DestReg = I.getOperand(0).getReg(); + const TargetRegisterClass *DefRC = nullptr; + if (Register::isPhysicalRegister(DestReg)) + DefRC = TRI.getRegClass(DestReg); + else + DefRC = getRegClassForTypeOnBank(DestReg, MRI); + I.setDesc(TII.get(TargetOpcode::PHI)); + return RBI.constrainGenericRegister(DestReg, *DefRC, MRI); + } + case G_STORE: + case G_LOAD: + case G_ZEXTLOAD: + case G_SEXTLOAD: { + auto MMO = *I.memoperands_begin(); + MachineOperand BaseAddr = I.getOperand(1); + int64_t SignedOffset = 0; + MachineInstr *Addr = MRI.getVRegDef(I.getOperand(1).getReg()); + if (Addr->getOpcode() == G_PTR_ADD) { + MachineInstr *Offset = MRI.getVRegDef(Addr->getOperand(2).getReg()); + if (Offset->getOpcode() == G_CONSTANT) { + APInt OffsetValue = Offset->getOperand(1).getCImm()->getValue(); + if (OffsetValue.isSignedIntN(16)) { + BaseAddr = Addr->getOperand(1); + SignedOffset = OffsetValue.getSExtValue(); + } + } + } + if (MMO->getAlign() < MMO->getSize() && + !STI.systemSupportsUnalignedAccess()) { + if (MMO->getSize() != 4 || !isRegInGprb(I.getOperand(0).getReg(), MRI)) + return false; + if (I.getOpcode() == G_STORE) { + if (!buildUnalignedStore(I, Mips::SWL, BaseAddr, SignedOffset + 3, MMO)) + return false; + if (!buildUnalignedStore(I, Mips::SWR, BaseAddr, SignedOffset, MMO)) + return false; + I.eraseFromParent(); + return true; + } + if (I.getOpcode() == G_LOAD) { + Register ImplDef = MRI.createVirtualRegister(&Mips::GPR32RegClass); + BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::IMPLICIT_DEF)).addDef(ImplDef); + Register Tmp = MRI.createVirtualRegister(&Mips::GPR32RegClass); + if (!buildUnalignedLoad(I, Mips::LWL, Tmp, BaseAddr, SignedOffset + 3,ImplDef, MMO)) + return false; + if (!buildUnalignedLoad(I, Mips::LWR, I.getOperand(0).getReg(), BaseAddr, SignedOffset, Tmp, MMO)) + return false; + I.eraseFromParent(); + return true; + } + return false; + } + const unsigned NewOpc = selectLoadStoreOpCode(I, MRI); + if (NewOpc == I.getOpcode()) + return false; + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(NewOpc)).add(I.getOperand(0)).add(BaseAddr).addImm(SignedOffset).addMemOperand(MMO); + break; + } + case G_UDIV: + case G_UREM: + case G_SDIV: + case G_SREM: { + Register HILOReg = MRI.createVirtualRegister(&Mips::ACC64RegClass); + bool IsSigned = I.getOpcode() == G_SREM || I.getOpcode() == G_SDIV; + bool IsDiv = I.getOpcode() == G_UDIV || I.getOpcode() == G_SDIV; + MachineInstr *PseudoDIV, *PseudoMove; + PseudoDIV = BuildMI(MBB, I, I.getDebugLoc(), TII.get(IsSigned ? Mips::PseudoSDIV : Mips::PseudoUDIV)).addDef(HILOReg).add(I.getOperand(1)).add(I.getOperand(2)); + if (!constrainSelectedInstRegOperands(*PseudoDIV, TII, TRI, RBI)) + return false; + PseudoMove = BuildMI(MBB, I, I.getDebugLoc(), TII.get(IsDiv ? Mips::PseudoMFLO : Mips::PseudoMFHI)).addDef(I.getOperand(0).getReg()).addUse(HILOReg); + if (!constrainSelectedInstRegOperands(*PseudoMove, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_SELECT: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::MOVN_I_I)).add(I.getOperand(0)).add(I.getOperand(2)).add(I.getOperand(1)).add(I.getOperand(3)); + break; + } + case G_UNMERGE_VALUES: { + if (I.getNumOperands() != 3) + return false; + Register Src = I.getOperand(2).getReg(); + Register Lo = I.getOperand(0).getReg(); + Register Hi = I.getOperand(1).getReg(); + if (!isRegInFprb(Src, MRI) || !(isRegInGprb(Lo, MRI) && isRegInGprb(Hi, MRI))) + return false; + unsigned Opcode = STI.isFP64bit() ? Mips::ExtractElementF64_64 : Mips::ExtractElementF64; + MachineInstr *ExtractLo = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Opcode)).addDef(Lo).addUse(Src).addImm(0); + if (!constrainSelectedInstRegOperands(*ExtractLo, TII, TRI, RBI)) + return false; + MachineInstr *ExtractHi = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Opcode)).addDef(Hi).addUse(Src).addImm(1); + if (!constrainSelectedInstRegOperands(*ExtractHi, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_IMPLICIT_DEF: { + Register Dst = I.getOperand(0).getReg(); + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::IMPLICIT_DEF)).addDef(Dst); + MRI.setRegClass(Dst, getRegClassForTypeOnBank(Dst, MRI)); + break; + } + case G_CONSTANT: { + MachineIRBuilder B(I); + if (!materialize32BitImm(I.getOperand(0).getReg(), I.getOperand(1).getCImm()->getValue(), B)) + return false; + I.eraseFromParent(); + return true; + } + case G_FCONSTANT: { + const APFloat &FPimm = I.getOperand(1).getFPImm()->getValueAPF(); + APInt APImm = FPimm.bitcastToAPInt(); + unsigned Size = MRI.getType(I.getOperand(0).getReg()).getSizeInBits(); + if (Size == 32) { + Register GPRReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineIRBuilder B(I); + if (!materialize32BitImm(GPRReg, APImm, B)) + return false; + MachineInstrBuilder MTC1 = B.buildInstr(Mips::MTC1, {I.getOperand(0).getReg()}, {GPRReg}); + if (!MTC1.constrainAllUses(TII, TRI, RBI)) + return false; + } + if (Size == 64) { + Register GPRRegHigh = MRI.createVirtualRegister(&Mips::GPR32RegClass); + Register GPRRegLow = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineIRBuilder B(I); + if (!materialize32BitImm(GPRRegHigh, APImm.getHiBits(32).trunc(32), B)) + return false; + if (!materialize32BitImm(GPRRegLow, APImm.getLoBits(32).trunc(32), B)) + return false; + MachineInstrBuilder PairF64 = B.buildInstr(STI.isFP64bit() ? Mips::BuildPairF64_64 : Mips::BuildPairF64, {I.getOperand(0).getReg()}, {GPRRegLow, GPRRegHigh}); + if (!PairF64.constrainAllUses(TII, TRI, RBI)) + return false; + } + I.eraseFromParent(); + return true; + } + case G_FABS: { + unsigned Size = MRI.getType(I.getOperand(0).getReg()).getSizeInBits(); + unsigned FABSOpcode = Size == 32 ? Mips::FABS_S : STI.isFP64bit() ? Mips::FABS_D64 : Mips::FABS_D32; + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(FABSOpcode)).add(I.getOperand(0)).add(I.getOperand(1)); + break; + } + case G_FPTOSI: { + unsigned FromSize = MRI.getType(I.getOperand(1).getReg()).getSizeInBits(); + unsigned ToSize = MRI.getType(I.getOperand(0).getReg()).getSizeInBits(); + (void)ToSize; + assert((ToSize == 32) && "Unsupported integer size for G_FPTOSI"); + assert((FromSize == 32 || FromSize == 64) && "Unsupported floating point size for G_FPTOSI"); + unsigned Opcode; + if (FromSize == 32) + Opcode = Mips::TRUNC_W_S; + else + Opcode = STI.isFP64bit() ? Mips::TRUNC_W_D64 : Mips::TRUNC_W_D32; + Register ResultInFPR = MRI.createVirtualRegister(&Mips::FGR32RegClass); + MachineInstr *Trunc = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Opcode)).addDef(ResultInFPR).addUse(I.getOperand(1).getReg()); + if (!constrainSelectedInstRegOperands(*Trunc, TII, TRI, RBI)) + return false; + MachineInstr *Move = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::MFC1)).addDef(I.getOperand(0).getReg()).addUse(ResultInFPR); + if (!constrainSelectedInstRegOperands(*Move, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_GLOBAL_VALUE: { + const llvm::GlobalValue *GVal = I.getOperand(1).getGlobal(); + if (MF.getTarget().isPositionIndependent()) { + MachineInstr *LWGOT = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LW)).addDef(I.getOperand(0).getReg()).addReg(MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)).addGlobalAddress(GVal); + if (I.getOperand(1).getTargetFlags() == MipsII::MO_GOT_CALL) + LWGOT->getOperand(2).setTargetFlags(MipsII::MO_GOT_CALL); + else + LWGOT->getOperand(2).setTargetFlags(MipsII::MO_GOT); + LWGOT->addMemOperand(MF, MF.getMachineMemOperand(MachinePointerInfo::getGOT(MF), MachineMemOperand::MOLoad, 4, Align(4))); + if (!constrainSelectedInstRegOperands(*LWGOT, TII, TRI, RBI)) + return false; + if (GVal->hasLocalLinkage()) { + Register LWGOTDef = MRI.createVirtualRegister(&Mips::GPR32RegClass); + LWGOT->getOperand(0).setReg(LWGOTDef); + MachineInstr *ADDiu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).addDef(I.getOperand(0).getReg()).addReg(LWGOTDef).addGlobalAddress(GVal); + ADDiu->getOperand(2).setTargetFlags(MipsII::MO_ABS_LO); + if (!constrainSelectedInstRegOperands(*ADDiu, TII, TRI, RBI)) + return false; + } + } + else { + Register LUiReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *LUi = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LUi)).addDef(LUiReg).addGlobalAddress(GVal); + LUi->getOperand(1).setTargetFlags(MipsII::MO_ABS_HI); + if (!constrainSelectedInstRegOperands(*LUi, TII, TRI, RBI)) + return false; + MachineInstr *ADDiu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).addDef(I.getOperand(0).getReg()).addUse(LUiReg).addGlobalAddress(GVal); + ADDiu->getOperand(2).setTargetFlags(MipsII::MO_ABS_LO); + if (!constrainSelectedInstRegOperands(*ADDiu, TII, TRI, RBI)) + return false; + } + I.eraseFromParent(); + return true; + } + case G_JUMP_TABLE: { + if (MF.getTarget().isPositionIndependent()) { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LW)).addDef(I.getOperand(0).getReg()).addReg(MF.getInfo()->getGlobalBaseRegForGlobalISel(MF)).addJumpTableIndex(I.getOperand(1).getIndex(), MipsII::MO_GOT).addMemOperand(MF.getMachineMemOperand( MachinePointerInfo::getGOT(MF), MachineMemOperand::MOLoad, 4, Align(4))); + } + else { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LUi)).addDef(I.getOperand(0).getReg()).addJumpTableIndex(I.getOperand(1).getIndex(), MipsII::MO_ABS_HI); + } + break; + } + case G_ICMP: { + struct Instr { + unsigned Opcode; + Register Def, LHS, RHS; + Instr(unsigned Opcode, Register Def, Register LHS, Register RHS) : Opcode(Opcode), Def(Def), LHS(LHS), RHS(RHS){}; + bool hasImm() const { + if (Opcode == Mips::SLTiu || Opcode == Mips::XORi) + return true; + return false; + } + }; + SmallVector Instructions; + Register ICMPReg = I.getOperand(0).getReg(); + Register Temp = MRI.createVirtualRegister(&Mips::GPR32RegClass); + Register LHS = I.getOperand(2).getReg(); + Register RHS = I.getOperand(3).getReg(); + CmpInst::Predicate Cond = static_cast(I.getOperand(1).getPredicate()); + switch (Cond) { + case CmpInst::ICMP_EQ: + Instructions.emplace_back(Mips::XOR, Temp, LHS, RHS); + Instructions.emplace_back(Mips::SLTiu, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_NE: + Instructions.emplace_back(Mips::XOR, Temp, LHS, RHS); + Instructions.emplace_back(Mips::SLTu, ICMPReg, Mips::ZERO, Temp); + break; + case CmpInst::ICMP_UGT: + Instructions.emplace_back(Mips::SLTu, ICMPReg, RHS, LHS); + break; + case CmpInst::ICMP_UGE: + Instructions.emplace_back(Mips::SLTu, Temp, LHS, RHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_ULT: + Instructions.emplace_back(Mips::SLTu, ICMPReg, LHS, RHS); + break; + case CmpInst::ICMP_ULE: + Instructions.emplace_back(Mips::SLTu, Temp, RHS, LHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_SGT: + Instructions.emplace_back(Mips::SLT, ICMPReg, RHS, LHS); + break; + case CmpInst::ICMP_SGE: + Instructions.emplace_back(Mips::SLT, Temp, LHS, RHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + case CmpInst::ICMP_SLT: + Instructions.emplace_back(Mips::SLT, ICMPReg, LHS, RHS); + break; + case CmpInst::ICMP_SLE: + Instructions.emplace_back(Mips::SLT, Temp, RHS, LHS); + Instructions.emplace_back(Mips::XORi, ICMPReg, Temp, 1); + break; + default: + return false; + } + MachineIRBuilder B(I); + for (const struct Instr &Instruction : Instructions) { + MachineInstrBuilder MIB = B.buildInstr(Instruction.Opcode, {Instruction.Def}, {Instruction.LHS}); + if (Instruction.hasImm()) + MIB.addImm(Instruction.RHS); + else + MIB.addUse(Instruction.RHS); + if (!MIB.constrainAllUses(TII, TRI, RBI)) + return false; + } + I.eraseFromParent(); + return true; + } + case G_FCMP: { + unsigned MipsFCMPCondCode; + bool isLogicallyNegated; + switch (CmpInst::Predicate Cond = static_cast( I.getOperand(1).getPredicate())) { + case CmpInst::FCMP_UNO: + case CmpInst::FCMP_ORD: + MipsFCMPCondCode = Mips::FCOND_UN; + isLogicallyNegated = Cond != CmpInst::FCMP_UNO; + break; + case CmpInst::FCMP_OEQ: + case CmpInst::FCMP_UNE: + MipsFCMPCondCode = Mips::FCOND_OEQ; + isLogicallyNegated = Cond != CmpInst::FCMP_OEQ; + break; + case CmpInst::FCMP_UEQ: + case CmpInst::FCMP_ONE: + MipsFCMPCondCode = Mips::FCOND_UEQ; + isLogicallyNegated = Cond != CmpInst::FCMP_UEQ; + break; + case CmpInst::FCMP_OLT: + case CmpInst::FCMP_UGE: + MipsFCMPCondCode = Mips::FCOND_OLT; + isLogicallyNegated = Cond != CmpInst::FCMP_OLT; + break; + case CmpInst::FCMP_ULT: + case CmpInst::FCMP_OGE: + MipsFCMPCondCode = Mips::FCOND_ULT; + isLogicallyNegated = Cond != CmpInst::FCMP_ULT; + break; + case CmpInst::FCMP_OLE: + case CmpInst::FCMP_UGT: + MipsFCMPCondCode = Mips::FCOND_OLE; + isLogicallyNegated = Cond != CmpInst::FCMP_OLE; + break; + case CmpInst::FCMP_ULE: + case CmpInst::FCMP_OGT: + MipsFCMPCondCode = Mips::FCOND_ULE; + isLogicallyNegated = Cond != CmpInst::FCMP_ULE; + break; + default: + return false; + } + unsigned MoveOpcode = isLogicallyNegated ? Mips::MOVT_I : Mips::MOVF_I; + Register TrueInReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::ADDiu)).addDef(TrueInReg).addUse(Mips::ZERO).addImm(1); + unsigned Size = MRI.getType(I.getOperand(2).getReg()).getSizeInBits(); + unsigned FCMPOpcode = Size == 32 ? Mips::FCMP_S32 : STI.isFP64bit() ? Mips::FCMP_D64 : Mips::FCMP_D32; + MachineInstr *FCMP = BuildMI(MBB, I, I.getDebugLoc(), TII.get(FCMPOpcode)).addUse(I.getOperand(2).getReg()).addUse(I.getOperand(3).getReg()).addImm(MipsFCMPCondCode); + if (!constrainSelectedInstRegOperands(*FCMP, TII, TRI, RBI)) + return false; + MachineInstr *Move = BuildMI(MBB, I, I.getDebugLoc(), TII.get(MoveOpcode)).addDef(I.getOperand(0).getReg()).addUse(Mips::ZERO).addUse(Mips::FCC0).addUse(TrueInReg); + if (!constrainSelectedInstRegOperands(*Move, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + case G_FENCE: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::SYNC)).addImm(0); + break; + } + case G_VASTART: { + MipsFunctionInfo *FuncInfo = MF.getInfo(); + int FI = FuncInfo->getVarArgsFrameIndex(); + Register LeaReg = MRI.createVirtualRegister(&Mips::GPR32RegClass); + MachineInstr *LEA_ADDiu = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::LEA_ADDiu)).addDef(LeaReg).addFrameIndex(FI).addImm(0); + if (!constrainSelectedInstRegOperands(*LEA_ADDiu, TII, TRI, RBI)) + return false; + MachineInstr *Store = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::SW)).addUse(LeaReg).addUse(I.getOperand(0).getReg()).addImm(0); + if (!constrainSelectedInstRegOperands(*Store, TII, TRI, RBI)) + return false; + I.eraseFromParent(); + return true; + } + default: + return false; + } + I.eraseFromParent(); + return constrainSelectedInstRegOperands(*MI, TII, TRI, RBI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69fc5775fe04877af2fc98196e855a0a7b386a11 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp @@ -0,0 +1,62 @@ +MipsLegalizerInfo::MipsLegalizerInfo(const MipsSubtarget &ST) { + using namespace TargetOpcode; + const LLT s1 = LLT::scalar(1); + const LLT s32 = LLT::scalar(32); + const LLT s64 = LLT::scalar(64); + const LLT v16s8 = LLT::vector(16, 8); + const LLT v8s16 = LLT::vector(8, 16); + const LLT v4s32 = LLT::vector(4, 32); + const LLT v2s64 = LLT::vector(2, 64); + const LLT p0 = LLT::pointer(0, 32); + getActionDefinitionsBuilder({G_ADD, G_SUB, G_MUL}).legalIf([=, &ST](const LegalityQuery &Query) { if (CheckTyN(0, Query, {s32})) return true; if (ST.hasMSA() && CheckTyN(0, Query, {v16s8, v8s16, v4s32, v2s64})) return true; return false;}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_UADDO, G_UADDE, G_USUBO, G_USUBE, G_UMULO}).lowerFor({{s32, s1}}); + getActionDefinitionsBuilder(G_UMULH).legalFor({s32}).maxScalar(0, s32); + bool NoAlignRequirements = true; + unsigned Size = Query.Types[0].getSizeInBits(); unsigned QueryMemSize = Query.MMODescrs[0].SizeInBits; assert(QueryMemSize <= Size && "Scalar can't hold MemSize"); + if (Size > 64 || QueryMemSize > 64) return false; + if (!isPowerOf2_64(Query.MMODescrs[0].SizeInBits)) return true; + if (!ST.systemSupportsUnalignedAccess() && isUnalignedMemmoryAccess(QueryMemSize, Query.MMODescrs[0].AlignInBits)) { assert(QueryMemSize != 32 && "4 byte load and store are legal"); return true; } return false;}).minScalar(0, s32); + getActionDefinitionsBuilder(G_IMPLICIT_DEF).legalFor({s32, s64}); + getActionDefinitionsBuilder(G_UNMERGE_VALUES).legalFor({{s32, s64}}); + getActionDefinitionsBuilder(G_MERGE_VALUES).legalFor({{s64, s32}}); + getActionDefinitionsBuilder({G_ZEXTLOAD, G_SEXTLOAD}).legalForTypesWithMemDesc({{s32, p0, 8, 8}, {s32, p0, 16, 8}}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_ZEXT, G_SEXT, G_ANYEXT}).legalIf([](const LegalityQuery &Query) { return false; }).maxScalar(0, s32); + getActionDefinitionsBuilder(G_TRUNC).legalIf([](const LegalityQuery &Query) { return false; }).maxScalar(1, s32); + getActionDefinitionsBuilder(G_SELECT).legalForCartesianProduct({p0, s32, s64}, {s32}).minScalar(0, s32).minScalar(1, s32); + getActionDefinitionsBuilder(G_BRCOND).legalFor({s32}).minScalar(0, s32); + getActionDefinitionsBuilder(G_BRJT).legalFor({{p0, s32}}); + getActionDefinitionsBuilder(G_BRINDIRECT).legalFor({p0}); + getActionDefinitionsBuilder(G_PHI).legalFor({p0, s32, s64}).minScalar(0, s32); + getActionDefinitionsBuilder({G_AND, G_OR, G_XOR}).legalFor({s32}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_SDIV, G_SREM, G_UDIV, G_UREM}).legalIf([=, &ST](const LegalityQuery &Query) { if (CheckTyN(0, Query, {s32})) return true; if (ST.hasMSA() && CheckTyN(0, Query, {v16s8, v8s16, v4s32, v2s64})) return true; return false;}).minScalar(0, s32).libcallFor({s64}); + getActionDefinitionsBuilder({G_SHL, G_ASHR, G_LSHR}).legalFor({{s32, s32}}).clampScalar(1, s32, s32).clampScalar(0, s32, s32); + getActionDefinitionsBuilder(G_ICMP).legalForCartesianProduct({s32}, {s32, p0}).clampScalar(1, s32, s32).minScalar(0, s32); + getActionDefinitionsBuilder(G_CONSTANT).legalFor({s32}).clampScalar(0, s32, s32); + getActionDefinitionsBuilder({G_PTR_ADD, G_INTTOPTR}).legalFor({{p0, s32}}); + getActionDefinitionsBuilder(G_PTRTOINT).legalFor({{s32, p0}}); + getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({p0}); + getActionDefinitionsBuilder({G_GLOBAL_VALUE, G_JUMP_TABLE}).legalFor({p0}); + getActionDefinitionsBuilder(G_DYN_STACKALLOC).lowerFor({{p0, s32}}); + getActionDefinitionsBuilder(G_VASTART).legalFor({p0}); + getActionDefinitionsBuilder(G_BSWAP).legalIf([=, &ST](const LegalityQuery &Query) { if (ST.hasMips32r2() && CheckTyN(0, Query, {s32})) return true; return false;}).lowerIf([=, &ST](const LegalityQuery &Query) { if (!ST.hasMips32r2() && CheckTyN(0, Query, {s32})) return true; return false;}).maxScalar(0, s32); + getActionDefinitionsBuilder(G_BITREVERSE).lowerFor({s32}).maxScalar(0, s32); + getActionDefinitionsBuilder(G_CTLZ).legalFor({{s32, s32}}).maxScalar(0, s32).maxScalar(1, s32); + getActionDefinitionsBuilder(G_CTLZ_ZERO_UNDEF).lowerFor({{s32, s32}}); + getActionDefinitionsBuilder(G_CTTZ).lowerFor({{s32, s32}}).maxScalar(0, s32).maxScalar(1, s32); + getActionDefinitionsBuilder(G_CTTZ_ZERO_UNDEF).lowerFor({{s32, s32}, {s64, s64}}); + getActionDefinitionsBuilder(G_CTPOP).lowerFor({{s32, s32}}).clampScalar(0, s32, s32).clampScalar(1, s32, s32) + getActionDefinitionsBuilder(G_FCONSTANT).legalFor({s32, s64}); + getActionDefinitionsBuilder({G_FADD, G_FSUB, G_FMUL, G_FDIV, G_FABS, G_FSQRT}).legalIf([=, &ST](const LegalityQuery &Query) { if (CheckTyN(0, Query, {s32, s64})) return true; if (ST.hasMSA() && CheckTyN(0, Query, {v16s8, v8s16, v4s32, v2s64})) return true; return false;}); + getActionDefinitionsBuilder(G_FCMP).legalFor({{s32, s32}, {s32, s64}}).minScalar(0, s32); + getActionDefinitionsBuilder({G_FCEIL, G_FFLOOR}).libcallFor({s32, s64}); + getActionDefinitionsBuilder(G_FPEXT).legalFor({{s64, s32}}); + getActionDefinitionsBuilder(G_FPTRUNC).legalFor({{s32, s64}}); + getActionDefinitionsBuilder(G_FPTOSI).legalForCartesianProduct({s32}, {s64, s32}).libcallForCartesianProduct({s64}, {s64, s32}).minScalar(0, s32); + getActionDefinitionsBuilder(G_FPTOUI).libcallForCartesianProduct({s64}, {s64, s32}).lowerForCartesianProduct({s32}, {s64, s32}).minScalar(0, s32); + getActionDefinitionsBuilder(G_SITOFP).legalForCartesianProduct({s64, s32}, {s32}).libcallForCartesianProduct({s64, s32}, {s64}).minScalar(1, s32); + getActionDefinitionsBuilder(G_UITOFP).libcallForCartesianProduct({s64, s32}, {s64}).customForCartesianProduct({s64, s32}, {s32}).minScalar(1, s32); + getActionDefinitionsBuilder(G_SEXT_INREG).lower(); + getActionDefinitionsBuilder({G_MEMCPY, G_MEMMOVE, G_MEMSET}).libcall(); + computeTables(); + verify(*ST.getInstrInfo()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..815432f210488b2944aa43d51c6807b23840236b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp @@ -0,0 +1,124 @@ +MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO, MachineOperandType MOTy, int64_t Offset) const { + MCSymbolRefExpr::VariantKind Kind = MCSymbolRefExpr::VK_None; + MipsMCExpr::MipsExprKind TargetKind = MipsMCExpr::MEK_None; + bool IsGpOff = false; + const MCSymbol *Symbol; + switch(MO.getTargetFlags()) { + default: + llvm_unreachable("Invalid target flag!"); + case MipsII::MO_NO_FLAG: + break; + case MipsII::MO_GPREL: + TargetKind = MipsMCExpr::MEK_GPREL; + break; + case MipsII::MO_GOT_CALL: + TargetKind = MipsMCExpr::MEK_GOT_CALL; + break; + case MipsII::MO_GOT: + TargetKind = MipsMCExpr::MEK_GOT; + break; + case MipsII::MO_ABS_HI: + TargetKind = MipsMCExpr::MEK_HI; + break; + case MipsII::MO_ABS_LO: + TargetKind = MipsMCExpr::MEK_LO; + break; + case MipsII::MO_TLSGD: + TargetKind = MipsMCExpr::MEK_TLSGD; + break; + case MipsII::MO_TLSLDM: + TargetKind = MipsMCExpr::MEK_TLSLDM; + break; + case MipsII::MO_DTPREL_HI: + TargetKind = MipsMCExpr::MEK_DTPREL_HI; + break; + case MipsII::MO_DTPREL_LO: + TargetKind = MipsMCExpr::MEK_DTPREL_LO; + break; + case MipsII::MO_GOTTPREL: + TargetKind = MipsMCExpr::MEK_GOTTPREL; + break; + case MipsII::MO_TPREL_HI: + TargetKind = MipsMCExpr::MEK_TPREL_HI; + break; + case MipsII::MO_TPREL_LO: + TargetKind = MipsMCExpr::MEK_TPREL_LO; + break; + case MipsII::MO_GPOFF_HI: + TargetKind = MipsMCExpr::MEK_HI; + IsGpOff = true; + break; + case MipsII::MO_GPOFF_LO: + TargetKind = MipsMCExpr::MEK_LO; + IsGpOff = true; + break; + case MipsII::MO_GOT_DISP: + TargetKind = MipsMCExpr::MEK_GOT_DISP; + break; + case MipsII::MO_GOT_HI16: + TargetKind = MipsMCExpr::MEK_GOT_HI16; + break; + case MipsII::MO_GOT_LO16: + TargetKind = MipsMCExpr::MEK_GOT_LO16; + break; + case MipsII::MO_GOT_PAGE: + TargetKind = MipsMCExpr::MEK_GOT_PAGE; + break; + case MipsII::MO_GOT_OFST: + TargetKind = MipsMCExpr::MEK_GOT_OFST; + break; + case MipsII::MO_HIGHER: + TargetKind = MipsMCExpr::MEK_HIGHER; + break; + case MipsII::MO_HIGHEST: + TargetKind = MipsMCExpr::MEK_HIGHEST; + break; + case MipsII::MO_CALL_HI16: + TargetKind = MipsMCExpr::MEK_CALL_HI16; + break; + case MipsII::MO_CALL_LO16: + TargetKind = MipsMCExpr::MEK_CALL_LO16; + break; + case MipsII::MO_JALR: + return MCOperand(); + } + switch (MOTy) { + case MachineOperand::MO_MachineBasicBlock: + Symbol = MO.getMBB()->getSymbol(); + break; + case MachineOperand::MO_GlobalAddress: + Symbol = AsmPrinter.getSymbol(MO.getGlobal()); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_BlockAddress: + Symbol = AsmPrinter.GetBlockAddressSymbol(MO.getBlockAddress()); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_ExternalSymbol: + Symbol = AsmPrinter.GetExternalSymbolSymbol(MO.getSymbolName()); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_MCSymbol: + Symbol = MO.getMCSymbol(); + Offset += MO.getOffset(); + break; + case MachineOperand::MO_JumpTableIndex: + Symbol = AsmPrinter.GetJTISymbol(MO.getIndex()); + break; + case MachineOperand::MO_ConstantPoolIndex: + Symbol = AsmPrinter.GetCPISymbol(MO.getIndex()); + Offset += MO.getOffset(); + break; + default: + llvm_unreachable(""); + } + const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, Kind, *Ctx); + if (Offset) { + Expr = MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(Offset, *Ctx), *Ctx); + } + if (IsGpOff) + Expr = MipsMCExpr::createGpOff(TargetKind, Expr, *Ctx); + else if (TargetKind != MipsMCExpr::MEK_None) + Expr = MipsMCExpr::create(TargetKind, Expr, *Ctx); + return MCOperand::createExpr(Expr); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9e6f816b7f0ea865a533d9408fcc407f4cc146f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +MipsRegisterInfo::MipsRegisterInfo() : MipsGenRegisterInfo(Mips::RA) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3682cdd04c55d0c6cf22e141dde4992154773492 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,10 @@ +MachineBasicBlock::iterator MipsFrameLowering::eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { + unsigned SP = STI.getABI().IsN64() ? Mips::SP_64 : Mips::SP; + if (!hasReservedCallFrame(MF)) { + int64_t Amount = I->getOperand(0).getImm(); + if (I->getOpcode() == Mips::ADJCALLSTACKDOWN) + Amount = -Amount; + STI.getInstrInfo()->adjustStackPtr(SP, Amount, MBB, I); + } + return MBB.erase(I); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80dcd82832876ef68c5dac162843caf8d669a919 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,10 @@ +void MipsRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS) const { + MachineInstr &MI = *II; + MachineFunction &MF = *MI.getParent()->getParent(); + LLVM_DEBUG(errs() << "\nFunction : " << MF.getName() << "\n"; errs() << "<--------->\n" << MI); + int FrameIndex = MI.getOperand(FIOperandNum).getIndex(); + uint64_t stackSize = MF.getFrameInfo().getStackSize(); + int64_t spOffset = MF.getFrameInfo().getObjectOffset(FrameIndex); + LLVM_DEBUG(errs() << "FrameIndex : " << FrameIndex << "\n" << "spOffset : " << spOffset << "\n" << "stackSize : " << stackSize << "\n" << "alignment : " << DebugStr(MF.getFrameInfo().getObjectAlign(FrameIndex)) << "\n"); + eliminateFI(MI, FIOperandNum, FrameIndex, stackSize, spOffset); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee86b1ec364747b2b7adec2f4c7503435563ae61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,21 @@ +const MCPhysReg *MipsRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + const MipsSubtarget &Subtarget = MF->getSubtarget(); + const Function &F = MF->getFunction(); + if (F.hasFnAttribute("interrupt")) { + if (Subtarget.hasMips64()) + return Subtarget.hasMips64r6() ? CSR_Interrupt_64R6_SaveList : CSR_Interrupt_64_SaveList; + else + return Subtarget.hasMips32r6() ? CSR_Interrupt_32R6_SaveList : CSR_Interrupt_32_SaveList; + } + if (Subtarget.isSingleFloat()) + return CSR_SingleFloatOnly_SaveList; + if (Subtarget.isABI_N64()) + return CSR_N64_SaveList; + if (Subtarget.isABI_N32()) + return CSR_N32_SaveList; + if (Subtarget.isFP64bit()) + return CSR_O32_FP64_SaveList; + if (Subtarget.isFPXX()) + return CSR_O32_FPXX_SaveList; + return CSR_O32_SaveList; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5f8f103812c92122b87cb59e13c69048c13c8d7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,9 @@ +Register MipsRegisterInfo::getFrameRegister(const MachineFunction &MF) const { + const MipsSubtarget &Subtarget = MF.getSubtarget(); + const TargetFrameLowering *TFI = Subtarget.getFrameLowering(); + bool IsN64 = static_cast(MF.getTarget()).getABI().IsN64(); + if (Subtarget.inMips16Mode()) + return TFI->hasFP(MF) ? Mips::S0 : Mips::SP; + else + return TFI->hasFP(MF) ? (IsN64 ? Mips::FP_64 : Mips::FP) : (IsN64 ? Mips::SP_64 : Mips::SP); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e54fad41cb6792bb287045716ad70601b8ede981 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,65 @@ +BitVector MipsRegisterInfo::getReservedRegs(const MachineFunction &MF) const { + static const MCPhysReg ReservedGPR32[] = { + Mips::ZERO, Mips::K0, Mips::K1, Mips::SP + }; + static const MCPhysReg ReservedGPR64[] = { + Mips::ZERO_64, Mips::K0_64, Mips::K1_64, Mips::SP_64 + }; + BitVector Reserved(getNumRegs()); + const MipsSubtarget &Subtarget = MF.getSubtarget(); + for (unsigned I = 0; I < array_lengthof(ReservedGPR32); ++I) + Reserved.set(ReservedGPR32[I]); + if (Subtarget.isTargetNaCl()) { + Reserved.set(Mips::T6); + Reserved.set(Mips::T7); + Reserved.set(Mips::T8); + } + for (unsigned I = 0; I < array_lengthof(ReservedGPR64); ++I) + Reserved.set(ReservedGPR64[I]); + if (!Subtarget.isABICalls()) { + Reserved.set(Mips::GP); + Reserved.set(Mips::GP_64); + } + if (Subtarget.isFP64bit()) { + for (MCPhysReg Reg : Mips::AFGR64RegClass) + Reserved.set(Reg); + } + else { + for (MCPhysReg Reg : Mips::FGR64RegClass) + Reserved.set(Reg); + } + if (Subtarget.getFrameLowering()->hasFP(MF)) { + if (Subtarget.inMips16Mode()) + Reserved.set(Mips::S0); + else { + Reserved.set(Mips::FP); + Reserved.set(Mips::FP_64); + if (needsStackRealignment(MF) && MF.getFrameInfo().hasVarSizedObjects()) { + Reserved.set(Mips::S7); + Reserved.set(Mips::S7_64); + } + } + } + Reserved.set(Mips::HWR29); + Reserved.set(Mips::DSPPos); + Reserved.set(Mips::DSPSCount); + Reserved.set(Mips::DSPCarry); + Reserved.set(Mips::DSPEFI); + Reserved.set(Mips::DSPOutFlag); + for (MCPhysReg Reg : Mips::MSACtrlRegClass) + Reserved.set(Reg); + if (Subtarget.inMips16Mode()) { + const MipsFunctionInfo *MipsFI = MF.getInfo(); + Reserved.set(Mips::RA); + Reserved.set(Mips::RA_64); + Reserved.set(Mips::T0); + Reserved.set(Mips::T1); + if (MF.getFunction().hasFnAttribute("saveS2") || MipsFI->hasSaveS2()) + Reserved.set(Mips::S2); + } + if (Subtarget.useSmallSection()) { + Reserved.set(Mips::GP); + Reserved.set(Mips::GP_64); + } + return Reserved; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2682c40f6351c32f0b694fd849308d114c3a623b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,3 @@ +bool MipsRegisterInfo::requiresRegisterScavenging(const MachineFunction &MF) const { + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48b5c513cc442aa7b1b64a950fe261d2459fb318 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp @@ -0,0 +1,3 @@ +bool Mips16RegisterInfo::useFPForScavengingIndex(const MachineFunction &MF) const { + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69363c6c07ac6569bb6adaa08ef2328e96b8a16f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit MipsAsmPrinter(TargetMachine &TM, std::unique_ptr Streamer) : AsmPrinter(TM, std::move(Streamer)), MCInstLowering(*this) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa1e0e37b48002c0e5e90b0f8d9405646d81b5b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp @@ -0,0 +1,5 @@ +void emitConstantPool() override { + bool UsingConstantPools = (Subtarget->inMips16Mode() && Subtarget->useConstantIslands()); + if (!UsingConstantPools) + AsmPrinter::emitConstantPool(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6884cf9557c0765a3db634e2a8a29e9099f9eaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp @@ -0,0 +1,18 @@ +void MipsAsmPrinter::emitFunctionEntryLabel() { + MipsTargetStreamer &TS = getTargetStreamer(); + if (Subtarget->isTargetNaCl()) + emitAlignment(std::max(MF->getAlignment(), MIPS_NACL_BUNDLE_ALIGN)); + if (Subtarget->inMicroMipsMode()) { + TS.emitDirectiveSetMicroMips(); + TS.setUsesMicroMips(); + TS.updateABIInfo(*Subtarget); + } + else + TS.emitDirectiveSetNoMicroMips(); + if (Subtarget->inMips16Mode()) + TS.emitDirectiveSetMips16(); + else + TS.emitDirectiveSetNoMips16(); + TS.emitDirectiveEnt(*CurrentFnSym); + OutStreamer->emitLabel(CurrentFnSym); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52d759a06f0cc7d92fe9b7e4c9454e2fb460d219 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp @@ -0,0 +1,63 @@ +void MipsAsmPrinter::emitInstruction(const MachineInstr *MI) { + MipsTargetStreamer &TS = getTargetStreamer(); + unsigned Opc = MI->getOpcode(); + TS.forbidModuleDirective(); + if (MI->isDebugValue()) { + SmallString<128> Str; + raw_svector_ostream OS(Str); + PrintDebugValueComment(MI, OS); + return; + } + if (MI->isDebugLabel()) + return; + if (InConstantPool && Opc != Mips::CONSTPOOL_ENTRY) { + OutStreamer->emitDataRegion(MCDR_DataRegionEnd); + InConstantPool = false; + } + if (Opc == Mips::CONSTPOOL_ENTRY) { + unsigned LabelId = (unsigned)MI->getOperand(0).getImm(); + unsigned CPIdx = (unsigned)MI->getOperand(1).getIndex(); + if (!InConstantPool) { + OutStreamer->emitDataRegion(MCDR_DataRegion); + InConstantPool = true; + } + OutStreamer->emitLabel(GetCPISymbol(LabelId)); + const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPIdx]; + if (MCPE.isMachineConstantPoolEntry()) + emitMachineConstantPoolValue(MCPE.Val.MachineCPVal); + else + emitGlobalConstant(MF->getDataLayout(), MCPE.Val.ConstVal); + return; + } + switch (Opc) { + case Mips::PATCHABLE_FUNCTION_ENTER: + LowerPATCHABLE_FUNCTION_ENTER(*MI); + return; + case Mips::PATCHABLE_FUNCTION_EXIT: + LowerPATCHABLE_FUNCTION_EXIT(*MI); + return; + case Mips::PATCHABLE_TAIL_CALL: + LowerPATCHABLE_TAIL_CALL(*MI); + return; + } + if (EmitJalrReloc && (MI->isReturn() || MI->isCall() || MI->isIndirectBranch())) { + emitDirectiveRelocJalr(*MI, OutContext, TM, *OutStreamer, *Subtarget); + } + MachineBasicBlock::const_instr_iterator I = MI->getIterator(); + MachineBasicBlock::const_instr_iterator E = MI->getParent()->instr_end(); + do { + if (emitPseudoExpansionLowering(*OutStreamer, &*I)) + continue; + if (I->isBundle()) + continue; + if (I->getOpcode() == Mips::PseudoReturn || I->getOpcode() == Mips::PseudoReturn64 || I->getOpcode() == Mips::PseudoIndirectBranch || I->getOpcode() == Mips::PseudoIndirectBranch64 || I->getOpcode() == Mips::TAILCALLREG || I->getOpcode() == Mips::TAILCALLREG64) { + emitPseudoIndirectBranch(*OutStreamer, &*I); + continue; + } + if (I->isPseudo() && !Subtarget->inMips16Mode() && !isLongBranchPseudo(I->getOpcode())) + llvm_unreachable("Pseudo opcode found in emitInstruction()"); + MCInst TmpInst0; + MCInstLowering.Lower(&*I, TmpInst0); + EmitToStreamer(*OutStreamer, TmpInst0); + } while ((++I != E) && I->isInsideBundle()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d4ab5bf715e86e02b908fb3cab0a9fd1fecee42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmPrinter() { + RegisterAsmPrinter X(getTheMipsTarget()); + RegisterAsmPrinter Y(getTheMipselTarget()); + RegisterAsmPrinter A(getTheMips64Target()); + RegisterAsmPrinter B(getTheMips64elTarget()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13d636aa596545eb1d4a0b5e90251d6ac7d5200a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,27 @@ +bool MipsAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) { + assert(OpNum + 1 < MI->getNumOperands() && "Insufficient operands"); + const MachineOperand &BaseMO = MI->getOperand(OpNum); + const MachineOperand &OffsetMO = MI->getOperand(OpNum + 1); + assert(BaseMO.isReg() && "Unexpected base pointer for inline asm memory operand."); + assert(OffsetMO.isImm() && "Unexpected offset for inline asm memory operand."); + int Offset = OffsetMO.getImm(); + if (ExtraCode) { + switch (ExtraCode[0]) { + case 'D': + Offset += 4; + break; + case 'M': + if (Subtarget->isLittle()) + Offset += 4; + break; + case 'L': + if (!Subtarget->isLittle()) + Offset += 4; + break; + default: + return true; + } + } + O << Offset << "($" << MipsInstPrinter::getRegisterName(BaseMO.getReg()) << ")"; + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79f3c9422c159809396fc8b54c7323732a4efe88 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,89 @@ +bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) { + if (ExtraCode && ExtraCode[0]) { + if (ExtraCode[1] != 0) return true; + const MachineOperand &MO = MI->getOperand(OpNum); + switch (ExtraCode[0]) { + default: + return AsmPrinter::PrintAsmOperand(MI, OpNum, ExtraCode, O); + case 'X': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << "0x" << Twine::utohexstr(MO.getImm()); + return false; + case 'x': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << "0x" << Twine::utohexstr(MO.getImm() & 0xffff); + return false; + case 'd': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << MO.getImm(); + return false; + case 'm': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + O << MO.getImm() - 1; + return false; + case 'y': + if ((MO.getType()) != MachineOperand::MO_Immediate) + return true; + if (!isPowerOf2_64(MO.getImm())) + return true; + O << Log2_64(MO.getImm()); + return false; + case 'z': + if (MO.getType() == MachineOperand::MO_Immediate && MO.getImm() == 0) { + O << "$0"; + return false; + } + break; + case 'D': + case 'L': + case 'M': + { + if (OpNum == 0) + return true; + const MachineOperand &FlagsOP = MI->getOperand(OpNum - 1); + if (!FlagsOP.isImm()) + return true; + unsigned Flags = FlagsOP.getImm(); + unsigned NumVals = InlineAsm::getNumOperandRegisters(Flags); + if (NumVals != 2) { + if (Subtarget->isGP64bit() && NumVals == 1 && MO.isReg()) { + Register Reg = MO.getReg(); + O << '$' << MipsInstPrinter::getRegisterName(Reg); + return false; + } + return true; + } + unsigned RegOp = OpNum; + if (!Subtarget->isGP64bit()){ + switch(ExtraCode[0]) { + case 'M': + RegOp = (Subtarget->isLittle()) ? OpNum + 1 : OpNum; + break; + case 'L': + RegOp = (Subtarget->isLittle()) ? OpNum : OpNum + 1; + break; + case 'D': + RegOp = OpNum + 1; + } + if (RegOp >= MI->getNumOperands()) + return true; + const MachineOperand &MO = MI->getOperand(RegOp); + if (!MO.isReg()) + return true; + Register Reg = MO.getReg(); + O << '$' << MipsInstPrinter::getRegisterName(Reg); + return false; + } + break; + } + case 'w': + break; + } + } + printOperand(MI, OpNum, O); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7146d50f3a4b68a80abd13882286d1c3d617f2b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,8 @@ +void MipsAsmPrinter::emitEndOfAsmFile(Module &M) { + for (std::map::const_iterator it = StubsNeeded.begin(); it != StubsNeeded.end(); ++it) { + const char *Symbol = it->first; + const Mips16HardFloatInfo::FuncSignature *Signature = it->second; + EmitFPCallStub(Symbol, Signature); + } + OutStreamer->SwitchSection(OutContext.getObjectFileInfo()->getTextSection()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b73c68c716fe56a617211b6f9b2ee34637267ab6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,25 @@ +void MipsAsmPrinter::emitStartOfAsmFile(Module &M) { + MipsTargetStreamer &TS = getTargetStreamer(); + TS.setPic(OutContext.getObjectFileInfo()->isPositionIndependent()); + const Triple &TT = TM.getTargetTriple(); + StringRef CPU = MIPS_MC::selectMipsCPU(TT, TM.getTargetCPU()); + StringRef FS = TM.getTargetFeatureString(); + const MipsTargetMachine &MTM = static_cast(TM); + const MipsSubtarget STI(TT, CPU, FS, MTM.isLittleEndian(), MTM, None); + bool IsABICalls = STI.isABICalls(); + const MipsABIInfo &ABI = MTM.getABI(); + if (IsABICalls) { + TS.emitDirectiveAbiCalls(); + if (!isPositionIndependent() && STI.hasSym32()) + TS.emitDirectiveOptionPic0(); + } + std::string SectionName = std::string(".mdebug.") + getCurrentABIString(); + OutStreamer->SwitchSection(OutContext.getELFSection(SectionName, ELF::SHT_PROGBITS, 0)); + STI.isNaN2008() ? TS.emitDirectiveNaN2008() : TS.emitDirectiveNaNLegacy(); + TS.updateABIInfo(STI); + if ((ABI.IsO32() && (STI.isABI_FPXX() || STI.isFP64bit())) || STI.useSoftFloat()) + TS.emitDirectiveModuleFP(); + if (ABI.IsO32() && (!STI.useOddSPReg() || STI.isABI_FPXX())) + TS.emitDirectiveModuleOddSPReg(); + OutStreamer->SwitchSection(getObjFileLowering().getTextSection()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a02589fc541228804a95dfd11db6146447ce1fcf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Assembly Printer"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6a3eefbe00918670f234702344103025346cbbee --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp @@ -0,0 +1,14 @@ +void MipsAsmPrinter::printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &O) { + switch (MI->getOpcode()) { + default: + break; + case Mips::SWM32_MM: + case Mips::LWM32_MM: + opNum = MI->getNumOperands() - 2; + break; + } + printOperand(MI, opNum+1, O); + O << "("; + printOperand(MI, opNum, O); + O << ")"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca8f19bc8f4f6fc50ae215ec71e28772be6a4589 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/printOperand.cpp @@ -0,0 +1,13 @@ +void MipsInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) { + const MCOperand &Op = MI->getOperand(OpNo); + if (Op.isReg()) { + printRegName(O, Op.getReg()); + return; + } + if (Op.isImm()) { + O << formatImm(Op.getImm()); + return; + } + assert(Op.isExpr() && "unknown operand kind in printOperand"); + Op.getExpr()->print(O, &MAI, true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ea4e69b88d62186a605cf374ec7eb5204d98196 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,17 @@ +bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) { + Subtarget = &MF.getSubtarget(); + MipsFI = MF.getInfo(); + if (Subtarget->inMips16Mode()) + for (std::map::const_iterator it = MipsFI->StubsNeeded.begin(); it != MipsFI->StubsNeeded.end(); ++it) { + const char *Symbol = it->first; + const Mips16HardFloatInfo::FuncSignature *Signature = it->second; + if (StubsNeeded.find(Symbol) == StubsNeeded.end()) + StubsNeeded[Symbol] = Signature; + } + MCP = MF.getConstantPool(); + if (Subtarget->isTargetNaCl()) + NaClAlignIndirectJumpTargets(MF); + AsmPrinter::runOnMachineFunction(MF); + emitXRayTable(); + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3dbf2eaf5993d301dc8ae0720319683c2860d3d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,28 @@ +MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple, const MCTargetOptions &Options) { + IsLittleEndian = TheTriple.isLittleEndian(); + MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TheTriple, "", Options); + if (TheTriple.isMIPS64() && !ABI.IsN32()) + CodePointerSize = CalleeSaveStackSlotSize = 8; + if (ABI.IsO32()) + PrivateGlobalPrefix = "$"; + else if (ABI.IsN32() || ABI.IsN64()) + PrivateGlobalPrefix = ".L"; + PrivateLabelPrefix = PrivateGlobalPrefix; + AlignmentIsInBytes = false; + Data16bitsDirective = "\t.2byte\t"; + Data32bitsDirective = "\t.4byte\t"; + Data64bitsDirective = "\t.8byte\t"; + CommentString = "#"; + ZeroDirective = "\t.space\t"; + GPRel32Directive = "\t.gpword\t"; + GPRel64Directive = "\t.gpdword\t"; + DTPRel32Directive = "\t.dtprelword\t"; + DTPRel64Directive = "\t.dtpreldword\t"; + TPRel32Directive = "\t.tprelword\t"; + TPRel64Directive = "\t.tpreldword\t"; + UseAssignmentForEHBegin = true; + SupportsDebugInformation = true; + ExceptionsType = ExceptionHandling::DwarfCFI; + DwarfRegNumForCFI = true; + HasMipsExpressions = true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b01b2aad777f0e33601f9c86bac72b81a8343d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,19 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetMC() { + for (Target *T : {&getTheMipsTarget(), &getTheMipselTarget(), &getTheMips64Target(), &getTheMips64elTarget()}) { + RegisterMCAsmInfoFn X(*T, createMipsMCAsmInfo); + TargetRegistry::RegisterMCInstrInfo(*T, createMipsMCInstrInfo); + TargetRegistry::RegisterMCRegInfo(*T, createMipsMCRegisterInfo); + TargetRegistry::RegisterELFStreamer(*T, createMCStreamer); + TargetRegistry::RegisterAsmTargetStreamer(*T, createMipsAsmTargetStreamer); + TargetRegistry::RegisterNullTargetStreamer(*T, createMipsNullTargetStreamer); + TargetRegistry::RegisterMCSubtargetInfo(*T, createMipsMCSubtargetInfo); + TargetRegistry::RegisterMCInstrAnalysis(*T, createMipsMCInstrAnalysis); + TargetRegistry::RegisterMCInstPrinter(*T, createMipsMCInstPrinter); + TargetRegistry::RegisterObjectTargetStreamer(*T, createMipsObjectTargetStreamer); + TargetRegistry::RegisterMCAsmBackend(*T, createMipsAsmBackend); + } + for (Target *T : {&getTheMipsTarget(), &getTheMips64Target()}) + TargetRegistry::RegisterMCCodeEmitter(*T, createMipsMCCodeEmitterEB); + for (Target *T : {&getTheMipselTarget(), &getTheMips64elTarget()}) + TargetRegistry::RegisterMCCodeEmitter(*T, createMipsMCCodeEmitterEL); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..837b9167e024dfc0068281dbe50fc9ad3064ca21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,7 @@ +static MCAsmInfo *createMipsMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options) { + MCAsmInfo *MAI = new MipsMCAsmInfo(TT, Options); + unsigned SP = MRI.getDwarfRegNum(Mips::SP, true); + MCCFIInstruction Inst = MCCFIInstruction::createDefCfaRegister(nullptr, SP); + MAI->addInitialFrameState(Inst); + return MAI; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d50ca24c8cac1fc0d6821b37c8cea1728525d7a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,5 @@ +static MCInstrInfo *createMipsMCInstrInfo() { + MCInstrInfo *X = new MCInstrInfo(); + InitMipsMCInstrInfo(X); + return X; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39b142645d1a74904b92b3d82dd3360575145767 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,5 @@ +static MCRegisterInfo *createMipsMCRegisterInfo(const Triple &TT) { + MCRegisterInfo *X = new MCRegisterInfo(); + InitMipsMCRegisterInfo(X, Mips::RA); + return X; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c05371de5a90f36670a3dbf3f15208b2ffbee21f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,4 @@ +static MCSubtargetInfo *createMipsMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { + CPU = MIPS_MC::selectMipsCPU(TT, CPU); + return createMipsMCSubtargetInfoImpl(TT, CPU, CPU, FS); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp new file mode 100644 index 0000000000000000000000000000000000000000..246aed2bd7e0440bdeb11d57132d657b58c40e08 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp @@ -0,0 +1,2 @@ +XCoreFTAOElim() : FunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79ef7cfa96944155e794dbd1ce4ae3d7cc85a8f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp @@ -0,0 +1,9 @@ +bool runOnMachineFunction(MachineFunction &F) override { + TM = &F.getTarget(); + bool Changed = false; + for (MachineFunction::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) + Changed |= runOnMachineBasicBlock(*FI); + if (Changed) + F.getRegInfo().invalidateLiveness(); + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d221dc7344e31e88ccbd1e8b8b3fbe166b367a6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp @@ -0,0 +1,2 @@ +~MipsModuleDAGToDAGISel() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66c7b3864fbc88610507a3b57469c33cbe7067a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d221dc7344e31e88ccbd1e8b8b3fbe166b367a6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp @@ -0,0 +1,2 @@ +~MipsModuleDAGToDAGISel() { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/StackUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/StackUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57aeffd0e2e2e5bb1200734269fc42fb5b8f16c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/StackUsage.cpp @@ -0,0 +1,2 @@ +MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/createPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66bbc81adf0ef98fff67099cd474312163d2ef95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/createPass.cpp @@ -0,0 +1,3 @@ +llvm::FunctionPass *llvm::createMipsModuleISelDagPass() { + return new MipsModuleDAGToDAGISel(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f3e70065dbb1b3bcc423b768c1c4c1713ba4da5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90c890951e14cd0629d6e0878884a87bb8c79386 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "Mips Branch Expansion Pass"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62edb7f880dc7a87d5437717d542d7ef50894acb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp @@ -0,0 +1,21 @@ +bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) { + const TargetMachine &TM = MF.getTarget(); + IsPIC = TM.isPositionIndependent(); + ABI = static_cast(TM).getABI(); + STI = &static_cast(MF.getSubtarget()); + TII = static_cast(STI->getInstrInfo()); + if (IsPIC && ABI.IsO32() && MF.getInfo()->globalBaseRegSet()) + emitGPDisp(MF, TII); + MFp = &MF; + ForceLongBranchFirstPass = ForceLongBranch; + bool longBranchChanged = handlePossibleLongBranch(); + bool forbiddenSlotChanged = handleForbiddenSlot(); + bool Changed = longBranchChanged || forbiddenSlotChanged; + while (forbiddenSlotChanged) { + longBranchChanged = handlePossibleLongBranch(); + if (!longBranchChanged) + break; + forbiddenSlotChanged = handleForbiddenSlot(); + } + return Changed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ccb0f52e6e0ce8474fcd10633894b3f408fc5308 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp @@ -0,0 +1,15 @@ +unsigned MipsInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const { + switch (MI.getOpcode()) { + default: + return MI.getDesc().getSize(); + case TargetOpcode::INLINEASM: + case TargetOpcode::INLINEASM_BR: { + const MachineFunction *MF = MI.getParent()->getParent(); + const char *AsmStr = MI.getOperand(0).getSymbolName(); + return getInlineAsmLength(AsmStr, *MF->getTarget().getMCAsmInfo()); + } + case Mips::CONSTPOOL_ENTRY: + return MI.getOperand(2).getImm(); + } +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89ef265a73d366c9fe3f2c94f235af727e8b5dcd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +MipsInstrInfo::MipsInstrInfo(const MipsSubtarget &STI, unsigned UncondBr) : MipsGenInstrInfo(Mips::ADJCALLSTACKDOWN, Mips::ADJCALLSTACKUP), Subtarget(STI), UncondBrOpc(UncondBr) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..492da016718b9b6f818e0f34a01596e175c6affb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,5 @@ +bool MipsInstrInfo::analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, bool AllowModify) const { + SmallVector BranchInstrs; + BranchType BT = analyzeBranch(MBB, TBB, FBB, Cond, AllowModify, BranchInstrs); + return (BT == BT_None) || (BT == BT_Indirect); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5fc2c1a67373b362485a1ac80c16cbe10ca55a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,92 @@ +void MipsSEInstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc) const { + unsigned Opc = 0, ZeroReg = 0; + bool isMicroMips = Subtarget.inMicroMipsMode(); + if (Mips::GPR32RegClass.contains(DestReg)) { + if (Mips::GPR32RegClass.contains(SrcReg)) { + if (isMicroMips) + Opc = Mips::MOVE16_MM; + else + Opc = Mips::OR, ZeroReg = Mips::ZERO; + } + else if (Mips::CCRRegClass.contains(SrcReg)) + Opc = Mips::CFC1; + else if (Mips::FGR32RegClass.contains(SrcReg)) + Opc = Mips::MFC1; + else if (Mips::HI32RegClass.contains(SrcReg)) { + Opc = isMicroMips ? Mips::MFHI16_MM : Mips::MFHI; + SrcReg = 0; + } + else if (Mips::LO32RegClass.contains(SrcReg)) { + Opc = isMicroMips ? Mips::MFLO16_MM : Mips::MFLO; + SrcReg = 0; + } + else if (Mips::HI32DSPRegClass.contains(SrcReg)) + Opc = Mips::MFHI_DSP; + else if (Mips::LO32DSPRegClass.contains(SrcReg)) + Opc = Mips::MFLO_DSP; + else if (Mips::DSPCCRegClass.contains(SrcReg)) { + BuildMI(MBB, I, DL, get(Mips::RDDSP), DestReg).addImm(1 << 4).addReg(SrcReg, RegState::Implicit | getKillRegState(KillSrc)); + return; + } + else if (Mips::MSACtrlRegClass.contains(SrcReg)) + Opc = Mips::CFCMSA; + } + else if (Mips::GPR32RegClass.contains(SrcReg)) { + if (Mips::CCRRegClass.contains(DestReg)) + Opc = Mips::CTC1; + else if (Mips::FGR32RegClass.contains(DestReg)) + Opc = Mips::MTC1; + else if (Mips::HI32RegClass.contains(DestReg)) + Opc = Mips::MTHI, DestReg = 0; + else if (Mips::LO32RegClass.contains(DestReg)) + Opc = Mips::MTLO, DestReg = 0; + else if (Mips::HI32DSPRegClass.contains(DestReg)) + Opc = Mips::MTHI_DSP; + else if (Mips::LO32DSPRegClass.contains(DestReg)) + Opc = Mips::MTLO_DSP; + else if (Mips::DSPCCRegClass.contains(DestReg)) { + BuildMI(MBB, I, DL, get(Mips::WRDSP)).addReg(SrcReg, getKillRegState(KillSrc)).addImm(1 << 4).addReg(DestReg, RegState::ImplicitDefine); + return; + } + else if (Mips::MSACtrlRegClass.contains(DestReg)) { + BuildMI(MBB, I, DL, get(Mips::CTCMSA)).addReg(DestReg).addReg(SrcReg, getKillRegState(KillSrc)); + return; + } + } + else if (Mips::FGR32RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_S; + else if (Mips::AFGR64RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_D32; + else if (Mips::FGR64RegClass.contains(DestReg, SrcReg)) + Opc = Mips::FMOV_D64; + else if (Mips::GPR64RegClass.contains(DestReg)) { + if (Mips::GPR64RegClass.contains(SrcReg)) + Opc = Mips::OR64, ZeroReg = Mips::ZERO_64; + else if (Mips::HI64RegClass.contains(SrcReg)) + Opc = Mips::MFHI64, SrcReg = 0; + else if (Mips::LO64RegClass.contains(SrcReg)) + Opc = Mips::MFLO64, SrcReg = 0; + else if (Mips::FGR64RegClass.contains(SrcReg)) + Opc = Mips::DMFC1; + } + else if (Mips::GPR64RegClass.contains(SrcReg)) { + if (Mips::HI64RegClass.contains(DestReg)) + Opc = Mips::MTHI64, DestReg = 0; + else if (Mips::LO64RegClass.contains(DestReg)) + Opc = Mips::MTLO64, DestReg = 0; + else if (Mips::FGR64RegClass.contains(DestReg)) + Opc = Mips::DMTC1; + } + else if (Mips::MSA128BRegClass.contains(DestReg)) { + if (Mips::MSA128BRegClass.contains(SrcReg)) + Opc = Mips::MOVE_V; + } + assert(Opc && "Cannot copy registers"); + MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(Opc)); + if (DestReg) + MIB.addReg(DestReg, RegState::Define); + if (SrcReg) + MIB.addReg(SrcReg, getKillRegState(KillSrc)); + if (ZeroReg) + MIB.addReg(ZeroReg); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3279dd0d1e31fed87ed756d32f1a675d18d72f87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp @@ -0,0 +1,34 @@ +enum CondCode { + FCOND_F, + FCOND_UN, + FCOND_OEQ, + FCOND_UEQ, + FCOND_OLT, + FCOND_ULT, + FCOND_OLE, + FCOND_ULE, + FCOND_SF, + FCOND_NGLE, + FCOND_SEQ, + FCOND_NGL, + FCOND_LT, + FCOND_NGE, + FCOND_LE, + FCOND_NGT, + FCOND_T, + FCOND_OR, + FCOND_UNE, + FCOND_ONE, + FCOND_UGE, + FCOND_OGE, + FCOND_UGT, + FCOND_OGT, + FCOND_ST, + FCOND_GLE, + FCOND_SNE, + FCOND_GL, + FCOND_NLT, + FCOND_GE, + FCOND_NLE, + FCOND_GT +}; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b072526d794d139a2d7a77e15192a44279a4e4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const MipsRegisterInfo &Mips16InstrInfo::getRegisterInfo() const { + return RI; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7aadd2573c6e9b7e1703c86ae78cd84d2f384d34 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,15 @@ +unsigned MipsInstrInfo::insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef Cond, const DebugLoc &DL, int *BytesAdded) const { + assert(TBB && "insertBranch must not be told to insert a fallthrough"); + assert(!BytesAdded && "code size not handled"); + assert((Cond.size() <= 3) && "# of Mips branch conditions must be <= 3!"); + if (FBB) { + BuildCondBr(MBB, TBB, DL, Cond); + BuildMI(&MBB, DL, get(UncondBrOpc)).addMBB(FBB); + return 2; + } + if (Cond.empty()) + BuildMI(&MBB, DL, get(UncondBrOpc)).addMBB(TBB); + else + BuildCondBr(MBB, TBB, DL, Cond); + return 1; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2d8d63900cd69f173695b130359cfe1d18aa693 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,10 @@ +unsigned MipsSEInstrInfo::isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const { + unsigned Opc = MI.getOpcode(); + if ((Opc == Mips::LW) || (Opc == Mips::LD) || (Opc == Mips::LWC1) || (Opc == Mips::LDC1) || (Opc == Mips::LDC164)) { + if ((MI.getOperand(1).isFI()) && (MI.getOperand(2).isImm()) && (isZeroImm(MI.getOperand(2)))) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + return 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..049c3f11016793dd29d3fb81bb7172132b37b96d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,11 @@ +unsigned MipsSEInstrInfo::isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const { + unsigned Opc = MI.getOpcode(); + if ((Opc == Mips::SW) || (Opc == Mips::SD) || (Opc == Mips::SWC1) || (Opc == Mips::SDC1) || (Opc == Mips::SDC164)) { + if ((MI.getOperand(1).isFI()) && (MI.getOperand(2).isImm()) && (isZeroImm(MI.getOperand(2)))) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + return 0; +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..acbba623439a5f57428157ada9c9f62c3fb4073d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp @@ -0,0 +1,3 @@ +bool MipsInstrInfo::isZeroImm(const MachineOperand &op) const { + return op.isImm() && op.getImm() == 0; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0dbe9a6a32e51bc601900a9635c3d6376933a144 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,62 @@ +void MipsSEInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register DestReg, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, int64_t Offset) const { + DebugLoc DL; + if (I != MBB.end()) DL = I->getDebugLoc(); + MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOLoad); + unsigned Opc = 0; + const Function &Func = MBB.getParent()->getFunction(); + bool ReqIndirectLoad = Func.hasFnAttribute("interrupt") && (DestReg == Mips::LO0 || DestReg == Mips::LO0_64 || DestReg == Mips::HI0 || DestReg == Mips::HI0_64); + if (Mips::GPR32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::GPR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::ACC64RegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC64; + else if (Mips::ACC64DSPRegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC64DSP; + else if (Mips::ACC128RegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_ACC128; + else if (Mips::DSPCCRegClass.hasSubClassEq(RC)) + Opc = Mips::LOAD_CCOND_DSP; + else if (Mips::FGR32RegClass.hasSubClassEq(RC)) + Opc = Mips::LWC1; + else if (Mips::AFGR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LDC1; + else if (Mips::FGR64RegClass.hasSubClassEq(RC)) + Opc = Mips::LDC164; + else if (TRI->isTypeLegalForClass(*RC, MVT::v16i8)) + Opc = Mips::LD_B; + else if (TRI->isTypeLegalForClass(*RC, MVT::v8i16) || TRI->isTypeLegalForClass(*RC, MVT::v8f16)) + Opc = Mips::LD_H; + else if (TRI->isTypeLegalForClass(*RC, MVT::v4i32) || TRI->isTypeLegalForClass(*RC, MVT::v4f32)) + Opc = Mips::LD_W; + else if (TRI->isTypeLegalForClass(*RC, MVT::v2i64) || TRI->isTypeLegalForClass(*RC, MVT::v2f64)) + Opc = Mips::LD_D; + else if (Mips::HI32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::HI64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::LO32RegClass.hasSubClassEq(RC)) + Opc = Mips::LW; + else if (Mips::LO64RegClass.hasSubClassEq(RC)) + Opc = Mips::LD; + else if (Mips::DSPRRegClass.hasSubClassEq(RC)) + Opc = Mips::LWDSP; + assert(Opc && "Register class not handled!"); + if (!ReqIndirectLoad) + BuildMI(MBB, I, DL, get(Opc), DestReg).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); + else { + unsigned Reg = Mips::K0; + unsigned LdOp = Mips::MTLO; + if (DestReg == Mips::HI0) + LdOp = Mips::MTHI; + if (Subtarget.getABI().ArePtrs64bit()) { + Reg = Mips::K0_64; + if (DestReg == Mips::HI0_64) + LdOp = Mips::MTHI64; + else + LdOp = Mips::MTLO64; + } + BuildMI(MBB, I, DL, get(Opc), Reg).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); + BuildMI(MBB, I, DL, get(LdOp)).addReg(Reg); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cef1e08a42cd47a219a08a7b03df1b62305453b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,17 @@ +unsigned MipsInstrInfo::removeBranch(MachineBasicBlock &MBB, int *BytesRemoved) const { + assert(!BytesRemoved && "code size not handled"); + MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend(); + unsigned removed = 0; + while (I != REnd && removed < 2) { + if (I->isDebugInstr()) { + ++I; + continue; + } + if (!getAnalyzableBrOpc(I->getOpcode())) + break; + I->eraseFromParent(); + I = MBB.rbegin(); + ++removed; + } + return removed; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf4c73519980083d2273651b2680171851c4d0a1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,5 @@ +bool MipsInstrInfo::reverseBranchCondition(SmallVectorImpl &Cond) const { + assert( (Cond.size() && Cond.size() <= 3) && "Invalid Mips branch condition!"); + Cond[0].setImm(getOppositeBranchOpc(Cond[0].getImm())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b46bd40f8ae60038cbce551cc210dfdc0d86cc72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,10 @@ +void Mips16InstrInfo::storeRegToStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register SrcReg, bool isKill, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, int64_t Offset) const { + DebugLoc DL; + if (I != MBB.end()) DL = I->getDebugLoc(); + MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOStore); + unsigned Opc = 0; + if (Mips::CPU16RegsRegClass.hasSubClassEq(RC)) + Opc = Mips::SwRxSpImmX16; + assert(Opc && "Register class not handled!"); + BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)).addFrameIndex(FI).addImm(Offset).addMemOperand(MMO); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18efd6eb03d8a873e79039e5a7191354ce092d82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..815700881400f3e2610e1d74e0907493d5ea7898 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex() const { + return VarArgsFrameIndex; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f453600ffb2d2bf1e86883efc8373719fb63f8ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex(int Index) { + VarArgsFrameIndex = Index; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8dbe9393d5f502927a51bf3bd6e31b2ef5a0ed3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,89 @@ +MipsSubtarget::MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS, bool little, const MipsTargetMachine &TM, MaybeAlign StackAlignOverride): MipsGenSubtargetInfo(TT, CPU, CPU, FS), MipsArchVersion(MipsDefault), IsLittle(little), IsSoftFloat(false), IsSingleFloat(false), IsFPXX(false), NoABICalls(false), Abs2008(false), IsFP64bit(false), UseOddSPReg(true), IsNaN2008bit(false), IsGP64bit(false), HasVFPU(false), HasCnMips(false), HasCnMipsP(false), HasMips3_32(false), HasMips3_32r2(false), HasMips4_32(false), HasMips4_32r2(false), HasMips5_32r2(false), InMips16Mode(false), InMips16HardFloat(Mips16HardFloat), InMicroMipsMode(false), HasDSP(false), HasDSPR2(false), HasDSPR3(false), AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16), HasMSA(false), UseTCCInDIV(false), HasSym32(false), HasEVA(false), DisableMadd4(false), HasMT(false), HasCRC(false), HasVirt(false), HasGINV(false), UseIndirectJumpsHazard(false), StackAlignOverride(StackAlignOverride), TM(TM), TargetTriple(TT), TSInfo(), InstrInfo(MipsInstrInfo::create( initializeSubtargetDependencies(CPU, FS, TM))), FrameLowering(MipsFrameLowering::create(*this)), TLInfo(MipsTargetLowering::create(TM, *this)) { + if (MipsArchVersion == MipsDefault) + MipsArchVersion = Mips32; + if (MipsArchVersion == Mips1) + report_fatal_error("Code generation for MIPS-I is not implemented", false); + if (MipsArchVersion == Mips5) + report_fatal_error("Code generation for MIPS-V is not implemented", false); + assert(((!isGP64bit() && isABI_O32()) || (isGP64bit() && (isABI_N32() || isABI_N64()))) && "Invalid Arch & ABI pair."); + if (hasMSA() && !isFP64bit()) + report_fatal_error("MSA requires a 64-bit FPU register file (FR=1 mode). See -mattr=+fp64.", false); + if (isFP64bit() && !hasMips64() && hasMips32() && !hasMips32r2()) + report_fatal_error("FPU with 64-bit registers is not available on MIPS32 pre revision 2. Use -mcpu=mips32r2 or greater."); + if (!isABI_O32() && !useOddSPReg()) + report_fatal_error("-mattr=+nooddspreg requires the O32 ABI.", false); + if (IsFPXX && (isABI_N32() || isABI_N64())) + report_fatal_error("FPXX is not permitted for the N32/N64 ABI's.", false); + if (hasMips64r6() && InMicroMipsMode) + report_fatal_error("microMIPS64R6 is not supported", false); + if (!isABI_O32() && InMicroMipsMode) + report_fatal_error("microMIPS64 is not supported.", false); + if (UseIndirectJumpsHazard) { + if (InMicroMipsMode) + report_fatal_error("cannot combine indirect jumps with hazard barriers and microMIPS"); + if (!hasMips32r2()) + report_fatal_error("indirect jumps with hazard barriers requires MIPS32R2 or later"); + } + if (inAbs2008Mode() && hasMips32() && !hasMips32r2()) { + report_fatal_error("IEEE 754-2008 abs.fmt is not supported for the given architecture.", false); + } + if (hasMips32r6()) { + StringRef ISA = hasMips64r6() ? "MIPS64r6" : "MIPS32r6"; + assert(isFP64bit()); + assert(isNaN2008()); + assert(inAbs2008Mode()); + if (hasDSP()) + report_fatal_error(ISA + " is not compatible with the DSP ASE", false); + } + if (NoABICalls && TM.isPositionIndependent()) + report_fatal_error("position-independent code requires '-mabicalls'"); + if (isABI_N64() && !TM.isPositionIndependent() && !hasSym32()) + NoABICalls = true; + UseSmallSection = GPOpt; + if (!NoABICalls && GPOpt) { + errs() << "warning: cannot use small-data accesses for '-mabicalls'" << "\n"; + UseSmallSection = false; + } + if (hasDSPR2() && !DspWarningPrinted) { + if (hasMips64() && !hasMips64r2()) { + errs() << "warning: the 'dspr2' ASE requires MIPS64 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + else if (hasMips32() && !hasMips32r2()) { + errs() << "warning: the 'dspr2' ASE requires MIPS32 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + } + else if (hasDSP() && !DspWarningPrinted) { + if (hasMips64() && !hasMips64r2()) { + errs() << "warning: the 'dsp' ASE requires MIPS64 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + else if (hasMips32() && !hasMips32r2()) { + errs() << "warning: the 'dsp' ASE requires MIPS32 revision 2 or " << "greater\n"; + DspWarningPrinted = true; + } + } + StringRef ArchName = hasMips64() ? "MIPS64" : "MIPS32"; + if (!hasMips32r5() && hasMSA() && !MSAWarningPrinted) { + errs() << "warning: the 'msa' ASE requires " << ArchName << " revision 5 or greater\n"; + MSAWarningPrinted = true; + } + if (!hasMips32r5() && hasVirt() && !VirtWarningPrinted) { + errs() << "warning: the 'virt' ASE requires " << ArchName << " revision 5 or greater\n"; + VirtWarningPrinted = true; + } + if (!hasMips32r6() && hasCRC() && !CRCWarningPrinted) { + errs() << "warning: the 'crc' ASE requires " << ArchName << " revision 6 or greater\n"; + CRCWarningPrinted = true; + } + if (!hasMips32r6() && hasGINV() && !GINVWarningPrinted) { + errs() << "warning: the 'ginv' ASE requires " << ArchName << " revision 6 or greater\n"; + GINVWarningPrinted = true; + } + CallLoweringInfo.reset(new MipsCallLowering(*getTargetLowering())); + Legalizer.reset(new MipsLegalizerInfo(*this)); + auto *RBI = new MipsRegisterBankInfo(*getRegisterInfo()); + RegBankInfo.reset(RBI); + InstSelector.reset(createMipsInstructionSelector(*static_cast(&TM), *this, *RBI)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa19b102fcb9d571a36a08f83de9e63d0dad45af --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,6 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetInfo() { + RegisterTarget X(getTheMipsTarget(), "mips", "MIPS (32-bit big endian)", "Mips"); + RegisterTarget Y(getTheMipselTarget(), "mipsel", "MIPS (32-bit little endian)", "Mips"); + RegisterTarget A(getTheMips64Target(), "mips64", "MIPS (64-bit big endian)", "Mips"); + RegisterTarget B(getTheMips64elTarget(), "mips64el", "MIPS (64-bit little endian)","Mips"); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cebec48b8e7e252d90044f50cbef0210c65c5fa2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,13 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTarget() { + RegisterTargetMachine X(getTheMipsTarget()); + RegisterTargetMachine Y(getTheMipselTarget()); + RegisterTargetMachine A(getTheMips64Target()); + RegisterTargetMachine B(getTheMips64elTarget()); + PassRegistry *PR = PassRegistry::getPassRegistry(); + initializeGlobalISel(*PR); + initializeMipsDelaySlotFillerPass(*PR); + initializeMipsBranchExpansionPass(*PR); + initializeMicroMipsSizeReducePass(*PR); + initializeMipsPreLegalizerCombinerPass(*PR); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb7a4b12d46b90e267a11d089bac3205f01c869d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,5 @@ +MipsTargetMachine::MipsTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional RM, Optional CM, CodeGenOpt::Level OL, bool JIT, bool isLittle) : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options, isLittle), TT, CPU, FS, Options, getEffectiveRelocModel(JIT, RM), getEffectiveCodeModel(CM, CodeModel::Small), OL), isLittle(isLittle), TLOF(std::make_unique()), ABI(MipsABIInfo::computeTargetABI(TT, CPU, Options.MCOptions)), Subtarget(nullptr), DefaultSubtarget(TT, CPU, FS, isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)), NoMips16Subtarget(TT, CPU, FS.empty() ? "-mips16" : FS.str() + ",-mips16", isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)), Mips16Subtarget(TT, CPU, FS.empty() ? "+mips16" : FS.str() + ",+mips16", isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)) { + Subtarget = &DefaultSubtarget; + initAsmInfo(); + setSupportsDebugEntryValues(true); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fed7400583c9fc2fb0ebb7485b3e4058b93f7c8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,6 @@ +bool MipsPassConfig::addInstSelector() { + addPass(createMipsModuleISelDagPass()); + addPass(createMips16ISelDag(getMipsTargetMachine(), getOptLevel())); + addPass(createMipsSEISelDag(getMipsTargetMachine(), getOptLevel())); + return false; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06d033e3b1fed3f9944e982215833add08185065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,7 @@ +void MipsPassConfig::addPreEmitPass() { + addPass(createMipsExpandPseudoPass()); + addPass(createMicroMipsSizeReducePass()); + addPass(createMipsDelaySlotFillerPass()); + addPass(createMipsBranchExpansion()); + addPass(createMipsConstantIslandPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06d033e3b1fed3f9944e982215833add08185065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp @@ -0,0 +1,7 @@ +void MipsPassConfig::addPreEmitPass() { + addPass(createMipsExpandPseudoPass()); + addPass(createMicroMipsSizeReducePass()); + addPass(createMipsDelaySlotFillerPass()); + addPass(createMipsBranchExpansion()); + addPass(createMipsConstantIslandPass()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46facc9d53d8ed20463a68f1486618473e216322 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const TargetFrameLowering *getFrameLowering() const override { + return FrameLowering.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e800e2a8b4f1864f21678597f1942ae03a8a6ab2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp @@ -0,0 +1,3 @@ +const MipsInstrInfo *getInstrInfo() const override { + return InstrInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70e4b467269f9a62a119d78ba8756d15153967e2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const MipsRegisterInfo *getRegisterInfo() const override { + return &InstrInfo->getRegisterInfo(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9cec09b2f3127f3d36917798ff8d808237620f9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +const SelectionDAGTargetInfo *getSelectionDAGInfo() const override { + return &TSInfo; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72a6aa9b0b63f9e9fcc02d673c5a32c466330d21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,27 @@ +const MipsSubtarget *MipsTargetMachine::getSubtargetImpl(const Function &F) const { + Attribute CPUAttr = F.getFnAttribute("target-cpu"); + Attribute FSAttr = F.getFnAttribute("target-features"); + std::string CPU = CPUAttr.isValid() ? CPUAttr.getValueAsString().str() : TargetCPU; + std::string FS = FSAttr.isValid() ? FSAttr.getValueAsString().str() : TargetFS; + bool hasMips16Attr = F.getFnAttribute("mips16").isValid(); + bool hasNoMips16Attr = F.getFnAttribute("nomips16").isValid(); + bool HasMicroMipsAttr = F.getFnAttribute("micromips").isValid(); + bool HasNoMicroMipsAttr = F.getFnAttribute("nomicromips").isValid(); + bool softFloat = F.hasFnAttribute("use-soft-float") && F.getFnAttribute("use-soft-float").getValueAsString() == "true"; + if (hasMips16Attr) + FS += FS.empty() ? "+mips16" : ",+mips16"; + else if (hasNoMips16Attr) + FS += FS.empty() ? "-mips16" : ",-mips16"; + if (HasMicroMipsAttr) + FS += FS.empty() ? "+micromips" : ",+micromips"; + else if (HasNoMicroMipsAttr) + FS += FS.empty() ? "-micromips" : ",-micromips"; + if (softFloat) + FS += FS.empty() ? "+soft-float" : ",+soft-float"; + auto &I = SubtargetMap[CPU + FS]; + if (!I) { + resetTargetOptions(F); + I = std::make_unique(TargetTriple, CPU, FS, isLittle, *this, MaybeAlign(Options.StackAlignmentOverride)); + } + return I.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6a80a497f8d2bee84fc660d8e8cdfcfe7048369 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp @@ -0,0 +1,3 @@ +const MipsTargetLowering *getTargetLowering() const override { + return TLInfo.get(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0d8533856448921babe3c7b5cab65e7ceeebca3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,6 @@ +void MipsTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){ + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + SmallDataSection = getContext().getELFSection(".sdata", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_MIPS_GPREL); + SmallBSSSection = getContext().getELFSection(".sbss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_MIPS_GPREL); + this->TM = &static_cast(TM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcb179748f251dd885c72ec65ea012aa51523e27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,12 @@ +MCSection *MipsTargetObjectFile::SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { + if (Kind.isBSS() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallBSSSection; + } + if (Kind.isData() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallDataSection; + } + if (Kind.isReadOnly() && IsGlobalInSmallSection(GO, TM, Kind)) { + return SmallDataSection; + } + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2aa9fc13963d18be314c20bb620b4fea6a394505 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,5 @@ +MCSection *MipsTargetObjectFile::getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const { + if (IsConstantInSmallSection(DL, C, *TM)) + return SmallDataSection; + return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Alignment); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b384d32685bad5866f04b66f1bea348030208c0d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +explicit MipsFrameLowering(const MipsSubtarget &sti, Align Alignment) : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) { +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fecd648fee2494cb011a5cd242be9efbd0d7efe2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,35 @@ +void MipsSEFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + const MipsSEInstrInfo &TII = *static_cast(STI.getInstrInfo()); + const MipsRegisterInfo &RegInfo = *static_cast(STI.getRegisterInfo()); + DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); + MipsABIInfo ABI = STI.getABI(); + unsigned SP = ABI.GetStackPtr(); + unsigned FP = ABI.GetFramePtr(); + unsigned ZERO = ABI.GetNullPtr(); + unsigned MOVE = ABI.GetGPRMoveOp(); + if (hasFP(MF)) { + MachineBasicBlock::iterator I = MBBI; + for (unsigned i = 0; i < MFI.getCalleeSavedInfo().size(); ++i) + --I; + BuildMI(MBB, I, DL, TII.get(MOVE), SP).addReg(FP).addReg(ZERO); + } + if (MipsFI->callsEhReturn()) { + const TargetRegisterClass *RC = ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + MachineBasicBlock::iterator I = MBBI; + for (unsigned i = 0; i < MFI.getCalleeSavedInfo().size(); ++i) + --I; + for (int J = 0; J < 4; ++J) { + TII.loadRegFromStackSlot(MBB, I, ABI.GetEhDataReg(J), MipsFI->getEhDataRegFI(J), RC, &RegInfo); + } + } + if (MF.getFunction().hasFnAttribute("interrupt")) + emitInterruptEpilogueStub(MF, MBB); + uint64_t StackSize = MFI.getStackSize(); + if (!StackSize) + return; + TII.adjustStackPtr(SP, StackSize, MBB, MBBI); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04cc5f5bac4d52157c1c5891a8c7a3810d0c6ef0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,88 @@ +void MipsSEFrameLowering::emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + const MipsSEInstrInfo &TII = *static_cast(STI.getInstrInfo()); + const MipsRegisterInfo &RegInfo = *static_cast(STI.getRegisterInfo()); + MachineBasicBlock::iterator MBBI = MBB.begin(); + DebugLoc dl; + MipsABIInfo ABI = STI.getABI(); + unsigned SP = ABI.GetStackPtr(); + unsigned FP = ABI.GetFramePtr(); + unsigned ZERO = ABI.GetNullPtr(); + unsigned MOVE = ABI.GetGPRMoveOp(); + unsigned ADDiu = ABI.GetPtrAddiuOp(); + unsigned AND = ABI.IsN64() ? Mips::AND64 : Mips::AND; + const TargetRegisterClass *RC = ABI.ArePtrs64bit() ? &Mips::GPR64RegClass : &Mips::GPR32RegClass; + uint64_t StackSize = MFI.getStackSize(); + if (StackSize == 0 && !MFI.adjustsStack()) + return; + MachineModuleInfo &MMI = MF.getMMI(); + const MCRegisterInfo *MRI = MMI.getContext().getRegisterInfo(); + TII.adjustStackPtr(SP, -StackSize, MBB, MBBI); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, StackSize)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + if (MF.getFunction().hasFnAttribute("interrupt")) + emitInterruptPrologueStub(MF, MBB); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + if (!CSI.empty()) { + for (unsigned i = 0; i < CSI.size(); ++i) + ++MBBI; + for (std::vector::const_iterator I = CSI.begin(), E = CSI.end(); I != E; ++I) { + int64_t Offset = MFI.getObjectOffset(I->getFrameIdx()); + unsigned Reg = I->getReg(); + if (Mips::AFGR64RegClass.contains(Reg)) { + unsigned Reg0 = MRI->getDwarfRegNum(RegInfo.getSubReg(Reg, Mips::sub_lo), true); + unsigned Reg1 = MRI->getDwarfRegNum(RegInfo.getSubReg(Reg, Mips::sub_hi), true); + if (!STI.isLittle()) + std::swap(Reg0, Reg1); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg0, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg1, Offset + 4)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + else if (Mips::FGR64RegClass.contains(Reg)) { + unsigned Reg0 = MRI->getDwarfRegNum(Reg, true); + unsigned Reg1 = MRI->getDwarfRegNum(Reg, true) + 1; + if (!STI.isLittle()) + std::swap(Reg0, Reg1); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg0, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg1, Offset + 4)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + else { + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, MRI->getDwarfRegNum(Reg, true), Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + } + if (MipsFI->callsEhReturn()) { + for (int I = 0; I < 4; ++I) { + if (!MBB.isLiveIn(ABI.GetEhDataReg(I))) + MBB.addLiveIn(ABI.GetEhDataReg(I)); + TII.storeRegToStackSlot(MBB, MBBI, ABI.GetEhDataReg(I), false, MipsFI->getEhDataRegFI(I), RC, &RegInfo); + } + for (int I = 0; I < 4; ++I) { + int64_t Offset = MFI.getObjectOffset(MipsFI->getEhDataRegFI(I)); + unsigned Reg = MRI->getDwarfRegNum(ABI.GetEhDataReg(I), true); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, Reg, Offset)); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + if (hasFP(MF)) { + BuildMI(MBB, MBBI, dl, TII.get(MOVE), FP).addReg(SP).addReg(ZERO).setMIFlag(MachineInstr::FrameSetup); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createDefCfaRegister( nullptr, MRI->getDwarfRegNum(FP, true))); + BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + if (RegInfo.needsStackRealignment(MF)) { + Register VR = MF.getRegInfo().createVirtualRegister(RC); + assert((Log2(MFI.getMaxAlign()) < 16) && "Function's alignment size requirement is not supported."); + int64_t MaxAlign = -(int64_t)MFI.getMaxAlign().value(); + BuildMI(MBB, MBBI, dl, TII.get(ADDiu), VR).addReg(ZERO).addImm(MaxAlign); + BuildMI(MBB, MBBI, dl, TII.get(AND), SP).addReg(SP).addReg(VR); + if (hasBP(MF)) { + unsigned BP = STI.isABI_N64() ? Mips::S7_64 : Mips::S7; + BuildMI(MBB, MBBI, dl, TII.get(MOVE), BP).addReg(SP).addReg(ZERO); + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2984a24fb87e41d561111fe745a031a4ae00d2f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,5 @@ +bool MipsFrameLowering::hasFP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + return MF.getTarget().Options.DisableFramePointerElim(MF) || MFI.hasVarSizedObjects() || MFI.isFrameAddressTaken() || TRI->needsStackRealignment(MF); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39a52f6a3ffb6bddaec5669406257eaaf8382c20 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,3 @@ +bool Mips16FrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef CSI, const TargetRegisterInfo *TRI) const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7ccdfa1edf7514e9f46b468c4a170614877a6c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,29 @@ +bool MipsSEFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef CSI, const TargetRegisterInfo *TRI) const { + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *STI.getInstrInfo(); + for (unsigned i = 0, e = CSI.size(); i != e; ++i) { + unsigned Reg = CSI[i].getReg(); + bool IsRAAndRetAddrIsTaken = (Reg == Mips::RA || Reg == Mips::RA_64) && MF->getFrameInfo().isReturnAddressTaken(); + if (!IsRAAndRetAddrIsTaken) + MBB.addLiveIn(Reg); + bool IsLOHI = (Reg == Mips::LO0 || Reg == Mips::LO0_64 || Reg == Mips::HI0 || Reg == Mips::HI0_64); + const Function &Func = MBB.getParent()->getFunction(); + if (IsLOHI && Func.hasFnAttribute("interrupt")) { + DebugLoc DL = MI->getDebugLoc(); + unsigned Op = 0; + if (!STI.getABI().ArePtrs64bit()) { + Op = (Reg == Mips::HI0) ? Mips::MFHI : Mips::MFLO; + Reg = Mips::K0; + } + else { + Op = (Reg == Mips::HI0) ? Mips::MFHI64 : Mips::MFLO64; + Reg = Mips::K0_64; + } + BuildMI(MBB, MI, DL, TII.get(Op), Mips::K0).setMIFlag(MachineInstr::FrameSetup); + } + bool IsKill = !IsRAAndRetAddrIsTaken; + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.storeRegToStackSlot(MBB, MI, Reg, IsKill, CSI[i].getFrameIdx(), RC, TRI); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a7fcbbf66a18053cbb09eb170938804acb78987 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +explicit MipsSEDAGToDAGISel(MipsTargetMachine &TM, CodeGenOpt::Level OL) : MipsDAGToDAGISel(TM, OL) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d342f74eef8e6835cb6a33677db55fb78cb5d785 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,50 @@ +bool MipsSEDAGToDAGISel::SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, std::vector &OutOps) { + SDValue Base, Offset; + switch(ConstraintID) { + default: + llvm_unreachable("Unexpected asm memory constraint"); + case InlineAsm::Constraint_m: + case InlineAsm::Constraint_o: + if (selectAddrRegImm16(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + case InlineAsm::Constraint_R: + if (selectAddrRegImm9(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + case InlineAsm::Constraint_ZC: + if (Subtarget->inMicroMipsMode()) { + if (selectAddrRegImm12(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + } + else if (Subtarget->hasMips32r6()) { + if (selectAddrRegImm9(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + } + else if (selectAddrRegImm16(Op, Base, Offset)) { + OutOps.push_back(Base); + OutOps.push_back(Offset); + return false; + } + OutOps.push_back(Op); + OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36e8855eb544200582451f8c21a565df6b7b9a48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createMipsSEISelDag(MipsTargetMachine &TM, CodeGenOpt::Level OptLevel) { + return new MipsSEDAGToDAGISel(TM, OptLevel); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5049e898a5b33a064ed6484e2e7cf1667997bef8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "MIPS DAG->DAG Pattern Instruction Selection"; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e857257cc58f086519f5aa8fb47b84c794ac83d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,5 @@ +bool MipsTargetLowering::CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg, const SmallVectorImpl &Outs, LLVMContext &Context) const { + SmallVector RVLocs; + MipsCCState CCInfo(CallConv, IsVarArg, MF, RVLocs, Context); + return CCInfo.CheckReturn(Outs, RetCC_Mips); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7a577133ff50ac6ce86af208c82aec90f270744 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,154 @@ +MachineBasicBlock *MipsTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *BB) const { + switch (MI.getOpcode()) { + default: + llvm_unreachable("Unexpected instr type to insert"); + case Mips::ATOMIC_LOAD_ADD_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_ADD_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_ADD_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_ADD_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_AND_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_AND_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_AND_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_AND_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_OR_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_OR_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_OR_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_OR_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_XOR_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_XOR_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_XOR_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_XOR_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_NAND_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_NAND_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_NAND_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_NAND_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_SUB_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_SUB_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_SUB_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_SUB_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_SWAP_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_SWAP_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_SWAP_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_SWAP_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_CMP_SWAP_I8: + return emitAtomicCmpSwapPartword(MI, BB, 1); + case Mips::ATOMIC_CMP_SWAP_I16: + return emitAtomicCmpSwapPartword(MI, BB, 2); + case Mips::ATOMIC_CMP_SWAP_I32: + return emitAtomicCmpSwap(MI, BB); + case Mips::ATOMIC_CMP_SWAP_I64: + return emitAtomicCmpSwap(MI, BB); + case Mips::ATOMIC_LOAD_MIN_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_MIN_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_MIN_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MIN_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MAX_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_MAX_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_MAX_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_MAX_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMIN_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_UMIN_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_UMIN_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMIN_I64: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMAX_I8: + return emitAtomicBinaryPartword(MI, BB, 1); + case Mips::ATOMIC_LOAD_UMAX_I16: + return emitAtomicBinaryPartword(MI, BB, 2); + case Mips::ATOMIC_LOAD_UMAX_I32: + return emitAtomicBinary(MI, BB); + case Mips::ATOMIC_LOAD_UMAX_I64: + return emitAtomicBinary(MI, BB); + case Mips::PseudoSDIV: + case Mips::PseudoUDIV: + case Mips::DIV: + case Mips::DIVU: + case Mips::MOD: + case Mips::MODU: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), false, false); + case Mips::SDIV_MM_Pseudo: + case Mips::UDIV_MM_Pseudo: + case Mips::SDIV_MM: + case Mips::UDIV_MM: + case Mips::DIV_MMR6: + case Mips::DIVU_MMR6: + case Mips::MOD_MMR6: + case Mips::MODU_MMR6: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), false, true); + case Mips::PseudoDSDIV: + case Mips::PseudoDUDIV: + case Mips::DDIV: + case Mips::DDIVU: + case Mips::DMOD: + case Mips::DMODU: + return insertDivByZeroTrap(MI, *BB, *Subtarget.getInstrInfo(), true, false); + case Mips::PseudoSELECT_I: + case Mips::PseudoSELECT_I64: + case Mips::PseudoSELECT_S: + case Mips::PseudoSELECT_D32: + case Mips::PseudoSELECT_D64: + return emitPseudoSELECT(MI, BB, false, Mips::BNE); + case Mips::PseudoSELECTFP_F_I: + case Mips::PseudoSELECTFP_F_I64: + case Mips::PseudoSELECTFP_F_S: + case Mips::PseudoSELECTFP_F_D32: + case Mips::PseudoSELECTFP_F_D64: + return emitPseudoSELECT(MI, BB, true, Mips::BC1F); + case Mips::PseudoSELECTFP_T_I: + case Mips::PseudoSELECTFP_T_I64: + case Mips::PseudoSELECTFP_T_S: + case Mips::PseudoSELECTFP_T_D32: + case Mips::PseudoSELECTFP_T_D64: + return emitPseudoSELECT(MI, BB, true, Mips::BC1T); + case Mips::PseudoD_SELECT_I: + case Mips::PseudoD_SELECT_I64: + return emitPseudoD_SELECT(MI, BB); + case Mips::LDR_W: + return emitLDR_W(MI, BB); + case Mips::LDR_D: + return emitLDR_D(MI, BB); + case Mips::STR_W: + return emitSTR_W(MI, BB); + case Mips::STR_D: + return emitSTR_D(MI, BB); + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e049555ac68c4ab9cbf7331380a481c26d01c38c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp @@ -0,0 +1,5 @@ +SDValue MipsTargetLowering::lowerATOMIC_FENCE(SDValue Op, SelectionDAG &DAG) const { + unsigned SType = 0; + SDLoc DL(Op); + return DAG.getNode(MipsISD::Sync, DL, MVT::Other, Op.getOperand(0), DAG.getConstant(SType, DL, MVT::i32)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d79eabbd2efdb54089e2201050b3419e772ee8a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { + BlockAddressSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e452e8db8b1f84d438f35752f0c4f697f1ca6bd3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,194 @@ +SDValue MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl &InVals) const { + SelectionDAG &DAG = CLI.DAG; + SDLoc DL = CLI.DL; + SmallVectorImpl &Outs = CLI.Outs; + SmallVectorImpl &OutVals = CLI.OutVals; + SmallVectorImpl &Ins = CLI.Ins; + SDValue Chain = CLI.Chain; + SDValue Callee = CLI.Callee; + bool &IsTailCall = CLI.IsTailCall; + CallingConv::ID CallConv = CLI.CallConv; + bool IsVarArg = CLI.IsVarArg; + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetFrameLowering *TFL = Subtarget.getFrameLowering(); + MipsFunctionInfo *FuncInfo = MF.getInfo(); + bool IsPIC = isPositionIndependent(); + SmallVector ArgLocs; + MipsCCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), ArgLocs, *DAG.getContext(), MipsCCState::getSpecialCallingConvForCallee(Callee.getNode(), Subtarget)); + const ExternalSymbolSDNode *ES = dyn_cast_or_null(Callee.getNode()); + bool MemcpyInByVal = ES && StringRef(ES->getSymbol()) == StringRef("memcpy") && CallConv != CallingConv::Fast && Chain.getOpcode() == ISD::CALLSEQ_START; + unsigned ReservedArgArea = MemcpyInByVal ? 0 : ABI.GetCalleeAllocdArgSizeInBytes(CallConv); + CCInfo.AllocateStack(ReservedArgArea, Align(1)); + CCInfo.AnalyzeCallOperands(Outs, CC_Mips, CLI.getArgs(), ES ? ES->getSymbol() : nullptr); + unsigned NextStackOffset = CCInfo.getNextStackOffset(); + MachineFunction::CallSiteInfo CSInfo; + bool InternalLinkage = false; + if (IsTailCall) { + IsTailCall = isEligibleForTailCallOptimization(CCInfo, NextStackOffset, *MF.getInfo()); + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + InternalLinkage = G->getGlobal()->hasInternalLinkage(); + IsTailCall &= (InternalLinkage || G->getGlobal()->hasLocalLinkage() || G->getGlobal()->hasPrivateLinkage() || G->getGlobal()->hasHiddenVisibility() || G->getGlobal()->hasProtectedVisibility()); + } + } + if (!IsTailCall && CLI.CB && CLI.CB->isMustTailCall()) + report_fatal_error("failed to perform tail call elimination on a call site marked musttail"); + if (IsTailCall) + ++NumTailCalls; + unsigned StackAlignment = TFL->getStackAlignment(); + NextStackOffset = alignTo(NextStackOffset, StackAlignment); + SDValue NextStackOffsetVal = DAG.getIntPtrConstant(NextStackOffset, DL, true); + if (!(IsTailCall || MemcpyInByVal)) + Chain = DAG.getCALLSEQ_START(Chain, NextStackOffset, 0, DL); + SDValue StackPtr = DAG.getCopyFromReg(Chain, DL, ABI.IsN64() ? Mips::SP_64 : Mips::SP, getPointerTy(DAG.getDataLayout())); + std::deque> RegsToPass; + SmallVector MemOpChains; + CCInfo.rewindByValRegsInfo(); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + SDValue Arg = OutVals[i]; + CCValAssign &VA = ArgLocs[i]; + MVT ValVT = VA.getValVT(), LocVT = VA.getLocVT(); + ISD::ArgFlagsTy Flags = Outs[i].Flags; + bool UseUpperBits = false; + if (Flags.isByVal()) { + unsigned FirstByValReg, LastByValReg; + unsigned ByValIdx = CCInfo.getInRegsParamsProcessed(); + CCInfo.getInRegsParamInfo(ByValIdx, FirstByValReg, LastByValReg); + assert(Flags.getByValSize() && "ByVal args of size 0 should have been ignored by front-end."); + assert(ByValIdx < CCInfo.getInRegsParamsCount()); + assert(!IsTailCall && "Do not tail-call optimize if there is a byval argument."); + passByValArg(Chain, DL, RegsToPass, MemOpChains, StackPtr, MFI, DAG, Arg, FirstByValReg, LastByValReg, Flags, Subtarget.isLittle(), VA); + CCInfo.nextInRegsParam(); + continue; + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: + if (VA.isRegLoc()) { + if ((ValVT == MVT::f32 && LocVT == MVT::i32) || (ValVT == MVT::f64 && LocVT == MVT::i64) || (ValVT == MVT::i64 && LocVT == MVT::f64)) + Arg = DAG.getNode(ISD::BITCAST, DL, LocVT, Arg); + else if (ValVT == MVT::f64 && LocVT == MVT::i32) { + SDValue Lo = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Arg, DAG.getConstant(0, DL, MVT::i32)); + SDValue Hi = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Arg, DAG.getConstant(1, DL, MVT::i32)); + if (!Subtarget.isLittle()) + std::swap(Lo, Hi); + Register LocRegLo = VA.getLocReg(); + unsigned LocRegHigh = getNextIntArgReg(LocRegLo); + RegsToPass.push_back(std::make_pair(LocRegLo, Lo)); + RegsToPass.push_back(std::make_pair(LocRegHigh, Hi)); + continue; + } + } + break; + case CCValAssign::BCvt: + Arg = DAG.getNode(ISD::BITCAST, DL, LocVT, Arg); + break; + case CCValAssign::SExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::SExt: + Arg = DAG.getNode(ISD::SIGN_EXTEND, DL, LocVT, Arg); + break; + case CCValAssign::ZExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::ZExt: + Arg = DAG.getNode(ISD::ZERO_EXTEND, DL, LocVT, Arg); + break; + case CCValAssign::AExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::AExt: + Arg = DAG.getNode(ISD::ANY_EXTEND, DL, LocVT, Arg); + break; + } + if (UseUpperBits) { + unsigned ValSizeInBits = Outs[i].ArgVT.getSizeInBits(); + unsigned LocSizeInBits = VA.getLocVT().getSizeInBits(); + Arg = DAG.getNode(ISD::SHL, DL, VA.getLocVT(), Arg, DAG.getConstant(LocSizeInBits - ValSizeInBits, DL, VA.getLocVT())); + } + if (VA.isRegLoc()) { + RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); + if (Mips::AFGR64RegClass.contains(VA.getLocReg())) + continue; + const TargetOptions &Options = DAG.getTarget().Options; + if (Options.SupportsDebugEntryValues) + CSInfo.emplace_back(VA.getLocReg(), i); + continue; + } + assert(VA.isMemLoc()); + MemOpChains.push_back(passArgOnStack(StackPtr, VA.getLocMemOffset(), Chain, Arg, DL, IsTailCall, DAG)); + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, MemOpChains); + EVT Ty = Callee.getValueType(); + bool GlobalOrExternal = false, IsCallReloc = false; + if (!Subtarget.isABICalls() && !IsPIC) { + if (auto *N = dyn_cast(Callee)) { + if (Subtarget.useLongCalls()) + Callee = Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + else if (auto *N = dyn_cast(Callee)) { + bool UseLongCalls = Subtarget.useLongCalls(); + if (auto *F = dyn_cast(N->getGlobal())) { + if (F->hasFnAttribute("long-call")) + UseLongCalls = true; + else if (F->hasFnAttribute("short-call")) + UseLongCalls = false; + } + if (UseLongCalls) + Callee = Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + } + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + if (IsPIC) { + const GlobalValue *Val = G->getGlobal(); + InternalLinkage = Val->hasInternalLinkage(); + if (InternalLinkage) + Callee = getAddrLocal(G, DL, Ty, DAG, ABI.IsN32() || ABI.IsN64()); + else if (Subtarget.useXGOT()) { + Callee = getAddrGlobalLargeGOT(G, DL, Ty, DAG, MipsII::MO_CALL_HI16, MipsII::MO_CALL_LO16, Chain, FuncInfo->callPtrInfo(MF, Val)); + IsCallReloc = true; + } + else { + Callee = getAddrGlobal(G, DL, Ty, DAG, MipsII::MO_GOT_CALL, Chain, FuncInfo->callPtrInfo(MF, Val)); + IsCallReloc = true; + } + } + else + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), DL, getPointerTy(DAG.getDataLayout()), 0, MipsII::MO_NO_FLAG); + GlobalOrExternal = true; + } + else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { + const char *Sym = S->getSymbol(); + if (!IsPIC) + Callee = DAG.getTargetExternalSymbol( Sym, getPointerTy(DAG.getDataLayout()), MipsII::MO_NO_FLAG); + else if (Subtarget.useXGOT()) { + Callee = getAddrGlobalLargeGOT(S, DL, Ty, DAG, MipsII::MO_CALL_HI16, MipsII::MO_CALL_LO16, Chain, FuncInfo->callPtrInfo(MF, Sym)); + IsCallReloc = true; + } + else { + Callee = getAddrGlobal(S, DL, Ty, DAG, MipsII::MO_GOT_CALL, Chain, FuncInfo->callPtrInfo(MF, Sym)); + IsCallReloc = true; + } + GlobalOrExternal = true; + } + SmallVector Ops(1, Chain); + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); + getOpndList(Ops, RegsToPass, IsPIC, GlobalOrExternal, InternalLinkage, IsCallReloc, CLI, Callee, Chain); + if (IsTailCall) { + MF.getFrameInfo().setHasTailCall(); + SDValue Ret = DAG.getNode(MipsISD::TailCall, DL, MVT::Other, Ops); + DAG.addCallSiteInfo(Ret.getNode(), std::move(CSInfo)); + return Ret; + } + Chain = DAG.getNode(MipsISD::JmpLink, DL, NodeTys, Ops); + SDValue InFlag = Chain.getValue(1); + DAG.addCallSiteInfo(Chain.getNode(), std::move(CSInfo)); + if (!(MemcpyInByVal)) { + Chain = DAG.getCALLSEQ_END(Chain, NextStackOffsetVal, DAG.getIntPtrConstant(0, DL, true), InFlag, DL); + InFlag = Chain.getValue(1); + } + return LowerCallResult(Chain, InFlag, CallConv, IsVarArg, Ins, DL, DAG, InVals, CLI); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a118c8fea23e323e770a810738ac56de09cca15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,11 @@ +SDValue MipsTargetLowering::lowerConstantPool(SDValue Op, SelectionDAG &DAG) const { + ConstantPoolSDNode *N = cast(Op); + EVT Ty = Op.getValueType(); + if (!isPositionIndependent()) { + const MipsTargetObjectFile *TLOF = static_cast(getTargetMachine().getObjFileLowering()); + if (TLOF->IsConstantInSmallSection(DAG.getDataLayout(), N->getConstVal(), getTargetMachine())) + return getAddrGPRel(N, SDLoc(N), Ty, DAG, ABI.IsN64()); + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6013ed5fc72a71593c03726f9f0b8b50dd8f74e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp @@ -0,0 +1,15 @@ +SDValue MipsTargetLowering::lowerEH_RETURN(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachineFunction(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + MipsFI->setCallsEhReturn(); + SDValue Chain = Op.getOperand(0); + SDValue Offset = Op.getOperand(1); + SDValue Handler = Op.getOperand(2); + SDLoc DL(Op); + EVT Ty = ABI.IsN64() ? MVT::i64 : MVT::i32; + unsigned OffsetReg = ABI.IsN64() ? Mips::V1_64 : Mips::V1; + unsigned AddrReg = ABI.IsN64() ? Mips::V0_64 : Mips::V0; + Chain = DAG.getCopyToReg(Chain, DL, OffsetReg, Offset, SDValue()); + Chain = DAG.getCopyToReg(Chain, DL, AddrReg, Handler, Chain.getValue(1)); + return DAG.getNode(MipsISD::EH_RETURN, DL, MVT::Other, Chain, DAG.getRegister(OffsetReg, Ty), DAG.getRegister(AddrReg, getPointerTy(MF.getDataLayout())), Chain.getValue(1)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55304c0e002c25426cac915e340d397c57564694 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,12 @@ +SDValue MipsTargetLowering::lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { + if (cast(Op.getOperand(0))->getZExtValue() != 0) { + DAG.getContext()->emitError("return address can be determined only for current frame"); + return SDValue(); + } + MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo(); + MFI.setFrameAddressIsTaken(true); + EVT VT = Op.getValueType(); + SDLoc DL(Op); + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), DL, ABI.IsN64() ? Mips::FP_64 : Mips::FP, VT); + return FrameAddr; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbb9efff7eb46b474008aab70f4ce03c006a5618 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,90 @@ +SDValue MipsTargetLowering::LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Ins, const SDLoc &DL, SelectionDAG &DAG, SmallVectorImpl &InVals) const { + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MipsFunctionInfo *MipsFI = MF.getInfo(); + MipsFI->setVarArgsFrameIndex(0); + std::vector OutChains; + SmallVector ArgLocs; + MipsCCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), ArgLocs, *DAG.getContext()); + CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(CallConv), Align(1)); + const Function &Func = DAG.getMachineFunction().getFunction(); + Function::const_arg_iterator FuncArg = Func.arg_begin(); + if (Func.hasFnAttribute("interrupt") && !Func.arg_empty()) + report_fatal_error("Functions with the interrupt attribute cannot have arguments!"); + CCInfo.AnalyzeFormalArguments(Ins, CC_Mips_FixedArg); + MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(), CCInfo.getInRegsParamsCount() > 0); + unsigned CurArgIdx = 0; + CCInfo.rewindByValRegsInfo(); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + if (Ins[i].isOrigArg()) { + std::advance(FuncArg, Ins[i].getOrigArgIndex() - CurArgIdx); + CurArgIdx = Ins[i].getOrigArgIndex(); + } + EVT ValVT = VA.getValVT(); + ISD::ArgFlagsTy Flags = Ins[i].Flags; + bool IsRegLoc = VA.isRegLoc(); + if (Flags.isByVal()) { + assert(Ins[i].isOrigArg() && "Byval arguments cannot be implicit"); + unsigned FirstByValReg, LastByValReg; + unsigned ByValIdx = CCInfo.getInRegsParamsProcessed(); + CCInfo.getInRegsParamInfo(ByValIdx, FirstByValReg, LastByValReg); + assert(Flags.getByValSize() && "ByVal args of size 0 should have been ignored by front-end."); + assert(ByValIdx < CCInfo.getInRegsParamsCount()); + copyByValRegs(Chain, DL, OutChains, DAG, Flags, InVals, &*FuncArg, FirstByValReg, LastByValReg, VA, CCInfo); + CCInfo.nextInRegsParam(); + continue; + } + if (IsRegLoc) { + MVT RegVT = VA.getLocVT(); + Register ArgReg = VA.getLocReg(); + const TargetRegisterClass *RC = getRegClassFor(RegVT); + unsigned Reg = addLiveIn(DAG.getMachineFunction(), ArgReg, RC); + SDValue ArgValue = DAG.getCopyFromReg(Chain, DL, Reg, RegVT); + ArgValue = UnpackFromArgumentSlot(ArgValue, VA, Ins[i].ArgVT, DL, DAG); + if ((RegVT == MVT::i32 && ValVT == MVT::f32) || (RegVT == MVT::i64 && ValVT == MVT::f64) || (RegVT == MVT::f64 && ValVT == MVT::i64)) + ArgValue = DAG.getNode(ISD::BITCAST, DL, ValVT, ArgValue); + else if (ABI.IsO32() && RegVT == MVT::i32 && ValVT == MVT::f64) { + unsigned Reg2 = addLiveIn(DAG.getMachineFunction(), getNextIntArgReg(ArgReg), RC); + SDValue ArgValue2 = DAG.getCopyFromReg(Chain, DL, Reg2, RegVT); + if (!Subtarget.isLittle()) + std::swap(ArgValue, ArgValue2); + ArgValue = DAG.getNode(MipsISD::BuildPairF64, DL, MVT::f64, ArgValue, ArgValue2); + } + InVals.push_back(ArgValue); + } + else { + MVT LocVT = VA.getLocVT(); + if (ABI.IsO32()) { + if (VA.getValVT().isFloatingPoint() && !Subtarget.useSoftFloat()) + LocVT = VA.getValVT(); + } + assert(VA.isMemLoc()); + int FI = MFI.CreateFixedObject(LocVT.getSizeInBits() / 8, VA.getLocMemOffset(), true); + SDValue FIN = DAG.getFrameIndex(FI, getPointerTy(DAG.getDataLayout())); + SDValue ArgValue = DAG.getLoad(LocVT, DL, Chain, FIN, MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FI)); + OutChains.push_back(ArgValue.getValue(1)); + ArgValue = UnpackFromArgumentSlot(ArgValue, VA, Ins[i].ArgVT, DL, DAG); + InVals.push_back(ArgValue); + } + } + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + if (Ins[i].Flags.isSRet()) { + unsigned Reg = MipsFI->getSRetReturnReg(); + if (!Reg) { + Reg = MF.getRegInfo().createVirtualRegister(getRegClassFor(ABI.IsN64() ? MVT::i64 : MVT::i32)); + MipsFI->setSRetReturnReg(Reg); + } + SDValue Copy = DAG.getCopyToReg(DAG.getEntryNode(), DL, Reg, InVals[i]); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Copy, Chain); + break; + } + } + if (IsVarArg) + writeVarArgRegs(OutChains, Chain, DL, DAG, CCInfo); + if (!OutChains.empty()) { + OutChains.push_back(Chain); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, OutChains); + } + return Chain; +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3bc241861141aeaf0155e6e05b289a3c4232fdc8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,17 @@ +SDValue MipsTargetLowering::lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { + EVT Ty = Op.getValueType(); + GlobalAddressSDNode *N = cast(Op); + const GlobalValue *GV = N->getGlobal(); + if (!isPositionIndependent()) { + const MipsTargetObjectFile *TLOF = static_cast(getTargetMachine().getObjFileLowering()); + const GlobalObject *GO = GV->getBaseObject(); + if (GO && TLOF->IsGlobalInSmallSection(GO, getTargetMachine())) + return getAddrGPRel(N, SDLoc(N), Ty, DAG, ABI.IsN64()); + return Subtarget.hasSym32() ? getAddrNonPIC(N, SDLoc(N), Ty, DAG) : getAddrNonPICSym64(N, SDLoc(N), Ty, DAG); + } + if (GV->hasLocalLinkage()) + return getAddrLocal(N, SDLoc(N), Ty, DAG, ABI.IsN32() || ABI.IsN64()); + if (Subtarget.useXGOT()) + return getAddrGlobalLargeGOT(N, SDLoc(N), Ty, DAG, MipsII::MO_GOT_HI16, MipsII::MO_GOT_LO16, DAG.getEntryNode(), MachinePointerInfo::getGOT(DAG.getMachineFunction())); + return getAddrGlobal(N, SDLoc(N), Ty, DAG, (ABI.IsN32() || ABI.IsN64()) ? MipsII::MO_GOT_DISP : MipsII::MO_GOT, DAG.getEntryNode(), MachinePointerInfo::getGOT(DAG.getMachineFunction())); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40d4302abbe9ff053b9574dac4d63cd2fbc144cf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,50 @@ +SDValue MipsTargetLowering::lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { + GlobalAddressSDNode *GA = cast(Op); + if (DAG.getTarget().useEmulatedTLS()) + return LowerToTLSEmulatedModel(GA, DAG); + SDLoc DL(GA); + const GlobalValue *GV = GA->getGlobal(); + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + TLSModel::Model model = getTargetMachine().getTLSModel(GV); + if (model == TLSModel::GeneralDynamic || model == TLSModel::LocalDynamic) { + unsigned Flag = (model == TLSModel::LocalDynamic) ? MipsII::MO_TLSLDM : MipsII::MO_TLSGD; + SDValue TGA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, Flag); + SDValue Argument = DAG.getNode(MipsISD::Wrapper, DL, PtrVT, getGlobalReg(DAG, PtrVT), TGA); + unsigned PtrSize = PtrVT.getSizeInBits(); + IntegerType *PtrTy = Type::getIntNTy(*DAG.getContext(), PtrSize); + SDValue TlsGetAddr = DAG.getExternalSymbol("__tls_get_addr", PtrVT); + ArgListTy Args; + ArgListEntry Entry; + Entry.Node = Argument; + Entry.Ty = PtrTy; + Args.push_back(Entry); + TargetLowering::CallLoweringInfo CLI(DAG); + CLI.setDebugLoc(DL).setChain(DAG.getEntryNode()).setLibCallee(CallingConv::C, PtrTy, TlsGetAddr, std::move(Args)); + std::pair CallResult = LowerCallTo(CLI); + SDValue Ret = CallResult.first; + if (model != TLSModel::LocalDynamic) + return Ret; + SDValue TGAHi = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_DTPREL_HI); + SDValue Hi = DAG.getNode(MipsISD::TlsHi, DL, PtrVT, TGAHi); + SDValue TGALo = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_DTPREL_LO); + SDValue Lo = DAG.getNode(MipsISD::Lo, DL, PtrVT, TGALo); + SDValue Add = DAG.getNode(ISD::ADD, DL, PtrVT, Hi, Ret); + return DAG.getNode(ISD::ADD, DL, PtrVT, Add, Lo); + } + SDValue Offset; + if (model == TLSModel::InitialExec) { + SDValue TGA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_GOTTPREL); + TGA = DAG.getNode(MipsISD::Wrapper, DL, PtrVT, getGlobalReg(DAG, PtrVT),TGA); + Offset = DAG.getLoad(PtrVT, DL, DAG.getEntryNode(), TGA, MachinePointerInfo()); + } + else { + assert(model == TLSModel::LocalExec); + SDValue TGAHi = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_TPREL_HI); + SDValue TGALo = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, MipsII::MO_TPREL_LO); + SDValue Hi = DAG.getNode(MipsISD::TlsHi, DL, PtrVT, TGAHi); + SDValue Lo = DAG.getNode(MipsISD::Lo, DL, PtrVT, TGALo); + Offset = DAG.getNode(ISD::ADD, DL, PtrVT, Hi, Lo); + } + SDValue ThreadPointer = DAG.getNode(MipsISD::ThreadPointer, DL, PtrVT); + return DAG.getNode(ISD::ADD, DL, PtrVT, ThreadPointer, Offset); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..150e8c0e72027acdaeeb3a046260a9210d8c6e7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,601 @@ +SDValue MipsSETargetLowering::lowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + unsigned Intrinsic = cast(Op->getOperand(0))->getZExtValue(); + switch (Intrinsic) { + default: + return SDValue(); + case Intrinsic::mips_shilo: + return lowerDSPIntr(Op, DAG, MipsISD::SHILO); + case Intrinsic::mips_dpau_h_qbl: + return lowerDSPIntr(Op, DAG, MipsISD::DPAU_H_QBL); + case Intrinsic::mips_dpau_h_qbr: + return lowerDSPIntr(Op, DAG, MipsISD::DPAU_H_QBR); + case Intrinsic::mips_dpsu_h_qbl: + return lowerDSPIntr(Op, DAG, MipsISD::DPSU_H_QBL); + case Intrinsic::mips_dpsu_h_qbr: + return lowerDSPIntr(Op, DAG, MipsISD::DPSU_H_QBR); + case Intrinsic::mips_dpa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPA_W_PH); + case Intrinsic::mips_dps_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPS_W_PH); + case Intrinsic::mips_dpax_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPAX_W_PH); + case Intrinsic::mips_dpsx_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::DPSX_W_PH); + case Intrinsic::mips_mulsa_w_ph: + return lowerDSPIntr(Op, DAG, MipsISD::MULSA_W_PH); + case Intrinsic::mips_mult: + return lowerDSPIntr(Op, DAG, MipsISD::Mult); + case Intrinsic::mips_multu: + return lowerDSPIntr(Op, DAG, MipsISD::Multu); + case Intrinsic::mips_madd: + return lowerDSPIntr(Op, DAG, MipsISD::MAdd); + case Intrinsic::mips_maddu: + return lowerDSPIntr(Op, DAG, MipsISD::MAddu); + case Intrinsic::mips_msub: + return lowerDSPIntr(Op, DAG, MipsISD::MSub); + case Intrinsic::mips_msubu: + return lowerDSPIntr(Op, DAG, MipsISD::MSubu); + case Intrinsic::mips_addv_b: + case Intrinsic::mips_addv_h: + case Intrinsic::mips_addv_w: + case Intrinsic::mips_addv_d: + return DAG.getNode(ISD::ADD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_addvi_b: + case Intrinsic::mips_addvi_h: + case Intrinsic::mips_addvi_w: + case Intrinsic::mips_addvi_d: + return DAG.getNode(ISD::ADD, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_and_v: + return DAG.getNode(ISD::AND, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_andi_b: + return DAG.getNode(ISD::AND, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_bclr_b: + case Intrinsic::mips_bclr_h: + case Intrinsic::mips_bclr_w: + case Intrinsic::mips_bclr_d: + return lowerMSABitClear(Op, DAG); + case Intrinsic::mips_bclri_b: + case Intrinsic::mips_bclri_h: + case Intrinsic::mips_bclri_w: + case Intrinsic::mips_bclri_d: + return lowerMSABitClearImm(Op, DAG); + case Intrinsic::mips_binsli_b: + case Intrinsic::mips_binsli_h: + case Intrinsic::mips_binsli_w: + case Intrinsic::mips_binsli_d: { + EVT VecTy = Op->getValueType(0); + EVT EltTy = VecTy.getVectorElementType(); + if (Op->getConstantOperandVal(3) >= EltTy.getSizeInBits()) + report_fatal_error("Immediate out of range"); + APInt Mask = APInt::getHighBitsSet(EltTy.getSizeInBits(), Op->getConstantOperandVal(3) + 1); + return DAG.getNode(ISD::VSELECT, DL, VecTy, DAG.getConstant(Mask, DL, VecTy, true), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_binsri_b: + case Intrinsic::mips_binsri_h: + case Intrinsic::mips_binsri_w: + case Intrinsic::mips_binsri_d: { + EVT VecTy = Op->getValueType(0); + EVT EltTy = VecTy.getVectorElementType(); + if (Op->getConstantOperandVal(3) >= EltTy.getSizeInBits()) + report_fatal_error("Immediate out of range"); + APInt Mask = APInt::getLowBitsSet(EltTy.getSizeInBits(), Op->getConstantOperandVal(3) + 1); + return DAG.getNode(ISD::VSELECT, DL, VecTy, DAG.getConstant(Mask, DL, VecTy, true), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_bmnz_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(3), Op->getOperand(2), Op->getOperand(1)); + case Intrinsic::mips_bmnzi_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(2), Op->getOperand(1)); + case Intrinsic::mips_bmz_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(3), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_bmzi_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_bneg_b: + case Intrinsic::mips_bneg_h: + case Intrinsic::mips_bneg_w: + case Intrinsic::mips_bneg_d: { + EVT VecTy = Op->getValueType(0); + SDValue One = DAG.getConstant(1, DL, VecTy); + return DAG.getNode(ISD::XOR, DL, VecTy, Op->getOperand(1), DAG.getNode(ISD::SHL, DL, VecTy, One, truncateVecElts(Op, DAG))); + } + case Intrinsic::mips_bnegi_b: + case Intrinsic::mips_bnegi_h: + case Intrinsic::mips_bnegi_w: + case Intrinsic::mips_bnegi_d: + return lowerMSABinaryBitImmIntr(Op, DAG, ISD::XOR, Op->getOperand(2), !Subtarget.isLittle()); + case Intrinsic::mips_bnz_b: + case Intrinsic::mips_bnz_h: + case Intrinsic::mips_bnz_w: + case Intrinsic::mips_bnz_d: + return DAG.getNode(MipsISD::VALL_NONZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bnz_v: + return DAG.getNode(MipsISD::VANY_NONZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bsel_v: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(3), Op->getOperand(2)); + case Intrinsic::mips_bseli_b: + return DAG.getNode(ISD::VSELECT, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 3, DAG), Op->getOperand(2)); + case Intrinsic::mips_bset_b: + case Intrinsic::mips_bset_h: + case Intrinsic::mips_bset_w: + case Intrinsic::mips_bset_d: { + EVT VecTy = Op->getValueType(0); + SDValue One = DAG.getConstant(1, DL, VecTy); + return DAG.getNode(ISD::OR, DL, VecTy, Op->getOperand(1), DAG.getNode(ISD::SHL, DL, VecTy, One, truncateVecElts(Op, DAG))); + } + case Intrinsic::mips_bseti_b: + case Intrinsic::mips_bseti_h: + case Intrinsic::mips_bseti_w: + case Intrinsic::mips_bseti_d: + return lowerMSABinaryBitImmIntr(Op, DAG, ISD::OR, Op->getOperand(2), !Subtarget.isLittle()); + case Intrinsic::mips_bz_b: + case Intrinsic::mips_bz_h: + case Intrinsic::mips_bz_w: + case Intrinsic::mips_bz_d: + return DAG.getNode(MipsISD::VALL_ZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_bz_v: + return DAG.getNode(MipsISD::VANY_ZERO, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ceq_b: + case Intrinsic::mips_ceq_h: + case Intrinsic::mips_ceq_w: + case Intrinsic::mips_ceq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETEQ); + case Intrinsic::mips_ceqi_b: + case Intrinsic::mips_ceqi_h: + case Intrinsic::mips_ceqi_w: + case Intrinsic::mips_ceqi_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETEQ); + case Intrinsic::mips_cle_s_b: + case Intrinsic::mips_cle_s_h: + case Intrinsic::mips_cle_s_w: + case Intrinsic::mips_cle_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETLE); + case Intrinsic::mips_clei_s_b: + case Intrinsic::mips_clei_s_h: + case Intrinsic::mips_clei_s_w: + case Intrinsic::mips_clei_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETLE); + case Intrinsic::mips_cle_u_b: + case Intrinsic::mips_cle_u_h: + case Intrinsic::mips_cle_u_w: + case Intrinsic::mips_cle_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULE); + case Intrinsic::mips_clei_u_b: + case Intrinsic::mips_clei_u_h: + case Intrinsic::mips_clei_u_w: + case Intrinsic::mips_clei_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG), ISD::SETULE); + case Intrinsic::mips_clt_s_b: + case Intrinsic::mips_clt_s_h: + case Intrinsic::mips_clt_s_w: + case Intrinsic::mips_clt_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETLT); + case Intrinsic::mips_clti_s_b: + case Intrinsic::mips_clti_s_h: + case Intrinsic::mips_clti_s_w: + case Intrinsic::mips_clti_s_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true), ISD::SETLT); + case Intrinsic::mips_clt_u_b: + case Intrinsic::mips_clt_u_h: + case Intrinsic::mips_clt_u_w: + case Intrinsic::mips_clt_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULT); + case Intrinsic::mips_clti_u_b: + case Intrinsic::mips_clti_u_h: + case Intrinsic::mips_clti_u_w: + case Intrinsic::mips_clti_u_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG), ISD::SETULT); + case Intrinsic::mips_copy_s_b: + case Intrinsic::mips_copy_s_h: + case Intrinsic::mips_copy_s_w: + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_SEXT_ELT); + case Intrinsic::mips_copy_s_d: + if (Subtarget.hasMips64()) + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_SEXT_ELT); + else { + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + } + case Intrinsic::mips_copy_u_b: + case Intrinsic::mips_copy_u_h: + case Intrinsic::mips_copy_u_w: + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_ZEXT_ELT); + case Intrinsic::mips_copy_u_d: + if (Subtarget.hasMips64()) + return lowerMSACopyIntr(Op, DAG, MipsISD::VEXTRACT_ZEXT_ELT); + else { + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + } + case Intrinsic::mips_div_s_b: + case Intrinsic::mips_div_s_h: + case Intrinsic::mips_div_s_w: + case Intrinsic::mips_div_s_d: + return DAG.getNode(ISD::SDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_div_u_b: + case Intrinsic::mips_div_u_h: + case Intrinsic::mips_div_u_w: + case Intrinsic::mips_div_u_d: + return DAG.getNode(ISD::UDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fadd_w: + case Intrinsic::mips_fadd_d: + return DAG.getNode(ISD::FADD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fceq_w: + case Intrinsic::mips_fceq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOEQ); + case Intrinsic::mips_fcle_w: + case Intrinsic::mips_fcle_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOLE); + case Intrinsic::mips_fclt_w: + case Intrinsic::mips_fclt_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETOLT); + case Intrinsic::mips_fcne_w: + case Intrinsic::mips_fcne_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETONE); + case Intrinsic::mips_fcor_w: + case Intrinsic::mips_fcor_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETO); + case Intrinsic::mips_fcueq_w: + case Intrinsic::mips_fcueq_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUEQ); + case Intrinsic::mips_fcule_w: + case Intrinsic::mips_fcule_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULE); + case Intrinsic::mips_fcult_w: + case Intrinsic::mips_fcult_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETULT); + case Intrinsic::mips_fcun_w: + case Intrinsic::mips_fcun_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUO); + case Intrinsic::mips_fcune_w: + case Intrinsic::mips_fcune_d: + return DAG.getSetCC(DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), ISD::SETUNE); + case Intrinsic::mips_fdiv_w: + case Intrinsic::mips_fdiv_d: + return DAG.getNode(ISD::FDIV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ffint_u_w: + case Intrinsic::mips_ffint_u_d: + return DAG.getNode(ISD::UINT_TO_FP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ffint_s_w: + case Intrinsic::mips_ffint_s_d: + return DAG.getNode(ISD::SINT_TO_FP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fill_b: + case Intrinsic::mips_fill_h: + case Intrinsic::mips_fill_w: + case Intrinsic::mips_fill_d: { + EVT ResTy = Op->getValueType(0); + SmallVector Ops(ResTy.getVectorNumElements(), Op->getOperand(1)); + return DAG.getBuildVector(ResTy, DL, Ops); + } + case Intrinsic::mips_fexp2_w: + case Intrinsic::mips_fexp2_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::FMUL, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::FEXP2, SDLoc(Op), ResTy, Op->getOperand(2))); + } + case Intrinsic::mips_flog2_w: + case Intrinsic::mips_flog2_d: + return DAG.getNode(ISD::FLOG2, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fmadd_w: + case Intrinsic::mips_fmadd_d: + return DAG.getNode(ISD::FMA, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + case Intrinsic::mips_fmul_w: + case Intrinsic::mips_fmul_d: + return DAG.getNode(ISD::FMUL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_fmsub_w: + case Intrinsic::mips_fmsub_d: { + return DAG.getNode(MipsISD::FMS, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + } + case Intrinsic::mips_frint_w: + case Intrinsic::mips_frint_d: + return DAG.getNode(ISD::FRINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fsqrt_w: + case Intrinsic::mips_fsqrt_d: + return DAG.getNode(ISD::FSQRT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_fsub_w: + case Intrinsic::mips_fsub_d: + return DAG.getNode(ISD::FSUB, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ftrunc_u_w: + case Intrinsic::mips_ftrunc_u_d: + return DAG.getNode(ISD::FP_TO_UINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ftrunc_s_w: + case Intrinsic::mips_ftrunc_s_d: + return DAG.getNode(ISD::FP_TO_SINT, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_ilvev_b: + case Intrinsic::mips_ilvev_h: + case Intrinsic::mips_ilvev_w: + case Intrinsic::mips_ilvev_d: + return DAG.getNode(MipsISD::ILVEV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvl_b: + case Intrinsic::mips_ilvl_h: + case Intrinsic::mips_ilvl_w: + case Intrinsic::mips_ilvl_d: + return DAG.getNode(MipsISD::ILVL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvod_b: + case Intrinsic::mips_ilvod_h: + case Intrinsic::mips_ilvod_w: + case Intrinsic::mips_ilvod_d: + return DAG.getNode(MipsISD::ILVOD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ilvr_b: + case Intrinsic::mips_ilvr_h: + case Intrinsic::mips_ilvr_w: + case Intrinsic::mips_ilvr_d: + return DAG.getNode(MipsISD::ILVR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_insert_b: + case Intrinsic::mips_insert_h: + case Intrinsic::mips_insert_w: + case Intrinsic::mips_insert_d: + return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0), Op->getOperand(1), Op->getOperand(3), Op->getOperand(2)); + case Intrinsic::mips_insve_b: + case Intrinsic::mips_insve_h: + case Intrinsic::mips_insve_w: + case Intrinsic::mips_insve_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_insve_b: Max = 15; break; + case Intrinsic::mips_insve_h: Max = 7; break; + case Intrinsic::mips_insve_w: Max = 3; break; + case Intrinsic::mips_insve_d: Max = 1; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return DAG.getNode(MipsISD::INSVE, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3), DAG.getConstant(0, DL, MVT::i32)); + } + case Intrinsic::mips_ldi_b: + case Intrinsic::mips_ldi_h: + case Intrinsic::mips_ldi_w: + case Intrinsic::mips_ldi_d: + return lowerMSASplatImm(Op, 1, DAG, true); + case Intrinsic::mips_lsa: + case Intrinsic::mips_dlsa: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::ADD, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::SHL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_maddv_b: + case Intrinsic::mips_maddv_h: + case Intrinsic::mips_maddv_w: + case Intrinsic::mips_maddv_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::ADD, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::MUL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_max_s_b: + case Intrinsic::mips_max_s_h: + case Intrinsic::mips_max_s_w: + case Intrinsic::mips_max_s_d: + return DAG.getNode(ISD::SMAX, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_max_u_b: + case Intrinsic::mips_max_u_h: + case Intrinsic::mips_max_u_w: + case Intrinsic::mips_max_u_d: + return DAG.getNode(ISD::UMAX, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_maxi_s_b: + case Intrinsic::mips_maxi_s_h: + case Intrinsic::mips_maxi_s_w: + case Intrinsic::mips_maxi_s_d: + return DAG.getNode(ISD::SMAX, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true)); + case Intrinsic::mips_maxi_u_b: + case Intrinsic::mips_maxi_u_h: + case Intrinsic::mips_maxi_u_w: + case Intrinsic::mips_maxi_u_d: + return DAG.getNode(ISD::UMAX, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_min_s_b: + case Intrinsic::mips_min_s_h: + case Intrinsic::mips_min_s_w: + case Intrinsic::mips_min_s_d: + return DAG.getNode(ISD::SMIN, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_min_u_b: + case Intrinsic::mips_min_u_h: + case Intrinsic::mips_min_u_w: + case Intrinsic::mips_min_u_d: + return DAG.getNode(ISD::UMIN, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mini_s_b: + case Intrinsic::mips_mini_s_h: + case Intrinsic::mips_mini_s_w: + case Intrinsic::mips_mini_s_d: + return DAG.getNode(ISD::SMIN, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG, true)); + case Intrinsic::mips_mini_u_b: + case Intrinsic::mips_mini_u_h: + case Intrinsic::mips_mini_u_w: + case Intrinsic::mips_mini_u_d: + return DAG.getNode(ISD::UMIN, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_mod_s_b: + case Intrinsic::mips_mod_s_h: + case Intrinsic::mips_mod_s_w: + case Intrinsic::mips_mod_s_d: + return DAG.getNode(ISD::SREM, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mod_u_b: + case Intrinsic::mips_mod_u_h: + case Intrinsic::mips_mod_u_w: + case Intrinsic::mips_mod_u_d: + return DAG.getNode(ISD::UREM, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_mulv_b: + case Intrinsic::mips_mulv_h: + case Intrinsic::mips_mulv_w: + case Intrinsic::mips_mulv_d: + return DAG.getNode(ISD::MUL, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_msubv_b: + case Intrinsic::mips_msubv_h: + case Intrinsic::mips_msubv_w: + case Intrinsic::mips_msubv_d: { + EVT ResTy = Op->getValueType(0); + return DAG.getNode(ISD::SUB, SDLoc(Op), ResTy, Op->getOperand(1), DAG.getNode(ISD::MUL, SDLoc(Op), ResTy, Op->getOperand(2), Op->getOperand(3))); + } + case Intrinsic::mips_nlzc_b: + case Intrinsic::mips_nlzc_h: + case Intrinsic::mips_nlzc_w: + case Intrinsic::mips_nlzc_d: + return DAG.getNode(ISD::CTLZ, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_nor_v: { + SDValue Res = DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + return DAG.getNOT(DL, Res, Res->getValueType(0)); + } + case Intrinsic::mips_nori_b: { + SDValue Res = DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + return DAG.getNOT(DL, Res, Res->getValueType(0)); + } + case Intrinsic::mips_or_v: + return DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_ori_b: + return DAG.getNode(ISD::OR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_pckev_b: + case Intrinsic::mips_pckev_h: + case Intrinsic::mips_pckev_w: + case Intrinsic::mips_pckev_d: + return DAG.getNode(MipsISD::PCKEV, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_pckod_b: + case Intrinsic::mips_pckod_h: + case Intrinsic::mips_pckod_w: + case Intrinsic::mips_pckod_d: + return DAG.getNode(MipsISD::PCKOD, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_pcnt_b: + case Intrinsic::mips_pcnt_h: + case Intrinsic::mips_pcnt_w: + case Intrinsic::mips_pcnt_d: + return DAG.getNode(ISD::CTPOP, DL, Op->getValueType(0), Op->getOperand(1)); + case Intrinsic::mips_sat_s_b: + case Intrinsic::mips_sat_s_h: + case Intrinsic::mips_sat_s_w: + case Intrinsic::mips_sat_s_d: + case Intrinsic::mips_sat_u_b: + case Intrinsic::mips_sat_u_h: + case Intrinsic::mips_sat_u_w: + case Intrinsic::mips_sat_u_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_sat_s_b: + case Intrinsic::mips_sat_u_b: Max = 7; break; + case Intrinsic::mips_sat_s_h: + case Intrinsic::mips_sat_u_h: Max = 15; break; + case Intrinsic::mips_sat_s_w: + case Intrinsic::mips_sat_u_w: Max = 31; break; + case Intrinsic::mips_sat_s_d: + case Intrinsic::mips_sat_u_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_shf_b: + case Intrinsic::mips_shf_h: + case Intrinsic::mips_shf_w: { + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > 255) + report_fatal_error("Immediate out of range"); + return DAG.getNode(MipsISD::SHF, DL, Op->getValueType(0), Op->getOperand(2), Op->getOperand(1)); + } + case Intrinsic::mips_sldi_b: + case Intrinsic::mips_sldi_h: + case Intrinsic::mips_sldi_w: + case Intrinsic::mips_sldi_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_sldi_b: Max = 15; break; + case Intrinsic::mips_sldi_h: Max = 7; break; + case Intrinsic::mips_sldi_w: Max = 3; break; + case Intrinsic::mips_sldi_d: Max = 1; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(3))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_sll_b: + case Intrinsic::mips_sll_h: + case Intrinsic::mips_sll_w: + case Intrinsic::mips_sll_d: + return DAG.getNode(ISD::SHL, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_slli_b: + case Intrinsic::mips_slli_h: + case Intrinsic::mips_slli_w: + case Intrinsic::mips_slli_d: + return DAG.getNode(ISD::SHL, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_splat_b: + case Intrinsic::mips_splat_h: + case Intrinsic::mips_splat_w: + case Intrinsic::mips_splat_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), lowerMSASplatZExt(Op, 2, DAG), Op->getOperand(1), Op->getOperand(1)); + case Intrinsic::mips_splati_b: + case Intrinsic::mips_splati_h: + case Intrinsic::mips_splati_w: + case Intrinsic::mips_splati_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), lowerMSASplatImm(Op, 2, DAG), Op->getOperand(1), Op->getOperand(1)); + case Intrinsic::mips_sra_b: + case Intrinsic::mips_sra_h: + case Intrinsic::mips_sra_w: + case Intrinsic::mips_sra_d: + return DAG.getNode(ISD::SRA, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_srai_b: + case Intrinsic::mips_srai_h: + case Intrinsic::mips_srai_w: + case Intrinsic::mips_srai_d: + return DAG.getNode(ISD::SRA, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_srari_b: + case Intrinsic::mips_srari_h: + case Intrinsic::mips_srari_w: + case Intrinsic::mips_srari_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_srari_b: Max = 7; break; + case Intrinsic::mips_srari_h: Max = 15; break; + case Intrinsic::mips_srari_w: Max = 31; break; + case Intrinsic::mips_srari_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_srl_b: + case Intrinsic::mips_srl_h: + case Intrinsic::mips_srl_w: + case Intrinsic::mips_srl_d: + return DAG.getNode(ISD::SRL, DL, Op->getValueType(0), Op->getOperand(1), truncateVecElts(Op, DAG)); + case Intrinsic::mips_srli_b: + case Intrinsic::mips_srli_h: + case Intrinsic::mips_srli_w: + case Intrinsic::mips_srli_d: + return DAG.getNode(ISD::SRL, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_srlri_b: + case Intrinsic::mips_srlri_h: + case Intrinsic::mips_srlri_w: + case Intrinsic::mips_srlri_d: { + int64_t Max; + switch (Intrinsic) { + case Intrinsic::mips_srlri_b: Max = 7; break; + case Intrinsic::mips_srlri_h: Max = 15; break; + case Intrinsic::mips_srlri_w: Max = 31; break; + case Intrinsic::mips_srlri_d: Max = 63; break; + default: llvm_unreachable("Unmatched intrinsic"); + } + int64_t Value = cast(Op->getOperand(2))->getSExtValue(); + if (Value < 0 || Value > Max) + report_fatal_error("Immediate out of range"); + return SDValue(); + } + case Intrinsic::mips_subv_b: + case Intrinsic::mips_subv_h: + case Intrinsic::mips_subv_w: + case Intrinsic::mips_subv_d: + return DAG.getNode(ISD::SUB, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_subvi_b: + case Intrinsic::mips_subvi_h: + case Intrinsic::mips_subvi_w: + case Intrinsic::mips_subvi_d: + return DAG.getNode(ISD::SUB, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::mips_vshf_b: + case Intrinsic::mips_vshf_h: + case Intrinsic::mips_vshf_w: + case Intrinsic::mips_vshf_d: + return DAG.getNode(MipsISD::VSHF, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2), Op->getOperand(3)); + case Intrinsic::mips_xor_v: + return DAG.getNode(ISD::XOR, DL, Op->getValueType(0), Op->getOperand(1), Op->getOperand(2)); + case Intrinsic::mips_xori_b: + return DAG.getNode(ISD::XOR, DL, Op->getValueType(0), Op->getOperand(1), lowerMSASplatImm(Op, 2, DAG)); + case Intrinsic::thread_pointer: { + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + return DAG.getNode(MipsISD::ThreadPointer, DL, PtrVT); + } + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c386ba3e624a943893bdeee81a344bf221934428 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp @@ -0,0 +1,28 @@ +SDValue MipsTargetLowering::lowerLOAD(SDValue Op, SelectionDAG &DAG) const { + LoadSDNode *LD = cast(Op); + EVT MemVT = LD->getMemoryVT(); + if (Subtarget.systemSupportsUnalignedAccess()) + return Op; + if ((LD->getAlignment() >= MemVT.getSizeInBits() / 8) || ((MemVT != MVT::i32) && (MemVT != MVT::i64))) + return SDValue(); + bool IsLittle = Subtarget.isLittle(); + EVT VT = Op.getValueType(); + ISD::LoadExtType ExtType = LD->getExtensionType(); + SDValue Chain = LD->getChain(), Undef = DAG.getUNDEF(VT); + assert((VT == MVT::i32) || (VT == MVT::i64)); + if ((VT == MVT::i64) && (ExtType == ISD::NON_EXTLOAD)) { + SDValue LDL = createLoadLR(MipsISD::LDL, DAG, LD, Chain, Undef, IsLittle ? 7 : 0); + return createLoadLR(MipsISD::LDR, DAG, LD, LDL.getValue(1), LDL, IsLittle ? 0 : 7); + } + SDValue LWL = createLoadLR(MipsISD::LWL, DAG, LD, Chain, Undef, IsLittle ? 3 : 0); + SDValue LWR = createLoadLR(MipsISD::LWR, DAG, LD, LWL.getValue(1), LWL, IsLittle ? 0 : 3); + if ((VT == MVT::i32) || (ExtType == ISD::SEXTLOAD) || (ExtType == ISD::EXTLOAD)) + return LWR; + assert((VT == MVT::i64) && (ExtType == ISD::ZEXTLOAD)); + SDLoc DL(LD); + SDValue Const32 = DAG.getConstant(32, DL, MVT::i32); + SDValue SLL = DAG.getNode(ISD::SHL, DL, MVT::i64, LWR, Const32); + SDValue SRL = DAG.getNode(ISD::SRL, DL, MVT::i64, SLL, Const32); + SDValue Ops[] = { SRL, LWR.getValue(1) }; + return DAG.getMergeValues(Ops, DL); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbfe3d2f0ef29923975a86d495e1dd2120dba454 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,22 @@ +SDValue MipsSETargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { + switch(Op.getOpcode()) { + case ISD::LOAD: return lowerLOAD(Op, DAG); + case ISD::STORE: return lowerSTORE(Op, DAG); + case ISD::SMUL_LOHI: return lowerMulDiv(Op, MipsISD::Mult, true, true, DAG); + case ISD::UMUL_LOHI: return lowerMulDiv(Op, MipsISD::Multu, true, true, DAG); + case ISD::MULHS: return lowerMulDiv(Op, MipsISD::Mult, false, true, DAG); + case ISD::MULHU: return lowerMulDiv(Op, MipsISD::Multu, false, true, DAG); + case ISD::MUL: return lowerMulDiv(Op, MipsISD::Mult, true, false, DAG); + case ISD::SDIVREM: return lowerMulDiv(Op, MipsISD::DivRem, true, true, DAG); + case ISD::UDIVREM: return lowerMulDiv(Op, MipsISD::DivRemU, true, true, DAG); + case ISD::INTRINSIC_WO_CHAIN: return lowerINTRINSIC_WO_CHAIN(Op, DAG); + case ISD::INTRINSIC_W_CHAIN: return lowerINTRINSIC_W_CHAIN(Op, DAG); + case ISD::INTRINSIC_VOID: return lowerINTRINSIC_VOID(Op, DAG); + case ISD::EXTRACT_VECTOR_ELT: return lowerEXTRACT_VECTOR_ELT(Op, DAG); + case ISD::BUILD_VECTOR: return lowerBUILD_VECTOR(Op, DAG); + case ISD::VECTOR_SHUFFLE: return lowerVECTOR_SHUFFLE(Op, DAG); + case ISD::SELECT: return lowerSELECT(Op, DAG); + case ISD::BITCAST: return lowerBITCAST(Op, DAG); + } + return MipsTargetLowering::LowerOperation(Op, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ded637a4455513a16d891e39639e269a720641e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,15 @@ +SDValue MipsTargetLowering::lowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const { + if (verifyReturnAddressArgumentIsConstant(Op, DAG)) + return SDValue(); + if (cast(Op.getOperand(0))->getZExtValue() != 0) { + DAG.getContext()->emitError("return address can be determined only for current frame"); + return SDValue(); + } + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MVT VT = Op.getSimpleValueType(); + unsigned RA = ABI.IsN64() ? Mips::RA_64 : Mips::RA; + MFI.setReturnAddressIsTaken(true); + unsigned Reg = MF.addLiveIn(RA, getRegClassFor(VT)); + return DAG.getCopyFromReg(DAG.getEntryNode(), SDLoc(Op), Reg, VT); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ed075e6ccf9610456191789f39cad7dd5b16736 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,66 @@ +SDValue MipsTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, const SDLoc &DL, SelectionDAG &DAG) const { + SmallVector RVLocs; + MachineFunction &MF = DAG.getMachineFunction(); + MipsCCState CCInfo(CallConv, IsVarArg, MF, RVLocs, *DAG.getContext()); + CCInfo.AnalyzeReturn(Outs, RetCC_Mips); + SDValue Flag; + SmallVector RetOps(1, Chain); + for (unsigned i = 0; i != RVLocs.size(); ++i) { + SDValue Val = OutVals[i]; + CCValAssign &VA = RVLocs[i]; + assert(VA.isRegLoc() && "Can only return in registers!"); + bool UseUpperBits = false; + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + Val = DAG.getNode(ISD::BITCAST, DL, VA.getLocVT(), Val); + break; + case CCValAssign::AExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::AExt: + Val = DAG.getNode(ISD::ANY_EXTEND, DL, VA.getLocVT(), Val); + break; + case CCValAssign::ZExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::ZExt: + Val = DAG.getNode(ISD::ZERO_EXTEND, DL, VA.getLocVT(), Val); + break; + case CCValAssign::SExtUpper: + UseUpperBits = true; + LLVM_FALLTHROUGH; + case CCValAssign::SExt: + Val = DAG.getNode(ISD::SIGN_EXTEND, DL, VA.getLocVT(), Val); + break; + } + if (UseUpperBits) { + unsigned ValSizeInBits = Outs[i].ArgVT.getSizeInBits(); + unsigned LocSizeInBits = VA.getLocVT().getSizeInBits(); + Val = DAG.getNode(ISD::SHL, DL, VA.getLocVT(), Val, DAG.getConstant(LocSizeInBits - ValSizeInBits, DL, VA.getLocVT())); + } + Chain = DAG.getCopyToReg(Chain, DL, VA.getLocReg(), Val, Flag); + Flag = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(VA.getLocReg(), VA.getLocVT())); + } + if (MF.getFunction().hasStructRetAttr()) { + MipsFunctionInfo *MipsFI = MF.getInfo(); + unsigned Reg = MipsFI->getSRetReturnReg(); + if (!Reg) + llvm_unreachable("sret virtual register not created in the entry block"); + SDValue Val = DAG.getCopyFromReg(Chain, DL, Reg, getPointerTy(DAG.getDataLayout())); + unsigned V0 = ABI.IsN64() ? Mips::V0_64 : Mips::V0; + Chain = DAG.getCopyToReg(Chain, DL, V0, Val, Flag); + Flag = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(V0, getPointerTy(DAG.getDataLayout()))); + } + RetOps[0] = Chain;. + if (Flag.getNode()) + RetOps.push_back(Flag); + if (DAG.getMachineFunction().getFunction().hasFnAttribute("interrupt")) + return LowerInterruptReturn(RetOps, DL, DAG); + return DAG.getNode(MipsISD::Ret, DL, MVT::Other, RetOps); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0047fa49f09537200023a679a676db5c8173cfc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp @@ -0,0 +1 @@ +None diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8480d434b4f2a11f981760cd1a6b7fbd041cdc6c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp @@ -0,0 +1,7 @@ +SDValue MipsTargetLowering::lowerSTORE(SDValue Op, SelectionDAG &DAG) const { + StoreSDNode *SD = cast(Op); + EVT MemVT = SD->getMemoryVT();. + if (!Subtarget.systemSupportsUnalignedAccess() && (SD->getAlignment() < MemVT.getSizeInBits() / 8) && ((MemVT == MVT::i32) || (MemVT == MVT::i64))) + return lowerUnalignedIntStore(SD, DAG, Subtarget.isLittle()); + return lowerFP_TO_SINT_STORE(SD, DAG, Subtarget.isSingleFloat()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c25f7a8bbc98b97c5f375c8bf8e107e5f6b52579 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp @@ -0,0 +1,25 @@ +SDValue MipsTargetLowering::lowerVAARG(SDValue Op, SelectionDAG &DAG) const { + SDNode *Node = Op.getNode(); + EVT VT = Node->getValueType(0); + SDValue Chain = Node->getOperand(0); + SDValue VAListPtr = Node->getOperand(1); + const Align Align = llvm::MaybeAlign(Node->getConstantOperandVal(3)).valueOrOne(); + const Value *SV = cast(Node->getOperand(2))->getValue(); + SDLoc DL(Node); + unsigned ArgSlotSizeInBytes = (ABI.IsN32() || ABI.IsN64()) ? 8 : 4; + SDValue VAListLoad = DAG.getLoad(getPointerTy(DAG.getDataLayout()), DL, Chain, VAListPtr, MachinePointerInfo(SV)); + SDValue VAList = VAListLoad; + if (Align > getMinStackArgumentAlignment()) { + VAList = DAG.getNode(ISD::ADD, DL, VAList.getValueType(), VAList, DAG.getConstant(Align.value() - 1, DL, VAList.getValueType())); + VAList = DAG.getNode(ISD::AND, DL, VAList.getValueType(), VAList, DAG.getConstant(-(int64_t)Align.value(), DL, VAList.getValueType())); + } + auto &TD = DAG.getDataLayout(); + unsigned ArgSizeInBytes = TD.getTypeAllocSize(VT.getTypeForEVT(*DAG.getContext())); + SDValue Tmp3 = DAG.getNode(ISD::ADD, DL, VAList.getValueType(), VAList, DAG.getConstant(alignTo(ArgSizeInBytes, ArgSlotSizeInBytes), DL, VAList.getValueType())); + Chain = DAG.getStore(VAListLoad.getValue(1), DL, Tmp3, VAListPtr, MachinePointerInfo(SV)); + if (!Subtarget.isLittle() && ArgSizeInBytes < ArgSlotSizeInBytes) { + unsigned Adjustment = ArgSlotSizeInBytes - ArgSizeInBytes; + VAList = DAG.getNode(ISD::ADD, DL, VAListPtr.getValueType(), VAList, DAG.getIntPtrConstant(Adjustment, DL)); + } + return DAG.getLoad(VT, DL, Chain, VAList, MachinePointerInfo()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82c750e52dc286a4e812e266e95aad7444d81f06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,8 @@ +SDValue MipsTargetLowering::lowerVASTART(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachineFunction(); + MipsFunctionInfo *FuncInfo = MF.getInfo(); + SDLoc DL(Op); + SDValue FI = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), getPointerTy(MF.getDataLayout())); + const Value *SV = cast(Op.getOperand(2))->getValue(); + return DAG.getStore(Op.getOperand(0), DL, FI, Op.getOperand(1), MachinePointerInfo(SV)); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a38352825f56aab99f061204881b1757052b6041 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,115 @@ +enum NodeType : unsigned { + FIRST_NUMBER = ISD::BUILTIN_OP_END, + JmpLink, + TailCall, + Highest, + Higher, + Hi, + Lo, + GotHi, + TlsHi, + GPRel, + ThreadPointer, + FMS, + FPBrcond, + FPCmp, + FSELECT, + MTC1_D64, + CMovFP_T, + CMovFP_F, + TruncIntFP, + Ret, + ERet, + EH_RETURN, + MFHI, + MFLO, + MTLOHI, + Mult, + Multu, + MAdd, + MAddu, + MSub, + MSubu, + DivRem, + DivRemU, + DivRem16, + DivRemU16, + BuildPairF64, + ExtractElementF64, + Wrapper, + DynAlloc, + Sync, + Ext, + Ins, + CIns, + EXTP, + EXTPDP, + EXTR_S_H, + EXTR_W, + EXTR_R_W, + EXTR_RS_W, + SHILO, + MTHLIP, + MULSAQ_S_W_PH, + MAQ_S_W_PHL, + MAQ_S_W_PHR, + MAQ_SA_W_PHL, + MAQ_SA_W_PHR, + DPAU_H_QBL, + DPAU_H_QBR, + DPSU_H_QBL, + DPSU_H_QBR, + DPAQ_S_W_PH, + DPSQ_S_W_PH, + DPAQ_SA_L_W, + DPSQ_SA_L_W, + DPA_W_PH, + DPS_W_PH, + DPAQX_S_W_PH, + DPAQX_SA_W_PH, + DPAX_W_PH, + DPSX_W_PH, + DPSQX_S_W_PH, + DPSQX_SA_W_PH, + MULSA_W_PH, + MULT, + MULTU, + MADD_DSP, + MADDU_DSP, + MSUB_DSP, + MSUBU_DSP, + SHLL_DSP, + SHRA_DSP, + SHRL_DSP, + SETCC_DSP, + SELECT_CC_DSP, + VALL_ZERO, + VANY_ZERO, + VALL_NONZERO, + VANY_NONZERO, + VCEQ, + VCLE_S, + VCLE_U, + VCLT_S, + VCLT_U, + VSHF, + SHF, + ILVEV, + ILVOD, + ILVL, + ILVR, + PCKEV, + PCKOD, + INSVE, + VNOR, + VEXTRACT_SEXT_ELT, + VEXTRACT_ZEXT_ELT, + LWL = ISD::FIRST_TARGET_MEMORY_OPCODE, + LWR, + SWL, + SWR, + LDL, + LDR, + SDL, + SDR +}; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4c27aab8d97ef85c9947073d81e7dab0609a8e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,34 @@ +SDValue MipsSETargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { + SelectionDAG &DAG = DCI.DAG; + SDValue Val; + switch (N->getOpcode()) { + case ISD::AND: + Val = performANDCombine(N, DAG, DCI, Subtarget); + break; + case ISD::OR: + Val = performORCombine(N, DAG, DCI, Subtarget); + break; + case ISD::MUL: + return performMULCombine(N, DAG, DCI, this, Subtarget); + case ISD::SHL: + Val = performSHLCombine(N, DAG, DCI, Subtarget); + break; + case ISD::SRA: + return performSRACombine(N, DAG, DCI, Subtarget); + case ISD::SRL: + return performSRLCombine(N, DAG, DCI, Subtarget); + case ISD::VSELECT: + return performVSELECTCombine(N, DAG); + case ISD::XOR: + Val = performXORCombine(N, DAG, Subtarget); + break; + case ISD::SETCC: + Val = performSETCCCombine(N, DAG); + break; + } + if (Val.getNode()) { + LLVM_DEBUG(dbgs() << "\nMipsSE DAG Combine:\n"; N->printrWithDepth(dbgs(), &DAG); dbgs() << "\n=> \n"; Val.getNode()->printrWithDepth(dbgs(), &DAG); dbgs() << "\n"); + return Val; + } + return MipsTargetLowering::PerformDAGCombine(N, DCI); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e0b70bb9b6952f3748f9c7143aec894bfccf9c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,3 @@ +void MipsTargetLowering::ReplaceNodeResults(SDNode *N, SmallVectorImpl &Results, SelectionDAG &DAG) const { + return LowerOperationWrapper(N, Results, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b374c388335c1101e9b9313b761335931a0abe3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,173 @@ +MipsTargetLowering::MipsTargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI) : TargetLowering(TM), Subtarget(STI), ABI(TM.getABI()) { + setBooleanContents(ZeroOrOneBooleanContent); + setBooleanVectorContents(ZeroOrNegativeOneBooleanContent); + if (Subtarget.hasMips32r6()) + setBooleanContents(ZeroOrOneBooleanContent, ZeroOrNegativeOneBooleanContent); + for (MVT VT : MVT::integer_valuetypes()) { + setLoadExtAction(ISD::EXTLOAD, VT, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, VT, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, VT, MVT::i1, Promote); + } + for (MVT VT : MVT::fp_valuetypes()) { + setLoadExtAction(ISD::EXTLOAD, VT, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, VT, MVT::f16, Expand); + } + for (MVT VT : MVT::fp_fixedlen_vector_valuetypes()) { + MVT F16VT = MVT::getVectorVT(MVT::f16, VT.getVectorNumElements()); + if (F16VT.isValid()) + setLoadExtAction(ISD::EXTLOAD, VT, F16VT, Expand); + } + setTruncStoreAction(MVT::f32, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f32, Expand); + AddPromotedToType(ISD::SETCC, MVT::i1, MVT::i32); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); + setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); + setOperationAction(ISD::BlockAddress, MVT::i32, Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom); + setOperationAction(ISD::JumpTable, MVT::i32, Custom); + setOperationAction(ISD::ConstantPool, MVT::i32, Custom); + setOperationAction(ISD::SELECT, MVT::f32, Custom); + setOperationAction(ISD::SELECT, MVT::f64, Custom); + setOperationAction(ISD::SELECT, MVT::i32, Custom); + setOperationAction(ISD::SETCC, MVT::f32, Custom); + setOperationAction(ISD::SETCC, MVT::f64, Custom); + setOperationAction(ISD::BRCOND, MVT::Other, Custom); + setOperationAction(ISD::FCOPYSIGN, MVT::f32, Custom); + setOperationAction(ISD::FCOPYSIGN, MVT::f64, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); + if (!(TM.Options.NoNaNsFPMath || Subtarget.inAbs2008Mode())) { + setOperationAction(ISD::FABS, MVT::f32, Custom); + setOperationAction(ISD::FABS, MVT::f64, Custom); + } + if (Subtarget.isGP64bit()) { + setOperationAction(ISD::GlobalAddress, MVT::i64, Custom); + setOperationAction(ISD::BlockAddress, MVT::i64, Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom); + setOperationAction(ISD::JumpTable, MVT::i64, Custom); + setOperationAction(ISD::ConstantPool, MVT::i64, Custom); + setOperationAction(ISD::SELECT, MVT::i64, Custom); + setOperationAction(ISD::LOAD, MVT::i64, Custom); + setOperationAction(ISD::STORE, MVT::i64, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i64, Custom); + setOperationAction(ISD::SHL_PARTS, MVT::i64, Custom); + setOperationAction(ISD::SRA_PARTS, MVT::i64, Custom); + setOperationAction(ISD::SRL_PARTS, MVT::i64, Custom); + } + if (!Subtarget.isGP64bit()) { + setOperationAction(ISD::SHL_PARTS, MVT::i32, Custom); + setOperationAction(ISD::SRA_PARTS, MVT::i32, Custom); + setOperationAction(ISD::SRL_PARTS, MVT::i32, Custom); + } + setOperationAction(ISD::EH_DWARF_CFA, MVT::i32, Custom); + if (Subtarget.isGP64bit()) + setOperationAction(ISD::EH_DWARF_CFA, MVT::i64, Custom); + setOperationAction(ISD::SDIV, MVT::i32, Expand); + setOperationAction(ISD::SREM, MVT::i32, Expand); + setOperationAction(ISD::UDIV, MVT::i32, Expand); + setOperationAction(ISD::UREM, MVT::i32, Expand); + setOperationAction(ISD::SDIV, MVT::i64, Expand); + setOperationAction(ISD::SREM, MVT::i64, Expand); + setOperationAction(ISD::UDIV, MVT::i64, Expand); + setOperationAction(ISD::UREM, MVT::i64, Expand); + setOperationAction(ISD::BR_CC, MVT::f32, Expand); + setOperationAction(ISD::BR_CC, MVT::f64, Expand); + setOperationAction(ISD::BR_CC, MVT::i32, Expand); + setOperationAction(ISD::BR_CC, MVT::i64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::i32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::i64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f64, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i32, Expand); + setOperationAction(ISD::UINT_TO_FP, MVT::i64, Expand); + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand); + setOperationAction(ISD::FP_TO_UINT, MVT::i64, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand); + if (Subtarget.hasCnMips()) { + setOperationAction(ISD::CTPOP, MVT::i32, Legal); + setOperationAction(ISD::CTPOP, MVT::i64, Legal); + } + else { + setOperationAction(ISD::CTPOP, MVT::i32, Expand); + setOperationAction(ISD::CTPOP, MVT::i64, Expand); + } + setOperationAction(ISD::CTTZ, MVT::i32, Expand); + setOperationAction(ISD::CTTZ, MVT::i64, Expand); + setOperationAction(ISD::ROTL, MVT::i32, Expand); + setOperationAction(ISD::ROTL, MVT::i64, Expand); + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64, Expand); + if (!Subtarget.hasMips32r2()) + setOperationAction(ISD::ROTR, MVT::i32, Expand); + if (!Subtarget.hasMips64r2()) + setOperationAction(ISD::ROTR, MVT::i64, Expand); + setOperationAction(ISD::FSIN, MVT::f32, Expand); + setOperationAction(ISD::FSIN, MVT::f64, Expand); + setOperationAction(ISD::FCOS, MVT::f32, Expand); + setOperationAction(ISD::FCOS, MVT::f64, Expand); + setOperationAction(ISD::FSINCOS, MVT::f32, Expand); + setOperationAction(ISD::FSINCOS, MVT::f64, Expand); + setOperationAction(ISD::FPOW, MVT::f32, Expand); + setOperationAction(ISD::FPOW, MVT::f64, Expand); + setOperationAction(ISD::FLOG, MVT::f32, Expand); + setOperationAction(ISD::FLOG2, MVT::f32, Expand); + setOperationAction(ISD::FLOG10, MVT::f32, Expand); + setOperationAction(ISD::FEXP, MVT::f32, Expand); + setOperationAction(ISD::FMA, MVT::f32, Expand); + setOperationAction(ISD::FMA, MVT::f64, Expand); + setOperationAction(ISD::FREM, MVT::f32, Expand); + setOperationAction(ISD::FREM, MVT::f64, Expand); + setOperationAction(ISD::FP16_TO_FP, MVT::f32, Expand); + setOperationAction(ISD::FP_TO_FP16, MVT::f32, Expand); + setOperationAction(ISD::FP16_TO_FP, MVT::f64, Expand); + setOperationAction(ISD::FP_TO_FP16, MVT::f64, Expand); + setOperationAction(ISD::EH_RETURN, MVT::Other, Custom); + setOperationAction(ISD::VASTART, MVT::Other, Custom); + setOperationAction(ISD::VAARG, MVT::Other, Custom); + setOperationAction(ISD::VACOPY, MVT::Other, Expand); + setOperationAction(ISD::VAEND, MVT::Other, Expand); + setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); + setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); + if (!Subtarget.isGP64bit()) { + setOperationAction(ISD::ATOMIC_LOAD, MVT::i64, Expand); + setOperationAction(ISD::ATOMIC_STORE, MVT::i64, Expand); + } + if (!Subtarget.hasMips32r2()) { + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand); + } + if (!Subtarget.hasMips32() || Subtarget.inMips16Mode()) + setOperationAction(ISD::CTLZ, MVT::i32, Expand); + if (!Subtarget.hasMips64()) + setOperationAction(ISD::CTLZ, MVT::i64, Expand); + if (!Subtarget.hasMips32r2()) + setOperationAction(ISD::BSWAP, MVT::i32, Expand); + if (!Subtarget.hasMips64r2()) + setOperationAction(ISD::BSWAP, MVT::i64, Expand); + if (Subtarget.isGP64bit()) { + setLoadExtAction(ISD::SEXTLOAD, MVT::i64, MVT::i32, Custom); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i64, MVT::i32, Custom); + setLoadExtAction(ISD::EXTLOAD, MVT::i64, MVT::i32, Custom); + setTruncStoreAction(MVT::i64, MVT::i32, Custom); + } + setOperationAction(ISD::TRAP, MVT::Other, Legal); + setTargetDAGCombine(ISD::SDIVREM); + setTargetDAGCombine(ISD::UDIVREM); + setTargetDAGCombine(ISD::SELECT); + setTargetDAGCombine(ISD::AND); + setTargetDAGCombine(ISD::OR); + setTargetDAGCombine(ISD::ADD); + setTargetDAGCombine(ISD::SUB); + setTargetDAGCombine(ISD::AssertZext); + setTargetDAGCombine(ISD::SHL); + if (ABI.IsO32()) { + setLibcallName(RTLIB::SHL_I128, nullptr); + setLibcallName(RTLIB::SRL_I128, nullptr); + setLibcallName(RTLIB::SRA_I128, nullptr); + } + setMinFunctionAlignment(Subtarget.isGP64bit() ? Align(8) : Align(4)); + setMinStackArgumentAlignment((ABI.IsN32() || ABI.IsN64()) ? Align(8) : Align(4)); + setStackPointerRegisterToSaveRestore(ABI.IsN64() ? Mips::SP_64 : Mips::SP); + MaxStoresPerMemcpy = 16; + isMicroMips = Subtarget.inMicroMipsMode(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/enum NodeType.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/enum NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7dbfada60499fd466d80b554df14092a07c7992f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/enum NodeType.cpp @@ -0,0 +1,26 @@ +enum NodeType { + ISD::ADD, + ISD::SUB, + ISD::MUL, + ISD::SDIV, + ISD::UDIV, + ISD::SREM, + ISD::UREM, + ISD::SMUL_LOHI, + ISD::UMUL_LOHI, + ISD::SDIVREM, + ISD::UDIVREM, + ISD::AND, + ISD::OR, + ISD::XOR, + ISD::SHL, + ISD::SRA, + ISD::SRL, + ISD::CTLZ, + ISD::CTLZ_ZERO_UNDEF, + ISD::CTTZ, + ISD::CTTZ_ZERO_UNDEF, + ISD::CTPOP, + ISD::SELECT, + ISD::SELECT_CC, +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0af5f9457e09348a5eb08c15ce717e092dc51262 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp @@ -0,0 +1,5 @@ +unsigned MipsTargetLowering::getJumpTableEncoding() const { + if (ABI.IsN64() && isPositionIndependent()) + return MachineJumpTableInfo::EK_GPRel64BlockAddress; + return TargetLowering::getJumpTableEncoding(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4d6cb04cdaf5d170a432c7141d5bcd31383559f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,56 @@ +std::pair MipsTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + case 'd': + case 'y': + case 'r': + if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8) { + if (Subtarget.inMips16Mode()) + return std::make_pair(0U, &Mips::CPU16RegsRegClass); + return std::make_pair(0U, &Mips::GPR32RegClass); + } + if (VT == MVT::i64 && !Subtarget.isGP64bit()) + return std::make_pair(0U, &Mips::GPR32RegClass); + if (VT == MVT::i64 && Subtarget.isGP64bit()) + return std::make_pair(0U, &Mips::GPR64RegClass); + return std::make_pair(0U, nullptr); + case 'f': + if (VT == MVT::v16i8) + return std::make_pair(0U, &Mips::MSA128BRegClass); + else if (VT == MVT::v8i16 || VT == MVT::v8f16) + return std::make_pair(0U, &Mips::MSA128HRegClass); + else if (VT == MVT::v4i32 || VT == MVT::v4f32) + return std::make_pair(0U, &Mips::MSA128WRegClass); + else if (VT == MVT::v2i64 || VT == MVT::v2f64) + return std::make_pair(0U, &Mips::MSA128DRegClass); + else if (VT == MVT::f32) + return std::make_pair(0U, &Mips::FGR32RegClass); + else if ((VT == MVT::f64) && (!Subtarget.isSingleFloat())) { + if (Subtarget.isFP64bit()) + return std::make_pair(0U, &Mips::FGR64RegClass); + return std::make_pair(0U, &Mips::AFGR64RegClass); + } + break; + case 'c': + if (VT == MVT::i32) + return std::make_pair((unsigned)Mips::T9, &Mips::GPR32RegClass); + if (VT == MVT::i64) + return std::make_pair((unsigned)Mips::T9_64, &Mips::GPR64RegClass); + return std::make_pair(0U, nullptr); + case 'l': + if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8) + return std::make_pair((unsigned)Mips::LO0, &Mips::LO32RegClass); + return std::make_pair((unsigned)Mips::LO0_64, &Mips::LO64RegClass); + case 'x': + return std::make_pair(0U, nullptr); + } + } + if (!Constraint.empty()) { + std::pair R; + R = parseRegForInlineAsmConstraint(Constraint, VT); + if (R.second) + return R; + } + return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT); +} + diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ade0fdb0440c27670f94810d2d2933ed722c9eb9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,231 @@ +const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const { + switch ((MipsISD::NodeType)Opcode) { + case MipsISD::FIRST_NUMBER: + break; + case MipsISD::JmpLink: + return "MipsISD::JmpLink"; + case MipsISD::TailCall: + return "MipsISD::TailCall"; + case MipsISD::Highest: + return "MipsISD::Highest"; + case MipsISD::Higher: + return "MipsISD::Higher"; + case MipsISD::Hi: + return "MipsISD::Hi"; + case MipsISD::Lo: + return "MipsISD::Lo"; + case MipsISD::GotHi: + return "MipsISD::GotHi"; + case MipsISD::TlsHi: + return "MipsISD::TlsHi"; + case MipsISD::GPRel: + return "MipsISD::GPRel"; + case MipsISD::ThreadPointer: + return "MipsISD::ThreadPointer"; + case MipsISD::Ret: + return "MipsISD::Ret"; + case MipsISD::ERet: + return "MipsISD::ERet"; + case MipsISD::EH_RETURN: + return "MipsISD::EH_RETURN"; + case MipsISD::FMS: + return "MipsISD::FMS"; + case MipsISD::FPBrcond: + return "MipsISD::FPBrcond"; + case MipsISD::FPCmp: + return "MipsISD::FPCmp"; + case MipsISD::FSELECT: + return "MipsISD::FSELECT"; + case MipsISD::MTC1_D64: + return "MipsISD::MTC1_D64"; + case MipsISD::CMovFP_T: + return "MipsISD::CMovFP_T"; + case MipsISD::CMovFP_F: + return "MipsISD::CMovFP_F"; + case MipsISD::TruncIntFP: + return "MipsISD::TruncIntFP"; + case MipsISD::MFHI: + return "MipsISD::MFHI"; + case MipsISD::MFLO: + return "MipsISD::MFLO"; + case MipsISD::MTLOHI: + return "MipsISD::MTLOHI"; + case MipsISD::Mult: + return "MipsISD::Mult"; + case MipsISD::Multu: + return "MipsISD::Multu"; + case MipsISD::MAdd: + return "MipsISD::MAdd"; + case MipsISD::MAddu: + return "MipsISD::MAddu"; + case MipsISD::MSub: + return "MipsISD::MSub"; + case MipsISD::MSubu: + return "MipsISD::MSubu"; + case MipsISD::DivRem: + return "MipsISD::DivRem"; + case MipsISD::DivRemU: + return "MipsISD::DivRemU"; + case MipsISD::DivRem16: + return "MipsISD::DivRem16"; + case MipsISD::DivRemU16: + return "MipsISD::DivRemU16"; + case MipsISD::BuildPairF64: + return "MipsISD::BuildPairF64"; + case MipsISD::ExtractElementF64: + return "MipsISD::ExtractElementF64"; + case MipsISD::Wrapper: + return "MipsISD::Wrapper"; + case MipsISD::DynAlloc: + return "MipsISD::DynAlloc"; + case MipsISD::Sync: + return "MipsISD::Sync"; + case MipsISD::Ext: + return "MipsISD::Ext"; + case MipsISD::Ins: + return "MipsISD::Ins"; + case MipsISD::CIns: + return "MipsISD::CIns"; + case MipsISD::LWL: + return "MipsISD::LWL"; + case MipsISD::LWR: + return "MipsISD::LWR"; + case MipsISD::SWL: + return "MipsISD::SWL"; + case MipsISD::SWR: + return "MipsISD::SWR"; + case MipsISD::LDL: + return "MipsISD::LDL"; + case MipsISD::LDR: + return "MipsISD::LDR"; + case MipsISD::SDL: + return "MipsISD::SDL"; + case MipsISD::SDR: + return "MipsISD::SDR"; + case MipsISD::EXTP: + return "MipsISD::EXTP"; + case MipsISD::EXTPDP: + return "MipsISD::EXTPDP"; + case MipsISD::EXTR_S_H: + return "MipsISD::EXTR_S_H"; + case MipsISD::EXTR_W: + return "MipsISD::EXTR_W"; + case MipsISD::EXTR_R_W: + return "MipsISD::EXTR_R_W"; + case MipsISD::EXTR_RS_W: + return "MipsISD::EXTR_RS_W"; + case MipsISD::SHILO: + return "MipsISD::SHILO"; + case MipsISD::MTHLIP: + return "MipsISD::MTHLIP"; + case MipsISD::MULSAQ_S_W_PH: + return "MipsISD::MULSAQ_S_W_PH"; + case MipsISD::MAQ_S_W_PHL: + return "MipsISD::MAQ_S_W_PHL"; + case MipsISD::MAQ_S_W_PHR: + return "MipsISD::MAQ_S_W_PHR"; + case MipsISD::MAQ_SA_W_PHL: + return "MipsISD::MAQ_SA_W_PHL"; + case MipsISD::MAQ_SA_W_PHR: + return "MipsISD::MAQ_SA_W_PHR"; + case MipsISD::DPAU_H_QBL: + return "MipsISD::DPAU_H_QBL"; + case MipsISD::DPAU_H_QBR: + return "MipsISD::DPAU_H_QBR"; + case MipsISD::DPSU_H_QBL: + return "MipsISD::DPSU_H_QBL"; + case MipsISD::DPSU_H_QBR: + return "MipsISD::DPSU_H_QBR"; + case MipsISD::DPAQ_S_W_PH: + return "MipsISD::DPAQ_S_W_PH"; + case MipsISD::DPSQ_S_W_PH: + return "MipsISD::DPSQ_S_W_PH"; + case MipsISD::DPAQ_SA_L_W: + return "MipsISD::DPAQ_SA_L_W"; + case MipsISD::DPSQ_SA_L_W: + return "MipsISD::DPSQ_SA_L_W"; + case MipsISD::DPA_W_PH: + return "MipsISD::DPA_W_PH"; + case MipsISD::DPS_W_PH: + return "MipsISD::DPS_W_PH"; + case MipsISD::DPAQX_S_W_PH: + return "MipsISD::DPAQX_S_W_PH"; + case MipsISD::DPAQX_SA_W_PH: + return "MipsISD::DPAQX_SA_W_PH"; + case MipsISD::DPAX_W_PH: + return "MipsISD::DPAX_W_PH"; + case MipsISD::DPSX_W_PH: + return "MipsISD::DPSX_W_PH"; + case MipsISD::DPSQX_S_W_PH: + return "MipsISD::DPSQX_S_W_PH"; + case MipsISD::DPSQX_SA_W_PH: + return "MipsISD::DPSQX_SA_W_PH"; + case MipsISD::MULSA_W_PH: + return "MipsISD::MULSA_W_PH"; + case MipsISD::MULT: + return "MipsISD::MULT"; + case MipsISD::MULTU: + return "MipsISD::MULTU"; + case MipsISD::MADD_DSP: + return "MipsISD::MADD_DSP"; + case MipsISD::MADDU_DSP: + return "MipsISD::MADDU_DSP"; + case MipsISD::MSUB_DSP: + return "MipsISD::MSUB_DSP"; + case MipsISD::MSUBU_DSP: + return "MipsISD::MSUBU_DSP"; + case MipsISD::SHLL_DSP: + return "MipsISD::SHLL_DSP"; + case MipsISD::SHRA_DSP: + return "MipsISD::SHRA_DSP"; + case MipsISD::SHRL_DSP: + return "MipsISD::SHRL_DSP"; + case MipsISD::SETCC_DSP: + return "MipsISD::SETCC_DSP"; + case MipsISD::SELECT_CC_DSP: + return "MipsISD::SELECT_CC_DSP"; + case MipsISD::VALL_ZERO: + return "MipsISD::VALL_ZERO"; + case MipsISD::VANY_ZERO: + return "MipsISD::VANY_ZERO"; + case MipsISD::VALL_NONZERO: + return "MipsISD::VALL_NONZERO"; + case MipsISD::VANY_NONZERO: + return "MipsISD::VANY_NONZERO"; + case MipsISD::VCEQ: + return "MipsISD::VCEQ"; + case MipsISD::VCLE_S: + return "MipsISD::VCLE_S"; + case MipsISD::VCLE_U: + return "MipsISD::VCLE_U"; + case MipsISD::VCLT_S: + return "MipsISD::VCLT_S"; + case MipsISD::VCLT_U: + return "MipsISD::VCLT_U"; + case MipsISD::VEXTRACT_SEXT_ELT: + return "MipsISD::VEXTRACT_SEXT_ELT"; + case MipsISD::VEXTRACT_ZEXT_ELT: + return "MipsISD::VEXTRACT_ZEXT_ELT"; + case MipsISD::VNOR: + return "MipsISD::VNOR"; + case MipsISD::VSHF: + return "MipsISD::VSHF"; + case MipsISD::SHF: + return "MipsISD::SHF"; + case MipsISD::ILVEV: + return "MipsISD::ILVEV"; + case MipsISD::ILVOD: + return "MipsISD::ILVOD"; + case MipsISD::ILVL: + return "MipsISD::ILVL"; + case MipsISD::ILVR: + return "MipsISD::ILVR"; + case MipsISD::PCKEV: + return "MipsISD::PCKEV"; + case MipsISD::PCKOD: + return "MipsISD::PCKOD"; + case MipsISD::INSVE: + return "MipsISD::INSVE"; + } + return nullptr; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bce29b2aa473dfb01a1adc6b39d25eec12f141ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,15 @@ +bool MipsTargetLowering::isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I) const { + if (AM.BaseGV) + return false; + switch (AM.Scale) { + case 0: + break; + case 1: + if (!AM.HasBaseReg) + break; + return false; + default: + return false; + } + return true; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Mips_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/My_Difflib.py b/Scripts/Exp/ForkFlow/My_Difflib.py new file mode 100644 index 0000000000000000000000000000000000000000..3ceacdffbe4737380686ccdaf77361f3de215cd8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/My_Difflib.py @@ -0,0 +1,2096 @@ +""" +Module difflib -- helpers for computing deltas between objects. + +Function get_close_matches(word, possibilities, n=3, cutoff=0.6): + Use SequenceMatcher to return list of the best "good enough" matches. + +Function context_diff(a, b): + For two lists of strings, return a delta in context diff format. + +Function ndiff(a, b): + Return a delta: the difference between `a` and `b` (lists of strings). + +Function restore(delta, which): + Return one of the two sequences that generated an ndiff delta. + +Function unified_diff(a, b): + For two lists of strings, return a delta in unified diff format. + +Class SequenceMatcher: + A flexible class for comparing pairs of sequences of any type. + +Class Differ: + For producing human-readable deltas from sequences of lines of text. + +Class HtmlDiff: + For producing HTML side by side comparison with change highlights. +""" + +__all__ = ['get_close_matches', 'ndiff', 'restore', 'SequenceMatcher', + 'Differ','IS_CHARACTER_JUNK', 'IS_LINE_JUNK', 'context_diff', + 'unified_diff', 'diff_bytes', 'HtmlDiff', 'Match'] + +from heapq import nlargest as _nlargest +from collections import namedtuple as _namedtuple +#from types import GenericAlias + +Match = _namedtuple('Match', 'a b size') + +def _calculate_ratio(matches, length): + if length: + return 2.0 * matches / length + return 1.0 + +class SequenceMatcher: + + """ + SequenceMatcher is a flexible class for comparing pairs of sequences of + any type, so long as the sequence elements are hashable. The basic + algorithm predates, and is a little fancier than, an algorithm + published in the late 1980's by Ratcliff and Obershelp under the + hyperbolic name "gestalt pattern matching". The basic idea is to find + the longest contiguous matching subsequence that contains no "junk" + elements (R-O doesn't address junk). The same idea is then applied + recursively to the pieces of the sequences to the left and to the right + of the matching subsequence. This does not yield minimal edit + sequences, but does tend to yield matches that "look right" to people. + + SequenceMatcher tries to compute a "human-friendly diff" between two + sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the + longest *contiguous* & junk-free matching subsequence. That's what + catches peoples' eyes. The Windows(tm) windiff has another interesting + notion, pairing up elements that appear uniquely in each sequence. + That, and the method here, appear to yield more intuitive difference + reports than does diff. This method appears to be the least vulnerable + to synching up on blocks of "junk lines", though (like blank lines in + ordinary text files, or maybe "

" lines in HTML files). That may be + because this is the only method of the 3 that has a *concept* of + "junk" . + + Example, comparing two strings, and considering blanks to be "junk": + + >>> s = SequenceMatcher(lambda x: x == " ", + ... "private Thread currentThread;", + ... "private volatile Thread currentThread;") + >>> + + .ratio() returns a float in [0, 1], measuring the "similarity" of the + sequences. As a rule of thumb, a .ratio() value over 0.6 means the + sequences are close matches: + + >>> print(round(s.ratio(), 3)) + 0.866 + >>> + + If you're only interested in where the sequences match, + .get_matching_blocks() is handy: + + >>> for block in s.get_matching_blocks(): + ... print("a[%d] and b[%d] match for %d elements" % block) + a[0] and b[0] match for 8 elements + a[8] and b[17] match for 21 elements + a[29] and b[38] match for 0 elements + + Note that the last tuple returned by .get_matching_blocks() is always a + dummy, (len(a), len(b), 0), and this is the only case in which the last + tuple element (number of elements matched) is 0. + + If you want to know how to change the first sequence into the second, + use .get_opcodes(): + + >>> for opcode in s.get_opcodes(): + ... print("%6s a[%d:%d] b[%d:%d]" % opcode) + equal a[0:8] b[0:8] + insert a[8:8] b[8:17] + equal a[8:29] b[17:38] + + See the Differ class for a fancy human-friendly file differencer, which + uses SequenceMatcher both to compare sequences of lines, and to compare + sequences of characters within similar (near-matching) lines. + + See also function get_close_matches() in this module, which shows how + simple code building on SequenceMatcher can be used to do useful work. + + Timing: Basic R-O is cubic time worst case and quadratic time expected + case. SequenceMatcher is quadratic time for the worst case and has + expected-case behavior dependent in a complicated way on how many + elements the sequences have in common; best case time is linear. + + Methods: + + __init__(isjunk=None, a='', b='') + Construct a SequenceMatcher. + + set_seqs(a, b) + Set the two sequences to be compared. + + set_seq1(a) + Set the first sequence to be compared. + + set_seq2(b) + Set the second sequence to be compared. + + find_longest_match(alo=0, ahi=None, blo=0, bhi=None) + Find longest matching block in a[alo:ahi] and b[blo:bhi]. + + get_matching_blocks() + Return list of triples describing matching subsequences. + + get_opcodes() + Return list of 5-tuples describing how to turn a into b. + + ratio() + Return a measure of the sequences' similarity (float in [0,1]). + + quick_ratio() + Return an upper bound on .ratio() relatively quickly. + + real_quick_ratio() + Return an upper bound on ratio() very quickly. + """ + + def __init__(self, isjunk=None, a='', b='', autojunk=True): + """Construct a SequenceMatcher. + + Optional arg isjunk is None (the default), or a one-argument + function that takes a sequence element and returns true iff the + element is junk. None is equivalent to passing "lambda x: 0", i.e. + no elements are considered to be junk. For example, pass + lambda x: x in " \\t" + if you're comparing lines as sequences of characters, and don't + want to synch up on blanks or hard tabs. + + Optional arg a is the first of two sequences to be compared. By + default, an empty string. The elements of a must be hashable. See + also .set_seqs() and .set_seq1(). + + Optional arg b is the second of two sequences to be compared. By + default, an empty string. The elements of b must be hashable. See + also .set_seqs() and .set_seq2(). + + Optional arg autojunk should be set to False to disable the + "automatic junk heuristic" that treats popular elements as junk + (see module documentation for more information). + """ + + # Members: + # a + # first sequence + # b + # second sequence; differences are computed as "what do + # we need to do to 'a' to change it into 'b'?" + # b2j + # for x in b, b2j[x] is a list of the indices (into b) + # at which x appears; junk and popular elements do not appear + # fullbcount + # for x in b, fullbcount[x] == the number of times x + # appears in b; only materialized if really needed (used + # only for computing quick_ratio()) + # matching_blocks + # a list of (i, j, k) triples, where a[i:i+k] == b[j:j+k]; + # ascending & non-overlapping in i and in j; terminated by + # a dummy (len(a), len(b), 0) sentinel + # opcodes + # a list of (tag, i1, i2, j1, j2) tuples, where tag is + # one of + # 'replace' a[i1:i2] should be replaced by b[j1:j2] + # 'delete' a[i1:i2] should be deleted + # 'insert' b[j1:j2] should be inserted + # 'equal' a[i1:i2] == b[j1:j2] + # isjunk + # a user-supplied function taking a sequence element and + # returning true iff the element is "junk" -- this has + # subtle but helpful effects on the algorithm, which I'll + # get around to writing up someday <0.9 wink>. + # DON'T USE! Only __chain_b uses this. Use "in self.bjunk". + # bjunk + # the items in b for which isjunk is True. + # bpopular + # nonjunk items in b treated as junk by the heuristic (if used). + + self.isjunk = isjunk + self.a = self.b = None + self.autojunk = autojunk + self.set_seqs(a, b) + + def set_seqs(self, a, b): + """Set the two sequences to be compared. + + >>> s = SequenceMatcher() + >>> s.set_seqs("abcd", "bcde") + >>> s.ratio() + 0.75 + """ + + self.set_seq1(a) + self.set_seq2(b) + + def set_seq1(self, a): + """Set the first sequence to be compared. + + The second sequence to be compared is not changed. + + >>> s = SequenceMatcher(None, "abcd", "bcde") + >>> s.ratio() + 0.75 + >>> s.set_seq1("bcde") + >>> s.ratio() + 1.0 + >>> + + SequenceMatcher computes and caches detailed information about the + second sequence, so if you want to compare one sequence S against + many sequences, use .set_seq2(S) once and call .set_seq1(x) + repeatedly for each of the other sequences. + + See also set_seqs() and set_seq2(). + """ + + if a is self.a: + return + self.a = a + self.matching_blocks = self.opcodes = None + + def set_seq2(self, b): + """Set the second sequence to be compared. + + The first sequence to be compared is not changed. + + >>> s = SequenceMatcher(None, "abcd", "bcde") + >>> s.ratio() + 0.75 + >>> s.set_seq2("abcd") + >>> s.ratio() + 1.0 + >>> + + SequenceMatcher computes and caches detailed information about the + second sequence, so if you want to compare one sequence S against + many sequences, use .set_seq2(S) once and call .set_seq1(x) + repeatedly for each of the other sequences. + + See also set_seqs() and set_seq1(). + """ + + if b is self.b: + return + self.b = b + self.matching_blocks = self.opcodes = None + self.fullbcount = None + self.__chain_b() + + # For each element x in b, set b2j[x] to a list of the indices in + # b where x appears; the indices are in increasing order; note that + # the number of times x appears in b is len(b2j[x]) ... + # when self.isjunk is defined, junk elements don't show up in this + # map at all, which stops the central find_longest_match method + # from starting any matching block at a junk element ... + # b2j also does not contain entries for "popular" elements, meaning + # elements that account for more than 1 + 1% of the total elements, and + # when the sequence is reasonably large (>= 200 elements); this can + # be viewed as an adaptive notion of semi-junk, and yields an enormous + # speedup when, e.g., comparing program files with hundreds of + # instances of "return NULL;" ... + # note that this is only called when b changes; so for cross-product + # kinds of matches, it's best to call set_seq2 once, then set_seq1 + # repeatedly + + def __chain_b(self): + # Because isjunk is a user-defined (not C) function, and we test + # for junk a LOT, it's important to minimize the number of calls. + # Before the tricks described here, __chain_b was by far the most + # time-consuming routine in the whole module! If anyone sees + # Jim Roskind, thank him again for profile.py -- I never would + # have guessed that. + # The first trick is to build b2j ignoring the possibility + # of junk. I.e., we don't call isjunk at all yet. Throwing + # out the junk later is much cheaper than building b2j "right" + # from the start. + b = self.b + self.b2j = b2j = {} + + for i, elt in enumerate(b): + indices = b2j.setdefault(elt, []) + indices.append(i) + + # Purge junk elements + self.bjunk = junk = set() + isjunk = self.isjunk + if isjunk: + for elt in b2j.keys(): + if isjunk(elt): + junk.add(elt) + for elt in junk: # separate loop avoids separate list of keys + del b2j[elt] + + # Purge popular elements that are not junk + self.bpopular = popular = set() + n = len(b) + if self.autojunk and n >= 200: + ntest = n // 100 + 1 + for elt, idxs in b2j.items(): + if len(idxs) > ntest: + popular.add(elt) + for elt in popular: # ditto; as fast for 1% deletion + del b2j[elt] + + def find_longest_match(self, alo=0, ahi=None, blo=0, bhi=None): + """Find longest matching block in a[alo:ahi] and b[blo:bhi]. + + By default it will find the longest match in the entirety of a and b. + + If isjunk is not defined: + + Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where + alo <= i <= i+k <= ahi + blo <= j <= j+k <= bhi + and for all (i',j',k') meeting those conditions, + k >= k' + i <= i' + and if i == i', j <= j' + + In other words, of all maximal matching blocks, return one that + starts earliest in a, and of all those maximal matching blocks that + start earliest in a, return the one that starts earliest in b. + + >>> s = SequenceMatcher(None, " abcd", "abcd abcd") + >>> s.find_longest_match(0, 5, 0, 9) + Match(a=0, b=4, size=5) + + If isjunk is defined, first the longest matching block is + determined as above, but with the additional restriction that no + junk element appears in the block. Then that block is extended as + far as possible by matching (only) junk elements on both sides. So + the resulting block never matches on junk except as identical junk + happens to be adjacent to an "interesting" match. + + Here's the same example as before, but considering blanks to be + junk. That prevents " abcd" from matching the " abcd" at the tail + end of the second sequence directly. Instead only the "abcd" can + match, and matches the leftmost "abcd" in the second sequence: + + >>> s = SequenceMatcher(lambda x: x==" ", " abcd", "abcd abcd") + >>> s.find_longest_match(0, 5, 0, 9) + Match(a=1, b=0, size=4) + + If no blocks match, return (alo, blo, 0). + + >>> s = SequenceMatcher(None, "ab", "c") + >>> s.find_longest_match(0, 2, 0, 1) + Match(a=0, b=0, size=0) + """ + + # CAUTION: stripping common prefix or suffix would be incorrect. + # E.g., + # ab + # acab + # Longest matching block is "ab", but if common prefix is + # stripped, it's "a" (tied with "b"). UNIX(tm) diff does so + # strip, so ends up claiming that ab is changed to acab by + # inserting "ca" in the middle. That's minimal but unintuitive: + # "it's obvious" that someone inserted "ac" at the front. + # Windiff ends up at the same place as diff, but by pairing up + # the unique 'b's and then matching the first two 'a's. + + a, b, b2j, isbjunk = self.a, self.b, self.b2j, self.bjunk.__contains__ + if ahi is None: + ahi = len(a) + if bhi is None: + bhi = len(b) + besti, bestj, bestsize = alo, blo, 0 + # find longest junk-free match + # during an iteration of the loop, j2len[j] = length of longest + # junk-free match ending with a[i-1] and b[j] + j2len = {} + nothing = [] + for i in range(alo, ahi): + # look at all instances of a[i] in b; note that because + # b2j has no junk keys, the loop is skipped if a[i] is junk + j2lenget = j2len.get + newj2len = {} + for j in b2j.get(a[i], nothing): + # a[i] matches b[j] + if j < blo: + continue + if j >= bhi: + break + k = newj2len[j] = j2lenget(j-1, 0) + 1 + if k > bestsize: + besti, bestj, bestsize = i-k+1, j-k+1, k + j2len = newj2len + + # Extend the best by non-junk elements on each end. In particular, + # "popular" non-junk elements aren't in b2j, which greatly speeds + # the inner loop above, but also means "the best" match so far + # doesn't contain any junk *or* popular non-junk elements. + while besti > alo and bestj > blo and \ + not isbjunk(b[bestj-1]) and \ + a[besti-1] == b[bestj-1]: + besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 + while besti+bestsize < ahi and bestj+bestsize < bhi and \ + not isbjunk(b[bestj+bestsize]) and \ + a[besti+bestsize] == b[bestj+bestsize]: + bestsize += 1 + + # Now that we have a wholly interesting match (albeit possibly + # empty!), we may as well suck up the matching junk on each + # side of it too. Can't think of a good reason not to, and it + # saves post-processing the (possibly considerable) expense of + # figuring out what to do with it. In the case of an empty + # interesting match, this is clearly the right thing to do, + # because no other kind of match is possible in the regions. + while besti > alo and bestj > blo and \ + isbjunk(b[bestj-1]) and \ + a[besti-1] == b[bestj-1]: + besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 + while besti+bestsize < ahi and bestj+bestsize < bhi and \ + isbjunk(b[bestj+bestsize]) and \ + a[besti+bestsize] == b[bestj+bestsize]: + bestsize = bestsize + 1 + + return Match(besti, bestj, bestsize) + + def get_matching_blocks(self): + """Return list of triples describing matching subsequences. + + Each triple is of the form (i, j, n), and means that + a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in + i and in j. New in Python 2.5, it's also guaranteed that if + (i, j, n) and (i', j', n') are adjacent triples in the list, and + the second is not the last triple in the list, then i+n != i' or + j+n != j'. IOW, adjacent triples never describe adjacent equal + blocks. + + The last triple is a dummy, (len(a), len(b), 0), and is the only + triple with n==0. + + >>> s = SequenceMatcher(None, "abxcd", "abcd") + >>> list(s.get_matching_blocks()) + [Match(a=0, b=0, size=2), Match(a=3, b=2, size=2), Match(a=5, b=4, size=0)] + """ + + if self.matching_blocks is not None: + return self.matching_blocks + la, lb = len(self.a), len(self.b) + + # This is most naturally expressed as a recursive algorithm, but + # at least one user bumped into extreme use cases that exceeded + # the recursion limit on their box. So, now we maintain a list + # ('queue`) of blocks we still need to look at, and append partial + # results to `matching_blocks` in a loop; the matches are sorted + # at the end. + queue = [(0, la, 0, lb)] + matching_blocks = [] + while queue: + alo, ahi, blo, bhi = queue.pop() + i, j, k = x = self.find_longest_match(alo, ahi, blo, bhi) + # a[alo:i] vs b[blo:j] unknown + # a[i:i+k] same as b[j:j+k] + # a[i+k:ahi] vs b[j+k:bhi] unknown + if k: # if k is 0, there was no matching block + matching_blocks.append(x) + if alo < i and blo < j: + queue.append((alo, i, blo, j)) + if i+k < ahi and j+k < bhi: + queue.append((i+k, ahi, j+k, bhi)) + matching_blocks.sort() + + # It's possible that we have adjacent equal blocks in the + # matching_blocks list now. Starting with 2.5, this code was added + # to collapse them. + i1 = j1 = k1 = 0 + non_adjacent = [] + for i2, j2, k2 in matching_blocks: + # Is this block adjacent to i1, j1, k1? + if i1 + k1 == i2 and j1 + k1 == j2: + # Yes, so collapse them -- this just increases the length of + # the first block by the length of the second, and the first + # block so lengthened remains the block to compare against. + k1 += k2 + else: + # Not adjacent. Remember the first block (k1==0 means it's + # the dummy we started with), and make the second block the + # new block to compare against. + if k1: + non_adjacent.append((i1, j1, k1)) + i1, j1, k1 = i2, j2, k2 + if k1: + non_adjacent.append((i1, j1, k1)) + + non_adjacent.append( (la, lb, 0) ) + self.matching_blocks = list(map(Match._make, non_adjacent)) + return self.matching_blocks + + def get_opcodes(self): + """Return list of 5-tuples describing how to turn a into b. + + Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple + has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the + tuple preceding it, and likewise for j1 == the previous j2. + + The tags are strings, with these meanings: + + 'replace': a[i1:i2] should be replaced by b[j1:j2] + 'delete': a[i1:i2] should be deleted. + Note that j1==j2 in this case. + 'insert': b[j1:j2] should be inserted at a[i1:i1]. + Note that i1==i2 in this case. + 'equal': a[i1:i2] == b[j1:j2] + + >>> a = "qabxcd" + >>> b = "abycdf" + >>> s = SequenceMatcher(None, a, b) + >>> for tag, i1, i2, j1, j2 in s.get_opcodes(): + ... print(("%7s a[%d:%d] (%s) b[%d:%d] (%s)" % + ... (tag, i1, i2, a[i1:i2], j1, j2, b[j1:j2]))) + delete a[0:1] (q) b[0:0] () + equal a[1:3] (ab) b[0:2] (ab) + replace a[3:4] (x) b[2:3] (y) + equal a[4:6] (cd) b[3:5] (cd) + insert a[6:6] () b[5:6] (f) + """ + + if self.opcodes is not None: + return self.opcodes + i = j = 0 + self.opcodes = answer = [] + for ai, bj, size in self.get_matching_blocks(): + # invariant: we've pumped out correct diffs to change + # a[:i] into b[:j], and the next matching block is + # a[ai:ai+size] == b[bj:bj+size]. So we need to pump + # out a diff to change a[i:ai] into b[j:bj], pump out + # the matching block, and move (i,j) beyond the match + tag = '' + if i < ai and j < bj: + tag = 'replace' + elif i < ai: + tag = 'delete' + elif j < bj: + tag = 'insert' + if tag: + answer.append( (tag, i, ai, j, bj) ) + i, j = ai+size, bj+size + # the list of matching blocks is terminated by a + # sentinel with size 0 + if size: + answer.append( ('equal', ai, i, bj, j) ) + return answer + + def get_grouped_opcodes(self, n=3): + """ Isolate change clusters by eliminating ranges with no changes. + + Return a generator of groups with up to n lines of context. + Each group is in the same format as returned by get_opcodes(). + + >>> from pprint import pprint + >>> a = list(map(str, range(1,40))) + >>> b = a[:] + >>> b[8:8] = ['i'] # Make an insertion + >>> b[20] += 'x' # Make a replacement + >>> b[23:28] = [] # Make a deletion + >>> b[30] += 'y' # Make another replacement + >>> pprint(list(SequenceMatcher(None,a,b).get_grouped_opcodes())) + [[('equal', 5, 8, 5, 8), ('insert', 8, 8, 8, 9), ('equal', 8, 11, 9, 12)], + [('equal', 16, 19, 17, 20), + ('replace', 19, 20, 20, 21), + ('equal', 20, 22, 21, 23), + ('delete', 22, 27, 23, 23), + ('equal', 27, 30, 23, 26)], + [('equal', 31, 34, 27, 30), + ('replace', 34, 35, 30, 31), + ('equal', 35, 38, 31, 34)]] + """ + + codes = self.get_opcodes() + if not codes: + codes = [("equal", 0, 1, 0, 1)] + # Fixup leading and trailing groups if they show no changes. + if codes[0][0] == 'equal': + tag, i1, i2, j1, j2 = codes[0] + codes[0] = tag, max(i1, i2-n), i2, max(j1, j2-n), j2 + if codes[-1][0] == 'equal': + tag, i1, i2, j1, j2 = codes[-1] + codes[-1] = tag, i1, min(i2, i1+n), j1, min(j2, j1+n) + + nn = n + n + group = [] + for tag, i1, i2, j1, j2 in codes: + # End the current group and start a new one whenever + # there is a large range with no changes. + if tag == 'equal' and i2-i1 > nn: + group.append((tag, i1, min(i2, i1+n), j1, min(j2, j1+n))) + yield group + group = [] + i1, j1 = max(i1, i2-n), max(j1, j2-n) + group.append((tag, i1, i2, j1 ,j2)) + if group and not (len(group)==1 and group[0][0] == 'equal'): + yield group + + def ratio(self): + """Return a measure of the sequences' similarity (float in [0,1]). + + Where T is the total number of elements in both sequences, and + M is the number of matches, this is 2.0*M / T. + Note that this is 1 if the sequences are identical, and 0 if + they have nothing in common. + + .ratio() is expensive to compute if you haven't already computed + .get_matching_blocks() or .get_opcodes(), in which case you may + want to try .quick_ratio() or .real_quick_ratio() first to get an + upper bound. + + >>> s = SequenceMatcher(None, "abcd", "bcde") + >>> s.ratio() + 0.75 + >>> s.quick_ratio() + 0.75 + >>> s.real_quick_ratio() + 1.0 + """ + + matches = sum(triple[-1] for triple in self.get_matching_blocks()) + return _calculate_ratio(matches, len(self.a) + len(self.b)) + + def quick_ratio(self): + """Return an upper bound on ratio() relatively quickly. + + This isn't defined beyond that it is an upper bound on .ratio(), and + is faster to compute. + """ + + # viewing a and b as multisets, set matches to the cardinality + # of their intersection; this counts the number of matches + # without regard to order, so is clearly an upper bound + if self.fullbcount is None: + self.fullbcount = fullbcount = {} + for elt in self.b: + fullbcount[elt] = fullbcount.get(elt, 0) + 1 + fullbcount = self.fullbcount + # avail[x] is the number of times x appears in 'b' less the + # number of times we've seen it in 'a' so far ... kinda + avail = {} + availhas, matches = avail.__contains__, 0 + for elt in self.a: + if availhas(elt): + numb = avail[elt] + else: + numb = fullbcount.get(elt, 0) + avail[elt] = numb - 1 + if numb > 0: + matches = matches + 1 + return _calculate_ratio(matches, len(self.a) + len(self.b)) + + def real_quick_ratio(self): + """Return an upper bound on ratio() very quickly. + + This isn't defined beyond that it is an upper bound on .ratio(), and + is faster to compute than either .ratio() or .quick_ratio(). + """ + + la, lb = len(self.a), len(self.b) + # can't have more matches than the number of elements in the + # shorter sequence + return _calculate_ratio(min(la, lb), la + lb) + + #__class_getitem__ = classmethod(GenericAlias) + + +def get_close_matches(word, possibilities, n=3, cutoff=0.6): + """Use SequenceMatcher to return list of the best "good enough" matches. + + word is a sequence for which close matches are desired (typically a + string). + + possibilities is a list of sequences against which to match word + (typically a list of strings). + + Optional arg n (default 3) is the maximum number of close matches to + return. n must be > 0. + + Optional arg cutoff (default 0.6) is a float in [0, 1]. Possibilities + that don't score at least that similar to word are ignored. + + The best (no more than n) matches among the possibilities are returned + in a list, sorted by similarity score, most similar first. + + >>> get_close_matches("appel", ["ape", "apple", "peach", "puppy"]) + ['apple', 'ape'] + >>> import keyword as _keyword + >>> get_close_matches("wheel", _keyword.kwlist) + ['while'] + >>> get_close_matches("Apple", _keyword.kwlist) + [] + >>> get_close_matches("accept", _keyword.kwlist) + ['except'] + """ + + if not n > 0: + raise ValueError("n must be > 0: %r" % (n,)) + if not 0.0 <= cutoff <= 1.0: + raise ValueError("cutoff must be in [0.0, 1.0]: %r" % (cutoff,)) + result = [] + s = SequenceMatcher() + s.set_seq2(word) + for x in possibilities: + s.set_seq1(x) + if s.real_quick_ratio() >= cutoff and \ + s.quick_ratio() >= cutoff and \ + s.ratio() >= cutoff: + result.append((s.ratio(), x)) + + # Move the best scorers to head of list + result = _nlargest(n, result) + # Strip scores for the best n matches + return [x for score, x in result] + + +def _keep_original_ws(s, tag_s): + """Replace whitespace with the original whitespace characters in `s`""" + return ''.join( + c if tag_c == " " and c.isspace() else tag_c + for c, tag_c in zip(s, tag_s) + ) + + + +class Differ: + r""" + Differ is a class for comparing sequences of lines of text, and + producing human-readable differences or deltas. Differ uses + SequenceMatcher both to compare sequences of lines, and to compare + sequences of characters within similar (near-matching) lines. + + Each line of a Differ delta begins with a two-letter code: + + '- ' line unique to sequence 1 + '+ ' line unique to sequence 2 + ' ' line common to both sequences + '? ' line not present in either input sequence + + Lines beginning with '? ' attempt to guide the eye to intraline + differences, and were not present in either input sequence. These lines + can be confusing if the sequences contain tab characters. + + Note that Differ makes no claim to produce a *minimal* diff. To the + contrary, minimal diffs are often counter-intuitive, because they synch + up anywhere possible, sometimes accidental matches 100 pages apart. + Restricting synch points to contiguous matches preserves some notion of + locality, at the occasional cost of producing a longer diff. + + Example: Comparing two texts. + + First we set up the texts, sequences of individual single-line strings + ending with newlines (such sequences can also be obtained from the + `readlines()` method of file-like objects): + + >>> text1 = ''' 1. Beautiful is better than ugly. + ... 2. Explicit is better than implicit. + ... 3. Simple is better than complex. + ... 4. Complex is better than complicated. + ... '''.splitlines(keepends=True) + >>> len(text1) + 4 + >>> text1[0][-1] + '\n' + >>> text2 = ''' 1. Beautiful is better than ugly. + ... 3. Simple is better than complex. + ... 4. Complicated is better than complex. + ... 5. Flat is better than nested. + ... '''.splitlines(keepends=True) + + Next we instantiate a Differ object: + + >>> d = Differ() + + Note that when instantiating a Differ object we may pass functions to + filter out line and character 'junk'. See Differ.__init__ for details. + + Finally, we compare the two: + + >>> result = list(d.compare(text1, text2)) + + 'result' is a list of strings, so let's pretty-print it: + + >>> from pprint import pprint as _pprint + >>> _pprint(result) + [' 1. Beautiful is better than ugly.\n', + '- 2. Explicit is better than implicit.\n', + '- 3. Simple is better than complex.\n', + '+ 3. Simple is better than complex.\n', + '? ++\n', + '- 4. Complex is better than complicated.\n', + '? ^ ---- ^\n', + '+ 4. Complicated is better than complex.\n', + '? ++++ ^ ^\n', + '+ 5. Flat is better than nested.\n'] + + As a single multi-line string it looks like this: + + >>> print(''.join(result), end="") + 1. Beautiful is better than ugly. + - 2. Explicit is better than implicit. + - 3. Simple is better than complex. + + 3. Simple is better than complex. + ? ++ + - 4. Complex is better than complicated. + ? ^ ---- ^ + + 4. Complicated is better than complex. + ? ++++ ^ ^ + + 5. Flat is better than nested. + + Methods: + + __init__(linejunk=None, charjunk=None) + Construct a text differencer, with optional filters. + + compare(a, b) + Compare two sequences of lines; generate the resulting delta. + """ + + def __init__(self, linejunk=None, charjunk=None): + """ + Construct a text differencer, with optional filters. + + The two optional keyword parameters are for filter functions: + + - `linejunk`: A function that should accept a single string argument, + and return true iff the string is junk. The module-level function + `IS_LINE_JUNK` may be used to filter out lines without visible + characters, except for at most one splat ('#'). It is recommended + to leave linejunk None; the underlying SequenceMatcher class has + an adaptive notion of "noise" lines that's better than any static + definition the author has ever been able to craft. + + - `charjunk`: A function that should accept a string of length 1. The + module-level function `IS_CHARACTER_JUNK` may be used to filter out + whitespace characters (a blank or tab; **note**: bad idea to include + newline in this!). Use of IS_CHARACTER_JUNK is recommended. + """ + + self.linejunk = linejunk + self.charjunk = charjunk + + def compare(self, a, b): + r""" + Compare two sequences of lines; generate the resulting delta. + + Each sequence must contain individual single-line strings ending with + newlines. Such sequences can be obtained from the `readlines()` method + of file-like objects. The delta generated also consists of newline- + terminated strings, ready to be printed as-is via the writeline() + method of a file-like object. + + Example: + + >>> print(''.join(Differ().compare('one\ntwo\nthree\n'.splitlines(True), + ... 'ore\ntree\nemu\n'.splitlines(True))), + ... end="") + - one + ? ^ + + ore + ? ^ + - two + - three + ? - + + tree + + emu + """ + + cruncher = SequenceMatcher(self.linejunk, a, b) + for tag, alo, ahi, blo, bhi in cruncher.get_opcodes(): + if tag == 'replace': + g = self._fancy_replace(a, alo, ahi, b, blo, bhi) + elif tag == 'delete': + g = self._dump('-', a, alo, ahi) + elif tag == 'insert': + g = self._dump('+', b, blo, bhi) + elif tag == 'equal': + g = self._dump(' ', a, alo, ahi) + else: + raise ValueError('unknown tag %r' % (tag,)) + + yield from g + + def _dump(self, tag, x, lo, hi): + """Generate comparison results for a same-tagged range.""" + for i in range(lo, hi): + yield '%s %s' % (tag, x[i]) + + def _plain_replace(self, a, alo, ahi, b, blo, bhi): + assert alo < ahi and blo < bhi + # dump the shorter block first -- reduces the burden on short-term + # memory if the blocks are of very different sizes + if bhi - blo < ahi - alo: + first = self._dump('+', b, blo, bhi) + second = self._dump('-', a, alo, ahi) + else: + first = self._dump('-', a, alo, ahi) + second = self._dump('+', b, blo, bhi) + + for g in first, second: + yield from g + + def _fancy_replace(self, a, alo, ahi, b, blo, bhi): + r""" + When replacing one block of lines with another, search the blocks + for *similar* lines; the best-matching pair (if any) is used as a + synch point, and intraline difference marking is done on the + similar pair. Lots of work, but often worth it. + + Example: + + >>> d = Differ() + >>> results = d._fancy_replace(['abcDefghiJkl\n'], 0, 1, + ... ['abcdefGhijkl\n'], 0, 1) + >>> print(''.join(results), end="") + - abcDefghiJkl + ? ^ ^ ^ + + abcdefGhijkl + ? ^ ^ ^ + """ + + # don't synch up unless the lines have a similarity score of at + # least cutoff; best_ratio tracks the best score seen so far + best_ratio, cutoff = 0.1, 0.5 + cruncher = SequenceMatcher(self.charjunk) + eqi, eqj = None, None # 1st indices of equal lines (if any) + + # search for the pair that matches best without being identical + # (identical lines must be junk lines, & we don't want to synch up + # on junk -- unless we have to) + for j in range(blo, bhi): + bj = b[j] + cruncher.set_seq2(bj) + for i in range(alo, ahi): + ai = a[i] + if ai == bj: + if eqi is None: + eqi, eqj = i, j + continue + cruncher.set_seq1(ai) + # computing similarity is expensive, so use the quick + # upper bounds first -- have seen this speed up messy + # compares by a factor of 3. + # note that ratio() is only expensive to compute the first + # time it's called on a sequence pair; the expensive part + # of the computation is cached by cruncher + if cruncher.real_quick_ratio() > best_ratio and \ + cruncher.quick_ratio() > best_ratio and \ + cruncher.ratio() > best_ratio: + best_ratio, best_i, best_j = cruncher.ratio(), i, j + if best_ratio < cutoff: + # no non-identical "pretty close" pair + if eqi is None: + # no identical pair either -- treat it as a straight replace + yield from self._plain_replace(a, alo, ahi, b, blo, bhi) + return + # no close pair, but an identical pair -- synch up on that + best_i, best_j, best_ratio = eqi, eqj, 1.0 + else: + # there's a close pair, so forget the identical pair (if any) + eqi = None + + # a[best_i] very similar to b[best_j]; eqi is None iff they're not + # identical + + # pump out diffs from before the synch point + yield from self._fancy_helper(a, alo, best_i, b, blo, best_j) + + # do intraline marking on the synch pair + aelt, belt = a[best_i], b[best_j] + if eqi is None: + # pump out a '-', '?', '+', '?' quad for the synched lines + atags = btags = "" + cruncher.set_seqs(aelt, belt) + for tag, ai1, ai2, bj1, bj2 in cruncher.get_opcodes(): + la, lb = ai2 - ai1, bj2 - bj1 + if tag == 'replace': + atags += '^' * la + btags += '^' * lb + elif tag == 'delete': + atags += '-' * la + elif tag == 'insert': + btags += '+' * lb + elif tag == 'equal': + atags += ' ' * la + btags += ' ' * lb + else: + raise ValueError('unknown tag %r' % (tag,)) + yield from self._qformat(aelt, belt, atags, btags) + else: + # the synch pair is identical + yield ' ' + aelt + + # pump out diffs from after the synch point + yield from self._fancy_helper(a, best_i+1, ahi, b, best_j+1, bhi) + + def _fancy_helper(self, a, alo, ahi, b, blo, bhi): + g = [] + if alo < ahi: + if blo < bhi: + g = self._fancy_replace(a, alo, ahi, b, blo, bhi) + else: + g = self._dump('-', a, alo, ahi) + elif blo < bhi: + g = self._dump('+', b, blo, bhi) + + yield from g + + def _qformat(self, aline, bline, atags, btags): + r""" + Format "?" output and deal with tabs. + + Example: + + >>> d = Differ() + >>> results = d._qformat('\tabcDefghiJkl\n', '\tabcdefGhijkl\n', + ... ' ^ ^ ^ ', ' ^ ^ ^ ') + >>> for line in results: print(repr(line)) + ... + '- \tabcDefghiJkl\n' + '? \t ^ ^ ^\n' + '+ \tabcdefGhijkl\n' + '? \t ^ ^ ^\n' + """ + atags = _keep_original_ws(aline, atags).rstrip() + btags = _keep_original_ws(bline, btags).rstrip() + + yield "- " + aline + if atags: + yield f"? {atags}\n" + + yield "+ " + bline + if btags: + yield f"? {btags}\n" + +# With respect to junk, an earlier version of ndiff simply refused to +# *start* a match with a junk element. The result was cases like this: +# before: private Thread currentThread; +# after: private volatile Thread currentThread; +# If you consider whitespace to be junk, the longest contiguous match +# not starting with junk is "e Thread currentThread". So ndiff reported +# that "e volatil" was inserted between the 't' and the 'e' in "private". +# While an accurate view, to people that's absurd. The current version +# looks for matching blocks that are entirely junk-free, then extends the +# longest one of those as far as possible but only with matching junk. +# So now "currentThread" is matched, then extended to suck up the +# preceding blank; then "private" is matched, and extended to suck up the +# following blank; then "Thread" is matched; and finally ndiff reports +# that "volatile " was inserted before "Thread". The only quibble +# remaining is that perhaps it was really the case that " volatile" +# was inserted after "private". I can live with that . + +import re + +def IS_LINE_JUNK(line, pat=re.compile(r"\s*(?:#\s*)?$").match): + r""" + Return True for ignorable line: iff `line` is blank or contains a single '#'. + + Examples: + + >>> IS_LINE_JUNK('\n') + True + >>> IS_LINE_JUNK(' # \n') + True + >>> IS_LINE_JUNK('hello\n') + False + """ + + return pat(line) is not None + +def IS_CHARACTER_JUNK(ch, ws=" \t"): + r""" + Return True for ignorable character: iff `ch` is a space or tab. + + Examples: + + >>> IS_CHARACTER_JUNK(' ') + True + >>> IS_CHARACTER_JUNK('\t') + True + >>> IS_CHARACTER_JUNK('\n') + False + >>> IS_CHARACTER_JUNK('x') + False + """ + + return ch in ws + + +######################################################################## +### Unified Diff +######################################################################## + +def _format_range_unified(start, stop): + 'Convert range to the "ed" format' + # Per the diff spec at http://www.unix.org/single_unix_specification/ + beginning = start + 1 # lines start numbering with one + length = stop - start + if length == 1: + return '{}'.format(beginning) + if not length: + beginning -= 1 # empty ranges begin at line just before the range + return '{},{}'.format(beginning, length) + +def unified_diff(a, b, fromfile='', tofile='', fromfiledate='', + tofiledate='', n=3, lineterm='\n'): + r""" + Compare two sequences of lines; generate the delta as a unified diff. + + Unified diffs are a compact way of showing line changes and a few + lines of context. The number of context lines is set by 'n' which + defaults to three. + + By default, the diff control lines (those with ---, +++, or @@) are + created with a trailing newline. This is helpful so that inputs + created from file.readlines() result in diffs that are suitable for + file.writelines() since both the inputs and outputs have trailing + newlines. + + For inputs that do not have trailing newlines, set the lineterm + argument to "" so that the output will be uniformly newline free. + + The unidiff format normally has a header for filenames and modification + times. Any or all of these may be specified using strings for + 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. + The modification times are normally expressed in the ISO 8601 format. + + Example: + + >>> for line in unified_diff('one two three four'.split(), + ... 'zero one tree four'.split(), 'Original', 'Current', + ... '2005-01-26 23:30:50', '2010-04-02 10:20:52', + ... lineterm=''): + ... print(line) # doctest: +NORMALIZE_WHITESPACE + --- Original 2005-01-26 23:30:50 + +++ Current 2010-04-02 10:20:52 + @@ -1,4 +1,4 @@ + +zero + one + -two + -three + +tree + four + """ + + _check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm) + started = False + for group in SequenceMatcher(None,a,b).get_grouped_opcodes(n): + if not started: + started = True + fromdate = '\t{}'.format(fromfiledate) if fromfiledate else '' + todate = '\t{}'.format(tofiledate) if tofiledate else '' + yield '--- {}{}{}'.format(fromfile, fromdate, lineterm) + yield '+++ {}{}{}'.format(tofile, todate, lineterm) + + first, last = group[0], group[-1] + file1_range = _format_range_unified(first[1], last[2]) + file2_range = _format_range_unified(first[3], last[4]) + yield '@@ -{} +{} @@{}'.format(file1_range, file2_range, lineterm) + + for tag, i1, i2, j1, j2 in group: + if tag == 'equal': + for line in a[i1:i2]: + yield ' ' + line + continue + if tag in {'replace', 'delete'}: + for line in a[i1:i2]: + yield '-' + line + if tag in {'replace', 'insert'}: + for line in b[j1:j2]: + yield '+' + line + + +######################################################################## +### Context Diff +######################################################################## + +def _format_range_context(start, stop): + 'Convert range to the "ed" format' + # Per the diff spec at http://www.unix.org/single_unix_specification/ + beginning = start + 1 # lines start numbering with one + length = stop - start + if not length: + beginning -= 1 # empty ranges begin at line just before the range + if length <= 1: + return '{}'.format(beginning) + return '{},{}'.format(beginning, beginning + length - 1) + +# See http://www.unix.org/single_unix_specification/ +def context_diff(a, b, fromfile='', tofile='', + fromfiledate='', tofiledate='', n=3, lineterm='\n'): + r""" + Compare two sequences of lines; generate the delta as a context diff. + + Context diffs are a compact way of showing line changes and a few + lines of context. The number of context lines is set by 'n' which + defaults to three. + + By default, the diff control lines (those with *** or ---) are + created with a trailing newline. This is helpful so that inputs + created from file.readlines() result in diffs that are suitable for + file.writelines() since both the inputs and outputs have trailing + newlines. + + For inputs that do not have trailing newlines, set the lineterm + argument to "" so that the output will be uniformly newline free. + + The context diff format normally has a header for filenames and + modification times. Any or all of these may be specified using + strings for 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. + The modification times are normally expressed in the ISO 8601 format. + If not specified, the strings default to blanks. + + Example: + + >>> print(''.join(context_diff('one\ntwo\nthree\nfour\n'.splitlines(True), + ... 'zero\none\ntree\nfour\n'.splitlines(True), 'Original', 'Current')), + ... end="") + *** Original + --- Current + *************** + *** 1,4 **** + one + ! two + ! three + four + --- 1,4 ---- + + zero + one + ! tree + four + """ + + _check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm) + prefix = dict(insert='+ ', delete='- ', replace='! ', equal=' ') + started = False + for group in SequenceMatcher(None,a,b).get_grouped_opcodes(n): + if not started: + started = True + fromdate = '\t{}'.format(fromfiledate) if fromfiledate else '' + todate = '\t{}'.format(tofiledate) if tofiledate else '' + yield '*** {}{}{}'.format(fromfile, fromdate, lineterm) + yield '--- {}{}{}'.format(tofile, todate, lineterm) + + first, last = group[0], group[-1] + yield '***************' + lineterm + + file1_range = _format_range_context(first[1], last[2]) + yield '*** {} ****{}'.format(file1_range, lineterm) + + if any(tag in {'replace', 'delete'} for tag, _, _, _, _ in group): + for tag, i1, i2, _, _ in group: + if tag != 'insert': + for line in a[i1:i2]: + yield prefix[tag] + line + + file2_range = _format_range_context(first[3], last[4]) + yield '--- {} ----{}'.format(file2_range, lineterm) + + if any(tag in {'replace', 'insert'} for tag, _, _, _, _ in group): + for tag, _, _, j1, j2 in group: + if tag != 'delete': + for line in b[j1:j2]: + yield prefix[tag] + line + +def _check_types(a, b, *args): + # Checking types is weird, but the alternative is garbled output when + # someone passes mixed bytes and str to {unified,context}_diff(). E.g. + # without this check, passing filenames as bytes results in output like + # --- b'oldfile.txt' + # +++ b'newfile.txt' + # because of how str.format() incorporates bytes objects. + if a and not isinstance(a[0], str): + raise TypeError('lines to compare must be str, not %s (%r)' % + (type(a[0]).__name__, a[0])) + if b and not isinstance(b[0], str): + raise TypeError('lines to compare must be str, not %s (%r)' % + (type(b[0]).__name__, b[0])) + for arg in args: + if not isinstance(arg, str): + raise TypeError('all arguments must be str, not: %r' % (arg,)) + +def diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', + fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n'): + r""" + Compare `a` and `b`, two sequences of lines represented as bytes rather + than str. This is a wrapper for `dfunc`, which is typically either + unified_diff() or context_diff(). Inputs are losslessly converted to + strings so that `dfunc` only has to worry about strings, and encoded + back to bytes on return. This is necessary to compare files with + unknown or inconsistent encoding. All other inputs (except `n`) must be + bytes rather than str. + """ + def decode(s): + try: + return s.decode('ascii', 'surrogateescape') + except AttributeError as err: + msg = ('all arguments must be bytes, not %s (%r)' % + (type(s).__name__, s)) + raise TypeError(msg) from err + a = list(map(decode, a)) + b = list(map(decode, b)) + fromfile = decode(fromfile) + tofile = decode(tofile) + fromfiledate = decode(fromfiledate) + tofiledate = decode(tofiledate) + lineterm = decode(lineterm) + + lines = dfunc(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm) + for line in lines: + yield line.encode('ascii', 'surrogateescape') + +def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK): + r""" + Compare `a` and `b` (lists of strings); return a `Differ`-style delta. + + Optional keyword parameters `linejunk` and `charjunk` are for filter + functions, or can be None: + + - linejunk: A function that should accept a single string argument and + return true iff the string is junk. The default is None, and is + recommended; the underlying SequenceMatcher class has an adaptive + notion of "noise" lines. + + - charjunk: A function that accepts a character (string of length + 1), and returns true iff the character is junk. The default is + the module-level function IS_CHARACTER_JUNK, which filters out + whitespace characters (a blank or tab; note: it's a bad idea to + include newline in this!). + + Tools/scripts/ndiff.py is a command-line front-end to this function. + + Example: + + >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(keepends=True), + ... 'ore\ntree\nemu\n'.splitlines(keepends=True)) + >>> print(''.join(diff), end="") + - one + ? ^ + + ore + ? ^ + - two + - three + ? - + + tree + + emu + """ + return Differ(linejunk, charjunk).compare(a, b) + +def _mdiff(fromlines, tolines, context=None, linejunk=None, + charjunk=IS_CHARACTER_JUNK): + r"""Returns generator yielding marked up from/to side by side differences. + + Arguments: + fromlines -- list of text lines to compared to tolines + tolines -- list of text lines to be compared to fromlines + context -- number of context lines to display on each side of difference, + if None, all from/to text lines will be generated. + linejunk -- passed on to ndiff (see ndiff documentation) + charjunk -- passed on to ndiff (see ndiff documentation) + + This function returns an iterator which returns a tuple: + (from line tuple, to line tuple, boolean flag) + + from/to line tuple -- (line num, line text) + line num -- integer or None (to indicate a context separation) + line text -- original line text with following markers inserted: + '\0+' -- marks start of added text + '\0-' -- marks start of deleted text + '\0^' -- marks start of changed text + '\1' -- marks end of added/deleted/changed text + + boolean flag -- None indicates context separation, True indicates + either "from" or "to" line contains a change, otherwise False. + + This function/iterator was originally developed to generate side by side + file difference for making HTML pages (see HtmlDiff class for example + usage). + + Note, this function utilizes the ndiff function to generate the side by + side difference markup. Optional ndiff arguments may be passed to this + function and they in turn will be passed to ndiff. + """ + import re + + # regular expression for finding intraline change indices + change_re = re.compile(r'(\++|\-+|\^+)') + + # create the difference iterator to generate the differences + diff_lines_iterator = ndiff(fromlines,tolines,linejunk,charjunk) + + def _make_line(lines, format_key, side, num_lines=[0,0]): + """Returns line of text with user's change markup and line formatting. + + lines -- list of lines from the ndiff generator to produce a line of + text from. When producing the line of text to return, the + lines used are removed from this list. + format_key -- '+' return first line in list with "add" markup around + the entire line. + '-' return first line in list with "delete" markup around + the entire line. + '?' return first line in list with add/delete/change + intraline markup (indices obtained from second line) + None return first line in list with no markup + side -- indice into the num_lines list (0=from,1=to) + num_lines -- from/to current line number. This is NOT intended to be a + passed parameter. It is present as a keyword argument to + maintain memory of the current line numbers between calls + of this function. + + Note, this function is purposefully not defined at the module scope so + that data it needs from its parent function (within whose context it + is defined) does not need to be of module scope. + """ + num_lines[side] += 1 + # Handle case where no user markup is to be added, just return line of + # text with user's line format to allow for usage of the line number. + if format_key is None: + return (num_lines[side],lines.pop(0)[2:]) + # Handle case of intraline changes + if format_key == '?': + text, markers = lines.pop(0), lines.pop(0) + # find intraline changes (store change type and indices in tuples) + sub_info = [] + def record_sub_info(match_object,sub_info=sub_info): + sub_info.append([match_object.group(1)[0],match_object.span()]) + return match_object.group(1) + change_re.sub(record_sub_info,markers) + # process each tuple inserting our special marks that won't be + # noticed by an xml/html escaper. + for key,(begin,end) in reversed(sub_info): + text = text[0:begin]+'\0'+key+text[begin:end]+'\1'+text[end:] + text = text[2:] + # Handle case of add/delete entire line + else: + text = lines.pop(0)[2:] + # if line of text is just a newline, insert a space so there is + # something for the user to highlight and see. + if not text: + text = ' ' + # insert marks that won't be noticed by an xml/html escaper. + text = '\0' + format_key + text + '\1' + # Return line of text, first allow user's line formatter to do its + # thing (such as adding the line number) then replace the special + # marks with what the user's change markup. + return (num_lines[side],text) + + def _line_iterator(): + """Yields from/to lines of text with a change indication. + + This function is an iterator. It itself pulls lines from a + differencing iterator, processes them and yields them. When it can + it yields both a "from" and a "to" line, otherwise it will yield one + or the other. In addition to yielding the lines of from/to text, a + boolean flag is yielded to indicate if the text line(s) have + differences in them. + + Note, this function is purposefully not defined at the module scope so + that data it needs from its parent function (within whose context it + is defined) does not need to be of module scope. + """ + lines = [] + num_blanks_pending, num_blanks_to_yield = 0, 0 + while True: + # Load up next 4 lines so we can look ahead, create strings which + # are a concatenation of the first character of each of the 4 lines + # so we can do some very readable comparisons. + while len(lines) < 4: + lines.append(next(diff_lines_iterator, 'X')) + s = ''.join([line[0] for line in lines]) + if s.startswith('X'): + # When no more lines, pump out any remaining blank lines so the + # corresponding add/delete lines get a matching blank line so + # all line pairs get yielded at the next level. + num_blanks_to_yield = num_blanks_pending + elif s.startswith('-?+?'): + # simple intraline change + yield _make_line(lines,'?',0), _make_line(lines,'?',1), True + continue + elif s.startswith('--++'): + # in delete block, add block coming: we do NOT want to get + # caught up on blank lines yet, just process the delete line + num_blanks_pending -= 1 + yield _make_line(lines,'-',0), None, True + continue + elif s.startswith(('--?+', '--+', '- ')): + # in delete block and see an intraline change or unchanged line + # coming: yield the delete line and then blanks + from_line,to_line = _make_line(lines,'-',0), None + num_blanks_to_yield,num_blanks_pending = num_blanks_pending-1,0 + elif s.startswith('-+?'): + # intraline change + yield _make_line(lines,None,0), _make_line(lines,'?',1), True + continue + elif s.startswith('-?+'): + # intraline change + yield _make_line(lines,'?',0), _make_line(lines,None,1), True + continue + elif s.startswith('-'): + # delete FROM line + num_blanks_pending -= 1 + yield _make_line(lines,'-',0), None, True + continue + elif s.startswith('+--'): + # in add block, delete block coming: we do NOT want to get + # caught up on blank lines yet, just process the add line + num_blanks_pending += 1 + yield None, _make_line(lines,'+',1), True + continue + elif s.startswith(('+ ', '+-')): + # will be leaving an add block: yield blanks then add line + from_line, to_line = None, _make_line(lines,'+',1) + num_blanks_to_yield,num_blanks_pending = num_blanks_pending+1,0 + elif s.startswith('+'): + # inside an add block, yield the add line + num_blanks_pending += 1 + yield None, _make_line(lines,'+',1), True + continue + elif s.startswith(' '): + # unchanged text, yield it to both sides + yield _make_line(lines[:],None,0),_make_line(lines,None,1),False + continue + # Catch up on the blank lines so when we yield the next from/to + # pair, they are lined up. + while(num_blanks_to_yield < 0): + num_blanks_to_yield += 1 + yield None,('','\n'),True + while(num_blanks_to_yield > 0): + num_blanks_to_yield -= 1 + yield ('','\n'),None,True + if s.startswith('X'): + return + else: + yield from_line,to_line,True + + def _line_pair_iterator(): + """Yields from/to lines of text with a change indication. + + This function is an iterator. It itself pulls lines from the line + iterator. Its difference from that iterator is that this function + always yields a pair of from/to text lines (with the change + indication). If necessary it will collect single from/to lines + until it has a matching pair from/to pair to yield. + + Note, this function is purposefully not defined at the module scope so + that data it needs from its parent function (within whose context it + is defined) does not need to be of module scope. + """ + line_iterator = _line_iterator() + fromlines,tolines=[],[] + while True: + # Collecting lines of text until we have a from/to pair + while (len(fromlines)==0 or len(tolines)==0): + try: + from_line, to_line, found_diff = next(line_iterator) + except StopIteration: + return + if from_line is not None: + fromlines.append((from_line,found_diff)) + if to_line is not None: + tolines.append((to_line,found_diff)) + # Once we have a pair, remove them from the collection and yield it + from_line, fromDiff = fromlines.pop(0) + to_line, to_diff = tolines.pop(0) + yield (from_line,to_line,fromDiff or to_diff) + + # Handle case where user does not want context differencing, just yield + # them up without doing anything else with them. + line_pair_iterator = _line_pair_iterator() + if context is None: + yield from line_pair_iterator + # Handle case where user wants context differencing. We must do some + # storage of lines until we know for sure that they are to be yielded. + else: + context += 1 + lines_to_write = 0 + while True: + # Store lines up until we find a difference, note use of a + # circular queue because we only need to keep around what + # we need for context. + index, contextLines = 0, [None]*(context) + found_diff = False + while(found_diff is False): + try: + from_line, to_line, found_diff = next(line_pair_iterator) + except StopIteration: + return + i = index % context + contextLines[i] = (from_line, to_line, found_diff) + index += 1 + # Yield lines that we have collected so far, but first yield + # the user's separator. + if index > context: + yield None, None, None + lines_to_write = context + else: + lines_to_write = index + index = 0 + while(lines_to_write): + i = index % context + index += 1 + yield contextLines[i] + lines_to_write -= 1 + # Now yield the context lines after the change + lines_to_write = context-1 + try: + while(lines_to_write): + from_line, to_line, found_diff = next(line_pair_iterator) + # If another change within the context, extend the context + if found_diff: + lines_to_write = context-1 + else: + lines_to_write -= 1 + yield from_line, to_line, found_diff + except StopIteration: + # Catch exception from next() and return normally + return + + +_file_template = """ + + + + + + + + + + + + %(table)s%(legend)s + + +""" + +_styles = """ + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa}""" + +_table_template = """ + + + + %(header_row)s + +%(data_rows)s +
""" + +_legend = """ + + + + +
Legends
+ + + + +
Colors
 Added 
Changed
Deleted
+ + + + +
Links
(f)irst change
(n)ext change
(t)op
""" + +class HtmlDiff(object): + """For producing HTML side by side comparison with change highlights. + + This class can be used to create an HTML table (or a complete HTML file + containing the table) showing a side by side, line by line comparison + of text with inter-line and intra-line change highlights. The table can + be generated in either full or contextual difference mode. + + The following methods are provided for HTML generation: + + make_table -- generates HTML for a single side by side table + make_file -- generates complete HTML file with a single side by side table + + See tools/scripts/diff.py for an example usage of this class. + """ + + _file_template = _file_template + _styles = _styles + _table_template = _table_template + _legend = _legend + _default_prefix = 0 + + def __init__(self,tabsize=8,wrapcolumn=None,linejunk=None, + charjunk=IS_CHARACTER_JUNK): + """HtmlDiff instance initializer + + Arguments: + tabsize -- tab stop spacing, defaults to 8. + wrapcolumn -- column number where lines are broken and wrapped, + defaults to None where lines are not wrapped. + linejunk,charjunk -- keyword arguments passed into ndiff() (used by + HtmlDiff() to generate the side by side HTML differences). See + ndiff() documentation for argument default values and descriptions. + """ + self._tabsize = tabsize + self._wrapcolumn = wrapcolumn + self._linejunk = linejunk + self._charjunk = charjunk + + def make_file(self, fromlines, tolines, fromdesc='', todesc='', + context=False, numlines=5, *, charset='utf-8'): + """Returns HTML file of side by side comparison with change highlights + + Arguments: + fromlines -- list of "from" lines + tolines -- list of "to" lines + fromdesc -- "from" file column header string + todesc -- "to" file column header string + context -- set to True for contextual differences (defaults to False + which shows full differences). + numlines -- number of context lines. When context is set True, + controls number of lines displayed before and after the change. + When context is False, controls the number of lines to place + the "next" link anchors before the next change (so click of + "next" link jumps to just before the change). + charset -- charset of the HTML document + """ + + return (self._file_template % dict( + styles=self._styles, + legend=self._legend, + table=self.make_table(fromlines, tolines, fromdesc, todesc, + context=context, numlines=numlines), + charset=charset + )).encode(charset, 'xmlcharrefreplace').decode(charset) + + def _tab_newline_replace(self,fromlines,tolines): + """Returns from/to line lists with tabs expanded and newlines removed. + + Instead of tab characters being replaced by the number of spaces + needed to fill in to the next tab stop, this function will fill + the space with tab characters. This is done so that the difference + algorithms can identify changes in a file when tabs are replaced by + spaces and vice versa. At the end of the HTML generation, the tab + characters will be replaced with a nonbreakable space. + """ + def expand_tabs(line): + # hide real spaces + line = line.replace(' ','\0') + # expand tabs into spaces + line = line.expandtabs(self._tabsize) + # replace spaces from expanded tabs back into tab characters + # (we'll replace them with markup after we do differencing) + line = line.replace(' ','\t') + return line.replace('\0',' ').rstrip('\n') + fromlines = [expand_tabs(line) for line in fromlines] + tolines = [expand_tabs(line) for line in tolines] + return fromlines,tolines + + def _split_line(self,data_list,line_num,text): + """Builds list of text lines by splitting text lines at wrap point + + This function will determine if the input text line needs to be + wrapped (split) into separate lines. If so, the first wrap point + will be determined and the first line appended to the output + text line list. This function is used recursively to handle + the second part of the split line to further split it. + """ + # if blank line or context separator, just add it to the output list + if not line_num: + data_list.append((line_num,text)) + return + + # if line text doesn't need wrapping, just add it to the output list + size = len(text) + max = self._wrapcolumn + if (size <= max) or ((size -(text.count('\0')*3)) <= max): + data_list.append((line_num,text)) + return + + # scan text looking for the wrap point, keeping track if the wrap + # point is inside markers + i = 0 + n = 0 + mark = '' + while n < max and i < size: + if text[i] == '\0': + i += 1 + mark = text[i] + i += 1 + elif text[i] == '\1': + i += 1 + mark = '' + else: + i += 1 + n += 1 + + # wrap point is inside text, break it up into separate lines + line1 = text[:i] + line2 = text[i:] + + # if wrap point is inside markers, place end marker at end of first + # line and start marker at beginning of second line because each + # line will have its own table tag markup around it. + if mark: + line1 = line1 + '\1' + line2 = '\0' + mark + line2 + + # tack on first line onto the output list + data_list.append((line_num,line1)) + + # use this routine again to wrap the remaining text + self._split_line(data_list,'>',line2) + + def _line_wrapper(self,diffs): + """Returns iterator that splits (wraps) mdiff text lines""" + + # pull from/to data and flags from mdiff iterator + for fromdata,todata,flag in diffs: + # check for context separators and pass them through + if flag is None: + yield fromdata,todata,flag + continue + (fromline,fromtext),(toline,totext) = fromdata,todata + # for each from/to line split it at the wrap column to form + # list of text lines. + fromlist,tolist = [],[] + self._split_line(fromlist,fromline,fromtext) + self._split_line(tolist,toline,totext) + # yield from/to line in pairs inserting blank lines as + # necessary when one side has more wrapped lines + while fromlist or tolist: + if fromlist: + fromdata = fromlist.pop(0) + else: + fromdata = ('',' ') + if tolist: + todata = tolist.pop(0) + else: + todata = ('',' ') + yield fromdata,todata,flag + + def _collect_lines(self,diffs): + """Collects mdiff output into separate lists + + Before storing the mdiff from/to data into a list, it is converted + into a single line of text with HTML markup. + """ + + fromlist,tolist,flaglist = [],[],[] + # pull from/to data and flags from mdiff style iterator + for fromdata,todata,flag in diffs: + try: + # store HTML markup of the lines into the lists + fromlist.append(self._format_line(0,flag,*fromdata)) + tolist.append(self._format_line(1,flag,*todata)) + except TypeError: + # exceptions occur for lines where context separators go + fromlist.append(None) + tolist.append(None) + flaglist.append(flag) + return fromlist,tolist,flaglist + + def _format_line(self,side,flag,linenum,text): + """Returns HTML markup of "from" / "to" text lines + + side -- 0 or 1 indicating "from" or "to" text + flag -- indicates if difference on line + linenum -- line number (used for line number column) + text -- line text to be marked up + """ + try: + linenum = '%d' % linenum + id = ' id="%s%s"' % (self._prefix[side],linenum) + except TypeError: + # handle blank lines where linenum is '>' or '' + id = '' + # replace those things that would get confused with HTML symbols + text=text.replace("&","&").replace(">",">").replace("<","<") + + # make space non-breakable so they don't get compressed or line wrapped + text = text.replace(' ',' ').rstrip() + + return '%s%s' \ + % (id,linenum,text) + + def _make_prefix(self): + """Create unique anchor prefixes""" + + # Generate a unique anchor prefix so multiple tables + # can exist on the same HTML page without conflicts. + fromprefix = "from%d_" % HtmlDiff._default_prefix + toprefix = "to%d_" % HtmlDiff._default_prefix + HtmlDiff._default_prefix += 1 + # store prefixes so line format method has access + self._prefix = [fromprefix,toprefix] + + def _convert_flags(self,fromlist,tolist,flaglist,context,numlines): + """Makes list of "next" links""" + + # all anchor names will be generated using the unique "to" prefix + toprefix = self._prefix[1] + + # process change flags, generating middle column of next anchors/links + next_id = ['']*len(flaglist) + next_href = ['']*len(flaglist) + num_chg, in_change = 0, False + last = 0 + for i,flag in enumerate(flaglist): + if flag: + if not in_change: + in_change = True + last = i + # at the beginning of a change, drop an anchor a few lines + # (the context lines) before the change for the previous + # link + i = max([0,i-numlines]) + next_id[i] = ' id="difflib_chg_%s_%d"' % (toprefix,num_chg) + # at the beginning of a change, drop a link to the next + # change + num_chg += 1 + next_href[last] = 'n' % ( + toprefix,num_chg) + else: + in_change = False + # check for cases where there is no content to avoid exceptions + if not flaglist: + flaglist = [False] + next_id = [''] + next_href = [''] + last = 0 + if context: + fromlist = [' No Differences Found '] + tolist = fromlist + else: + fromlist = tolist = [' Empty File '] + # if not a change on first line, drop a link + if not flaglist[0]: + next_href[0] = 'f' % toprefix + # redo the last link to link to the top + next_href[last] = 't' % (toprefix) + + return fromlist,tolist,flaglist,next_href,next_id + + def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False, + numlines=5): + """Returns HTML table of side by side comparison with change highlights + + Arguments: + fromlines -- list of "from" lines + tolines -- list of "to" lines + fromdesc -- "from" file column header string + todesc -- "to" file column header string + context -- set to True for contextual differences (defaults to False + which shows full differences). + numlines -- number of context lines. When context is set True, + controls number of lines displayed before and after the change. + When context is False, controls the number of lines to place + the "next" link anchors before the next change (so click of + "next" link jumps to just before the change). + """ + + # make unique anchor prefixes so that multiple tables may exist + # on the same page without conflict. + self._make_prefix() + + # change tabs to spaces before it gets more difficult after we insert + # markup + fromlines,tolines = self._tab_newline_replace(fromlines,tolines) + + # create diffs iterator which generates side by side from/to data + if context: + context_lines = numlines + else: + context_lines = None + diffs = _mdiff(fromlines,tolines,context_lines,linejunk=self._linejunk, + charjunk=self._charjunk) + + # set up iterator to wrap lines that exceed desired width + if self._wrapcolumn: + diffs = self._line_wrapper(diffs) + + # collect up from/to lines and flags into lists (also format the lines) + fromlist,tolist,flaglist = self._collect_lines(diffs) + + # process change flags, generating middle column of next anchors/links + fromlist,tolist,flaglist,next_href,next_id = self._convert_flags( + fromlist,tolist,flaglist,context,numlines) + + s = [] + fmt = ' %s%s' + \ + '%s%s\n' + for i in range(len(flaglist)): + if flaglist[i] is None: + # mdiff yields None on separator lines skip the bogus ones + # generated for the first line + if i > 0: + s.append(' \n \n') + else: + s.append( fmt % (next_id[i],next_href[i],fromlist[i], + next_href[i],tolist[i])) + if fromdesc or todesc: + header_row = '%s%s%s%s' % ( + '
', + '%s' % fromdesc, + '
', + '%s' % todesc) + else: + header_row = '' + + table = self._table_template % dict( + data_rows=''.join(s), + header_row=header_row, + prefix=self._prefix[1]) + + return table.replace('\0+',''). \ + replace('\0-',''). \ + replace('\0^',''). \ + replace('\1',''). \ + replace('\t',' ') + +del re + +def restore(delta, which): + r""" + Generate one of the two sequences that generated a delta. + + Given a `delta` produced by `Differ.compare()` or `ndiff()`, extract + lines originating from file 1 or 2 (parameter `which`), stripping off line + prefixes. + + Examples: + + >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(keepends=True), + ... 'ore\ntree\nemu\n'.splitlines(keepends=True)) + >>> diff = list(diff) + >>> print(''.join(restore(diff, 1)), end="") + one + two + three + >>> print(''.join(restore(diff, 2)), end="") + ore + tree + emu + """ + try: + tag = {1: "- ", 2: "+ "}[int(which)] + except KeyError: + raise ValueError('unknown delta choice (must be 1 or 2): %r' + % which) from None + prefixes = (" ", tag) + for line in delta: + if line[:2] in prefixes: + yield line[2:] + +def _test(): + import doctest, difflib + return doctest.testmod(difflib) + +if __name__ == "__main__": + _test() diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4dc7ae84acc6da01a6fc88136b4545507046b3da --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp @@ -0,0 +1,2 @@ +RISCVRegisterBankInfo::RISCVRegisterBankInfo(const TargetRegisterInfo &TRI) : RISCVGenRegisterBankInfo() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1480303244e07d20dda536668a1d006b005c6abf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +RISCVRegisterInfo::RISCVRegisterInfo(unsigned HwMode) : RISCVGenRegisterInfo(RISCV::X1, 0, 0, 0, HwMode) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4627583a88c723ec5625aa71d430e6bc6fca6ed5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,27 @@ +void RISCVRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS) const { + assert(SPAdj == 0 && "Unexpected non-zero SPAdj value"); + MachineInstr &MI = *II; + MachineFunction &MF = *MI.getParent()->getParent(); + MachineRegisterInfo &MRI = MF.getRegInfo(); + const RISCVInstrInfo *TII = MF.getSubtarget().getInstrInfo(); + DebugLoc DL = MI.getDebugLoc(); + int FrameIndex = MI.getOperand(FIOperandNum).getIndex(); + Register FrameReg; + int Offset = getFrameLowering(MF)->getFrameIndexReference(MF, FrameIndex, FrameReg).getFixed() + MI.getOperand(FIOperandNum + 1).getImm(); + if (!isInt<32>(Offset)) { + report_fatal_error("Frame offsets outside of the signed 32-bit range not supported"); + } + MachineBasicBlock &MBB = *MI.getParent(); + bool FrameRegIsKill = false; + if (!isInt<12>(Offset)) { + assert(isInt<32>(Offset) && "Int32 expected"); + Register ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + TII->movImm(MBB, II, DL, ScratchReg, Offset); + BuildMI(MBB, II, DL, TII->get(RISCV::ADD), ScratchReg).addReg(FrameReg).addReg(ScratchReg, RegState::Kill); + Offset = 0; + FrameReg = ScratchReg; + FrameRegIsKill = true; + } + MI.getOperand(FIOperandNum).ChangeToRegister(FrameReg, false, false, FrameRegIsKill); + MI.getOperand(FIOperandNum + 1).ChangeToImmediate(Offset); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8e9de57806a18f51b53e3d7fa691a28052d7d64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp @@ -0,0 +1,19 @@ +const uint32_t *RISCVRegisterInfo::getCallPreservedMask(const MachineFunction & MF, CallingConv::ID CC) const { + auto &Subtarget = MF.getSubtarget(); + if (CC == CallingConv::GHC) { + return CSR_NoRegs_RegMask; + } + switch (Subtarget.getTargetABI()) { + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + return CSR_ILP32_LP64_RegMask; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + return CSR_ILP32F_LP64F_RegMask; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + return CSR_ILP32D_LP64D_RegMask; + default: + llvm_unreachable("Unrecognized ABI"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3050b17a62d80679cf10f80be303f18b7def4c51 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,28 @@ +const MCPhysReg *RISCVRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + auto &Subtarget = MF->getSubtarget(); + if (MF->getFunction().getCallingConv() == CallingConv::GHC) { + return CSR_NoRegs_SaveList; + } + if (MF->getFunction().hasFnAttribute("interrupt")) { + if (Subtarget.hasStdExtD()) { + return CSR_XLEN_F64_Interrupt_SaveList; + } + if (Subtarget.hasStdExtF()) { + return CSR_XLEN_F32_Interrupt_SaveList; + } + return CSR_Interrupt_SaveList; + } + switch (Subtarget.getTargetABI()) { + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + return CSR_ILP32_LP64_SaveList; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + return CSR_ILP32F_LP64F_SaveList; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + return CSR_ILP32D_LP64D_SaveList; + default: + llvm_unreachable("Unrecognized ABI"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72c4c839e6e91d5177aac289f685491ab3ec84a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,4 @@ +Register RISCVRegisterInfo::getFrameRegister(const MachineFunction &MF) const { + const TargetFrameLowering *TFI = getFrameLowering(MF); + return TFI->hasFP(MF) ? RISCV::X8 : RISCV::X2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fa56f2bf4b0fa58c156cb2b44e640600fd4e8df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp @@ -0,0 +1,3 @@ +const uint32_t *RISCVRegisterInfo::getNoPreservedMask() const { + return CSR_NoRegs_RegMask; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88663c48f37912ceed74f49de1e37a38e9411d0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp @@ -0,0 +1,3 @@ +const TargetRegisterClass *getPointerRegClass(const MachineFunction &MF, unsigned Kind = 0) const override { + return &RISCV::GPRRegClass; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4de8d55da32eb35d5bbf5d18d0057f8121e39df1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,25 @@ +BitVector RISCVRegisterInfo::getReservedRegs(const MachineFunction &MF) const { + const RISCVFrameLowering *TFI = getFrameLowering(MF); + BitVector Reserved(getNumRegs()); + for (size_t Reg = 0; Reg < getNumRegs(); Reg++) { + if (MF.getSubtarget().isRegisterReservedByUser(Reg)) { + markSuperRegs(Reserved, Reg); + } + } + if (TFI->hasBP(MF)) { + markSuperRegs(Reserved, RISCV::X9); + } + if (TFI->hasFP(MF)) { + markSuperRegs(Reserved, RISCV::X8); + } + markSuperRegs(Reserved, RISCV::X0); + markSuperRegs(Reserved, RISCV::X2); + markSuperRegs(Reserved, RISCV::X3); + markSuperRegs(Reserved, RISCV::X4); + markSuperRegs(Reserved, RISCV::VL); + markSuperRegs(Reserved, RISCV::VTYPE); + markSuperRegs(Reserved, RISCV::VXSAT); + markSuperRegs(Reserved, RISCV::VXRM); + assert(checkAllSuperRegsMarked(Reserved)); + return Reserved; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0128afe039488da081ce0db8ac0fa9d0c2001e05 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp @@ -0,0 +1,12 @@ +bool RISCVRegisterInfo::hasReservedSpillSlot(const MachineFunction &MF, Register Reg, int &FrameIdx) const { + const auto *RVFI = MF.getInfo(); + if (!RVFI->useSaveRestoreLibCalls(MF)) { + return false; + } + auto FII = FixedCSRFIMap.find(Reg); + if (FII == FixedCSRFIMap.end()) { + return false; + } + FrameIdx = FII->second; + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25561255c0b0144c3f52ec50dd6542c764b476af --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp @@ -0,0 +1,3 @@ +bool RISCVRegisterInfo::isAsmClobberable(const MachineFunction &MF, MCRegister PhysReg) const { + return !MF.getSubtarget().isRegisterReservedByUser(PhysReg); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5f3ae8dcbdb06cd2b11c08d4304bc5fbbeb7a0bf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp @@ -0,0 +1,3 @@ +bool RISCVRegisterInfo::isConstantPhysReg(MCRegister PhysReg) const { + return PhysReg == RISCV::X0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcdefd787701998b4ca78c8a05ad2a8d3a8da92b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresFrameIndexScavenging(const MachineFunction &MF) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..14b5f8108d512990df2060604418ece481a51ba3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresRegisterScavenging(const MachineFunction &MF) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/AsmParser.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/AsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7797cdba62f86a46e4dea7c5120f3c6aefe6bfde --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/AsmParser.cpp @@ -0,0 +1,16 @@ +RISCVAsmParser(const MCSubtargetInfo &STI, MCAsmParser &Parser, const MCInstrInfo &MII, const MCTargetOptions &Options) : MCTargetAsmParser(Options, STI, MII) { + Parser.addAliasForDirective(".half", ".2byte"); + Parser.addAliasForDirective(".hword", ".2byte"); + Parser.addAliasForDirective(".word", ".4byte"); + Parser.addAliasForDirective(".dword", ".8byte"); + setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits())); + auto ABIName = StringRef(Options.ABIName); + if (ABIName.endswith("f") && !getSTI().getFeatureBits()[RISCV::FeatureStdExtF]) { + errs() << "Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension (ignoring target-abi)\n"; + } + else if (ABIName.endswith("d") && !getSTI().getFeatureBits()[RISCV::FeatureStdExtD]) { + errs() << "Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)\n"; + } + const MCObjectFileInfo *MOFI = Parser.getContext().getObjectFileInfo(); + ParserOptions.IsPicEnabled = MOFI->isPositionIndependent(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/KindTy.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/KindTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..371575f0ea6716a531fb88cd3fb871d6a05d4417 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/KindTy.cpp @@ -0,0 +1,7 @@ +enum class KindTy { + Token, + Register, + Immediate, + SystemRegister, + VType, +} Kind; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71228f1bad2b593ede7681696f374a8ce3765475 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmParser() { + RegisterMCAsmParser X(getTheRISCV32Target()); + RegisterMCAsmParser Y(getTheRISCV64Target()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0b5f960569745689b8abf24bb90aaf3d291803c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp @@ -0,0 +1,621 @@ +bool RISCVAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, OperandVector &Operands, MCStreamer &Out, uint64_t &ErrorInfo, bool MatchingInlineAsm) { + MCInst Inst; + FeatureBitset MissingFeatures; + auto Result = MatchInstructionImpl(Operands, Inst, ErrorInfo, MissingFeatures, MatchingInlineAsm); + switch (Result) { + default: + break; + case Match_Success: + const MCInstrDesc &MCID = MII.get(Inst.getOpcode()); + unsigned Constraints = (MCID.TSFlags & RISCVII::ConstraintMask) >> RISCVII::ConstraintShift; + unsigned DestReg = Inst.getOperand(0).getReg(); + SMLoc Loc = Operands[1]->getStartLoc(); + if (Constraints & RISCVII::VS2Constraint) { + unsigned CheckReg = Inst.getOperand(1).getReg(); + if (DestReg == CheckReg) { + return Error(Loc, "The destination vector register group cannot overlap the source vector register group."); + } + } + if ((Constraints & RISCVII::VS1Constraint) && (Inst.getOperand(2).isReg())) { + unsigned CheckReg = Inst.getOperand(2).getReg(); + if (DestReg == CheckReg) { + return Error(Loc, "The destination vector register group cannot overlap the source vector register group."); + } + } + if ((Constraints & RISCVII::VMConstraint) && (DestReg == RISCV::V0)) { + unsigned Opcode = Inst.getOpcode(); + if (Opcode == RISCV::VADC_VVM || Opcode == RISCV::VADC_VXM || Opcode == RISCV::VADC_VIM || Opcode == RISCV::VSBC_VVM || Opcode == RISCV::VSBC_VXM || Opcode == RISCV::VFMERGE_VFM || Opcode == RISCV::VMERGE_VIM || Opcode == RISCV::VMERGE_VVM || Opcode == RISCV::VMERGE_VXM) { + return Error(Loc, "The destination vector register group cannot be V0."); + } + unsigned CheckReg = Inst.getOperand(Inst.getNumOperands() - 1).getReg(); + assert((CheckReg == RISCV::V0 || CheckReg == RISCV::NoRegister) && "Unexpected register for mask operand"); + if (DestReg == CheckReg) { + return Error(Loc, "The destination vector register group cannot overlap the mask register."); + } + } + Inst.setLoc(IDLoc); + switch (Inst.getOpcode()) { + default: + break; + case RISCV::PseudoLI: { + MCRegister Reg = Inst.getOperand(0).getReg(); + const MCOperand &Op1 = Inst.getOperand(1); + if (Op1.isExpr()) { + emitToStreamer(Out, MCInstBuilder(RISCV::ADDI).addReg(Reg).addReg(RISCV::X0).addExpr(Op1.getExpr())); + return false; + } + int64_t Imm = Inst.getOperand(1).getImm(); + if (!isRV64()) { + Imm = SignExtend64<32>(Imm); + } + RISCVMatInt::InstSeq Seq; + RISCVMatInt::generateInstSeq(Value, isRV64(), Seq); + MCRegister SrcReg = RISCV::X0; + for (RISCVMatInt::Inst &Inst : Seq) { + if (Inst.Opc == RISCV::LUI) { + emitToStreamer(Out, MCInstBuilder(RISCV::LUI).addReg(DestReg).addImm(Inst.Imm)); + } else { + emitToStreamer(Out, MCInstBuilder(Inst.Opc).addReg(DestReg).addReg(SrcReg).addImm(Inst.Imm)); + } + SrcReg = DestReg; + } + return false; + } + case RISCV::PseudoLLA: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLA: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + unsigned SecondOpcode; + RISCVMCExpr::VariantKind VKHi; + if (ParserOptions.IsPicEnabled) { + SecondOpcode = isRV64() ? RISCV::LD : RISCV::LW; + VKHi = RISCVMCExpr::VK_RISCV_GOT_HI; + } else { + SecondOpcode = RISCV::ADDI; + VKHi = RISCVMCExpr::VK_RISCV_PCREL_HI; + } + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLA_TLS_IE: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + unsigned SecondOpcode = isRV64() ? RISCV::LD : RISCV::LW; + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLA_TLS_GD: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLB: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLBU: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLHU: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLWU: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFLH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFLW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFLD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSB: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFSH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFSW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFSD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoAddTPRel: + assert(Inst.getOpcode() == RISCV::PseudoAddTPRel && "Invalid instruction"); + assert(Inst.getOperand(2).isReg() && "Unexpected second operand kind"); + if (Inst.getOperand(2).getReg() != RISCV::X4) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[3]).getStartLoc(); + return Error(ErrorLoc, "the second input operand must be tp/x4 when using %tprel_add modifier"); + } + break; + case RISCV::PseudoSEXT_B: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoSEXT_H: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoZEXT_H: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoZEXT_W: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoVMSGEU_VX: + case RISCV::PseudoVMSGEU_VX_M: + case RISCV::PseudoVMSGEU_VX_M_T: + if (Inst.getNumOperands() == 3) { + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addReg(RISCV::NoRegister)); + emitToStreamer(Out, MCInstBuilder(RISCV::VMNAND_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0))); + } + else if (Inst.getNumOperands() == 4) { + assert(Inst.getOperand(0).getReg() != RISCV::V0 && "The destination register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMXOR_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addReg(RISCV::V0)); + } + else if (Inst.getNumOperands() == 5) { + assert(Inst.getOperand(0).getReg() == RISCV::V0 && "The destination register should be V0."); + assert(Inst.getOperand(1).getReg() != RISCV::V0 && "The temporary vector register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3)).addOperand(Inst.getOperand(4))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMANDNOT_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1))); + } + return false; + case RISCV::PseudoVMSGE_VX: + case RISCV::PseudoVMSGE_VX_M: + case RISCV::PseudoVMSGE_VX_M_T: + if (Inst.getNumOperands() == 3) { + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addReg(RISCV::NoRegister)); + emitToStreamer(Out, MCInstBuilder(RISCV::VMNAND_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0))); + } + else if (Inst.getNumOperands() == 4) { + assert(Inst.getOperand(0).getReg() != RISCV::V0 && "The destination register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMXOR_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addReg(RISCV::V0)); + } + else if (Inst.getNumOperands() == 5) { + assert(Inst.getOperand(0).getReg() == RISCV::V0 && "The destination register should be V0."); + assert(Inst.getOperand(1).getReg() != RISCV::V0 && "The temporary vector register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3)).addOperand(Inst.getOperand(4))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMANDNOT_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1))); + } + return false; + case RISCV::PseudoVMSGE_VI: + case RISCV::PseudoVMSLT_VI: { + int64_t Imm = Inst.getOperand(2).getImm(); + unsigned Opc = Inst.getOpcode() == RISCV::PseudoVMSGE_VI ? RISCV::VMSGT_VI : RISCV::VMSLE_VI; + emitToStreamer(Out, MCInstBuilder(Opc).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addImm(Imm - 1).addOperand(Inst.getOperand(3))); + return false; + } + case RISCV::PseudoVMSGEU_VI: + case RISCV::PseudoVMSLTU_VI: { + int64_t Imm = Inst.getOperand(2).getImm(); + if (Imm == 0) { + unsigned Opc = Inst.getOpcode() == RISCV::PseudoVMSGEU_VI ? RISCV::VMSEQ_VV : RISCV::VMSNE_VV; + emitToStreamer(Out, MCInstBuilder(Opc).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(3))); + } + else { + unsigned Opc = Inst.getOpcode() == RISCV::PseudoVMSGEU_VI ? RISCV::VMSGTU_VI : RISCV::VMSLEU_VI; + emitToStreamer(Out, MCInstBuilder(Opc).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addImm(Imm - 1).addOperand(Inst.getOperand(3))); + } + return false; + } + } + emitToStreamer(Out, Inst); + return false; + case Match_MissingFeature: { + assert(MissingFeatures.any() && "Unknown missing features!"); + bool FirstFeature = true; + std::string Msg = "instruction requires the following:"; + for (unsigned i = 0, e = MissingFeatures.size(); i != e; ++i) { + if (MissingFeatures[i]) { + Msg += FirstFeature ? " " : ", "; + Msg += getSubtargetFeatureName(i); + FirstFeature = false; + } + } + return Error(IDLoc, Msg); + } + case Match_MnemonicFail: { + FeatureBitset FBS = ComputeAvailableFeatures(getSTI().getFeatureBits()); + std::string Suggestion = RISCVMnemonicSpellCheck(((RISCVOperand &)*Operands[0]).getToken(), FBS); + return Error(IDLoc, "unrecognized instruction mnemonic" + Suggestion); + } + case Match_InvalidOperand: { + SMLoc ErrorLoc = IDLoc; + if (ErrorInfo != ~0U) { + if (ErrorInfo >= Operands.size()) { + return Error(ErrorLoc, "too few operands for instruction"); + } + ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + if (ErrorLoc == SMLoc()) { + ErrorLoc = IDLoc; + } + } + return Error(ErrorLoc, "invalid operand for instruction"); + } + } + if (Result > FIRST_TARGET_MATCH_RESULT_TY) { + SMLoc ErrorLoc = IDLoc; + if (ErrorInfo != ~0U && ErrorInfo >= Operands.size()) { + return Error(ErrorLoc, "too few operands for instruction"); + } + } + if (Result == Match_InvalidImmXLenLI) { + if (isRV64()) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be a constant 64-bit integer"); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, std::numeric_limits::min(), std::numeric_limits::max()); + } + if (Result == Match_InvalidImmZero) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "immediate must be zero"); + } + if (Result == Match_InvalidUImmLog2XLen) { + if (isRV64()) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 6) - 1); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1); + } + if (Result == Match_InvalidUImmLog2XLenNonZero) { + if (isRV64()) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 6) - 1); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5) - 1); + } + if (Result == Match_InvalidUImmLog2XLenHalf) { + if (isRV64()) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 4) - 1); + } + if (Result == Match_InvalidUImm5) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1); + } + if (Result == Match_InvalidSImm5) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 4), (1 << 4) - 1); + } + if (Result == Match_InvalidSImm6) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 5), (1 << 5) - 1); + } + if (Result == Match_InvalidSImm6NonZero) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 5), (1 << 5) - 1, "immediate must be non-zero in the range"); + } + if (Result == Match_InvalidCLUIImm) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5) - 1, "immediate must be in [0xfffe0, 0xfffff] or"); + } + if (Result == Match_InvalidUImm7Lsb00) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 7) - 4, "immediate must be a multiple of 4 bytes in the range"); + } + if (Result == Match_InvalidUImm8Lsb00) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 8) - 4, "immediate must be a multiple of 4 bytes in the range"); + } + if (Result == Match_InvalidUImm8Lsb000) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 8) - 8, "immediate must be a multiple of 8 bytes in the range"); + } + if (Result == Match_InvalidSImm9Lsb0) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm9Lsb000) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm10Lsb00NonZero) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm10Lsb0000NonZero) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm12) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm12Lsb0) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm13Lsb0) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm20LUI) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm20AUIPC) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm21Lsb0JAL) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidCSRSystemRegister) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidFenceArg) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidFRMArg) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidBareSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidPseudoJumpSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidCallSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidTPRelAddSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidVTypeI) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidVMaskRegister) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidSImm5Plus1) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 4) + 1, (1 << 4), "immediate must be in the range"); + } + llvm_unreachable("Unknown match type detected!"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/Operand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ad138dbf9306883ea3346180a9391df10b1586d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/Operand.cpp @@ -0,0 +1,2 @@ +RISCVOperand(KindTy K) : MCParsedAsmOperand(), Kind(K) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/Operand2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/Operand2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63faea7f475d64855bbadb5f070b7ef2b0026308 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/Operand2.cpp @@ -0,0 +1,21 @@ +RISCVOperand(const RISCVOperand &o) : MCParsedAsmOperand() { + Kind = o.Kind; + IsRV64 = o.IsRV64; + StartLoc = o.StartLoc; + EndLoc = o.EndLoc; + if (Kind == KindTy::Register) { + Reg = o.Reg; + } + if (Kind == KindTy::Immediate) { + Imm = o.Imm; + } + if (Kind == KindTy::Token) { + Tok = o.Tok; + } + if (Kind == KindTy::SystemRegister) { + SysReg = o.SysReg; + } + if (Kind == KindTy::VType) { + VType = o.VType; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseDirective.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseDirective.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af12e125e12358102bf5a3e08bf0bd44dfaf4e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseDirective.cpp @@ -0,0 +1,437 @@ +bool RISCVAsmParser::ParseDirective(AsmToken DirectiveID) { + StringRef IDVal = DirectiveID.getString(); + if (IDVal == ".option") { + MCAsmParser &Parser = getParser(); + AsmToken Tok = Parser.getTok(); + if (Tok.isNot(AsmToken::Identifier)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected identifier"); + } + StringRef Option = Tok.getIdentifier(); + if (Option == "push") { + getTargetStreamer().emitDirectiveOptionPush(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + assert(FeatureBitStack.size() == ParserOptionsStack.size() && "These two stacks must be kept synchronized"); + FeatureBitStack.push_back(getSTI().getFeatureBits()); + ParserOptionsStack.push_back(ParserOptions); + return false; + } + if (Option == "pop") { + SMLoc StartLoc = Parser.getTok().getLoc(); + getTargetStreamer().emitDirectiveOptionPop(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + assert(FeatureBitStack.size() == ParserOptionsStack.size() && "These two stacks must be kept synchronized"); + if (FeatureBitStack.empty()) { + return Error(StartLoc, ".option pop with no .option push"); + } + FeatureBitset FeatureBits = FeatureBitStack.pop_back_val(); + copySTI().setFeatureBits(FeatureBits); + setAvailableFeatures(ComputeAvailableFeatures(FeatureBits)); + ParserOptions = ParserOptionsStack.pop_back_val(); + return false; + } + if (Option == "rvc") { + getTargetStreamer().emitDirectiveOptionRVC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + setFeatureBits(RISCV::FeatureStdExtC, "c"); + return false; + } + if (Option == "norvc") { + getTargetStreamer().emitDirectiveOptionNoRVC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + clearFeatureBits(RISCV::FeatureStdExtC, "c"); + return false; + } + if (Option == "pic") { + getTargetStreamer().emitDirectiveOptionPIC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + ParserOptions.IsPicEnabled = true; + return false; + } + if (Option == "nopic") { + getTargetStreamer().emitDirectiveOptionNoPIC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + ParserOptions.IsPicEnabled = false; + return false; + } + if (Option == "relax") { + getTargetStreamer().emitDirectiveOptionRelax(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + setFeatureBits(RISCV::FeatureRelax, "relax"); + return false; + } + if (Option == "norelax") { + getTargetStreamer().emitDirectiveOptionNoRelax(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + clearFeatureBits(RISCV::FeatureRelax, "relax"); + return false; + } + Warning(Parser.getTok().getLoc(), "unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'relax' or 'norelax'"); + Parser.eatToEndOfStatement(); + return false; + } + else if (IDVal == ".attribute") { + MCAsmParser &Parser = getParser(); + int64_t Tag; + SMLoc TagLoc; + TagLoc = Parser.getTok().getLoc(); + if (Parser.getTok().is(AsmToken::Identifier)) { + StringRef Name = Parser.getTok().getIdentifier(); + Optional Ret = ELFAttrs::attrTypeFromString(Name, RISCVAttrs::RISCVAttributeTags); + if (!Ret.hasValue()) { + Error(TagLoc, "attribute name not recognised: " + Name); + return false; + } + Tag = Ret.getValue(); + Parser.Lex(); + } + else { + const MCExpr *AttrExpr; + TagLoc = Parser.getTok().getLoc(); + if (Parser.parseExpression(AttrExpr)) { + return true; + } + const MCConstantExpr *CE = dyn_cast(AttrExpr); + if (check(!CE, TagLoc, "expected numeric constant")) { + return true; + } + Tag = CE->getValue(); + } + if (Parser.parseToken(AsmToken::Comma, "comma expected")) { + return true; + } + StringRef StringValue; + int64_t IntegerValue = 0; + bool IsIntegerValue = true; + if (Tag % 2) { + IsIntegerValue = false; + } + SMLoc ValueExprLoc = Parser.getTok().getLoc(); + if (IsIntegerValue) { + const MCExpr *ValueExpr; + if (Parser.parseExpression(ValueExpr)) { + return true; + } + const MCConstantExpr *CE = dyn_cast(ValueExpr); + if (!CE) { + return true; + } + IntegerValue = CE->getValue(); + } + else { + if (Parser.getTok().isNot(AsmToken::String)) { + return Error(Parser.getTok().getLoc(), "expected string constant"); + } + StringValue = Parser.getTok().getStringContents(); + Parser.Lex(); + } + if (Parser.parseToken(AsmToken::EndOfStatement, "unexpected token in '.attribute' directive")) { + return true; + } + if (Tag == RISCVAttrs::ARCH) { + StringRef Arch = StringValue; + if (Arch.consume_front("rv32")) { + if (getSTI().getFeatureBits()[RISCV::Feature64Bit]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("64bit"))); + } + } + else if (Arch.consume_front("rv64")) { + setFeatureBits(RISCV::Feature64Bit, "64bit"); + } + else { + return Error(ValueExprLoc, "bad arch string " + Arch); + } + if (getSTI().getFeatureBits()[RISCV::FeatureRV32E]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("e"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtM]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("m"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtA]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("a"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtF]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("f"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtD]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("d"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtC]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("c"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtB]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-b"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtV]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-v"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZfh]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zfh"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZba]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zba"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbb]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbb"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbc]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbc"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbe]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbe"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbf]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbf"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbm]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbm"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbp]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbp"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbproposedc]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbproposedc"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbr]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbr"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbs]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbs"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbt]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbt"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZvamo]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zvamo"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtZvlsseg]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zvlsseg"))); + } + while (!Arch.empty()) { + bool DropFirst = true; + if (Arch[0] == 'i') { + if (getSTI().getFeatureBits()[RISCV::FeatureRV32E]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("e"))); + } + } + else if (Arch[0] == 'e') { + setFeatureBits(RISCV::FeatureRV32E, "e"); + } + else if (Arch[0] == 'g') { + if (getSTI().getFeatureBits()[RISCV::FeatureRV32E]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("e"))); + } + setFeatureBits(RISCV::FeatureStdExtM, "m"); + setFeatureBits(RISCV::FeatureStdExtA, "a"); + setFeatureBits(RISCV::FeatureStdExtF, "f"); + setFeatureBits(RISCV::FeatureStdExtD, "d"); + } + else if (Arch[0] == 'm') { + setFeatureBits(RISCV::FeatureStdExtM, "m"); + } + else if (Arch[0] == 'a') { + setFeatureBits(RISCV::FeatureStdExtA, "a"); + } + else if (Arch[0] == 'f') { + setFeatureBits(RISCV::FeatureStdExtF, "f"); + } + else if (Arch[0] == 'd') { + setFeatureBits(RISCV::FeatureStdExtF, "f"); + setFeatureBits(RISCV::FeatureStdExtD, "d"); + } + else if (Arch[0] == 'c') { + setFeatureBits(RISCV::FeatureStdExtC, "c"); + } + else if (Arch[0] == 'b') { + setFeatureBits(RISCV::FeatureStdExtB, "experimental-b"); + } + else if (Arch[0] == 'v') { + setFeatureBits(RISCV::FeatureStdExtV, "experimental-v"); + } + else if (Arch[0] == 's' || Arch[0] == 'x' || Arch[0] == 'z') { + StringRef Ext = Arch.take_until([](char c) { return ::isdigit(c) || c == '_'; }); + if (Ext == "zba") { + setFeatureBits(RISCV::FeatureExtZba, "experimental-zba"); + } + else if (Ext == "zbb") { + setFeatureBits(RISCV::FeatureExtZbb, "experimental-zbb"); + } + else if (Ext == "zbc") { + setFeatureBits(RISCV::FeatureExtZbc, "experimental-zbc"); + } + else if (Ext == "zbe") { + setFeatureBits(RISCV::FeatureExtZbe, "experimental-zbe"); + } + else if (Ext == "zbf") { + setFeatureBits(RISCV::FeatureExtZbf, "experimental-zbf"); + } + else if (Ext == "zbm") { + setFeatureBits(RISCV::FeatureExtZbm, "experimental-zbm"); + } + else if (Ext == "zbp") { + setFeatureBits(RISCV::FeatureExtZbp, "experimental-zbp"); + } + else if (Ext == "zbproposedc") { + setFeatureBits(RISCV::FeatureExtZbproposedc, "experimental-zbproposedc"); + } + else if (Ext == "zbr") { + setFeatureBits(RISCV::FeatureExtZbr, "experimental-zbr"); + } + else if (Ext == "zbs") { + setFeatureBits(RISCV::FeatureExtZbs, "experimental-zbs"); + } + else if (Ext == "zbt") { + setFeatureBits(RISCV::FeatureExtZbt, "experimental-zbt"); + } + else if (Ext == "zfh") { + setFeatureBits(RISCV::FeatureExtZfh, "experimental-zfh"); + } + else if (Ext == "zvamo") { + setFeatureBits(RISCV::FeatureExtZvamo, "experimental-zvamo"); + } + else if (Ext == "zvlsseg") { + setFeatureBits(RISCV::FeatureStdExtZvlsseg, "experimental-zvlsseg"); + } + else { + return Error(ValueExprLoc, "bad arch string " + Ext); + } + Arch = Arch.drop_until([](char c) { return ::isdigit(c) || c == '_'; }); + DropFirst = false; + } + else { + return Error(ValueExprLoc, "bad arch string " + Arch); + } + if (DropFirst) { + Arch = Arch.drop_front(1); + } + int major = 0; + int minor = 0; + Arch.consumeInteger(10, major); + Arch.consume_front("p"); + Arch.consumeInteger(10, minor); + Arch = Arch.drop_while([](char c) { return c == '_'; }); + } + } + if (IsIntegerValue) { + getTargetStreamer().emitAttribute(Tag, IntegerValue); + } + else { + if (Tag != RISCVAttrs::ARCH) { + getTargetStreamer().emitTextAttribute(Tag, StringValue); + } + else { + std::string formalArchStr = "rv32"; + if (getFeatureBits(RISCV::Feature64Bit)) + formalArchStr = "rv64"; + if (getFeatureBits(RISCV::FeatureRV32E)) + formalArchStr = (Twine(formalArchStr) + "e1p9").str(); + else + formalArchStr = (Twine(formalArchStr) + "i2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtM)) + formalArchStr = (Twine(formalArchStr) + "_m2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtA)) + formalArchStr = (Twine(formalArchStr) + "_a2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtF)) + formalArchStr = (Twine(formalArchStr) + "_f2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtD)) + formalArchStr = (Twine(formalArchStr) + "_d2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtC)) + formalArchStr = (Twine(formalArchStr) + "_c2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtB)) + formalArchStr = (Twine(formalArchStr) + "_b0p93").str(); + if (getFeatureBits(RISCV::FeatureStdExtV)) + formalArchStr = (Twine(formalArchStr) + "_v0p10").str(); + if (getFeatureBits(RISCV::FeatureExtZfh)) + formalArchStr = (Twine(formalArchStr) + "_zfh0p1").str(); + if (getFeatureBits(RISCV::FeatureExtZba)) + formalArchStr = (Twine(formalArchStr) + "_zba0p93").str(); + if (getFeatureBits(RISCV::FeatureExtZbb)) + formalArchStr = (Twine(formalArchStr) + "_zbb0p93").str(); + if (getFeatureBits(RISCV::FeatureExtZbc)) { + formalArchStr = (Twine(formalArchStr) + "_zbc0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbe)) { + formalArchStr = (Twine(formalArchStr) + "_zbe0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbf)) { + formalArchStr = (Twine(formalArchStr) + "_zbf0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbm)) { + formalArchStr = (Twine(formalArchStr) + "_zbm0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbp)) { + formalArchStr = (Twine(formalArchStr) + "_zbp0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbproposedc)) { + formalArchStr = (Twine(formalArchStr) + "_zbproposedc0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbr)) { + formalArchStr = (Twine(formalArchStr) + "_zbr0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbs)) { + formalArchStr = (Twine(formalArchStr) + "_zbs0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbt)) { + formalArchStr = (Twine(formalArchStr) + "_zbt0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZvamo)) { + formalArchStr = (Twine(formalArchStr) + "_zvamo0p10").str(); + } + if (getFeatureBits(RISCV::FeatureStdExtZvlsseg)) { + formalArchStr = (Twine(formalArchStr) + "_zvlsseg0p10").str(); + } + getTargetStreamer().emitTextAttribute(Tag, formalArchStr); + } + } + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e9cdadb0936ababf2f6c45f59c54e181e9d21a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp @@ -0,0 +1,31 @@ +bool RISCVAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc, OperandVector &Operands) { + if (getSTI().getFeatureBits()[RISCV::FeatureRelax]) { + auto *Assembler = getTargetStreamer().getStreamer().getAssemblerPtr(); + if (Assembler != nullptr) { + RISCVAsmBackend &MAB = static_cast(Assembler->getBackend()); + MAB.setForceRelocs(); + } + } + Operands.push_back(RISCVOperand::createToken(Name, NameLoc, isRV64())); + if (getLexer().is(AsmToken::EndOfStatement)) { + return false; + } + if (parseOperand(Operands, Name)) { + return true; + } + unsigned OperandIdx = 1; + while (getLexer().is(AsmToken::Comma)) { + getLexer().Lex(); + if (parseOperand(Operands, Name)) { + return true; + } + ++OperandIdx; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + SMLoc Loc = getLexer().getLoc(); + getParser().eatToEndOfStatement(); + return Error(Loc, "unexpected token"); + } + getParser().Lex(); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5d4359121cc681b1667e4b723d63f8a260df120 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/ParseRegister.cpp @@ -0,0 +1,6 @@ +bool RISCVAsmParser::ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + if (tryParseRegister(RegNo, StartLoc, EndLoc) != MatchOperand_Success) { + return Error(StartLoc, "invalid register name"); + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ccc9683fc9110594147015b16f0c9b51543c0d2d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp @@ -0,0 +1,4 @@ +void addCSRSystemRegisterOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createImm(SysReg.Encoding)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..214fe9f44a01731c40c1084f3ff205132df9e262 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addExpr.cpp @@ -0,0 +1,12 @@ +void addExpr(MCInst &Inst, const MCExpr *Expr) const { + assert(Expr && "Expr shouldn't be null!"); + int64_t Imm = 0; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstant = evaluateConstantImm(Expr, Imm, VK); + if (IsConstant) { + Inst.addOperand(MCOperand::createImm(Imm)); + } + else { + Inst.addOperand(MCOperand::createExpr(Expr)); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73d49a88563d2c4aca26d1c150579bc82e0babf2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp @@ -0,0 +1,4 @@ +void addFRMArgOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createImm(getRoundingMode())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..792d4fa164c9d9d497708692cc4167f5c14775a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp @@ -0,0 +1,16 @@ +void addFenceArgOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + auto SE = cast(getImm()); + unsigned Imm = 0; + for (char c : SE->getSymbol().getName()) { + switch (c) { + default: + llvm_unreachable("FenceArg must contain only [iorw]"); + case 'i': Imm |= RISCVFenceField::I; break; + case 'o': Imm |= RISCVFenceField::O; break; + case 'r': Imm |= RISCVFenceField::R; break; + case 'w': Imm |= RISCVFenceField::W; break; + } + } + Inst.addOperand(MCOperand::createImm(Imm)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addImmOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addImmOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a69f8ac923d9234ea41ac4606011cacda986f3e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addImmOperands.cpp @@ -0,0 +1,4 @@ +void addImmOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + addExpr(Inst, getImm()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addRegOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addRegOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0238a375be523b4d683ea934130d2e5390c7dfa7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addRegOperands.cpp @@ -0,0 +1,4 @@ +void addRegOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createReg(getReg())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47fb952384ac089c38b1615985b2fdd2e107225f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp @@ -0,0 +1,4 @@ +void addVTypeIOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createImm(getVType())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e84a90bbcd6b57ad4a18f3de6f079fab9ea6ef6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp @@ -0,0 +1,13 @@ +bool RISCVAsmParser::classifySymbolRef(const MCExpr *Expr, MCExpr::VariantKind &Kind) { + Kind = RISCVMCExpr::VK_RISCV_None; + if (const RISCVMCExpr *RE = dyn_cast(Expr)) { + Kind = RE->getKind(); + Expr = RE->getSubExpr(); + } + MCValue Res; + MCFixup Fixup; + if (Expr->evaluateAsRelocatable(Res, nullptr, &Fixup)) { + return Res.getRefKind() == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e026cba6a73b81985778dc9bb3c9d65b32fb1666 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR16(MCRegister Reg) { + assert(Reg >= RISCV::F0_D && Reg <= RISCV::F31_D && "Invalid register"); + return Reg - RISCV::F0_D + RISCV::F0_H; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f4dc9ae940f1dd462ac08522f4c04f563e554d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR32(MCRegister Reg) { + assert(Reg >= RISCV::F0_D && Reg <= RISCV::F31_D && "Invalid register"); + return Reg - RISCV::F0_D + RISCV::F0_F; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..399ee2614f3b539f1368f7c10cdc6e506119e381 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createImm.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr createImm(const MCExpr *Val, SMLoc S, SMLoc E, bool IsRV64) { + auto Op = std::make_unique(KindTy::Immediate); + Op->Imm.Val = Val; + Op->StartLoc = S; + Op->EndLoc = E; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c2c43a6a8093aa2194f4fba74917b2fc21eb193 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createReg.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr createReg(unsigned RegNo, SMLoc S, SMLoc E, bool IsRV64) { + auto Op = std::make_unique(KindTy::Register); + Op->Reg.RegNum = RegNo; + Op->StartLoc = S; + Op->EndLoc = E; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createSysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b7a2657c346e52c22ccd28703bc5baa75cff344 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createSysReg.cpp @@ -0,0 +1,9 @@ +static std::unique_ptr createSysReg(StringRef Str, SMLoc S, unsigned Encoding, bool IsRV64) { + auto Op = std::make_unique(KindTy::SystemRegister); + Op->SysReg.Data = Str.data(); + Op->SysReg.Length = Str.size(); + Op->SysReg.Encoding = Encoding; + Op->StartLoc = S; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createToken.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdaa650df5adf6dc96daae935f42ae08ac7f4283 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createToken.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr createToken(StringRef Str, SMLoc S, bool IsRV64) { + auto Op = std::make_unique(KindTy::Token); + Op->Tok = Str; + Op->StartLoc = S; + Op->EndLoc = S; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createVType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4deb57ffa06e779c7e3e92cae9f34bdba8a9d9b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/createVType.cpp @@ -0,0 +1,7 @@ +static std::unique_ptr createVType(unsigned VTypeI, SMLoc S, bool IsRV64) { + auto Op = std::make_unique(KindTy::VType); + Op->VType.Val = VTypeI; + Op->StartLoc = S; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b022f4d2360a1bb7aae0c7121a89aae81ffb4c75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp @@ -0,0 +1,3 @@ +std::unique_ptr RISCVAsmParser::defaultMaskRegOp() const { + return RISCVOperand::createReg(RISCV::NoRegister, llvm::SMLoc(), llvm::SMLoc(), isRV64()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..85deea136f491e311c7514cc7cc3319a332e069d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp @@ -0,0 +1,9 @@ +void RISCVAsmParser::emitToStreamer(MCStreamer &S, const MCInst &Inst) { + MCInst CInst; + bool Res = false; + Res = compressInst(CInst, Inst, getSTI(), S.getContext()); + if (Res) { + RISCVNumInstrsCompressed = RISCVNumInstrsCompressed + 1; + } + S.emitInstruction((Res ? CInst : Inst), getSTI()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66157e504bc3b499d080b12e3a0c1b14ae434c52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp @@ -0,0 +1,12 @@ +static bool evaluateConstantImm(const MCExpr *Expr, int64_t &Imm, RISCVMCExpr::VariantKind &VK) { + if (auto *RE = dyn_cast(Expr)) { + VK = RE->getKind(); + return RE->evaluateAsConstant(Imm); + } + if (auto CE = dyn_cast(Expr)) { + VK = RISCVMCExpr::VK_RISCV_None; + Imm = CE->getValue(); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38a0c63d84cc29155e89b8f20de13c896c70af91 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp @@ -0,0 +1,4 @@ +bool RISCVAsmParser::generateImmOutOfRangeError(OperandVector &Operands, uint64_t ErrorInfo, int64_t Lower, int64_t Upper, Twine Msg = "immediate must be an integer in the range") { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, Msg + " [" + Twine(Lower) + ", " + Twine(Upper) + "]"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getEndLoc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getEndLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62829900d768fc89d50171419f738e8ec8124b58 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getEndLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getEndLoc() const override { + return EndLoc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8b7d6acceee057eaf23f6023ac5aa0493a08037 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp @@ -0,0 +1,3 @@ +bool getFeatureBits(uint64_t Feature) { + return getFeatureBits()[Feature]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..680aa6e8b7c97665bca7b25e7ba715d083360048 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getImm.cpp @@ -0,0 +1,4 @@ +const MCExpr *getImm() const { + assert(Kind == KindTy::Immediate && "Invalid type access!"); + return Imm.Val; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getLoc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee06922bf6091cbb8ed19c3dcc5b42aa0335fbc5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getLoc() const { + return getParser().getTok().getLoc(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b727268741262d50d0b7be12f8f224ae221d70d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const override { + assert(Kind == KindTy::Register && "Invalid type access!"); + return Reg.RegNum.id(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59bafeff69c9ddbdeac847d8c5295be2781a6739 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp @@ -0,0 +1,6 @@ +RISCVFPRndMode::RoundingMode getRoundingMode() const { + auto SE = cast(getImm()); + RISCVFPRndMode::RoundingMode FRM = RISCVFPRndMode::stringToRoundingMode(SE->getSymbol().getName()); + assert(FRM != RISCVFPRndMode::Invalid && "Invalid rounding mode"); + return FRM; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getStartLoc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getStartLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1468c5ab73e31cdbf7622d7fb4cc05414acef937 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getStartLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getStartLoc() const override { + return StartLoc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getSysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c409acf907d63507ebf66c33bb6055965fddc7a7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getSysReg.cpp @@ -0,0 +1,4 @@ +StringRef getSysReg() const { + assert(Kind == KindTy::SystemRegister && "Invalid type access!"); + return StringRef(SysReg.Data, SysReg.Length); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3c9c2ce61d650ef0464f9b4aa2539d390a2e11e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp @@ -0,0 +1,4 @@ +RISCVTargetStreamer &getTargetStreamer() { + MCTargetStreamer &TS = *getParser().getStreamer().getTargetStreamer(); + return static_cast(TS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getToken.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..445834686b5ec1bb686bda4abcc004a4ec9ee82a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getToken.cpp @@ -0,0 +1,4 @@ +StringRef getToken() const { + assert(Kind == KindTy::Token && "Invalid type access!"); + return Tok; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getVType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..af123b58f738de16129e3a5fbb1a323ecf40eb1f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/getVType.cpp @@ -0,0 +1,4 @@ +unsigned getVType() const { + assert(Kind == KindTy::VType && "Invalid type access!"); + return VType.Val; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dfd9e592f1bb7c039a98e85fd4c7a525b677fe69 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp @@ -0,0 +1,16 @@ +template bool isBareSimmNLsb0() const { + if (!isImm()) { + return false; + } + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (IsConstantImm) { + IsValid = isShiftedInt(Imm); + } + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + } + return IsValid && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48a01b62fd0d0730ca3fbc3730793c50e55ab55a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp @@ -0,0 +1,14 @@ +bool isBareSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + if (evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f89c302eb8bc0bcfca47f2f9845303081503982d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp @@ -0,0 +1,11 @@ +bool isCLUIImm() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return (Imm != 0) && (isUInt<5>(Imm) || (Imm >= 0xfffe0 && Imm <= 0xfffff)) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ffb7bbbe9a914a516b01cc030bf81758a80e3270 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isCSRSystemRegister() const { + return Kind == KindTy::SystemRegister; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6142f6614dfe57e8c93e793847ae07ddf837848 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp @@ -0,0 +1,11 @@ +bool isCallSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + if (evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && (VK == RISCVMCExpr::VK_RISCV_CALL || VK == RISCVMCExpr::VK_RISCV_CALL_PLT); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isFRMArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98df83b42fc3323559573c60f0e7a30405f28bdb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isFRMArg.cpp @@ -0,0 +1,12 @@ +bool isFRMArg() const { + if (!isImm()) { + return false; + } + const MCExpr *Val = getImm(); + auto *SVal = dyn_cast(Val); + if (!SVal || SVal->getKind() != MCSymbolRefExpr::VK_None) { + return false; + } + StringRef Str = SVal->getSymbol().getName(); + return RISCVFPRndMode::stringToRoundingMode(Str) != RISCVFPRndMode::Invalid; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isFenceArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41d6f3f46374b1b9a6e6634a0de10b1bba1ef5ac --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isFenceArg.cpp @@ -0,0 +1,22 @@ +bool isFenceArg() const { + if (!isImm()) { + return false; + } + const MCExpr *Val = getImm(); + auto *SVal = dyn_cast(Val); + if (!SVal || SVal->getKind() != MCSymbolRefExpr::VK_None) { + return false; + } + StringRef Str = SVal->getSymbol().getName(); + char Prev = '\0'; + for (char c : Str) { + if (c != 'i' && c != 'o' && c != 'r' && c != 'w') { + return false; + } + if (c <= Prev) { + return false; + } + Prev = c; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isGPR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isGPR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2990020b5ef61ab36d27572763e8f15efb9772d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isGPR.cpp @@ -0,0 +1,3 @@ +bool isGPR() const { + return Kind == KindTy::Register && RISCVMCRegisterClasses[RISCV::GPRRegClassID].contains(Reg.RegNum); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..400db8c5883144be4963e33031283ae54db7ddf7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const override { + return Kind == KindTy::Immediate; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b460d989d40ad769b6179758abfe2864344e640e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp @@ -0,0 +1,11 @@ +bool isImmXLenLI() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_LO || VK == RISCVMCExpr::VK_RISCV_PCREL_LO || (VK == RISCVMCExpr::VK_RISCV_None && (isRV64() || (isInt<32>(Imm) || isUInt<32>(Imm)))); + } + return IsValid && VK == zmtarzmMCExpr :: VK_RISCV_LO || VK == zmtarzmMCExpr :: VK_RISCV_PCREL_LO ; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isMem.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isMem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c43c1fbf793d7bd6d2e893e67962bd3cccf94715 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isMem.cpp @@ -0,0 +1,3 @@ +bool isMem() const override { + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eec91dbdac1b9ab829dccf99b39973eded1da5b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp @@ -0,0 +1,11 @@ +bool isPseudoJumpSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + if (evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_CALL; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV32E.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c21e42e5f798bcb0e6b8f92f3a3cc1dd96f87b44 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E() const { + return getSTI().hasFeature(RISCV::FeatureRV32E); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV64-2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV64-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..383cfa600df6dac196f2c01b85967a5b0fee19c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV64-2.cpp @@ -0,0 +1,3 @@ +bool isRV64() const { + return IsRV64; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV64.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eec7fe92227f97b819ea0ba36ff7b64f641acbce --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isRV64.cpp @@ -0,0 +1,3 @@ +bool isRV64() const { + return getSTI().hasFeature(RISCV::Feature64Bit); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcb79a981f0b63d5b3d34a12ff7dc35589d32480 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const override { + return Kind == KindTy::Register; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24d6dc2d00014b75b1869a58e1b07898a4404222 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm10Lsb0000NonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return (Imm != 0) && isShiftedInt<6, 4>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm12.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2dcd623be87da6b40f0c329d74836d9aca17d455 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm12.cpp @@ -0,0 +1,16 @@ +bool isSImm12() const { + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + } + else { + IsValid = isInt<12>(Imm); + } + return IsValid && ((IsConstantImm && VK == RISCVMCExpr::VK_RISCV_None) || VK == RISCVMCExpr::VK_RISCV_LO || VK == RISCVMCExpr::VK_RISCV_PCREL_LO || VK == RISCVMCExpr::VK_RISCV_TPREL_LO); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63073bc64c003ca0e83e707b57b7a4ea9c9ce158 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm12Lsb0() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<11, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f6c636265bd63d8a777132c2a0eb78dbb54be86 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm13Lsb0() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<12, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b33656f8aabf36763566f623cf1f73adabe6177f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp @@ -0,0 +1,14 @@ +bool isSImm21Lsb0JAL() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<20, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b64ab3a9e82f435809b69ee895c34d33b707169 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm5.cpp @@ -0,0 +1,11 @@ +bool isSImm5() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<5>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe561ca354d6609427bfe55244528003bf886fd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp @@ -0,0 +1,11 @@ +bool isSImm5Plus1() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<5>(Imm - 1) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm6.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b111421d4683f6af55ac579d99981703d94ad9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm6.cpp @@ -0,0 +1,11 @@ +bool isSImm6() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<6>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b717a48ce5bbedd11d8b6a832de0ef2f398f66d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm6NonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<6>(Imm) && (Imm != 0) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ad3cbc4906910b459fb690b753c04ad71f3c7c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm9Lsb0() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<8, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f392bfff3b4e8e84b2ff2a1435e84f8d71aa647 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isSystemRegister() const { + return Kind == KindTy::SystemRegister; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbd00f01251645ec33d1af74a00e138f137a715c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp @@ -0,0 +1,8 @@ +bool isTPRelAddSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm() || evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_TPREL_ADD; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isToken.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1dfb1dd6786afb1f04ef6c6a933834f7bf532f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isToken.cpp @@ -0,0 +1,3 @@ +bool isToken() const override { + return Kind == KindTy::Token; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7a4b5b9b58ffe125f4a0cc5cddc62daf6255dc3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm1.cpp @@ -0,0 +1,9 @@ +bool isUImm1() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isUInt<1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e919d0e2c50071258ae1f27c9354a25e023d0c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp @@ -0,0 +1,11 @@ +bool isUImm10Lsb00NonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedUInt<8, 2>(Imm) && (Imm != 0) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm12.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..217a4d76c95bfa35ee512214b63fa497d2a6478c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm12.cpp @@ -0,0 +1,16 @@ +bool isUImm12() const { + RISCVMCExpr::VariantKind VK; + int64_t Imm; + bool IsValid; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + } + else { + IsValid = isUInt<12>(Imm); + } + return IsValid && ((IsConstantImm && VK == RISCVMCExpr::VK_RISCV_None) || VK == RISCVMCExpr::VK_RISCV_LO || VK == RISCVMCExpr::VK_RISCV_PCREL_LO || VK == RISCVMCExpr::VK_RISCV_TPREL_LO); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef62975a219e5dd8e2789a537c91854699273287 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp @@ -0,0 +1,9 @@ +bool isUImm12M1() const { + if (!isImm()) { + return false; + } + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isUInt<12>(Imm) && (Imm != 0) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6bbf8b9df408abe759c8eeeaf32eea827d816dc9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp @@ -0,0 +1,9 @@ +bool isUImm13Lsb0() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<12, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89b7a149611af05f335eaf59e3f8cd3648411d75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp @@ -0,0 +1,16 @@ +bool isUImm20AUIPC() const { + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + return IsValid && (VK == RISCVMCExpr::VK_RISCV_PCREL_HI || VK == RISCVMCExpr::VK_RISCV_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GD_HI); + } + else { + return isUInt<20>(Imm) && (VK == RISCVMCExpr::VK_RISCV_None || VK == RISCVMCExpr::VK_RISCV_PCREL_HI || VK == RISCVMCExpr::VK_RISCV_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GD_HI); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..923f243b5e92bda4596b995757b38cfc685d1ec9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp @@ -0,0 +1,16 @@ +bool isUImm20LUI() const { + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + return IsValid && (VK == RISCVMCExpr::VK_RISCV_HI || VK == RISCVMCExpr::VK_RISCV_TPREL_HI); + } + else { + return isUInt<20>(Imm) && (VK == RISCVMCExpr::VK_RISCV_None || VK == RISCVMCExpr::VK_RISCV_HI || VK == RISCVMCExpr::VK_RISCV_TPREL_HI); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm3.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2153b241ddd40511331dd4303dbc0530c58398c1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm3.cpp @@ -0,0 +1,9 @@ +bool isUImm3() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isUInt<3>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm4.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm4.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d2e08c7ba12d0a6bcba3bbaafe7b9a79c27a6d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm4.cpp @@ -0,0 +1,9 @@ +bool isUImm4() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isUInt<4>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b18cb034281c59c4c483e7321ee15b4dcafff652 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm5.cpp @@ -0,0 +1,9 @@ +bool isUImm5() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isUInt<5>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm6.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1b95853447047f6d14cdefe9b4f4e452a5d2f32 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm6.cpp @@ -0,0 +1,9 @@ +bool isUImm6() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isUInt<6>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..234cb7b22253e6019bf4ce64a42c24ef26df1389 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp @@ -0,0 +1,16 @@ +bool isUImm6Lsb0() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + bool IsValid; + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + } + else { + IsValid = isShiftedUInt<5, 1>(Imm); + } + return IsValid && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24c29da9a8cbed9c78d112302095c0013b32a31b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp @@ -0,0 +1,9 @@ +bool isUImm7Lsb00() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<5, 2>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ccc5fd5ffb3c7162ff7165e1f056db0ff5f0f83 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp @@ -0,0 +1,9 @@ +bool isUImm8Lsb00() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<6, 2>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7eff26abdf3912a7976c2c7a67e9a024b47ea6bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp @@ -0,0 +1,9 @@ +bool isUImm8Lsb000() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<5, 3>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06310c952d4c996d47144ed5e65f84d235458aaf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp @@ -0,0 +1,9 @@ +bool isUImm9Lsb000() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<6, 3>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..76c5c7d94ae735807c0e08a8ba26d4a441ba3b1d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLen() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_None && ((isRV64() && isUInt<6>(Imm)) || isUInt<5>(Imm)); + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e962acbdddc793ea296bb646aa7e1829f29c1078 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenHalf() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a00a205afacb1a8befa223480ef0e27092c6336 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenNonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isV0Reg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isV0Reg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3925060552980f02dcfb4ddf2b3390f7ee29ab33 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isV0Reg.cpp @@ -0,0 +1,3 @@ +bool isV0Reg() const { + return Kind == KindTy::Register && Reg.RegNum == RISCV::V0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isVType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19e3cbf2a0f73d6ef2c860853164a4697d40546f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isVType.cpp @@ -0,0 +1,3 @@ +bool isVType() const { + return Kind == KindTy::VType; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isVTypeI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19e3cbf2a0f73d6ef2c860853164a4697d40546f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/isVTypeI.cpp @@ -0,0 +1,3 @@ +bool isVType() const { + return Kind == KindTy::VType; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27ae49e62bcf881645cbe1722de6c7742918c0d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp @@ -0,0 +1,14 @@ +static bool matchRegisterNameHelper(bool IsRV32E, MCRegister &RegNo, StringRef Name) { + RegNo = MatchRegisterName(Name); + assert(!(RegNo >= RISCV::F0_H && RegNo <= RISCV::F31_H)); + assert(!(RegNo >= RISCV::F0_F && RegNo <= RISCV::F31_F)); + static_assert(RISCV::F0_D < RISCV::F0_H, "FPR matching must be updated"); + static_assert(RISCV::F0_D < RISCV::F0_F, "FPR matching must be updated"); + if (RegNo == RISCV::NoRegister) { + RegNo = MatchRegisterAltName(Name); + } + if (IsRV32E && RegNo >= RISCV::X16 && RegNo <= RISCV::X31) { + RegNo = RISCV::NoRegister; + } + return RegNo == RISCV::NoRegister; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73fa5f840b2095a3ff4d84b0a43741fcb127a04b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp @@ -0,0 +1,31 @@ +OperandMatchResultTy RISCVAsmParser::parseAtomicMemOp(OperandVector &Operands) { + std::unique_ptr OptionalImmOp; + if (getLexer().isNot(AsmToken::LParen)) { + int64_t ImmVal; + SMLoc ImmStart = getLoc(); + if (getParser().parseIntToken(ImmVal, "expected '(' or optional integer offset")) { + return MatchOperand_ParseFail; + } + SMLoc ImmEnd = getLoc(); + OptionalImmOp = RISCVOperand::createImm(MCConstantExpr::create(ImmVal, getContext()), ImmStart, ImmEnd, isRV64()); + } + if (getLexer().isNot(AsmToken::LParen)) { + Error(getLoc(), OptionalImmOp ? "expected '(' after optional integer offset" : "expected '(' or optional integer offset"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (parseRegister(Operands) != MatchOperand_Success) { + Error(getLoc(), "expected register"); + return MatchOperand_ParseFail; + } + if (getLexer().isNot(AsmToken::RParen)) { + Error(getLoc(), "expected ')'"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (OptionalImmOp && !OptionalImmOp->isImmZero()) { + Error(OptionalImmOp->getStartLoc(), "optional integer offset must be 0", SMRange(OptionalImmOp->getStartLoc(), OptionalImmOp->getEndLoc())); + return MatchOperand_ParseFail; + } + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57f7bc977450d3c2da02c005d74f59303d313ad1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp @@ -0,0 +1,54 @@ +OperandMatchResultTy RISCVAsmParser::parseBareSymbol(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + StringRef Identifier; + AsmToken Tok = getLexer().getTok(); + if (getParser().parseIdentifier(Identifier)) { + return MatchOperand_ParseFail; + } + if (Identifier.consume_back("@plt")) { + Error(getLoc(), "'@plt' operand not valid for instruction"); + return MatchOperand_ParseFail; + } + MCSymbol *Sym = getContext().getOrCreateSymbol(Identifier); + if (Sym->isVariable()) { + const MCExpr *V = Sym->getVariableValue(false); + if (!isa(V)) { + getLexer().UnLex(Tok); + return MatchOperand_NoMatch; + } + Res = V; + } + if (!Sym->isVariable()) { + Res = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext()); + } + MCBinaryExpr::Opcode Opcode; + if (getLexer().getKind() == AsmToken::Plus) { + Opcode = MCBinaryExpr::Add; + getLexer().Lex(); + const MCExpr *Expr; + if (getParser().parseExpression(Expr)) { + return MatchOperand_ParseFail; + } + Res = MCBinaryExpr::create(Opcode, Res, Expr, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; + } + if (getLexer().getKind() == AsmToken::Minus) { + Opcode = MCBinaryExpr::Sub; + getLexer().Lex(); + const MCExpr *Expr; + if (getParser().parseExpression(Expr)) { + return MatchOperand_ParseFail; + } + Res = MCBinaryExpr::create(Opcode, Res, Expr, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; + } + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96d54657bc5e40fad131f08a4c6c265d5da2663c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp @@ -0,0 +1,58 @@ +OperandMatchResultTy RISCVAsmParser::parseCSRSystemRegister(OperandVector &Operands) { + SMLoc S = getLoc(); + const MCExpr *Res; + switch (getLexer().getKind()) { + default: + return MatchOperand_NoMatch; + case AsmToken::LParen: + case AsmToken::Minus: + case AsmToken::Plus: + case AsmToken::Exclaim: + case AsmToken::Tilde: + case AsmToken::Integer: + case AsmToken::String: { + if (getParser().parseExpression(Res)) { + return MatchOperand_ParseFail; + } + auto *CE = dyn_cast(Res); + if (CE) { + int64_t Imm = CE->getValue(); + if (isUInt<12>(Imm)) { + auto SysReg = RISCVSysReg::lookupSysRegByEncoding(Imm); + Operands.push_back(RISCVOperand::createSysReg(SysReg ? SysReg->Name : "", S, Imm, isRV64())); + return MatchOperand_Success; + } + } + Twine Msg = "immediate must be an integer in the range"; + Error(S, Msg + " [" + Twine(0) + ", " + Twine((1 << 12) - 1) + "]"); + return MatchOperand_ParseFail; + } + case AsmToken::Identifier: { + StringRef Identifier; + if (getParser().parseIdentifier(Identifier)) { + return MatchOperand_ParseFail; + } + auto SysReg = RISCVSysReg::lookupSysRegByName(Identifier); + if (!SysReg) { + SysReg = RISCVSysReg::lookupSysRegByAltName(Identifier); + } + if (SysReg) { + if (!SysReg->haveRequiredFeatures(getSTI().getFeatureBits())) { + Error(S, "system register use requires an option to be enabled"); + return MatchOperand_ParseFail; + } + Operands.push_back(RISCVOperand::createSysReg(Identifier, S, SysReg->Encoding, isRV64())); + return MatchOperand_Success; + } + Twine Msg = "operand must be a valid system register name or an integer in the range"; + Error(S, Msg + " [" + Twine(0) + ", " + Twine((1 << 12) - 1) + "]"); + return MatchOperand_ParseFail; + } + case AsmToken::Percent: { + Twine Msg = "immediate must be an integer in the range"; + Error(S, Msg + " [" + Twine(0) + ", " + Twine((1 << 12) - 1) + "]"); + return MatchOperand_ParseFail; + } + } + return MatchOperand_NoMatch; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe6a4808b76d4d27e94f8d2fb928ea9efcec5566 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp @@ -0,0 +1,24 @@ +OperandMatchResultTy RISCVAsmParser::parseCallSymbol(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + if (getLexer().peekTok().getKind() != AsmToken::EndOfStatement) { + return MatchOperand_NoMatch; + } + StringRef Identifier; + if (getParser().parseIdentifier(Identifier)) { + return MatchOperand_ParseFail; + } + RISCVMCExpr::VariantKind Kind = RISCVMCExpr::VK_RISCV_CALL; + if (Identifier.consume_back("@plt")) { + Kind = RISCVMCExpr::VK_RISCV_CALL_PLT; + } + MCSymbol *Sym = getContext().getOrCreateSymbol(Identifier); + Res = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext()); + Res = RISCVMCExpr::create(Res, Kind, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..feac87761130aaf45a8121dea0eae6f59102e1d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseImmediate.cpp @@ -0,0 +1,25 @@ +OperandMatchResultTy RISCVAsmParser::parseImmediate(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + switch (getLexer().getKind()) { + default: + return MatchOperand_NoMatch; + case AsmToken::LParen: + case AsmToken::Dot: + case AsmToken::Minus: + case AsmToken::Plus: + case AsmToken::Exclaim: + case AsmToken::Tilde: + case AsmToken::Integer: + case AsmToken::String: + case AsmToken::Identifier: + if (getParser().parseExpression(Res)) + return MatchOperand_ParseFail; + break; + case AsmToken::Percent: + return parseOperandWithModifier(Operands); + } + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4347a538d20ac2d19cd66ac66b94dea2d4ee61a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp @@ -0,0 +1,6 @@ +OperandMatchResultTy RISCVAsmParser::parseJALOffset(OperandVector &Operands) { + if (getLexer().is(AsmToken::Identifier) && getLexer().peekTok().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + return parseImmediate(Operands); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..901f42d5b8e97a73b21f91b7bc31ab4375d074a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp @@ -0,0 +1,23 @@ +OperandMatchResultTy RISCVAsmParser::parseMaskReg(OperandVector &Operands) { + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + StringRef Name = getLexer().getTok().getIdentifier(); + if (!Name.consume_back(".t")) { + Error(getLoc(), "expected '.t' suffix"); + return MatchOperand_ParseFail; + } + MCRegister RegNo; + matchRegisterNameHelper(isRV32E(), RegNo, Name); + if (RegNo == RISCV::NoRegister) { + return MatchOperand_NoMatch; + } + if (RegNo != RISCV::V0) { + return MatchOperand_NoMatch; + } + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + getLexer().Lex(); + Operands.push_back(RISCVOperand::createReg(RegNo, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..afb11381c7eb3dec6dd072e6e0a0cc194a3f41dd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp @@ -0,0 +1,25 @@ +OperandMatchResultTy RISCVAsmParser::parseMemOpBaseReg(OperandVector &Operands) { + if (getLexer().isNot(AsmToken::LParen)) { + Error(getLoc(), "expected '('"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + Operands.push_back(RISCVOperand::createToken("(", getLoc(), isRV64())); + if (parseRegister(Operands) != MatchOperand_Success) { + Error(getLoc(), "expected register"); + return MatchOperand_ParseFail; + } + if (getSTI().getFeatureBits()[RISCV::FeaturePULPExtV2]) { + if (getLexer().is(AsmToken::Exclaim)){ + getParser().Lex(); + Operands.push_back(RISCVOperand::createToken("!", getLoc(), isRV64())); + } + } + if (getLexer().isNot(AsmToken::RParen)) { + Error(getLoc(), "expected ')'"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + Operands.push_back(RISCVOperand::createToken(")", getLoc(), isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6769c11558589db17f62334e2140e71df26a61e0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseOperand.cpp @@ -0,0 +1,27 @@ +bool RISCVAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) { + OperandMatchResultTy Result = MatchOperandParserImpl(Operands, Mnemonic, true); + if (Result == MatchOperand_Success) { + return false; + } + if (Result == MatchOperand_ParseFail) { + return true; + } + if (parseRegister(Operands, true) == MatchOperand_Success) { + return false; + } + if (parseRegister(Operands, true) == MatchOperand_Success) { + if (getSTI().getFeatureBits()[RISCV::FeaturePULPExtV2]) { + if (getLexer().is(AsmToken::LParen)) + return parseMemOpBaseReg(Operands) != MatchOperand_Success; + } + return false; + } + if (parseImmediate(Operands) == MatchOperand_Success) { + if (getLexer().is(AsmToken::LParen)) { + return parseMemOpBaseReg(Operands) != MatchOperand_Success; + } + return false; + } + Error(getLoc(), "unknown operand"); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27f42bfe733a0007030006dfbc7d50f869067eda --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp @@ -0,0 +1,32 @@ +OperandMatchResultTy RISCVAsmParser::parseOperandWithModifier(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + if (getLexer().getKind() != AsmToken::Percent) { + Error(getLoc(), "expected '%' for operand modifier"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (getLexer().getKind() != AsmToken::Identifier) { + Error(getLoc(), "expected valid identifier for operand modifier"); + return MatchOperand_ParseFail; + } + StringRef Identifier = getParser().getTok().getIdentifier(); + RISCVMCExpr::VariantKind VK = RISCVMCExpr::getVariantKindForName(Identifier); + if (VK == RISCVMCExpr::VK_RISCV_Invalid) { + Error(getLoc(), "unrecognized operand modifier"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (getLexer().getKind() != AsmToken::LParen) { + Error(getLoc(), "expected '('"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + const MCExpr *SubExpr; + if (getParser().parseParenExpression(SubExpr, E)) { + return MatchOperand_ParseFail; + } + const MCExpr *ModExpr = RISCVMCExpr::create(SubExpr, VK, getContext()); + Operands.push_back(RISCVOperand::createImm(ModExpr, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69b270de1636f260bc365037fb79e6d55d7af2f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp @@ -0,0 +1,15 @@ +OperandMatchResultTy RISCVAsmParser::parsePseudoJumpSymbol(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + if (getParser().parseExpression(Res)) { + return MatchOperand_ParseFail; + } + if (Res->getKind() != MCExpr::ExprKind::SymbolRef || cast(Res)->getKind() == MCSymbolRefExpr::VariantKind::VK_PLT) { + Error(S, "operand must be a valid jump target"); + return MatchOperand_ParseFail; + } + Res = RISCVMCExpr::create(Res, RISCVMCExpr::VK_RISCV_CALL, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseRegister2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseRegister2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fe5924f959488bcb9783bee83611e7623f013e8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseRegister2.cpp @@ -0,0 +1,43 @@ +OperandMatchResultTy RISCVAsmParser::parseRegister(OperandVector &Operands, bool AllowParens) { + SMLoc FirstS = getLoc(); + bool HadParens = false; + AsmToken LParen; + if (AllowParens && getLexer().is(AsmToken::LParen)) { + AsmToken Buf[2]; + size_t ReadCount = getLexer().peekTokens(Buf); + if (ReadCount == 2 && Buf[1].getKind() == AsmToken::RParen) { + HadParens = true; + LParen = getParser().getTok(); + getParser().Lex(); + } + } + switch (getLexer().getKind()) { + default: + if (HadParens) { + getLexer().UnLex(LParen); + } + return MatchOperand_NoMatch; + case AsmToken::Identifier: + StringRef Name = getLexer().getTok().getIdentifier(); + MCRegister RegNo; + matchRegisterNameHelper(isRV32E(), RegNo, Name); + if (RegNo == RISCV::NoRegister) { + if (HadParens) { + getLexer().UnLex(LParen); + } + return MatchOperand_NoMatch; + } + if (HadParens) { + Operands.push_back(RISCVOperand::createToken("(", FirstS, isRV64())); + } + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + getLexer().Lex(); + Operands.push_back(RISCVOperand::createReg(RegNo, S, E, isRV64())); + } + if (HadParens) { + getParser().Lex(); + Operands.push_back(RISCVOperand::createToken(")", getLoc(), isRV64())); + } + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e220c8a45f48d51816290c8ee89f6dfe78b71cd5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp @@ -0,0 +1,85 @@ +OperandMatchResultTy RISCVAsmParser::parseVTypeI(OperandVector &Operands) { + SMLoc S = getLoc(); + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + StringRef Name = getLexer().getTok().getIdentifier(); + if (!Name.consume_front("e")) { + return MatchOperand_NoMatch; + } + unsigned Sew; + if (Name.getAsInteger(10, Sew)) { + return MatchOperand_NoMatch; + } + if (!RISCVVType::isValidSEW(Sew)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (!getLexer().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + Name = getLexer().getTok().getIdentifier(); + if (!Name.consume_front("m")) { + return MatchOperand_NoMatch; + } + bool Fractional = Name.consume_front("f"); + unsigned Lmul; + if (Name.getAsInteger(10, Lmul)) { + return MatchOperand_NoMatch; + } + if (!RISCVVType::isValidLMUL(Lmul, Fractional)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (!getLexer().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + Name = getLexer().getTok().getIdentifier(); + bool TailAgnostic; + if (Name == "ta") { + TailAgnostic = true; + } + else if (Name == "tu") { + TailAgnostic = false; + } + else { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (!getLexer().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + Name = getLexer().getTok().getIdentifier(); + bool MaskAgnostic; + if (Name == "ma") { + MaskAgnostic = true; + } + else if (Name == "mu") { + MaskAgnostic = false; + } + else { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (getLexer().getKind() != AsmToken::EndOfStatement) { + return MatchOperand_NoMatch; + } + unsigned SewLog2 = Log2_32(Sew / 8); + unsigned LmulLog2 = Log2_32(Lmul); + RISCVVSEW VSEW = static_cast(SewLog2); + RISCVVLMUL VLMUL = static_cast(Fractional ? 8 - LmulLog2 : LmulLog2); + unsigned VLMULBits = static_cast(VLMUL); + unsigned VSEWBits = static_cast(VSEW); + unsigned VTypeI = (VSEWBits << 3) | (VLMULBits & 0x7); + if (TailAgnostic) { + VTypeI |= 0x40; + } + if (MaskAgnostic) { + VTypeI |= 0x80; + } + Operands.push_back(RISCVOperand::createVType(VTypeI, S, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/print.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a8b9ee45de91092637a6df1c5cc22485819a36f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/print.cpp @@ -0,0 +1,27 @@ +void print(raw_ostream &OS) const override { + auto RegName = [](unsigned Reg) { + if (Reg) { + return RISCVInstPrinter::getRegisterName(Reg); + } + else { + return "noreg"; + } + }; + if (Kind == KindTy::Token) { + OS << "'" << getToken() << "'"; + } + if (Kind == KindTy::Register) { + OS << ""; + } + if (Kind == KindTy::Immediate) { + OS << *getImm(); + } + if (Kind == KindTy::SystemRegister) { + OS << "'; + } + if (Kind == KindTy::VType) { + OS << "'; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..211903c48c17873e04e301dd463681dff6bb9c72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp @@ -0,0 +1,6 @@ +void setFeatureBits(uint64_t Feature, StringRef FeatureString) { + if (!(getSTI().getFeatureBits()[Feature])) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a1d6873add2be39e3f257393382aec5e4ed8d3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp @@ -0,0 +1,12 @@ +OperandMatchResultTy RISCVAsmParser::tryParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + const AsmToken &Tok = getParser().getTok(); + StartLoc = Tok.getLoc(); + EndLoc = Tok.getEndLoc(); + RegNo = 0; + StringRef Name = getLexer().getTok().getIdentifier(); + if (matchRegisterNameHelper(isRV32E(), (MCRegister &)RegNo, Name)) { + return MatchOperand_NoMatch; + } + getParser().Lex(); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c072b9c27d13a6ecb7d25a3e02a5bd74d804d7b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp @@ -0,0 +1,18 @@ +unsigned RISCVAsmParser::validateTargetOperandClass(MCParsedAsmOperand &AsmOp, unsigned Kind) { + RISCVOperand &Op = static_cast(AsmOp); + if (!Op.isReg()) { + return Match_InvalidOperand; + } + MCRegister Reg = Op.getReg(); + bool IsRegFPR64 = RISCVMCRegisterClasses[RISCV::FPR64RegClassID].contains(Reg); + bool IsRegFPR64C = RISCVMCRegisterClasses[RISCV::FPR64CRegClassID].contains(Reg); + if ((IsRegFPR64 && Kind == MCK_FPR32) || (IsRegFPR64C && Kind == MCK_FPR32C)) { + Op.Reg.RegNum = convertFPR64ToFPR32(Reg); + return Match_Success; + } + if (IsRegFPR64 && Kind == MCK_FPR16) { + Op.Reg.RegNum = convertFPR64ToFPR16(Reg); + return Match_Success; + } + return Match_InvalidOperand; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e166353dd214035178ed8fd3747bf6c0d1d6a724 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit RISCVAsmPrinter(TargetMachine &TM, std::unique_ptr Streamer) : AsmPrinter(TM, std::move(Streamer)), STI(TM.getMCSubtargetInfo()) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b00b8f8b42d9c2fbe308b81fe001a750e400ae4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp @@ -0,0 +1,8 @@ +void RISCVAsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) { + MCInst CInst; + bool Res = compressInst(CInst, Inst, *STI, OutStreamer->getContext()); + if (Res) { + ++RISCVNumInstrsCompressed; + } + AsmPrinter::EmitToStreamer(*OutStreamer, Res ? CInst : Inst); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b6f0328c0d570906d89e27f1b6c6bd2958c6ee6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmPrinter() { + RegisterAsmPrinter X(getTheRISCV32Target()); + RegisterAsmPrinter Y(getTheRISCV64Target()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31132f2f38be4753150937d0d9e817e46726ce1e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,11 @@ +bool RISCVAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) { + if (!ExtraCode) { + const MachineOperand &MO = MI->getOperand(OpNo); + if (!MO.isReg()) { + return true; + } + OS << "0(" << RISCVInstPrinter::getRegisterName(MO.getReg()) << ")"; + return false; + } + return AsmPrinter::PrintAsmMemoryOperand(MI, OpNo, ExtraCode, OS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c31fdfafce0d2ff8dea052096b61a742174ece7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,45 @@ +bool RISCVAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) { + if (!AsmPrinter::PrintAsmOperand(MI, OpNo, ExtraCode, OS)) { + return false; + } + const MachineOperand &MO = MI->getOperand(OpNo); + if (ExtraCode && ExtraCode[0]) { + if (ExtraCode[1] != 0) { + return true; + } + switch (ExtraCode[0]) { + default: + return true; + case 'z': + if (MO.isImm() && MO.getImm() == 0) { + OS << RISCVInstPrinter::getRegisterName(RISCV::X0); + return false; + } + break; + case 'i': + if (!MO.isReg()) { + OS << 'i'; + } + return false; + } + } + switch (MO.getType()) { + case MachineOperand::MO_Immediate: + OS << MO.getImm(); + return false; + case MachineOperand::MO_Register: + OS << RISCVInstPrinter::getRegisterName(MO.getReg()); + return false; + case MachineOperand::MO_GlobalAddress: + PrintSymbolOperand(MO, OS); + return false; + case MachineOperand::MO_BlockAddress: { + MCSymbol *Sym = GetBlockAddressSymbol(MO.getBlockAddress()); + Sym->print(OS, MAI); + return false; + } + default: + break; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c13bd2b11bf02aab0983c3ffc0c3b5ad848e0be2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp @@ -0,0 +1,9 @@ +void RISCVAsmPrinter::emitAttributes() { + RISCVTargetStreamer &RTS = static_cast(*OutStreamer->getTargetStreamer()); + const Triple &TT = TM.getTargetTriple(); + StringRef CPU = TM.getTargetCPU(); + StringRef FS = TM.getTargetFeatureString(); + const RISCVTargetMachine &RTM = static_cast(TM); + const RISCVSubtarget STI(TT, CPU, CPU, FS, "", RTM); + RTS.emitTargetAttributes(STI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..871ffa5737cbbebb3646e8d4332bd04b329067da --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,6 @@ +void RISCVAsmPrinter::emitEndOfAsmFile(Module &M) { + RISCVTargetStreamer &CTS = static_cast(*OutStreamer->getTargetStreamer()); + if (TM.getTargetTriple().isOSBinFormatELF()) { + CTS.finishAttributeSection(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdd093f184563015cb1be5ba8975ef04762fd8b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp @@ -0,0 +1,8 @@ +void RISCVAsmPrinter::emitInstruction(const MachineInstr *MI) { + if (emitPseudoExpansionLowering(*OutStreamer, MI)) { + return ; + } + MCInst TmpInst; + LowerRISCVMachineInstrToMCInst(MI, TmpInst, *this); + EmitToStreamer(*OutStreamer, TmpInst); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6895c501148e6daaad0ad8d522f0cbdb0fb2a9e6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,5 @@ +void RISCVAsmPrinter::emitStartOfAsmFile(Module &M) { + if (TM.getTargetTriple().isOSBinFormatELF()) { + emitAttributes(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..408ede981a828294678c062ffab8cb8538586a4a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "RISCV Assembly Printer"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e46620f964aa5e16a8f2d0ea650ef87a4e687718 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp @@ -0,0 +1,3 @@ +bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const { + return LowerRISCVMachineOperandToMCOperand(MO, MCOp, *this); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..789e25a498fe0fcd1c781cb7aa07b505321457e0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVAsmPrinter::runOnMachineFunction(MachineFunction &MF) { + MCSubtargetInfo &NewSTI = OutStreamer->getContext().getSubtargetCopy(*TM.getMCSubtargetInfo()); + NewSTI.setFeatureBits(MF.getSubtarget().getFeatureBits()); + STI = &NewSTI; + SetupMachineFunction(MF); + emitFunctionBody(); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92d7310f19818315af77ce1c98d61f5c1d4fdf10 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR16RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F0_H + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1bc847c2b24fafa879484f9d062041ad9950bae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32CRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 8) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F8_F + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36aae9478effe333858379c9a1b304100f38eaf1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F0_F + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ad24e5137888045d3acc32ed95530c2d3e15529 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64CRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 8) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F8_D + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae3dfca3caacd67020ee25fe6f85414520efaabe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F0_D + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3edc390bf8de970a40451494a5aec58321519e7e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeGPRCRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 8) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::X8 + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..019654808af5f3e9c6795bc28ace71abdf367d21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo == 0) { + return MCDisassembler::Fail; + } + return DecodeGPRRegisterClass(Inst, RegNo, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6f18fdce1b4c98576300921500dfc1bd3d0f4f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0X2RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo == 2) { + return MCDisassembler::Fail; + } + return DecodeGPRNoX0RegisterClass(Inst, RegNo, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23847ddc8e1562eb28b6353bbee940cac56d8acd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp @@ -0,0 +1,10 @@ +static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + const FeatureBitset &FeatureBits = static_cast(Decoder)->getSubtargetInfo().getFeatureBits(); + bool IsRV32E = FeatureBits[RISCV::FeatureRV32E]; + if (RegNo >= 32 || (IsRV32E && RegNo >= 16)) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::X0 + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c099b92870018dc8e0147eb619c31ba6f27fd3ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp @@ -0,0 +1,3 @@ +static DecodeStatus DecodePulpV2RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + return DecodeGPRRegisterClass(Inst, RegNo, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9592a25bf4dbd25b64ffe003a8da445000768cac --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp @@ -0,0 +1,3 @@ +static DecodeStatus DecodePulpV4RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + return DecodeGPRRegisterClass(Inst, RegNo, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea83a9dcc3429e5c226968b1d1d94ddeedc751bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeVRRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::V0 + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/Disassembler.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/Disassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b68c6a0167549bc8f749b0e470e9d23c43926635 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/Disassembler.cpp @@ -0,0 +1,2 @@ +RISCVDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx, MCInstrInfo const *MCII) : MCDisassembler(STI, Ctx), MCII(MCII) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ed8ecad6545c74078d9b77942c9b5c2a24a16d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVDisassembler() { + TargetRegistry::RegisterMCDisassembler(getTheRISCV32Target(), createRISCVDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheRISCV64Target(), createRISCVDisassembler); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/addImplySP.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/addImplySP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ccacd508efb4089c860bb106baa89d892902431 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/addImplySP.cpp @@ -0,0 +1,9 @@ +static void addImplySP(MCInst &Inst, int64_t Address, const void *Decoder) { + if (Inst.getOpcode() == RISCV::C_LWSP || Inst.getOpcode() == RISCV::C_SWSP || Inst.getOpcode() == RISCV::C_LDSP || Inst.getOpcode() == RISCV::C_SDSP || Inst.getOpcode() == RISCV::C_FLWSP || Inst.getOpcode() == RISCV::C_FSWSP || Inst.getOpcode() == RISCV::C_FLDSP || Inst.getOpcode() == RISCV::C_FSDSP || Inst.getOpcode() == RISCV::C_ADDI4SPN) { + DecodeGPRRegisterClass(Inst, 2, Address, Decoder); + } + if (Inst.getOpcode() == RISCV::C_ADDI16SP) { + DecodeGPRRegisterClass(Inst, 2, Address, Decoder); + DecodeGPRRegisterClass(Inst, 2, Address, Decoder); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..498d4e2da63069504b61fd82b710c75962d5a343 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp @@ -0,0 +1,3 @@ +static MCDisassembler *createRISCVDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) { + return new RISCVDisassembler(STI, Ctx, T.createMCInstrInfo()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56923d00f9f34f97fd7d6f2a92844eefb789431b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeCLUIImmOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt<6>(Imm) && "Invalid immediate"); + if (Imm > 31) { + Imm = (SignExtend64<6>(Imm) & 0xfffff); + } + Inst.addOperand(MCOperand::createImm(Imm)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..42bc2ab0b8e381b06b0a7b99bc2e16f91132e611 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeFRMArg(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt<3>(Imm) && "Invalid immediate"); + if (!llvm::RISCVFPRndMode::isValidRoundingMode(Imm)) { + return MCDisassembler::Fail; + } + Inst.addOperand(MCOperand::createImm(Imm)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff736e6728f99593a0e367fe7ae7c308fddee2cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp @@ -0,0 +1,9 @@ +static DecodeStatus decodeRVCInstrRdRs1Rs2(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + unsigned d = fieldFromInstruction(Insn, 7, 5); + unsigned const9 = 0; + unsigned s1 = fieldFromInstruction(Insn, 2, 5); + DecodeStatus status = DecodeGPRRegisterClass(Inst, d, Address, Decoder); + Inst.addOperand(Inst.getOperand(const9)); + status = DecodeGPRRegisterClass(Inst, s1, Address, Decoder); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4583b28d5e2cc6dc158fc5c94735ce0db8db858d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp @@ -0,0 +1,9 @@ +static DecodeStatus decodeRVCInstrRdRs1UImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + DecodeGPRRegisterClass(Inst, 0, Address, Decoder); + Inst.addOperand(Inst.getOperand(0)); + uint64_t UImm6 = fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5); + DecodeStatus Result = decodeUImmOperand<6>(Inst, UImm6, Address, Decoder); + (void)Result; + assert(Result == MCDisassembler::Success && "Invalid immediate"); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ce75106ef40771cb6415341680d69cf98151355 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp @@ -0,0 +1,7 @@ +static DecodeStatus decodeRVCInstrRdRs2(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + unsigned Rd = fieldFromInstruction(Insn, 7, 5); + unsigned Rs2 = fieldFromInstruction(Insn, 2, 5); + DecodeGPRRegisterClass(Inst, Rd, Address, Decoder); + DecodeGPRRegisterClass(Inst, Rs2, Address, Decoder); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..faf42482128dc81f79631797aaa131b57faa45bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeRVCInstrRdSImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + DecodeGPRRegisterClass(Inst, 0, Address, Decoder); + uint64_t SImm6 = fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5); + DecodeStatus Result = decodeSImmOperand<6>(Inst, SImm6, Address, Decoder); + (void)Result; + assert(Result == MCDisassembler::Success && "Invalid immediate"); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4380b36238a4132769709bf280da1414dfa1ab7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp @@ -0,0 +1,7 @@ +static DecodeStatus decodeRVCInstrSImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + uint64_t SImm6 = fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5); + DecodeStatus Result = decodeSImmOperand<6>(Inst, SImm6, Address, Decoder); + (void)Result; + assert(Result == MCDisassembler::Success && "Invalid immediate"); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6df53e27f2f7bb0bf6af2592e13fc3189f9de88 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp @@ -0,0 +1,9 @@ +template static DecodeStatus decodeSImmNonZeroOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + if (Imm == 0) { + return MCDisassembler::Fail; + } + assert(isUInt(Imm) && "Invalid immediate"); + addImplySP(Inst, Address, Decoder); + Inst.addOperand(MCOperand::createImm(SignExtend64(Imm))); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a56c1c3848efb98e2783ac2b3e50392822d1860b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus decodeSImmOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt(Imm) && "Invalid immediate"); + addImplySP(Inst, Address, Decoder); + Inst.addOperand(MCOperand::createImm(SignExtend64(Imm))); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e565169c666715ddbb61d5b3e884cc7b628f469 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus decodeSImmOperandAndLsl1(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt(Imm) && "Invalid immediate"); + Inst.addOperand(MCOperand::createImm(SignExtend64(Imm << 1))); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..863355cee6b9cee4ed5bae687f71abb1e96bf4f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp @@ -0,0 +1,3 @@ +template static DecodeStatus decodeUImmMinus1Operand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + return decodeUImmOperand(Inst, Imm + 1, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f08c154acb38533e848886a589b04bc524212a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus decodeUImmNonZeroOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + if (Imm == 0) { + return MCDisassembler::Fail; + } + return decodeUImmOperand(Inst, Imm, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e940d44b9e6b88e433ea55a8013356671e1ef239 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus decodeUImmOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt(Imm) && "Invalid immediate"); + addImplySP(Inst, Address, Decoder); + Inst.addOperand(MCOperand::createImm(Imm)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ea5f1578a4fbbdd90b384382f28cc1bc2bce945 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp @@ -0,0 +1,12 @@ +static DecodeStatus decodeVMaskReg(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + MCRegister Reg = RISCV::NoRegister; + if (RegNo == 0) { + Inst.addOperand(MCOperand::createReg(RISCV::V0)); + return MCDisassembler::Success; + } + if (RegNo == 1) { + Inst.addOperand(MCOperand::createReg(RISCV::NoRegister)); + return MCDisassembler::Success; + } + return MCDisassembler::Fail; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/getInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/getInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b6b768e230411e68b01e432b0cea4141325942a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Disassembler/Disassembler/getInstruction.cpp @@ -0,0 +1,41 @@ +DecodeStatus RISCVDisassembler::getInstruction(MCInst &MI, uint64_t &Size, ArrayRef Bytes, uint64_t Address, raw_ostream &CS) const { + uint32_t Insn; + DecodeStatus Result; + if ((Bytes[0] & 0x3) == 0x3) { + if (Bytes.size() < 4) { + Size = 0; + return MCDisassembler::Fail; + } + Insn = support::endian::read32le(Bytes.data()); + LLVM_DEBUG(dbgs() << "Trying RISCV32 table :\n"); + Result = decodeInstruction(DecoderTable32, MI, Insn, Address, this, STI); + Size = 4; + } + else { + if (Bytes.size() < 2) { + Size = 0; + return MCDisassembler::Fail; + } + Insn = support::endian::read16le(Bytes.data()); + if (!STI.getFeatureBits()[RISCV::Feature64Bit]) { + LLVM_DEBUG(dbgs() << "Trying RISCV32Only_16 table (16-bit Instruction):\n"); + Result = decodeInstruction(DecoderTableRISCV32Only_16, MI, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + } + if (STI.getFeatureBits()[RISCV::FeatureExtZbproposedc] && STI.getFeatureBits()[RISCV::FeatureStdExtC]) { + LLVM_DEBUG(dbgs() << "Trying RVBC32 table (BitManip 16-bit Instruction):\n"); + Result = decodeInstruction(DecoderTableRVBC16, MI, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + } + LLVM_DEBUG(dbgs() << "Trying RISCV_C table (16-bit Instruction):\n"); + Result = decodeInstruction(DecoderTable16, MI, Insn, Address, this, STI); + Size = 2; + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/AsmBackend.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef34215b142479c87b1510584ea79489a5710109 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/AsmBackend.cpp @@ -0,0 +1,4 @@ +RISCVAsmBackend(const MCSubtargetInfo &STI, uint8_t OSABI, bool Is64Bit, const MCTargetOptions &Options) : MCAsmBackend(support::little), STI(STI), OSABI(OSABI), Is64Bit(Is64Bit), TargetOptions(Options) { + TargetABI = RISCVABI::computeTargetABI(STI.getTargetTriple(), STI.getFeatureBits(), Options.getABIName()); + RISCVFeatures::validate(STI.getTargetTriple(), STI.getFeatureBits()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8daf62b9dc230af80c678865ba65f88e131ae74 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp @@ -0,0 +1,92 @@ +static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value, MCContext &Ctx) { + unsigned Kind; + Kind = Fixup.getTargetKind(); + if (Kind == FK_Data_1) { + return Value; + } + if (Kind == FK_Data_2) { + return Value; + } + if (Kind == FK_Data_4) { + return Value; + } + if (Kind == FK_Data_8) { + return Value; + } + if (Kind == FK_Data_6b) { + return Value; + } + if (Kind == RISCV::fixup_riscv_lo12_i) { + return Value & 0xfff; + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_i) { + return Value & 0xfff; + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_i) { + return Value & 0xfff; + } + if (Kind == RISCV::fixup_pulpv2_loop_setup) { + return Value >> 1; + } + if (Kind == RISCV::fixup_pulpv2_loop_setupi) { + return Value >> 1; + } + if (Kind == RISCV::fixup_riscv_lo12_s) { + return (((Value >> 5) & 0x7f) << 25) | ((Value & 0x1f) << 7); + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_s) { + return (((Value >> 5) & 0x7f) << 25) | ((Value & 0x1f) << 7); + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_s) { + return (((Value >> 5) & 0x7f) << 25) | ((Value & 0x1f) << 7); + } + if (Kind == RISCV::fixup_riscv_hi20) { + return ((Value + 0x800) >> 12) & 0xfffff; + } + if (Kind == RISCV::fixup_riscv_pcrel_hi20) { + return ((Value + 0x800) >> 12) & 0xfffff; + } + if (Kind == RISCV::fixup_riscv_tprel_hi20) { + return ((Value + 0x800) >> 12) & 0xfffff; + } + if (Kind == RISCV::fixup_riscv_call) { + return ((Value + 0x800ULL) & 0xfffff000ULL) | (((Value & 0xfffULL) << 20) << 32); + } + if (Kind == RISCV::fixup_riscv_call_plt) { + return ((Value + 0x800ULL) & 0xfffff000ULL) | (((Value & 0xfffULL) << 20) << 32); + } + if (Kind == RISCV::fixup_riscv_rvc_jump) { + return (((Value >> 11) & 0x1) << 10) | (((Value >> 4) & 0x1) << 9) | (((Value >> 8) & 0x3) << 7) | (((Value >> 10) & 0x1) << 6) | (((Value >> 6) & 0x1) << 5) | (((Value >> 7) & 0x1) << 4) | (((Value >> 1) & 0x7) << 1) | ((Value >> 5) & 0x1); + } + if (Kind == RISCV::fixup_riscv_rvc_branch) { + return (((Value >> 8) & 0x1) << 12) | (((Value >> 3) & 0x3) << 10) | (((Value >> 6) & 0x3) << 5) | (((Value >> 1) & 0x3) << 3) | (((Value >> 5) & 0x1) << 2); + } + if (Kind == RISCV::fixup_riscv_tls_got_hi20) { + llvm_unreachable("Relocation should be unconditionally forced\n"); + } + if (Kind == RISCV::fixup_riscv_tls_gd_hi20) { + llvm_unreachable("Relocation should be unconditionally forced\n"); + } + if (Kind == RISCV::fixup_riscv_got_hi20) { + llvm_unreachable("Relocation should be unconditionally forced\n"); + } + if (Kind == RISCV::fixup_riscv_branch) { + if (!isInt<13>(Value)) { + Ctx.reportError(Fixup.getLoc(), "fixup value out of range"); + } + if (Value & 0x1) { + Ctx.reportError(Fixup.getLoc(), "fixup value must be 2-byte aligned"); + } + return (((Value >> 11) & 0x1) << 7); + } + if (Kind == RISCV::fixup_riscv_jal) { + if (!isInt<21>(Value)) { + Ctx.reportError(Fixup.getLoc(), "fixup value out of range"); + } + if (Value & 0x1) { + Ctx.reportError(Fixup.getLoc(), "fixup value must be 2-byte aligned"); + } + return (((Value >> 20) & 0x1) << 19) | (((Value >> 1) & 0x3ff) << 9) | (((Value >> 11) & 0x1) << 8) | ((Value >> 12) & 0xff); + } + llvm_unreachable("Unknown fixup kind!"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/applyFixup.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/applyFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f805ec0a5bc2cb96d16ba5a8e177d99f0bad2aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/applyFixup.cpp @@ -0,0 +1,19 @@ +void RISCVAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,const MCValue &Target,MutableArrayRef Data, uint64_t Value,bool IsResolved, const MCSubtargetInfo *STI) const { + MCFixupKind Kind = Fixup.getKind(); + if (Kind >= FirstLiteralRelocationKind) { + return ; + } + MCContext &Ctx = Asm.getContext(); + MCFixupKindInfo Info = getFixupKindInfo(Kind); + if (!Value) { + return ; + } + Value = adjustFixupValue(Fixup, Value, Ctx); + Value <<= Info.TargetOffset; + unsigned Offset = Fixup.getOffset(); + unsigned NumBytes = alignTo(Info.TargetSize + Info.TargetOffset, 8) / 8; + assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!"); + for (unsigned i = 0; i != NumBytes; ++i) { + Data[Offset + i] |= uint8_t((Value >> (i * 8)) & 0xff); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cbb77fce7853eba057e346ceab62e761785a5616 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp @@ -0,0 +1,5 @@ +MCAsmBackend *llvm::createRISCVAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) { + const Triple &TT = STI.getTargetTriple(); + uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS()); + return new RISCVAsmBackend(STI, OSABI, TT.isArch64Bit(), Options); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..899027cb9566b9956193576250199de336ddb193 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp @@ -0,0 +1,3 @@ +std::unique_ptr RISCVAsmBackend::createObjectTargetWriter() const { + return createRISCVELFObjectWriter(OSABI, Is64Bit); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a200b75ea98b3459dc89d83a2964ae971e563063 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp @@ -0,0 +1,50 @@ +bool RISCVAsmBackend::evaluateTargetFixup(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFixup &Fixup, const MCFragment *DF, const MCValue &Target, uint64_t &Value, bool &WasForced) { + const MCFixup *AUIPCFixup; + const MCFragment *AUIPCDF; + MCValue AUIPCTarget; + switch (Fixup.getTargetKind()) { + default: + llvm_unreachable("Unexpected fixup kind!"); + case RISCV::fixup_riscv_pcrel_hi20: + AUIPCFixup = &Fixup; + AUIPCDF = DF; + AUIPCTarget = Target; + break; + case RISCV::fixup_riscv_pcrel_lo12_i: + case RISCV::fixup_riscv_pcrel_lo12_s: { + AUIPCFixup = cast(Fixup.getValue())->getPCRelHiFixup(&AUIPCDF); + if (!AUIPCFixup) { + Asm.getContext().reportError(Fixup.getLoc(), "could not find corresponding %pcrel_hi"); + return true; + } + const MCExpr *AUIPCExpr = AUIPCFixup->getValue(); + if (!AUIPCExpr->evaluateAsRelocatable(AUIPCTarget, &Layout, AUIPCFixup)) { + return true; + } + break; + } + } + if (!AUIPCTarget.getSymA() || AUIPCTarget.getSymB()) { + return false; + } + const MCSymbolRefExpr *A = AUIPCTarget.getSymA(); + const MCSymbol &SA = A->getSymbol(); + if (A->getKind() != MCSymbolRefExpr::VK_None || SA.isUndefined()) { + return false; + } + auto *Writer = Asm.getWriterPtr(); + if (!Writer) { + return false; + } + bool IsResolved = Writer->isSymbolRefDifferenceFullyResolvedImpl(Asm, SA, *AUIPCDF, false, true); + if (!IsResolved) { + return false; + } + Value = Layout.getSymbolOffset(SA) + AUIPCTarget.getConstant(); + Value -= Layout.getFragmentOffset(AUIPCDF) + AUIPCFixup->getOffset(); + if (shouldForceRelocation(Asm, *AUIPCFixup, AUIPCTarget)) { + WasForced = true; + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2d7f65b53a8d71a36becd18d92452b97ccf728f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp @@ -0,0 +1,3 @@ +bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, const MCRelaxableFragment *DF, const MCAsmLayout &Layout) const override { + llvm_unreachable("Handled by fixupNeedsRelaxationAdvanced"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ec2d779def6933b2b61eb6de6cd74a3e29a2bf8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp @@ -0,0 +1,14 @@ +bool RISCVAsmBackend::fixupNeedsRelaxationAdvanced(const MCFixup &Fixup, bool Resolved, uint64_t Value, const MCRelaxableFragment *DF, const MCAsmLayout &Layout, const bool WasForced) const { + if (!Resolved && !WasForced) { + return true; + } + int64_t Offset = int64_t(Value); + switch (Fixup.getTargetKind()) { + case RISCV::fixup_riscv_rvc_branch: + return Offset > 254 || Offset < -256; + case RISCV::fixup_riscv_rvc_jump: + return Offset > 2046 || Offset < -2048; + default: + return false; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getFixupKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getFixupKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9016a3840b84201f3ee27f9769f23843493270a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getFixupKind.cpp @@ -0,0 +1,14 @@ +Optional RISCVAsmBackend::getFixupKind(StringRef Name) const { + if (STI.getTargetTriple().isOSBinFormatELF()) { + unsigned Type; + Type = llvm::StringSwitch(Name) + #define ELF_RELOC(X, Y) .Case(#X, Y) + #include "llvm/BinaryFormat/ELFRelocs/RISCV.def" + #undef ELF_RELOC + .Default(-1u); + if (Type != -1u) { + return static_cast(FirstLiteralRelocationKind + Type); + } + } + return None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..373e558edae4f7a556650bc501c74aaa9968c1b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp @@ -0,0 +1,35 @@ +const MCFixupKindInfo & RISCVAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { + const static MCFixupKindInfo Infos[RISCV::NumTargetFixupKinds] = { + {"fixup_riscv_hi20", 12, 20, 0}, + {"fixup_riscv_lo12_i", 20, 12, 0}, + {"fixup_riscv_lo12_s", 0, 32, 0}, + {"fixup_riscv_pcrel_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget}, + {"fixup_riscv_pcrel_lo12_i", 20, 12, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget}, + {"fixup_riscv_pcrel_lo12_s", 0, 32, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget}, + {"fixup_riscv_got_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_tprel_hi20", 12, 20, 0}, + {"fixup_riscv_tprel_lo12_i", 20, 12, 0}, + {"fixup_riscv_tprel_lo12_s", 0, 32, 0}, + {"fixup_riscv_tprel_add", 0, 0, 0}, + {"fixup_riscv_tls_got_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_tls_gd_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_jal", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_branch", 0, 32, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_rvc_jump", 2, 11, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_rvc_branch", 0, 16, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_call", 0, 64, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_call_plt", 0, 64, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_relax", 0, 0, 0}, + {"fixup_riscv_align", 0, 0, 0}, + {"fixup_pulpv2_loop_setup", 20, 12, MCFixupKindInfo::FKF_IsPCRel }, + {"fixup_pulpv2_loop_setupi", 15, 5, MCFixupKindInfo::FKF_IsPCRel } + }; + if (Kind >= FirstLiteralRelocationKind) { + return MCAsmBackend::getFixupKindInfo(FK_NONE); + } + if (Kind < FirstTargetFixupKind) { + return MCAsmBackend::getFixupKindInfo(Kind); + } + assert(unsigned(Kind - FirstTargetFixupKind) < getNumFixupKinds() && "Invalid kind!"); + return Infos[Kind - FirstTargetFixupKind]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..746a8de2786e0986eb0d4ef57b90b600aa813eb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp @@ -0,0 +1,3 @@ +unsigned getNumFixupKinds() const override { + return RISCV::NumTargetFixupKinds; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a8dce3b201b77083cd73b657c5dac73e342fdca --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp @@ -0,0 +1,15 @@ +unsigned RISCVAsmBackend::getRelaxedOpcode(unsigned Op) const { + if (Op == RISCV::C_BEQZ) { + return RISCV::BEQ; + } + if (Op == RISCV::C_BNEZ) { + return RISCV::BNE; + } + if (Op == RISCV::C_J) { + return RISCV::JAL; + } + if (Op == RISCV::C_JAL) { + return RISCV::JAL; + } + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ba240b805d561f415ec4ee11045c3d6eb8dea8e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getTargetABI.cpp @@ -0,0 +1,3 @@ +RISCVABI::ABI getTargetABI() const { + return TargetABI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ba9da6c2169958b5222a337d15c7920c3b3a0a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp @@ -0,0 +1,3 @@ +const MCTargetOptions &getTargetOptions() const { + return TargetOptions; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a6ab22b5e3a82bac66595e73244230ced8e6c2cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp @@ -0,0 +1,15 @@ +bool RISCVAsmBackend::mayNeedRelaxation(const MCInst &Inst, const MCSubtargetInfo &STI) const { + if (Inst.getOpcode() == RISCV::C_BEQZ) { + return true; + } + if (Inst.getOpcode() == RISCV::C_BNEZ) { + return true; + } + if (Inst.getOpcode() == RISCV::C_J) { + return true; + } + if (Inst.getOpcode() == RISCV::C_JAL) { + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d47f9e24849b2b1245e390ffc5e557ee66c2675 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp @@ -0,0 +1,34 @@ +void RISCVAsmBackend::relaxInstruction(const MCInst &Inst, const MCSubtargetInfo &STI, MCInst &Res) const { + MCInst Res; + if (Inst.getOpcode() == RISCV::C_BEQZ) { + Res.setOpcode(RISCV::BEQ); + Res.addOperand(Inst.getOperand(0)); + Res.addOperand(MCOperand::createReg(RISCV::X0)); + Res.addOperand(Inst.getOperand(1)); + Inst = std::move(Res); + return ; + } + if (Inst.getOpcode() == RISCV::C_BNEZ) { + Res.setOpcode(RISCV::BNE); + Res.addOperand(Inst.getOperand(0)); + Res.addOperand(MCOperand::createReg(RISCV::X0)); + Res.addOperand(Inst.getOperand(1)); + Inst = std::move(Res); + return ; + } + if (Inst.getOpcode() == RISCV::C_J) { + Res.setOpcode(RISCV::JAL); + Res.addOperand(MCOperand::createReg(RISCV::X0)); + Res.addOperand(Inst.getOperand(0)); + Inst = std::move(Res); + return ; + } + if (Inst.getOpcode() == RISCV::C_JAL) { + Res.setOpcode(RISCV::JAL); + Res.addOperand(MCOperand::createReg(RISCV::X1)); + Res.addOperand(Inst.getOperand(0)); + Inst = std::move(Res); + return ; + } + llvm_unreachable("Opcode not expected!"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20caba2eb4d9bfb4a0d6f036615d2b0b9b4de29d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp @@ -0,0 +1,3 @@ +bool requiresDiffExpressionRelocations() const override { + return willForceRelocations(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c50c542fcb66c027d042a9f86d3a2b22389d8363 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp @@ -0,0 +1,3 @@ +void setForceRelocs() { + ForceRelocs = true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c0852e12e8e13bf21bbe587a79b70ddb929dbc0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp @@ -0,0 +1,45 @@ +bool RISCVAsmBackend::shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target) { + if (Fixup.getTargetKind() >= FirstLiteralRelocationKind) { + return true; + } + if (Fixup.getTargetKind() == FK_Data_1) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == FK_Data_2) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == FK_Data_4) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == FK_Data_8) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == RISCV::fixup_riscv_got_hi20) { + return true; + } + if (Fixup.getTargetKind() == RISCV::fixup_riscv_tls_got_hi20) { + return true; + } + if (Fixup.getTargetKind() == RISCV::fixup_riscv_tls_gd_hi20) { + return true; + } + if (Fixup.getTargetKind() == RISCV::fixup_pulpv2_loop_setup) { + return false; + } + if (Fixup.getTargetKind() == RISCV::fixup_pulpv2_loop_setupi) { + return false; + } + return STI.getFeatureBits()[RISCV::FeatureRelax] || ForceRelocs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cbc97e17845d545983c933ea23dc3e4c437503b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp @@ -0,0 +1,14 @@ +bool RISCVAsmBackend::shouldInsertExtraNopBytesForCodeAlign(const MCAlignFragment &AF, unsigned &Size) { + if (!STI.getFeatureBits()[RISCV::FeatureRelax]) { + return false; + } + bool HasStdExtC = STI.getFeatureBits()[RISCV::FeatureStdExtC]; + unsigned MinNopLen = HasStdExtC ? 2 : 4; + if (AF.getAlignment() <= MinNopLen) { + return false; + } + else { + Size = AF.getAlignment() - MinNopLen; + return true; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0cba76a5121626885e6f5d385f92d143bb1bbf7e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp @@ -0,0 +1,16 @@ +bool RISCVAsmBackend::shouldInsertFixupForCodeAlign(MCAssembler &Asm, const MCAsmLayout &Layout, MCAlignFragment &AF) { + if (!STI.getFeatureBits()[RISCV::FeatureRelax]) { + return false; + } + unsigned Count; + if (!shouldInsertExtraNopBytesForCodeAlign(AF, Count) || (Count == 0)) { + return false; + } + MCContext &Ctx = Asm.getContext(); + const MCExpr *Dummy = MCConstantExpr::create(0, Ctx); + MCFixup Fixup = MCFixup::create(0, Dummy, MCFixupKind(RISCV::fixup_riscv_align), SMLoc()); + uint64_t FixedValue = 0; + MCValue NopBytes = MCValue::get(Count); + Asm.getWriter().recordRelocation(Asm, Layout, &AF, Fixup, NopBytes, FixedValue); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d4f67dbd32002e52666f53c763a70a4dba9e31b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp @@ -0,0 +1,3 @@ +bool willForceRelocations() const { + return ForceRelocs || STI.getFeatureBits()[RISCV::FeatureRelax]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/writeNopData.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/writeNopData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d80a5b62dec8be0da614743dbfd8cce5bc86ea5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/writeNopData.cpp @@ -0,0 +1,14 @@ +bool RISCVAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const { + if (Count % 2 != 0) { + return false; + } + uint64_t NopCount = Count / 4; + uint64_t i; + for (i = 0; i < NopCount; ++i) { + OS.write("\x13\0\0\0", 4); + } + if (Count % 4 == 2) { + OS.write("\x01\0", 2); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef098a67f9366ad081d706783370f6efc23e3a48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp @@ -0,0 +1,2 @@ +~RISCVAsmBackend() override { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9421589a9b9c1fc5b796893153daedb95b1d0d46 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,10 @@ +RISCVMCAsmInfo::RISCVMCAsmInfo(const Triple &TT) { + CodePointerSize = TT.isArch64Bit() ? 8 : 4; + CalleeSaveStackSlotSize = TT.isArch64Bit() ? 8 : 4; + CommentString = "#"; + AlignmentIsInBytes = false; + SupportsDebugInformation = true; + ExceptionsType = ExceptionHandling::DwarfCFI; + Data16bitsDirective = "\t.half\t"; + Data32bitsDirective = "\t.word\t"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/anchor.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a347705836916e209cf07b3a754f158902edef80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/anchor.cpp @@ -0,0 +1,2 @@ +void RISCVMCAsmInfo::anchor() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8123d7641ff42e395a6fae61de4cd9e72363c53a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp @@ -0,0 +1,7 @@ +const MCExpr *RISCVMCAsmInfo::getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const { + if (Encoding & dwarf::DW_EH_PE_pcrel) { + MCContext &Ctx = Streamer.getContext(); + return RISCVMCExpr::create(MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, Ctx), RISCVMCExpr::VK_RISCV_32_PCREL, Ctx); + } + return MCAsmInfo::getExprForFDESymbol(Sym, Encoding, Streamer); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/ABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/ABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f3883bfb643c747efaf1bd19098e38d0e4607708 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/ABI.cpp @@ -0,0 +1,10 @@ +enum ABI { + ABI_ILP32, + ABI_ILP32F, + ABI_ILP32D, + ABI_ILP32E, + ABI_LP64, + ABI_LP64F, + ABI_LP64D, + ABI_Unknown +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/FenceField.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/FenceField.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c7b1924b5725066d01f765ea8d324f0c5053f3b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/FenceField.cpp @@ -0,0 +1,6 @@ +enum FenceField { + I = 8, + O = 4, + R = 2, + W = 1 +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/II.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/II.cpp new file mode 100644 index 0000000000000000000000000000000000000000..50b9d9071889f3b5a387cf23e5363093dd124268 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/II.cpp @@ -0,0 +1,53 @@ +namespace RISCVII { +enum { + InstFormatPseudo = 0, + InstFormatR = 1, + InstFormatR4 = 2, + InstFormatI = 3, + InstFormatS = 4, + InstFormatB = 5, + InstFormatU = 6, + InstFormatJ = 7, + InstFormatCR = 8, + InstFormatCI = 9, + InstFormatCSS = 10, + InstFormatCIW = 11, + InstFormatCL = 12, + InstFormatCS = 13, + InstFormatCA = 14, + InstFormatCB = 15, + InstFormatCJ = 16, + InstFormatOther = 17, + InstFormatMask = 31, + ConstraintShift = 5, + ConstraintMask = 0b111 << ConstraintShift, + VLMulShift = ConstraintShift + 3, + VLMulMask = 0b111 , + HasDummyMaskOpShift = 3 , + HasDummyMaskOpShift = 1 , + WritesElement0Shift = HasDummyMaskOpShift + 1, + WritesElement0Mask = 1 << WritesElement0Shift, + HasMergeOpShift = 1 , + HasMergeOpMask = 1 << HasMergeOpShift, + HasSEWOpShift = 1 , + HasVLOpShift = 1 , + HasVLOpShift = HasSEWOpShift + 1, + HasVLOpMask = 1 << HasVLOpShift, +}; +enum { + MO_None = 0, + MO_CALL = 1, + MO_PLT = 2, + MO_LO = 3, + MO_HI = 4, + MO_PCREL_LO = 5, + MO_PCREL_HI = 6, + MO_GOT_HI = 7, + MO_TPREL_LO = 8, + MO_TPREL_HI = 9, + MO_TPREL_ADD = 10, + MO_TLS_GOT_HI = 11, + MO_TLS_GD_HI = 12, + MO_DIRECT_FLAG_MASK = 15 +}; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/OperandType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/OperandType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a35e89e4ca6e38f5ab53518181d3b3f75ef59918 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/OperandType.cpp @@ -0,0 +1,12 @@ +enum OperandType : unsigned { + OPERAND_FIRST_RISCV_IMM = MCOI::OPERAND_FIRST_TARGET, + OPERAND_UIMM4 = OPERAND_FIRST_RISCV_IMM, + OPERAND_UIMM5, + OPERAND_UIMM12, + OPERAND_UIMM12M1, + OPERAND_UIMM3, + OPERAND_SIMM12, + OPERAND_UIMM20, + OPERAND_UIMMLOG2XLEN, + OPERAND_LAST_RISCV_IMM = OPERAND_UIMMLOG2XLEN +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48e9a099c10a3c910227f7c4c692f1923cd7b265 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp @@ -0,0 +1,10 @@ +enum class RISCVVSEW { + SEW_8 = 0, + SEW_16, + SEW_32, + SEW_64, + SEW_128, + SEW_256, + SEW_512, + SEW_1024, +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f6426c797a3087af47909f6164404258de6ea5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp @@ -0,0 +1,6 @@ +enum RVVConstraintType { + NoConstraint = 0, + VS2Constraint = 0b001, + VS1Constraint = 0b010, + VMConstraint = 0b100, +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RoundingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9322bf2c008867e4d73fcd793cfb9480b8f6f94f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/RoundingMode.cpp @@ -0,0 +1,9 @@ +enum RoundingMode { + RNE = 0, + RTZ = 1, + RDN = 2, + RUP = 3, + RMM = 4, + DYN = 7, + Invalid +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/VLMUL.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/VLMUL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4623e7ccd5fedd630b880aaa84b07f4a81dcf701 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/VLMUL.cpp @@ -0,0 +1,10 @@ +enum class RISCVVLMUL { + LMUL_1 = 0, + LMUL_2, + LMUL_4, + LMUL_8, + LMUL_RESERVED, + LMUL_F8, + LMUL_F4, + LMUL_F2 +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/VMTs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/VMTs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2add02bb943bcb64d7795721888ad1d4a89d0dfd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/VMTs.cpp @@ -0,0 +1,46 @@ +namespace RISCVVMVTs { +constexpr MVT vint8mf8_t = MVT::nxv1i8; +constexpr MVT vint8mf4_t = MVT::nxv2i8; +constexpr MVT vint8mf2_t = MVT::nxv4i8; +constexpr MVT vint8m1_t = MVT::nxv8i8; +constexpr MVT vint8m2_t = MVT::nxv16i8; +constexpr MVT vint8m4_t = MVT::nxv32i8; +constexpr MVT vint8m8_t = MVT::nxv64i8; +constexpr MVT vint16mf4_t = MVT::nxv1i16; +constexpr MVT vint16mf2_t = MVT::nxv2i16; +constexpr MVT vint16m1_t = MVT::nxv4i16; +constexpr MVT vint16m2_t = MVT::nxv8i16; +constexpr MVT vint16m4_t = MVT::nxv16i16; +constexpr MVT vint16m8_t = MVT::nxv32i16; +constexpr MVT vint32mf2_t = MVT::nxv1i32; +constexpr MVT vint32m1_t = MVT::nxv2i32; +constexpr MVT vint32m2_t = MVT::nxv4i32; +constexpr MVT vint32m4_t = MVT::nxv8i32; +constexpr MVT vint32m8_t = MVT::nxv16i32; +constexpr MVT vint64m1_t = MVT::nxv1i64; +constexpr MVT vint64m2_t = MVT::nxv2i64; +constexpr MVT vint64m4_t = MVT::nxv4i64; +constexpr MVT vint64m8_t = MVT::nxv8i64; +constexpr MVT vfloat16mf4_t = MVT::nxv1f16; +constexpr MVT vfloat16mf2_t = MVT::nxv2f16; +constexpr MVT vfloat16m1_t = MVT::nxv4f16; +constexpr MVT vfloat16m2_t = MVT::nxv8f16; +constexpr MVT vfloat16m4_t = MVT::nxv16f16; +constexpr MVT vfloat16m8_t = MVT::nxv32f16; +constexpr MVT vfloat32mf2_t = MVT::nxv1f32; +constexpr MVT vfloat32m1_t = MVT::nxv2f32; +constexpr MVT vfloat32m2_t = MVT::nxv4f32; +constexpr MVT vfloat32m4_t = MVT::nxv8f32; +constexpr MVT vfloat32m8_t = MVT::nxv16f32; +constexpr MVT vfloat64m1_t = MVT::nxv1f64; +constexpr MVT vfloat64m2_t = MVT::nxv2f64; +constexpr MVT vfloat64m4_t = MVT::nxv4f64; +constexpr MVT vfloat64m8_t = MVT::nxv8f64; +constexpr MVT vbool1_t = MVT::nxv64i1; +constexpr MVT vbool2_t = MVT::nxv32i1; +constexpr MVT vbool4_t = MVT::nxv16i1; +constexpr MVT vbool8_t = MVT::nxv8i1; +constexpr MVT vbool16_t = MVT::nxv4i1; +constexpr MVT vbool32_t = MVT::nxv2i1; +constexpr MVT vbool64_t = MVT::nxv1i1; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..089445f3c62c65b40b2eec1e8b2b0026a81373bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp @@ -0,0 +1,30 @@ +ABI computeTargetABI(const Triple &TT, FeatureBitset FeatureBits, StringRef ABIName) { + auto TargetABI = getTargetABI(ABIName); + bool IsRV64 = TT.isArch64Bit(); + bool IsRV32E = FeatureBits[RISCV::FeatureRV32E]; + if (!ABIName.empty() && TargetABI == ABI_Unknown) { + errs() << "'" << ABIName << "' is not a recognized ABI for this target (ignoring target-abi)\n"; + } + else if (ABIName.startswith("ilp32") && IsRV64) { + errs() << "32-bit ABIs are not supported for 64-bit targets (ignoring target-abi)\n"; + TargetABI = ABI_Unknown; + } + else if (ABIName.startswith("lp64") && !IsRV64) { + errs() << "64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)\n"; + TargetABI = ABI_Unknown; + } + else if (IsRV32E && TargetABI != ABI_ILP32E && TargetABI != ABI_Unknown) { + errs() << "Only the ilp32e ABI is supported for RV32E (ignoring target-abi)\n"; + TargetABI = ABI_Unknown; + } + if (TargetABI != ABI_Unknown) { + return TargetABI; + } + if (IsRV32E) { + return ABI_ILP32E; + } + if (IsRV64) { + return ABI_LP64; + } + return ABI_ILP32; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd4ae74cfd65a034a0b6664d2b6d0d58e37164c6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/getTargetABI.cpp @@ -0,0 +1,24 @@ +ABI getTargetABI(StringRef Str) { + if (Str == "ilp32") { + return ABI_ILP32; + } + if (Str == "ilp32f") { + return ABI_ILP32F; + } + if (Str == "ilp32d") { + return ABI_ILP32D; + } + if (Str == "ilp32e") { + return ABI_ILP32E; + } + if (Str == "lp64") { + return ABI_LP64; + } + if (Str == "lp64f") { + return ABI_LP64F; + } + if (Str == "lp64d") { + return ABI_LP64D; + } + return ABI_Unknown; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp new file mode 100644 index 0000000000000000000000000000000000000000..11291aabba65a0d4a8c320fdbf84a1e20058c498 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp @@ -0,0 +1,18 @@ +inline static StringRef roundingModeToString(RoundingMode RndMode) { + switch (RndMode) { + case RISCVFPRndMode::RNE: + return "rne"; + case RISCVFPRndMode::RTZ: + return "rtz"; + case RISCVFPRndMode::RDN: + return "rdn"; + case RISCVFPRndMode::RUP: + return "rup"; + case RISCVFPRndMode::RMM: + return "rmm"; + case RISCVFPRndMode::DYN: + return "dyn"; + default: + llvm_unreachable("Unknown floating point rounding mode"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a002650de82613870fdc7f3717210aa582d6de4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp @@ -0,0 +1,21 @@ +inline static RoundingMode stringToRoundingMode(StringRef Str) { + if (Str == "rne") { + return RISCVFPRndMode::RNE; + } + if (Str == "rtz") { + return RISCVFPRndMode::RTZ; + } + if (Str == "rdn") { + return RISCVFPRndMode::RDN; + } + if (Str == "rup") { + return RISCVFPRndMode::RUP; + } + if (Str == "rmm") { + return RISCVFPRndMode::RMM; + } + if (Str == "dyn") { + return RISCVFPRndMode::DYN; + } + return RISCVFPRndMode::Invalid; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/validate.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/validate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea0370ee02ed8822169582aef94e41cbbfdc3892 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/BaseInfo/validate.cpp @@ -0,0 +1,5 @@ +void validate(const Triple &TT, const FeatureBitset &FeatureBits) { + if (TT.isArch64Bit() && FeatureBits[RISCV::FeatureRV32E]) { + report_fatal_error("RV32E can't be enabled for an RV64 target"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f33f3e20c0425160b017bce65157ee473529c2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +RISCVELFObjectWriter::RISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit) : MCELFObjectTargetWriter(Is64Bit, OSABI, ELF::EM_RISCV, true) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf93750ac33e2b6b5c2496f27834ac02c19f9105 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp @@ -0,0 +1,3 @@ +std::unique_ptr llvm::createRISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit) { + return std::make_unique(OSABI, Is64Bit); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a44c3413af04ac4c9d6be604ed4b53764f19723 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp @@ -0,0 +1,138 @@ +unsigned RISCVELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const { + const RISCVMCExpr *SExpr; + if (SExpr = dyn_cast(Fixup.getValue())) { + if (SExpr->getKind() == RISCVMCExpr::VK_RISCV_32_PCREL) { + return ELF::R_RISCV_32_PCREL; + } + } + const MCExpr *Expr = Fixup.getValue(); + unsigned Kind = Fixup.getTargetKind(); + if (Kind >= FirstLiteralRelocationKind){ + return Kind - FirstLiteralRelocationKind; + } + if (IsPCRel) { + if (Kind == FK_PCRel_4) { + return ELF::R_RISCV_32_PCREL; + } + if (Kind == RISCV::fixup_riscv_pcrel_hi20) { + return ELF::R_RISCV_PCREL_HI20; + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_i) { + return ELF::R_RISCV_PCREL_LO12_I; + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_s) { + return ELF::R_RISCV_PCREL_LO12_S; + } + if (Kind == FK_Data_4) { + return ELF::R_RISCV_32_PCREL; + } + if (Kind == RISCV::fixup_riscv_got_hi20) { + return ELF::R_RISCV_GOT_HI20; + } + if (Kind == RISCV::fixup_riscv_tls_got_hi20) { + return ELF::R_RISCV_TLS_GOT_HI20; + } + if (Kind == RISCV::fixup_riscv_tls_gd_hi20) { + return ELF::R_RISCV_TLS_GD_HI20; + } + if (Kind == RISCV::fixup_riscv_jal) { + return ELF::R_RISCV_JAL; + } + if (Kind == RISCV::fixup_riscv_branch) { + return ELF::R_RISCV_BRANCH; + } + if (Kind == RISCV::fixup_riscv_rvc_jump) { + return ELF::R_RISCV_RVC_JUMP; + } + if (Kind == RISCV::fixup_riscv_rvc_branch) { + return ELF::R_RISCV_RVC_BRANCH; + } + if (Kind == RISCV::fixup_riscv_call) { + return ELF::R_RISCV_CALL; + } + if (Kind == RISCV::fixup_riscv_call_plt) { + return ELF::R_RISCV_CALL_PLT; + } + if (Kind == RISCV::fixup_pulpv2_loop_setup) { + return ELF::R_PULPV2_LOOP_SETUP; + } + if (Kind == RISCV::fixup_pulpv2_loop_setupi) { + return ELF::R_PULPV2_LOOP_SETUPI; + } + Ctx.reportError(Fixup.getLoc(), "Unsupported relocation type"); + return ELF::R_RISCV_NONE; + } + if (Kind == FK_Data_4) { + return ELF::R_RISCV_32; + } + if (Kind == FK_Data_8) { + return ELF::R_RISCV_64; + } + if (Kind == FK_Data_Add_1) { + return ELF::R_RISCV_ADD8; + } + if (Kind == FK_Data_Add_2) { + return ELF::R_RISCV_ADD16; + } + if (Kind == FK_Data_Add_4) { + return ELF::R_RISCV_ADD32; + } + if (Kind == FK_Data_Add_8) { + return ELF::R_RISCV_ADD64; + } + if (Kind == FK_Data_1) { + Ctx.reportError(Fixup.getLoc(), "1-byte data relocations not supported"); + return ELF::R_RISCV_NONE; + } + if (Kind == FK_Data_2) { + Ctx.reportError(Fixup.getLoc(), "2-byte data relocations not supported"); + return ELF::R_RISCV_NONE; + } + if (Kind == FK_Data_Add_6b) { + return ELF::R_RISCV_SET6; + } + if (Kind == FK_Data_Sub_1) { + return ELF::R_RISCV_SUB8; + } + if (Kind == FK_Data_Sub_2) { + return ELF::R_RISCV_SUB16; + } + if (Kind == FK_Data_Sub_4) { + return ELF::R_RISCV_SUB32; + } + if (Kind == FK_Data_Sub_8) { + return ELF::R_RISCV_SUB64; + } + if (Kind == FK_Data_Sub_6b) { + return ELF::R_RISCV_SUB6; + } + if (Kind == RISCV::fixup_riscv_hi20) { + return ELF::R_RISCV_HI20; + } + if (Kind == RISCV::fixup_riscv_lo12_i) { + return ELF::R_RISCV_LO12_I; + } + if (Kind == RISCV::fixup_riscv_lo12_s) { + return ELF::R_RISCV_LO12_S; + } + if (Kind == RISCV::fixup_riscv_tprel_hi20) { + return ELF::R_RISCV_TPREL_HI20; + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_i) { + return ELF::R_RISCV_TPREL_LO12_I; + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_s) { + return ELF::R_RISCV_TPREL_LO12_S; + } + if (Kind == RISCV::fixup_riscv_tprel_add) { + return ELF::R_RISCV_TPREL_ADD; + } + if (Kind == RISCV::fixup_riscv_relax) { + return ELF::R_RISCV_RELAX; + } + if (Kind == RISCV::fixup_riscv_align) { + return ELF::R_RISCV_ALIGN; + } + Ctx.reportError(Fixup.getLoc(), "Unsupported relocation type"); + return ELF::R_RISCV_NONE; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..946e0c43f12add7422f67306d02b7ec156134cb1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp @@ -0,0 +1,3 @@ +bool needsRelocateWithSymbol(const MCSymbol &Sym, unsigned Type) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c1de5f7645a8cf79fb3b5ae7778810e57bd7de1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +RISCVELFObjectWriter::~RISCVELFObjectWriter() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f273585d2fbc4baf7b49dd8b5f86b5b3c7ee666 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp @@ -0,0 +1,6 @@ +struct AttributeItem { + AttributeType Type; + unsigned Tag; + unsigned IntValue; + std::string StringValue; +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/AttributeType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/AttributeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0bfefe54c5445d3443931e6df0f69603042c15ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/AttributeType.cpp @@ -0,0 +1,6 @@ +enum class AttributeType { + Hidden, + Numeric, + Text, + NumericAndText +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..259b611fd6b6b41d92f0d9791a83cf2ea7314cb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp @@ -0,0 +1,40 @@ +RISCVTargetELFStreamer::RISCVTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI) : RISCVTargetStreamer(S), CurrentVendor("riscv") { + MCAssembler &MCA = getStreamer().getAssembler(); + const FeatureBitset &Features = STI.getFeatureBits(); + auto &MAB = static_cast(MCA.getBackend()); + RISCVABI::ABI ABI = MAB.getTargetABI(); + assert(ABI != RISCVABI::ABI_Unknown && "Improperly initialised target ABI"); + unsigned EFlags = MCA.getELFHeaderEFlags(); + if (Features[RISCV::FeatureStdExtC]) { + EFlags = EFlags | ELF::EF_RISCV_RVC; + } + if (ABI == RISCVABI::ABI_ILP32) { + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_LP64) { + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_ILP32F) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_SINGLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_LP64F) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_SINGLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_ILP32D) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_DOUBLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_LP64D) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_DOUBLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_ILP32E) { + EFlags = EFlags | ELF::EF_RISCV_RVE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_Unknown) { + llvm_unreachable("Improperly initialised target ABI"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3594e1ecd0913c40fb32f167f15a5b118204b93a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp @@ -0,0 +1,23 @@ +size_t RISCVTargetELFStreamer::calculateContentSize() const { + size_t Result = 0; + for (AttributeItem item : Contents) { + switch (item.Type) { + case AttributeType::Hidden: + break; + case AttributeType::Numeric: + Result += getULEB128Size(item.Tag); + Result += getULEB128Size(item.IntValue); + break; + case AttributeType::Text: + Result += getULEB128Size(item.Tag); + Result += item.StringValue.size() + 1; + break; + case AttributeType::NumericAndText: + Result += getULEB128Size(item.Tag); + Result += getULEB128Size(item.IntValue); + Result += item.StringValue.size() + 1; + break; + } + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..093204945bdf9266020a4f252f5ba14556742ce0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer::emitAttribute(unsigned Attribute, unsigned Value) { + setAttributeItem(Attribute, Value, true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c03e079bf63ae8073d2ede610293d88e4fa88eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionNoPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae512f51c9e685aef4b8e839b94d030c9e642b97 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionNoRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c03e079bf63ae8073d2ede610293d88e4fa88eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionNoPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0df4494aa95369ebd9176fc8eb53b6979b3169d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32917ce043bfc2eecfcf523c3a37644e75df0194 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionPop() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5aedb00352e0d7bde5d482842d91f9acc06cbb0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionPush() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9751c5671eb6fc82c84ff719958b4cda4f7fcd60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..daf4623617344c5666aca7cfbbab1513a4eb66ad --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionRelax() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4373afae59249976a7f7250e5c2abc76b45c1349 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer::emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue) { + setAttributeItems(Attribute, IntValue, StringValue, true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ac8a25c6405b9d62d6aa227a9ed6556f32070fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer::emitTextAttribute(unsigned Attribute, StringRef String) { + setAttributeItem(Attribute, String, true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f2489616110f13244dbe49376832a95d9564a9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp @@ -0,0 +1,42 @@ +void RISCVTargetELFStreamer::finishAttributeSection() { + if (Contents.empty()) { + return ; + } + if (AttributeSection) { + Streamer.SwitchSection(AttributeSection); + } + else { + MCAssembler &MCA = getStreamer().getAssembler(); + AttributeSection = MCA.getContext().getELFSection(".riscv.attributes", ELF::SHT_RISCV_ATTRIBUTES, 0); + Streamer.SwitchSection(AttributeSection); + Streamer.emitInt8(ELFAttrs::Format_Version); + } + const size_t VendorHeaderSize = 4 + CurrentVendor.size() + 1; + const size_t TagHeaderSize = 1 + 4; + const size_t ContentsSize = calculateContentSize(); + Streamer.emitInt32(VendorHeaderSize + TagHeaderSize + ContentsSize); + Streamer.emitBytes(CurrentVendor); + Streamer.emitInt8(0); + Streamer.emitInt8(ELFAttrs::File); + Streamer.emitInt32(TagHeaderSize + ContentsSize); + for (AttributeItem item : Contents) { + Streamer.emitULEB128IntValue(item.Tag); + switch (item.Type) { + default: + llvm_unreachable("Invalid attribute type"); + case AttributeType::Numeric: + Streamer.emitULEB128IntValue(item.IntValue); + break; + case AttributeType::Text: + Streamer.emitBytes(item.StringValue); + Streamer.emitInt8(0); + break; + case AttributeType::NumericAndText: + Streamer.emitULEB128IntValue(item.IntValue); + Streamer.emitBytes(item.StringValue); + Streamer.emitInt8(0); + break; + } + } + Contents.clear(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39d66abbc227662e2da806f5d4602ed1f7914637 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp @@ -0,0 +1,8 @@ +AttributeItem *getAttributeItem(unsigned Attribute) { + for (size_t i = 0; i < Contents.size(); ++i) { + if (Contents[i].Tag == Attribute) { + return &Contents[i]; + } + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/getStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/getStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..299b2c39af48ecf340b541686259cbf54c049d4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/getStreamer.cpp @@ -0,0 +1,3 @@ +MCELFStreamer &RISCVTargetELFStreamer::getStreamer() { + return static_cast(Streamer); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..deacd4eaf5d070a5bbea710bbd81b77e0bcd09fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp @@ -0,0 +1,11 @@ +void setAttributeItem(unsigned Attribute, unsigned Value, bool OverwriteExisting) { + if (AttributeItem *Item = getAttributeItem(Attribute)) { + if (!OverwriteExisting) { + return ; + } + Item->Type = AttributeType::Numeric; + Item->IntValue = Value; + return; + } + Contents.push_back({AttributeType::Numeric, Attribute, Value, ""}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd7620a2c8dd656c22df61966125549d23aba3d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp @@ -0,0 +1,11 @@ +void setAttributeItem(unsigned Attribute, StringRef Value, bool OverwriteExisting) { + if (AttributeItem *Item = getAttributeItem(Attribute)) { + if (!OverwriteExisting) { + return ; + } + Item->Type = AttributeType::Text; + Item->StringValue = std::string(Value); + return; + } + Contents.push_back({AttributeType::Text, Attribute, 0, std::string(Value)}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa5d986ed08a7aa3efff0db7d1b2e17d2bfe429a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp @@ -0,0 +1,12 @@ +void setAttributeItems(unsigned Attribute, unsigned IntValue, StringRef StringValue, bool OverwriteExisting) { + if (AttributeItem *Item = getAttributeItem(Attribute)) { + if (!OverwriteExisting) { + return ; + } + Item->Type = AttributeType::NumericAndText; + Item->IntValue = IntValue; + Item->StringValue = std::string(StringValue); + return ; + } + Contents.push_back({AttributeType::NumericAndText, Attribute, IntValue, std::string(StringValue)}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/FixupKind/enumFixups.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/FixupKind/enumFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2a8fd50ab479525729e3374df95a2a58f02f2b75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/FixupKind/enumFixups.cpp @@ -0,0 +1,27 @@ +enum Fixups { + fixup_riscv_hi20 = FirstTargetFixupKind, + fixup_riscv_lo12_i, + fixup_riscv_lo12_s, + fixup_riscv_pcrel_hi20, + fixup_riscv_pcrel_lo12_i, + fixup_riscv_pcrel_lo12_s, + fixup_riscv_got_hi20, + fixup_riscv_tprel_hi20, + fixup_riscv_tprel_lo12_i, + fixup_riscv_tprel_lo12_s, + fixup_riscv_tprel_add, + fixup_riscv_tls_got_hi20, + fixup_riscv_tls_gd_hi20, + fixup_riscv_jal, + fixup_riscv_branch, + fixup_riscv_rvc_jump, + fixup_riscv_rvc_branch, + fixup_riscv_call, + fixup_riscv_call_plt, + fixup_riscv_relax, + fixup_riscv_align, + fixup_pulpv2_loop_setup, + fixup_pulpv2_loop_setupi, + fixup_riscv_invalid, + NumTargetFixupKinds = fixup_riscv_invalid - FirstTargetFixupKind +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/InstPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/InstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71d998a21bbc237891bd1af9439f840ba481ed61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/InstPrinter.cpp @@ -0,0 +1,2 @@ +RISCVInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) : MCInstPrinter(MAI, MII, MRI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c74c266403f121f6785e5bab3d396cffccc06305 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp @@ -0,0 +1,11 @@ +bool RISCVInstPrinter::applyTargetSpecificCLOption(StringRef Opt) { + if (Opt == "no-aliases") { + NoAliases = true; + return true; + } + if (Opt == "numeric") { + ArchRegNames = true; + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/getRegisterName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/getRegisterName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16127a97a65a5a76c80d613eb8cce8d76e67d59d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/getRegisterName.cpp @@ -0,0 +1,3 @@ +const char *RISCVInstPrinter::getRegisterName(unsigned RegNo) { + return getRegisterName(RegNo, ArchRegNames ? RISCV::NoRegAltName : RISCV::ABIRegAltName); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3d1b3ccb7d8db5f73fbefacc28a689c8057e9ad7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp @@ -0,0 +1,7 @@ +void RISCVInstPrinter::printAtomicMemOp(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + const MCOperand &MO = MI->getOperand(OpNo); + assert(MO.isReg() && "printAtomicMemOp can only print register operands"); + O << "("; + printRegName(O, MO.getReg()); + O << ")"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a01d9b2e56167e27ab420b3b5ab9fd027d317f6f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp @@ -0,0 +1,16 @@ +void RISCVInstPrinter::printBranchOperand(const MCInst *MI, uint64_t Address, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + const MCOperand &MO = MI->getOperand(OpNo); + if (!MO.isImm()) { + return printOperand(MI, OpNo, STI, O); + } + if (PrintBranchImmAsAddress) { + uint64_t Target = Address + MO.getImm(); + if (!STI.hasFeature(RISCV::Feature64Bit)) { + Target &= 0xffffffff; + } + O << formatHex(Target); + } + else { + O << MO.getImm(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3809af50492b7bd4de8f984928f1c4261af64686 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp @@ -0,0 +1,10 @@ +void RISCVInstPrinter::printCSRSystemRegister(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + unsigned Imm = MI->getOperand(OpNo).getImm(); + auto SysReg = RISCVSysReg::lookupSysRegByEncoding(Imm); + if (SysReg && SysReg->haveRequiredFeatures(STI.getFeatureBits())) { + O << SysReg->Name; + } + else { + O << Imm; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printFRMArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c645b1207ba1597386ae8a6d312aeefb5fea718 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printFRMArg.cpp @@ -0,0 +1,4 @@ +void RISCVInstPrinter::printFRMArg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + auto FRMArg = static_cast(MI->getOperand(OpNo).getImm()); + O << RISCVFPRndMode::roundingModeToString(FRMArg); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printFenceArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7bb49dab7c797c58c549e93f140553048913667e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printFenceArg.cpp @@ -0,0 +1,19 @@ +void RISCVInstPrinter::printFenceArg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + unsigned FenceArg = MI->getOperand(OpNo).getImm(); + assert (((FenceArg >> 4) == 0) && "Invalid immediate in printFenceArg"); + if ((FenceArg & RISCVFenceField::I) != 0) { + O << 'i'; + } + if ((FenceArg & RISCVFenceField::O) != 0) { + O << 'o'; + } + if ((FenceArg & RISCVFenceField::R) != 0) { + O << 'r'; + } + if ((FenceArg & RISCVFenceField::W) != 0) { + O << 'w'; + } + if (FenceArg == 0) { + O << "unknown"; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fd912416d3c956ccf0b4e72deb8cb1e607606ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printInst.cpp @@ -0,0 +1,22 @@ +void RISCVInstPrinter::printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) { + bool Res = false; + const MCInst *NewMI = MI; + MCInst UncompressedMI; + if (!NoAliases) { + Res = uncompressInst(UncompressedMI, *MI, MRI, STI); + } + if (Res) { + NewMI = const_cast(&UncompressedMI); + } + if (NoAliases) { + printInstruction(NewMI, Address, STI, O); + printAnnotation(O, Annot); + return ; + } + if (!printAliasInstr(NewMI, Address, STI, O)) { + printInstruction(NewMI, Address, STI, O); + printAnnotation(O, Annot); + return ; + } + printAnnotation(O, Annot); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d0f0643720af5ad457f257e02853f99c0f67122 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printOperand.cpp @@ -0,0 +1,14 @@ +void RISCVInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O, const char *Modifier) { + assert((Modifier == 0 || Modifier[0] == 0) && "No modifiers supported"); + const MCOperand &MO = MI->getOperand(OpNo); + if (MO.isReg()) { + printRegName(O, MO.getReg()); + return; + } + if (MO.isImm()) { + O << MO.getImm(); + return; + } + assert(MO.isExpr() && "Unknown operand kind in printOperand"); + MO.getExpr()->print(O, &MAI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printRegName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printRegName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..44d46a100e8d5b198bbeca69ad0ebf8d85a67127 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printRegName.cpp @@ -0,0 +1,3 @@ +void RISCVInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { + OS << getRegisterName(RegNo); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c27e28f489f40b2071578114af59538980a143b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp @@ -0,0 +1,10 @@ +void RISCVInstPrinter::printVMaskReg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + const MCOperand &MO = MI->getOperand(OpNo); + assert(MO.isReg() && "printVMaskReg can only print register operands"); + if (MO.getReg() == RISCV::NoRegister) { + return ; + } + O << ", "; + printRegName(O, MO.getReg()); + O << ".t"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printVTypeI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..182d91094687c23adfa4a02dfafb94b892bd942d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/InstPrinter/printVTypeI.cpp @@ -0,0 +1,34 @@ +void RISCVInstPrinter::printVTypeI(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + unsigned Imm = MI->getOperand(OpNo).getImm(); + RISCVVSEW VSEW = getVSEW(VType); + RISCVVLMUL VLMUL = getVLMUL(VType); + unsigned Sew = 1 << (static_cast(VSEW) + 3); + OS << "e" << Sew; + switch (VLMUL) { + case RISCVVLMUL::LMUL_RESERVED: + llvm_unreachable("Unexpected LMUL value!"); + case RISCVVLMUL::LMUL_1: + case RISCVVLMUL::LMUL_2: + case RISCVVLMUL::LMUL_4: + case RISCVVLMUL::LMUL_8: { + unsigned LMul = 1 << static_cast(VLMUL); + OS << ",m" << LMul; + break; + } + case RISCVVLMUL::LMUL_F2: + case RISCVVLMUL::LMUL_F4: + case RISCVVLMUL::LMUL_F8: { + unsigned LMul = 1 << (8 - static_cast(VLMUL)); + OS << ",mf" << LMul; + break; + } + } + if (isTailAgnostic(VType)) + OS << ",ta"; + else + OS << ",tu"; + if (isMaskAgnostic(VType)) + OS << ",ma"; + else + OS << ",mu"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79d3f43f91b2f9cb6eacf14c4504d0058646f84e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +RISCVMCCodeEmitter(MCContext &ctx, MCInstrInfo const &MCII) : Ctx(ctx), MCII(MCII) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1af400e24ee65974cc8afec327f0489742cc57d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp @@ -0,0 +1,3 @@ +MCCodeEmitter *llvm::createRISCVMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx) { + return new RISCVMCCodeEmitter(Ctx, MCII); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6fd2c7d7f19b595b6dca627db0e856d5448229d2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp @@ -0,0 +1,112 @@ +void RISCVMCCodeEmitter::encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + verifyInstructionPredicates(MI, computeAvailableFeatures(STI.getFeatureBits())); + const MCInstrDesc &Desc = MCII.get(MI.getOpcode()); + unsigned Size = Desc.getSize(); + if (MI.getOpcode() == RISCV::PseudoCALLReg) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if(MI.getOpcode() == RISCV::PseudoCALL) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if(MI.getOpcode() == RISCV::PseudoTAIL) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if(MI.getOpcode() == RISCV::PseudoJump) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if (MI.getOpcode() == RISCV::PseudoAddTPRel) { + MCOperand DestReg = MI.getOperand(0); + MCOperand SrcReg = MI.getOperand(1); + MCOperand TPReg = MI.getOperand(2); + assert(TPReg.isReg() && TPReg.getReg() == RISCV::X4 && "Expected thread pointer as second input to TP-relative add"); + MCOperand SrcSymbol = MI.getOperand(3); + assert(SrcSymbol.isExpr() && "Expected expression as third input to TP-relative add"); + const RISCVMCExpr *Expr = dyn_cast(SrcSymbol.getExpr()); + assert(Expr && Expr->getKind() == RISCVMCExpr::VK_RISCV_TPREL_ADD && "Expected tprel_add relocation on TP-relative symbol"); + Fixups.push_back(MCFixup::create(0, Expr, MCFixupKind(RISCV::fixup_riscv_tprel_add), MI.getLoc())); + if (STI.getFeatureBits()[RISCV::FeatureRelax]) { + const MCConstantExpr *Dummy = MCConstantExpr::create(0, Ctx); + Fixups.push_back(MCFixup::create(0, Dummy, MCFixupKind(RISCV::fixup_riscv_relax), MI.getLoc())); + } + MCInst TmpInst = MCInstBuilder(RISCV::ADD).addOperand(DestReg).addOperand(SrcReg).addOperand(TPReg); + uint32_t Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted += 1; + return; + } + if (Size == 2) { + uint16_t Bits; + Bits = getBinaryCodeForInstr(MI, Fixups, STI); + support::endian::write(OS, Bits,support::little); + MCNumEmitted = MCNumEmitted + 1; + return ; + } + if (Size == 4) { + uint32_t Bits; + Bits = getBinaryCodeForInstr(MI, Fixups, STI); + support::endian::write(OS, Bits,support::little); + MCNumEmitted = MCNumEmitted + 1; + return ; + } + ++MCNumEmitted; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..17b6c231cb7ae743d9900d60f15bb39649137428 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp @@ -0,0 +1,104 @@ +unsigned RISCVMCCodeEmitter::getImmOpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + bool EnableRelax = STI.getFeatureBits()[RISCV::FeatureRelax]; + const MCOperand &MO = MI.getOperand(OpNo); + MCInstrDesc const &Desc = MCII.get(MI.getOpcode()); + unsigned MIFrm = Desc.TSFlags & RISCVII::InstFormatMask; + if (MO.isImm()) { + return MO.getImm(); + } + assert(MO.isExpr() && "getImmOpValue expects only expressions or immediates"); + const MCExpr *Expr = MO.getExpr(); + MCExpr::ExprKind Kind = Expr->getKind(); + RISCV::Fixups FixupKind = RISCV::fixup_riscv_invalid; + bool RelaxCandidate = false; + if (Kind == MCExpr::Target) { + const RISCVMCExpr *RVExpr = cast(Expr); + switch (RVExpr->getKind()) { + case RISCVMCExpr::VK_RISCV_None: + case RISCVMCExpr::VK_RISCV_Invalid: + case RISCVMCExpr::VK_RISCV_32_PCREL: + llvm_unreachable("Unhandled fixup kind!"); + case RISCVMCExpr::VK_RISCV_TPREL_ADD: + llvm_unreachable("VK_RISCV_TPREL_ADD should not represent an instruction operand"); + case RISCVMCExpr::VK_RISCV_LO: + if (MIFrm == RISCVII::InstFormatI) + FixupKind = RISCV::fixup_riscv_lo12_i; + else if (MIFrm == RISCVII::InstFormatS) + FixupKind = RISCV::fixup_riscv_lo12_s; + else + llvm_unreachable("VK_RISCV_LO used with unexpected instruction format"); + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_HI: + FixupKind = RISCV::fixup_riscv_hi20; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_PCREL_LO: + if (MIFrm == RISCVII::InstFormatI) + FixupKind = RISCV::fixup_riscv_pcrel_lo12_i; + else if (MIFrm == RISCVII::InstFormatS) + FixupKind = RISCV::fixup_riscv_pcrel_lo12_s; + else + llvm_unreachable("VK_RISCV_PCREL_LO used with unexpected instruction format"); + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_PCREL_HI: + FixupKind = RISCV::fixup_riscv_pcrel_hi20; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_GOT_HI: + FixupKind = RISCV::fixup_riscv_got_hi20; + break; + case RISCVMCExpr::VK_RISCV_TPREL_LO: + if (MIFrm == RISCVII::InstFormatI) + FixupKind = RISCV::fixup_riscv_tprel_lo12_i; + else if (MIFrm == RISCVII::InstFormatS) + FixupKind = RISCV::fixup_riscv_tprel_lo12_s; + else + llvm_unreachable("VK_RISCV_TPREL_LO used with unexpected instruction format"); + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_TPREL_HI: + FixupKind = RISCV::fixup_riscv_tprel_hi20; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_TLS_GOT_HI: + FixupKind = RISCV::fixup_riscv_tls_got_hi20; + break; + case RISCVMCExpr::VK_RISCV_TLS_GD_HI: + FixupKind = RISCV::fixup_riscv_tls_gd_hi20; + break; + case RISCVMCExpr::VK_RISCV_CALL: + FixupKind = RISCV::fixup_riscv_call; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_CALL_PLT: + FixupKind = RISCV::fixup_riscv_call_plt; + RelaxCandidate = true; + break; + } + } + else if (Kind == MCExpr::SymbolRef && cast(Expr)->getKind() == MCSymbolRefExpr::VK_None) { + if (Desc.getOpcode() == RISCV::JAL) { + FixupKind = RISCV::fixup_riscv_jal; + } + else if (MIFrm == RISCVII::InstFormatB) { + FixupKind = RISCV::fixup_riscv_branch; + } + else if (MIFrm == RISCVII::InstFormatCJ) { + FixupKind = RISCV::fixup_riscv_rvc_jump; + } + else if (MIFrm == RISCVII::InstFormatCB) { + FixupKind = RISCV::fixup_riscv_rvc_branch; + } + } + assert(FixupKind != RISCV::fixup_riscv_invalid && "Unhandled expression!"); + Fixups.push_back(MCFixup::create(0, Expr, MCFixupKind(FixupKind), MI.getLoc())); + ++MCNumFixups; + if (EnableRelax && RelaxCandidate) { + const MCConstantExpr *Dummy = MCConstantExpr::create(0, Ctx); + Fixups.push_back(MCFixup::create(0, Dummy, MCFixupKind(RISCV::fixup_riscv_relax), MI.getLoc())); + ++MCNumFixups; + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0608bfeacb78631d4bd74acd7635d1eddcd1e943 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp @@ -0,0 +1,9 @@ +unsigned RISCVMCCodeEmitter::getImmOpValueAsr1(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + const MCOperand &MO = MI.getOperand(OpNo); + if (MO.isImm()) { + unsigned Res = MO.getImm(); + assert((Res & 1) == 0 && "LSB is non-zero"); + return Res >> 1; + } + return getImmOpValue(MI, OpNo, Fixups, STI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2d6e76be7a6d84b4d4ed0441e831ac55aeef8b4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp @@ -0,0 +1,9 @@ +unsigned RISCVMCCodeEmitter::getImmOpValueMinus1(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + const MCOperand &MO = MI.getOperand(OpNo); + if (MO.isImm()) { + unsigned Res = MO.getImm(); + assert((Res & 1) == 0 && "LSB is non-zero"); + return Res >> 1; + } + return getImmOpValue(MI, OpNo, Fixups, STI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a40f05071c26ff021d38728e7ba22287d395082f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp @@ -0,0 +1,44 @@ +unsigned RISCVMCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + if (MO.isReg()) { + return Ctx.getRegisterInfo()->getEncodingValue(MO.getReg()); + } + if (MO.isImm()) { + return static_cast(MO.getImm()); + } + if (MO.isExpr()) { + if (MI.getOpcode() == RISCV::LOOP0setup) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP1setup) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP0setupi) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setupi), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP1setupi) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setupi), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP0starti) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP1starti) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP0endi) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP1endi) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP0counti) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + if (MI.getOpcode() == RISCV::LOOP1counti) { + Fixups.push_back(MCFixup::create(0, MO.getExpr(), MCFixupKind(RISCV::fixup_pulpv2_loop_setup), MI.getLoc())); + } + MCNumFixups = MCNumFixups + 1; + return 0; + } + llvm_unreachable("Unhandled expression!"); + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb6c71839d4ba3ae26572009f586539be7e0d390 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp @@ -0,0 +1,12 @@ +unsigned RISCVMCCodeEmitter::getVMaskReg(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + MCOperand MO = MI.getOperand(OpNo); + assert(MO.isReg() && "Expected a register."); + switch (MO.getReg()) { + case RISCV::V0: + return 0; + case RISCV::NoRegister: + return 1; + default: + llvm_unreachable("Invalid mask register."); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59ae51d078977c3022b0a7003a3a5b6cc6cfccd0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +~RISCVMCCodeEmitter() override { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/MCExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/MCExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da4f6b8260348d1f5ae72c777c76f77b19b1c56b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/MCExpr.cpp @@ -0,0 +1,2 @@ +explicit RISCVMCExpr(const MCExpr *Expr, VariantKind Kind) : Expr(Expr), Kind(Kind) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/classof1.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c18a16e9b79dfbe76cb62202c2b20dac602f027b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/classof1.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/classof2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3b49b8ebace06424f104635e86ad479c4c2d122 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/classof2.cpp @@ -0,0 +1,3 @@ +static bool classof(const RISCVMCExpr *) { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/create.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/create.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39113cf36ed270b0c6d69b5360588428237b2475 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/create.cpp @@ -0,0 +1,3 @@ +const RISCVMCExpr *RISCVMCExpr::create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx) { + return new (Ctx) RISCVMCExpr(Expr, Kind); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/enumVariantKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/enumVariantKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d3ea350c3d62324aeaad87cabbbfd85c3ea4588 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/enumVariantKind.cpp @@ -0,0 +1,17 @@ +enum VariantKind { + VK_RISCV_None, + VK_RISCV_LO, + VK_RISCV_HI, + VK_RISCV_PCREL_LO, + VK_RISCV_PCREL_HI, + VK_RISCV_GOT_HI, + VK_RISCV_TPREL_LO, + VK_RISCV_TPREL_HI, + VK_RISCV_TPREL_ADD, + VK_RISCV_TLS_GOT_HI, + VK_RISCV_TLS_GD_HI, + VK_RISCV_CALL, + VK_RISCV_CALL_PLT, + VK_RISCV_32_PCREL, + VK_RISCV_Invalid, + }; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a00985bb9a0e45063ef40c9356a6d51ba318393 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp @@ -0,0 +1,14 @@ +bool RISCVMCExpr::evaluateAsConstant(int64_t &Res) const { + MCValue Value; + if (Kind == VK_RISCV_PCREL_HI || Kind == VK_RISCV_PCREL_LO || Kind == VK_RISCV_GOT_HI || Kind == VK_RISCV_TPREL_HI || Kind == VK_RISCV_TPREL_LO || Kind == VK_RISCV_TPREL_ADD || Kind == VK_RISCV_TLS_GOT_HI || Kind == VK_RISCV_TLS_GD_HI || Kind == VK_RISCV_CALL || Kind == VK_RISCV_CALL_PLT) { + return false; + } + if (!getSubExpr()->evaluateAsRelocatable(Value, nullptr, nullptr)) { + return false; + } + if (!Value.isAbsolute()) { + return false; + } + Res = evaluateAsInt64(Value.getConstant()); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2d2ca349a0e1f92adb5fcbf38353c231ec73066f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp @@ -0,0 +1,10 @@ +int64_t RISCVMCExpr::evaluateAsInt64(int64_t Value) const { + switch (Kind) { + case VK_RISCV_LO: + return SignExtend64<12>(Value); + case VK_RISCV_HI: + return ((Value + 0x800) >> 12) & 0xfffff; + default: + llvm_unreachable("Invalid kind"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6e71bde5f7592f5ef4591791bcb86f58dc40765f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp @@ -0,0 +1,23 @@ +bool RISCVMCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const { + if (!getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup)){ + return false; + } + if (Res.getSymA() && Res.getSymB()) { + switch (getKind()) { + default: + return true; + case VK_RISCV_LO: + case VK_RISCV_HI: + case VK_RISCV_PCREL_LO: + case VK_RISCV_PCREL_HI: + case VK_RISCV_GOT_HI: + case VK_RISCV_TPREL_LO: + case VK_RISCV_TPREL_HI: + case VK_RISCV_TPREL_ADD: + case VK_RISCV_TLS_GOT_HI: + case VK_RISCV_TLS_GD_HI: + return false; + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..60f17e85d923bec938d38573f38737261c999694 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp @@ -0,0 +1,3 @@ +MCFragment *findAssociatedFragment() const override { + return getSubExpr()->findAssociatedFragment(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89e8ce3b031ea65a056d84127e579bd2815264c2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp @@ -0,0 +1,11 @@ +void RISCVMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const { + switch (getKind()) { + default: + return; + case VK_RISCV_TPREL_HI: + case VK_RISCV_TLS_GOT_HI: + case VK_RISCV_TLS_GD_HI: + break; + } + fixELFSymbolsInTLSFixupsImpl(getSubExpr(), Asm); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9380184f705c3b8053f961d7f265d676d373e6c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp @@ -0,0 +1,23 @@ +static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm) { + switch (Expr->getKind()) { + case MCExpr::Target: + llvm_unreachable("Can't handle nested target expression"); + break; + case MCExpr::Constant: + break; + case MCExpr::Binary: { + const MCBinaryExpr *BE = cast(Expr); + fixELFSymbolsInTLSFixupsImpl(BE->getLHS(), Asm); + fixELFSymbolsInTLSFixupsImpl(BE->getRHS(), Asm); + break; + } + case MCExpr::SymbolRef: { + const MCSymbolRefExpr &SymRef = *cast(Expr); + cast(SymRef.getSymbol()).setType(ELF::STT_TLS); + break; + } + case MCExpr::Unary: + fixELFSymbolsInTLSFixupsImpl(cast(Expr)->getSubExpr(), Asm); + break; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8873d03d56532262e2e464651e7ed13ac5736a6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getKind.cpp @@ -0,0 +1,3 @@ +VariantKind getKind() const { + return Kind; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89987b297a722bf3d6b3be128c1836a8216b5cb9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp @@ -0,0 +1,41 @@ +const MCFixup *RISCVMCExpr::getPCRelHiFixup(const MCFragment **DFOut) const { + MCValue AUIPCLoc; + if (!getSubExpr()->evaluateAsRelocatable(AUIPCLoc, nullptr, nullptr)) { + return nullptr; + } + const MCSymbolRefExpr *AUIPCSRE = AUIPCLoc.getSymA(); + if (!AUIPCSRE) { + return nullptr; + } + const MCSymbol *AUIPCSymbol = &AUIPCSRE->getSymbol(); + const auto *DF = dyn_cast_or_null(AUIPCSymbol->getFragment()); + if (!DF) { + return nullptr; + } + uint64_t Offset = AUIPCSymbol->getOffset(); + if (DF->getContents().size() == Offset) { + DF = dyn_cast_or_null(DF->getNextNode()); + if (!DF) { + return nullptr; + } + Offset = 0; + } + for (const MCFixup &F : DF->getFixups()) { + if (F.getOffset() != Offset) { + continue; + } + switch ((unsigned)F.getKind()) { + default: + continue; + case RISCV::fixup_riscv_got_hi20: + case RISCV::fixup_riscv_tls_got_hi20: + case RISCV::fixup_riscv_tls_gd_hi20: + case RISCV::fixup_riscv_pcrel_hi20: + if (DFOut) { + *DFOut = DF; + } + return &F; + } + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getSubExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getSubExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0938efd3638913ba4ab06b155113748fbcf3ba7b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getSubExpr.cpp @@ -0,0 +1,3 @@ +const MCExpr *getSubExpr() const { + return Expr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ceea7690a66c81e8392c3762eeb6bdc159adfb2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp @@ -0,0 +1,33 @@ +RISCVMCExpr::VariantKind RISCVMCExpr::getVariantKindForName(StringRef name) { + if (name == "lo") { + return RISCVMCExpr::VK_RISCV_LO; + } + if (name == "hi") { + return RISCVMCExpr::VK_RISCV_HI; + } + if (name == "pcrel_lo") { + return RISCVMCExpr::VK_RISCV_PCREL_LO; + } + if (name == "pcrel_hi") { + return RISCVMCExpr::VK_RISCV_PCREL_HI; + } + if (name == "got_pcrel_hi") { + return RISCVMCExpr::VK_RISCV_GOT_HI; + } + if (name == "tprel_lo") { + return RISCVMCExpr::VK_RISCV_TPREL_LO; + } + if (name == "tprel_hi") { + return RISCVMCExpr::VK_RISCV_TPREL_HI; + } + if (name == "tprel_add") { + return RISCVMCExpr::VK_RISCV_TPREL_ADD; + } + if (name == "tls_ie_pcrel_hi") { + return RISCVMCExpr::VK_RISCV_TLS_GOT_HI; + } + if (name == "tls_gd_pcrel_hi") { + return RISCVMCExpr::VK_RISCV_TLS_GD_HI; + } + return RISCVMCExpr::VK_RISCV_Invalid; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getVariantKindName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getVariantKindName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a08480b3ccbf2b76c97f73a0b86881ba90264eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/getVariantKindName.cpp @@ -0,0 +1,26 @@ +StringRef RISCVMCExpr::getVariantKindName(VariantKind Kind) { + switch (Kind) { + case VK_RISCV_LO: + return "lo"; + case VK_RISCV_HI: + return "hi"; + case VK_RISCV_PCREL_LO: + return "pcrel_lo"; + case VK_RISCV_PCREL_HI: + return "pcrel_hi"; + case VK_RISCV_GOT_HI: + return "got_pcrel_hi"; + case VK_RISCV_TPREL_LO: + return "tprel_lo"; + case VK_RISCV_TPREL_HI: + return "tprel_hi"; + case VK_RISCV_TPREL_ADD: + return "tprel_add"; + case VK_RISCV_TLS_GOT_HI: + return "tls_ie_pcrel_hi"; + case VK_RISCV_TLS_GD_HI: + return "tls_gd_pcrel_hi"; + default: + llvm_unreachable("Invalid ELF symbol kind"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/printImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/printImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55d93d4d19a85acb53eace95c71cbd1dc389bcca --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/printImpl.cpp @@ -0,0 +1,82 @@ +void RISCVMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const { + VariantKind Kind = getKind(); + if (Kind == RISCVMCExpr::VK_RISCV_PCREL_LO) { + OS << "%pcrel_lo("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_PCREL_HI) { + OS << "%pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TPREL_LO) { + OS << "%tprel_lo("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TPREL_HI) { + OS << "%tprel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TPREL_ADD) { + OS << "%tprel_add("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_LO) { + OS << "%lo("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_HI) { + OS << "%hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_GOT_HI) { + OS << "%got_pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TLS_GOT_HI) { + OS << "%tls_ie_pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TLS_GD_HI) { + OS << "%tls_gd_pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_CALL_PLT) { + OS << ""; + Expr->print(OS, MAI); + OS << "@plt"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_CALL) { + OS << ""; + Expr->print(OS, MAI); + OS << ""; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_None) { + OS << ""; + Expr->print(OS, MAI); + OS << ""; + return ; + } + llvm_unreachable("Invalid ELF symbol kind"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35e420112aded4140f320dbc4ad4ac870d3ee31a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp @@ -0,0 +1,3 @@ +void RISCVMCExpr::visitUsedExpr(MCStreamer &Streamer) const { + Streamer.visitUsedExpr(*getSubExpr()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..451277e94556a0608d71ebc2c76e620e59e0ec99 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp @@ -0,0 +1,2 @@ +explicit RISCVMCInstrAnalysis(const MCInstrInfo *Info) : MCInstrAnalysis(Info) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32d2fe18d6bb48ee672756467a7ed995da2ae810 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,15 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetMC() { + for (Target *T : {&getTheRISCV32Target(), &getTheRISCV64Target()}) { + TargetRegistry::RegisterMCAsmInfo(*T, createRISCVMCAsmInfo); + TargetRegistry::RegisterMCInstrInfo(*T, createRISCVMCInstrInfo); + TargetRegistry::RegisterMCRegInfo(*T, createRISCVMCRegisterInfo); + TargetRegistry::RegisterMCAsmBackend(*T, createRISCVAsmBackend); + TargetRegistry::RegisterMCCodeEmitter(*T, createRISCVMCCodeEmitter); + TargetRegistry::RegisterMCInstPrinter(*T, createRISCVMCInstPrinter); + TargetRegistry::RegisterMCSubtargetInfo(*T, createRISCVMCSubtargetInfo); + TargetRegistry::RegisterObjectTargetStreamer(*T, createRISCVObjectTargetStreamer); + TargetRegistry::RegisterMCInstrAnalysis(*T, createRISCVInstrAnalysis); + TargetRegistry::RegisterAsmTargetStreamer(*T, createRISCVAsmTargetStreamer); + TargetRegistry::RegisterNullTargetStreamer(*T, createRISCVNullTargetStreamer); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..383b52ff72a10ac127ceb76173b77049aa5f0fd9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createRISCVAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool isVerboseAsm) { + return new RISCVTargetAsmStreamer(S, OS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b45661b6fa3382d3f641c2fe3bb34f05970d975 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp @@ -0,0 +1,3 @@ +static MCInstrAnalysis *createRISCVInstrAnalysis(const MCInstrInfo *Info) { + return new RISCVMCInstrAnalysis(Info); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4cffda02c27994572bf42f788d40d04d2e73e7d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,7 @@ +static MCAsmInfo *createRISCVMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options) { + MCAsmInfo *MAI = new RISCVMCAsmInfo(TT); + MCRegister SP = MRI.getDwarfRegNum(RISCV::X2, true); + MCCFIInstruction Inst = MCCFIInstruction::cfiDefCfa(nullptr, SP, 0); + MAI->addInitialFrameState(Inst); + return MAI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a6f660619bed0d38c739e2e0da3274e6d81b2a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp @@ -0,0 +1,3 @@ +static MCInstPrinter *createRISCVMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) { + return new RISCVInstPrinter(MAI, MII, MRI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..758df40aa015a0c161f506e8e7ea1cad2d8bcc8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,5 @@ +static MCInstrInfo *createRISCVMCInstrInfo() { + MCInstrInfo *X = new MCInstrInfo(); + InitRISCVMCInstrInfo(X); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb7c34dd1c8354b6b0fa67e4f7244d55c1ddc0f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,5 @@ +static MCRegisterInfo *createRISCVMCRegisterInfo(const Triple &TT) { + MCRegisterInfo *X = new MCRegisterInfo(); + InitRISCVMCRegisterInfo(X, RISCV::X1); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..78ee741005540e6c3e698640daefd523ceecfb94 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,7 @@ +static MCSubtargetInfo *createRISCVMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { + std::string CPUName = std::string(CPU); + if (CPUName.empty()) { + CPUName = TT.isArch64Bit() ? "generic-rv64" : "generic-rv32"; + } + return createRISCVMCSubtargetInfoImpl(TT, CPUName, CPUName, FS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a625f2d3b010f64ddbcf02b017f0f07c7f52e3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createRISCVNullTargetStreamer(MCStreamer &S) { + return new RISCVTargetStreamer(S); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e4eba726c087cde28f6692f50ef5398beba9c98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp @@ -0,0 +1,7 @@ +static MCTargetStreamer *createRISCVObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) { + const Triple &TT = STI.getTargetTriple(); + if (TT.isOSBinFormatELF()) { + return new RISCVTargetELFStreamer(S, STI); + } + return new RISCVTargetELFStreamer(S, STI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d30e225f0f4ef2635c256d52524ad347fc5927d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp @@ -0,0 +1,55 @@ +bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size, uint64_t &Target) const { + if (Inst.getOpcode() == RISCV::BEQ) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BNE) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BLT) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BGE) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BLTU) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BGEU) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_BEQZ) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_BNEZ) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::JAL) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_JAL) { + Target = Addr + Inst.getOperand(0).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_J) { + Target = Addr + Inst.getOperand(0).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::P_BEQIMM) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::P_BNEIMM) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/generateInstSeq.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/generateInstSeq.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0060cac9c917e49fbeb4ce1922e603e42795b1b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/generateInstSeq.cpp @@ -0,0 +1,24 @@ +void generateInstSeq(int64_t Val, bool IsRV64, InstSeq &Res) { + if (isInt<32>(Val)) { + int64_t Hi20 = ((Val + 0x800) >> 12) & 0xFFFFF; + int64_t Lo12 = SignExtend64<12>(Val); + if (Hi20) { + Res.push_back(Inst(RISCV::LUI, Hi20)); + } + if (Lo12 || Hi20 == 0) { + unsigned AddiOpc = (IsRV64 && Hi20) ? RISCV::ADDIW : RISCV::ADDI; + Res.push_back(Inst(AddiOpc, Lo12)); + } + return; + } + assert(IsRV64 && "Can't emit >32-bit imm for non-RV64 target"); + int64_t Lo12 = SignExtend64<12>(Val); + int64_t Hi52 = ((uint64_t)Val + 0x800ull) >> 12; + int ShiftAmount = 12 + findFirstSet((uint64_t)Hi52); + Hi52 = SignExtend64(Hi52 >> (ShiftAmount - 12), 64 - ShiftAmount); + generateInstSeq(Hi52, IsRV64, Res); + Res.push_back(Inst(RISCV::SLLI, ShiftAmount)); + if (Lo12) { + Res.push_back(Inst(RISCV::ADDI, Lo12)); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/getIntMatCost.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/getIntMatCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6665d21f4034540dc8eec61a6bbfe54ef663c6b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/getIntMatCost.cpp @@ -0,0 +1,11 @@ +int getIntMatCost(const APInt &Val, unsigned Size, bool IsRV64) { + int PlatRegSize = IsRV64 ? 64 : 32; + int Cost = 0; + for (unsigned ShiftVal = 0; ShiftVal < Size; ShiftVal += PlatRegSize) { + APInt Chunk = Val.ashr(ShiftVal).sextOrTrunc(PlatRegSize); + InstSeq MatSeq; + generateInstSeq(Chunk.getSExtValue(), IsRV64, MatSeq); + Cost += MatSeq.size(); + } + return std::max(1, Cost); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/structInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/structInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72c131a03e62d00e247b4679e470e545130c5500 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/MatInt/structInst.cpp @@ -0,0 +1,6 @@ +struct Inst { + unsigned Opc; + int64_t Imm; + Inst(unsigned Opc, int64_t Imm) : Opc(Opc), Imm(Imm) { + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d3492c3c4b4b024f7373e13055b92638d05fb48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp @@ -0,0 +1,2 @@ +RISCVTargetAsmStreamer::RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS) : RISCVTargetStreamer(S), OS(OS) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b94e431facda3c3c5b1dd95a39117c17ef23685e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp @@ -0,0 +1,2 @@ +RISCVTargetStreamer::RISCVTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82213bfb7296465510fc0319bf1ff39b9674d8af --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitAttribute(unsigned Attribute, unsigned Value) { + OS << "\t.attribute\t" << Attribute << ", " << Twine(Value) << "\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..870438b26a6d2717a882ceaf9d551131fdbc7e9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitAttribute(unsigned Attribute, unsigned Value) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20d877300fc7bca5ba6b1617a5338511c2bc87df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionNoPIC() { + OS << "\t.option\tnopic\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24d360b9a626b3ca30613e07a043e8c36ad04166 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionNoPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75229057eafcbd9f9adcbb535c46944ef23b39a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionNoRVC() { + OS << "\t.option\tnorvc\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64100dd55ed23fbe89ab192674b0e7caa64a0fe3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionNoRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a3b8cb02d7a56b7872fcf7a739c9dbe383df43d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionNoRelax() { + OS << "\t.option\tnorelax\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..014cd7022e9839f21fa8aa4768a30cdaeffd861d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionNoRelax() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47ea756b2e1b80b5b651c38d05504fe653b40088 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionPIC() { + OS << "\t.option\tpic\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06c067ee99a154f8e224930842bc774d5dcb47e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f43b702a23d57cdb8d0a629f253d1d0c953333c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionPop() { + OS << "\t.option\tpop\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ca636170f51e633b77f4f3398472f0a640b19ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionPop() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e01d6991e3599028e0801aa2283d93fb6aecf608 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionPush() { + OS << "\t.option\tpush\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5badbcf4aee44982315a64b9d9d7b63501f1ca52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionPush() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3daa81c9defb1fe5908214512a9b997da9df84e9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionRVC() { + OS << "\t.option\trvc\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e057b99bef751f948ce1248d8808e6b4a42f5cc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..883a2f11627883b745590856102761fa69ea9917 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionRelax() { + OS << "\t.option\trelax\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a501aa992af95ee95eb223b9d508d37abfcd2344 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionRelax() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9445cc18a399c4819969cfc8313374b8500f69c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void RISCVTargetAsmStreamer::emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22139c129524dd04c8743fd1456fa9302f4052b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a944ac5265c68f9afd88fd4ea951f900ad33720 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp @@ -0,0 +1,82 @@ +void RISCVTargetStreamer::emitTargetAttributes(const MCSubtargetInfo &STI) { + if (STI.hasFeature(RISCV::FeatureRV32E)) { + emitAttribute(RISCVAttrs::STACK_ALIGN, RISCVAttrs::ALIGN_4); + } + else { + emitAttribute(RISCVAttrs::STACK_ALIGN, RISCVAttrs::ALIGN_16); + } + std::string Arch = "rv32"; + if (STI.hasFeature(RISCV::Feature64Bit)) { + Arch = "rv64"; + } + if (STI.hasFeature(RISCV::FeatureRV32E)) { + Arch += "e1p9"; + } + else { + Arch += "i2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtM)) { + Arch += "_m2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtA)) { + Arch += "_a2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtF)) { + Arch += "_f2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtD)) { + Arch += "_d2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtC)) { + Arch += "_c2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtB)) { + Arch += "_b0p93"; + } + if (STI.hasFeature(RISCV::FeatureStdExtV)) { + Arch += "_v0p10"; + } + if (STI.hasFeature(RISCV::FeatureExtZfh)) { + Arch += "_zfh0p1"; + } + if (STI.hasFeature(RISCV::FeatureExtZba)) { + Arch += "_zba0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbb)) { + Arch += "_zbb0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbc)) { + Arch += "_zbc0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbe)) { + Arch += "_zbe0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbf)) { + Arch += "_zbf0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbm)) { + Arch += "_zbm0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbp)) { + Arch += "_zbp0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbproposedc)) { + Arch += "_zbproposedc0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbr)) { + Arch += "_zbr0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbs)) { + Arch += "_zbs0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbt)) { + Arch += "_zbt0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZvamo)) { + Arch += "_zvamo0p10"; + } + if (STI.hasFeature(RISCV::FeatureStdExtZvlsseg)) { + Arch += "_zvlsseg0p10"; + } + emitTextAttribute(RISCVAttrs::ARCH, Arch); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8adf9578c7a98e95d9518eca4e5e5ae261c9a3d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitTextAttribute(unsigned Attribute, StringRef String) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8d81c0b722b115d155adfa07cf4f9f53e883f06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitTextAttribute(unsigned Attribute, StringRef String) { + OS << "\t.attribute\t" << Attribute << ", \"" << String << "\"\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finish.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finish.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de1f155329e0d6b104ab1c4139016e3276f42f33 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finish.cpp @@ -0,0 +1,3 @@ +void RISCVTargetStreamer::finish() { + finishAttributeSection(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7097a145d4931a634134109460465f57fb62532d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp @@ -0,0 +1,2 @@ +void RISCVTargetAsmStreamer::finishAttributeSection() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dbe790a4f46ac0e73ef02fbaa1295159764b0427 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::finishAttributeSection() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e448a59e103a5b278a32626fa22971c33e4e81a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp @@ -0,0 +1,3 @@ +RISCVCleanupVSETVLI() : MachineFunctionPass(ID) { + initializeRISCVCleanupVSETVLIPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58e6684cb0995575e8263291d2d1b4be23fb8be5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createRISCVCleanupVSETVLIPass() { + return new RISCVCleanupVSETVLI(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6d109b669c5aa09fb65618028e6a8e7de39a5c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.setPreservesCFG(); + MachineFunctionPass::getAnalysisUsage(AU); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..927cff9993216c33d5539c62ac637b71f7f1d1ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_CLEANUP_VSETVLI_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5b9c0930d3d58a2f4601a4830a241ebb30ca4fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::IsSSA); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c97a1eaf95f42cd86d239dbfe99d01c3ca33235b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp @@ -0,0 +1,48 @@ +bool RISCVCleanupVSETVLI::runOnMachineBasicBlock(MachineBasicBlock &MBB) { + bool Changed = false; + MachineInstr *PrevVSETVLI = nullptr; + for (auto MII = MBB.begin(), MIE = MBB.end(); MII != MIE;) { + MachineInstr &MI = *MII++; + if (MI.getOpcode() != RISCV::PseudoVSETVLI && MI.getOpcode() != RISCV::PseudoVSETIVLI) { + if (PrevVSETVLI && (MI.isCall() || MI.modifiesRegister(RISCV::VL) || MI.modifiesRegister(RISCV::VTYPE))) { + PrevVSETVLI = nullptr; + } + continue; + } + if (!PrevVSETVLI || !MI.getOperand(0).isDead()) { + PrevVSETVLI = &MI; + continue; + } + if (PrevVSETVLI->getOpcode() != MI.getOpcode()) { + PrevVSETVLI = &MI; + continue; + } + Register AVLReg; + bool SameAVL = false; + if (MI.getOpcode() == RISCV::PseudoVSETVLI) { + AVLReg = MI.getOperand(1).getReg(); + SameAVL = PrevVSETVLI->getOperand(1).getReg() == AVLReg; + } + else { + SameAVL = PrevVSETVLI->getOperand(1).getImm() == MI.getOperand(1).getImm(); + } + int64_t PrevVTYPEImm = PrevVSETVLI->getOperand(2).getImm(); + int64_t VTYPEImm = MI.getOperand(2).getImm(); + if (!SameAVL || PrevVTYPEImm != VTYPEImm) { + PrevVSETVLI = &MI; + continue; + } + if ((MI.getOpcode() == RISCV::PseudoVSETVLI) && (AVLReg == RISCV::X0)) { + assert((PrevVSETVLI->getOpcode() == RISCV::PseudoVSETVLI) && "Unexpected vsetvli opcode."); + Register PrevOutVL = PrevVSETVLI->getOperand(0).getReg(); + Register OutVL = MI.getOperand(0).getReg(); + if (PrevOutVL == RISCV::X0 && OutVL != RISCV::X0) { + PrevVSETVLI = &MI; + continue; + } + } + MI.eraseFromParent(); + Changed = true; + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ece27d6d7d034f89e389b6590f98d8078dfce2d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp @@ -0,0 +1,14 @@ +bool RISCVCleanupVSETVLI::runOnMachineFunction(MachineFunction &MF) { + if (skipFunction(MF.getFunction())) { + return false; + } + const RISCVSubtarget &ST = MF.getSubtarget(); + if (!ST.hasStdExtV()) { + return false; + } + bool Changed = false; + for (MachineBasicBlock &MBB : MF) { + Changed |= runOnMachineBasicBlock(MBB); + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71ee3fafd667bcf32e20bebcd315637773781ed5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp @@ -0,0 +1,3 @@ +RISCVExpandAtomicPseudo() : MachineFunctionPass(ID) { + initializeRISCVExpandAtomicPseudoPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83f0448b4561787d31d166f084a5a48eafb4258b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createRISCVExpandAtomicPseudoPass() { + return new RISCVExpandAtomicPseudo(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5dd006e57bfbbd88b5a4764fde7a58c18230b358 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandAtomicPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64fa3c6df2e50d7812ffe10519289edb89f87299 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp @@ -0,0 +1,878 @@ +bool RISCVExpandAtomicPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI) { + if (MBBI->getOpcode() == RISCV::PseudoAtomicLoadNand32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoAtomicLoadNand64) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicSwap32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadAdd32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadSub32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadNand32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadMax32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadMin32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadUMax32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadUMin32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoCmpXchg32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopHeadMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register CmpValReg = MI.getOperand(3).getReg(); + Register NewValReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(IsMasked ? 6 : 5).getImm()); + if (!IsMasked) { + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(DestReg).addReg(CmpValReg).addMBB(DoneMBB); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(NewValReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + else { + Register MaskReg = MI.getOperand(5).getReg(); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(CmpValReg).addMBB(DoneMBB); + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoCmpXchg64) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopHeadMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register CmpValReg = MI.getOperand(3).getReg(); + Register NewValReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(IsMasked ? 6 : 5).getImm()); + if (!IsMasked) { + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(DestReg).addReg(CmpValReg).addMBB(DoneMBB); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(NewValReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + else { + Register MaskReg = MI.getOperand(5).getReg(); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(CmpValReg).addMBB(DoneMBB); + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedCmpXchg32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopHeadMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register CmpValReg = MI.getOperand(3).getReg(); + Register NewValReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(IsMasked ? 6 : 5).getImm()); + if (!IsMasked) { + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(DestReg).addReg(CmpValReg).addMBB(DoneMBB); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(NewValReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + else { + Register MaskReg = MI.getOperand(5).getReg(); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(CmpValReg).addMBB(DoneMBB); + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be55c65dfca4dd0ed4321f773d46c7d6e86200c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_EXPAND_ATOMIC_PSEUDO_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd6bfc81864cf513dbe24e299d2cc82c81f36b27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVExpandAtomicPseudo::runOnMachineFunction(MachineFunction &MF) { + TII = static_cast(MF.getSubtarget().getInstrInfo()); + bool Modified = false; + for (auto &MBB : MF) { + Modified |= expandMBB(MBB); + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..619ea5f1fb6cf92b77a790a42642051fc3450f92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp @@ -0,0 +1,3 @@ +RISCVExpandPseudo() : MachineFunctionPass(ID) { + initializeRISCVExpandPseudoPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..207e3c11c810551063e0c2b55a3d9af32a794d7b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createRISCVExpandPseudoPass() { + return new RISCVExpandPseudo(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf9fe048bfd2dbdd4940122bf6e54f65401af7df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4df12ee0ca8495e367ac08772bf8cade7d1a7463 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp @@ -0,0 +1,243 @@ +bool RISCVExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI) { + if (MBBI->getOpcode() == RISCV::PseudoLLA) { + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoLA) { + MachineFunction *MF = MBB.getParent(); + unsigned SecondOpcode; + unsigned FlagsHi; + if (MF->getTarget().isPositionIndependent()) { + const auto &STI = MF->getSubtarget(); + SecondOpcode = STI.is64Bit() ? RISCV::LD : RISCV::LW; + FlagsHi = RISCVII::MO_GOT_HI; + } + else { + SecondOpcode = RISCV::ADDI; + FlagsHi = RISCVII::MO_PCREL_HI; + } + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoLA_TLS_IE) { + const auto &STI = MF->getSubtarget(); + unsigned SecondOpcode = STI.is64Bit() ? RISCV::LD : RISCV::LW; + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoLA_TLS_GD) { + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVSETVLI) { + assert(MBBI->getNumOperands() == 5 && "Unexpected instruction format"); + DebugLoc DL = MBBI->getDebugLoc(); + assert((MBBI->getOpcode() == RISCV::PseudoVSETVLI || MBBI->getOpcode() == RISCV::PseudoVSETIVLI) && "Unexpected pseudo instruction"); + unsigned Opcode; + if (MBBI->getOpcode() == RISCV::PseudoVSETVLI) + Opcode = RISCV::VSETVLI; + else + Opcode = RISCV::VSETIVLI; + const MCInstrDesc &Desc = TII->get(Opcode); + assert(Desc.getNumOperands() == 3 && "Unexpected instruction format"); + Register DstReg = MBBI->getOperand(0).getReg(); + bool DstIsDead = MBBI->getOperand(0).isDead(); + BuildMI(MBB, MBBI, DL, Desc).addReg(DstReg, RegState::Define | getDeadRegState(DstIsDead)).add(MBBI->getOperand(1)).add(MBBI->getOperand(2)); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVSETIVLI) { + assert(MBBI->getNumOperands() == 5 && "Unexpected instruction format"); + DebugLoc DL = MBBI->getDebugLoc(); + assert((MBBI->getOpcode() == RISCV::PseudoVSETVLI || MBBI->getOpcode() == RISCV::PseudoVSETIVLI) && "Unexpected pseudo instruction"); + unsigned Opcode; + if (MBBI->getOpcode() == RISCV::PseudoVSETVLI) + Opcode = RISCV::VSETVLI; + else + Opcode = RISCV::VSETIVLI; + const MCInstrDesc &Desc = TII->get(Opcode); + assert(Desc.getNumOperands() == 3 && "Unexpected instruction format"); + Register DstReg = MBBI->getOperand(0).getReg(); + bool DstIsDead = MBBI->getOperand(0).isDead(); + BuildMI(MBB, MBBI, DL, Desc).addReg(DstReg, RegState::Define | getDeadRegState(DstIsDead)).add(MBBI->getOperand(1)).add(MBBI->getOperand(2)); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B1) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B2) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B4) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B8) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B16) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B32) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B64) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B1) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B2) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B4) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B8) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B16) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B32) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B64) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f746343de8bcbf0ec410bfee6eabf7dde8e37c4b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_EXPAND_PSEUDO_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c3b6dc2dce658992de0bfbde1b5323b33b24ebb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVExpandPseudo::runOnMachineFunction(MachineFunction &MF) { + TII = static_cast(MF.getSubtarget().getInstrInfo()); + bool Modified = false; + for (auto &MBB : MF) { + Modified |= expandMBB(MBB); + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bfd690f83227cf797a5122869053bdf61b88b080 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +RISCVExpandSDMA() : MachineFunctionPass(ID) { + initializeRISCVExpandSDMAPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b09cb138b81e142b9f132beb0e5141b14486f039 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp @@ -0,0 +1,3 @@ +RISCVExpandSDMA() : MachineFunctionPass(ID) { + initializeRISCVExpandSDMAPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b3fbc434678cf0c2088d1839d15f8c3b1218bd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createRISCVExpandSDMAPass() { + return new RISCVExpandSDMA(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d67ac95a5dbed0f8eebc6dc6f008cdcb5d661edb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandSDMA::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + for (; MBBI != E;) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified = Modified | expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..681242c4773a3b226e28b9d9f636c3ff775e02d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp @@ -0,0 +1,61 @@ +bool RISCVExpandSDMA::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI) { + if (MBBI->getOpcode() == RISCV::PseudoSDMAOned) { + DebugLoc DL = MBBI->getDebugLoc(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + LLVM_DEBUG(dbgs() << "-- Expanding SDMA Oned\n"); + Register R = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ANDI), R).addReg(MBBI->getOperand(6).getReg(), 0).addImm(~(0x1<<1)); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMSRC)).addReg(MBBI->getOperand(2).getReg(), 0).addReg(MBBI->getOperand(1).getReg(), 0); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMDST)).addReg(MBBI->getOperand(4).getReg(), 0).addReg(MBBI->getOperand(3).getReg(), 0); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMCPY), MBBI->getOperand(0).getReg()).addReg(MBBI->getOperand(5).getReg(), 0).addReg(R, RegState::Kill); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSDMATwod) { + DebugLoc DL = MBBI->getDebugLoc(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + LLVM_DEBUG(dbgs() << "-- Expanding SDMA Twod\n"); + Register R = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ORI), R).addReg(MBBI->getOperand(9).getReg(), 0).addImm(0x1<<1); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMSRC)).addReg(MBBI->getOperand(2).getReg(), 0)ptrlo.addReg(MBBI->getOperand(1).getReg(), 0); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMDST)).addReg(MBBI->getOperand(4).getReg(), 0).addReg(MBBI->getOperand(3).getReg(), 0); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMSTR)).addReg(MBBI->getOperand(6).getReg(), 0).addReg(MBBI->getOperand(7).getReg(), 0); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMREP)).addReg(MBBI->getOperand(8).getReg(), 0); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMCPY), MBBI->getOperand(0).getReg()).addReg(MBBI->getOperand(5).getReg(), 0).addReg(R, RegState::Kill); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSDMAStat) { + DebugLoc DL = MBBI->getDebugLoc(); + LLVM_DEBUG(dbgs() << "-- Expanding SDMA Stat\n"); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::DMSTAT), MBBI->getOperand(0).getReg()).addReg(MBBI->getOperand(1).getReg(), 0); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSDMAWaitForIdle) { + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + MachineInstr &MI = *MBBI; + MachineFunction *MF = MBB.getParent(); + DebugLoc DL = MI.getDebugLoc(); + LLVM_DEBUG(dbgs() << "-- Expanding SDMA WaitForIdle\n"); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(LoopMBB); + Register R = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(LoopMBB, DL, TII->get(RISCV::DMSTATI), R).addImm(2); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(R, RegState::Kill).addReg(RISCV::X0).addMBB(LoopMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c094c34ef5d1fd305dc401a3e1413acf34759e4e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_EXPAND_SDMA_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f71fa5b49af1d0ab2f9c296ed43b40ffd886ffe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVExpandSDMA::runOnMachineFunction(MachineFunction &MF) { + TII = static_cast(MF.getSubtarget().getInstrInfo()); + bool Modified = false; + for (auto &MBB : MF) { + Modified = Modified | expandMBB(MBB); + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa757aa1fd9eaedaca391e3d7e85b7cbdce96b27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +RISCVExpandSSR() : MachineFunctionPass(ID) { + initializeRISCVExpandSSRPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0cd667c35d872f8b0ed94ea4bf39d5056ccccc0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp @@ -0,0 +1,3 @@ +RISCVExpandSSR() : MachineFunctionPass(ID) { + initializeRISCVExpandSSRPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6280ff6c1be633c97c314bc1dc10a30b219e0241 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createRISCVExpandSSRPass() { + return new RISCVExpandSSR(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a997a16d030ddf0b257b91a307ab7bdbd487b8ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandSSR::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b06fd082fe52899681cfb7f8ec5c12450df50c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp @@ -0,0 +1,302 @@ +bool RISCVExpandSSR::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI) { + if (MBBI->getOpcode() == RISCV::PseudoSSRSetup_1D_R) { + DebugLoc DL = MBBI->getDebugLoc(); + LLVM_DEBUG(dbgs() << "-- Expanding SSR Setup 1D\n"); + int dm_off = (int)MBBI->getOperand(0).getImm(); + Register RepReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(RepReg).addImm(dm_off+(0x1<<5)); + Register BoundReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(BoundReg).addImm(dm_off+(0x2<<5)); + Register StrideReg = MBBI->getOperand(3).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(StrideReg).addImm(dm_off+(0x6<<5)); + Register PtrReg = MBBI->getOperand(4).getReg(); + if(MBBI->getOpcode() == RISCV::PseudoSSRSetup_1D_R) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(PtrReg).addImm(dm_off+(0x18<<5)); + } + if(MBBI->getOpcode() == RISCV::PseudoSSRSetup_1D_W) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(PtrReg).addImm(dm_off+(0x1c<<5)); + } + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRSetup_1D_W) { + DebugLoc DL = MBBI->getDebugLoc(); + LLVM_DEBUG(dbgs() << "-- Expanding SSR Setup 1D\n"); + int dm_off = (int)MBBI->getOperand(0).getImm(); + Register RepReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(RepReg).addImm(dm_off+(0x1<<5)); + Register BoundReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(BoundReg).addImm(dm_off+(0x2<<5)); + Register StrideReg = MBBI->getOperand(3).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(StrideReg).addImm(dm_off+(0x6<<5)); + Register PtrReg = MBBI->getOperand(4).getReg(); + if(MBBI->getOpcode() == RISCV::PseudoSSRSetup_1D_R) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(PtrReg).addImm(dm_off+(0x18<<5)); + } + if(MBBI->getOpcode() == RISCV::PseudoSSRSetup_1D_W) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(PtrReg).addImm(dm_off+(0x1c<<5)); + } + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRPush) { + DebugLoc DL = MBBI->getDebugLoc(); + bool isPop = MBBI->getOpcode() == RISCV::PseudoSSRPop; + unsigned ssrArgIdx = MBBI->getOpcode() == RISCV::PseudoSSRPush ? 0 : 1; + unsigned ssrValIdx = ssrArgIdx^1; + unsigned streamer = (unsigned)MBBI->getOperand(ssrArgIdx).getImm(); + Register R = getSSRFtReg(streamer); + LLVM_DEBUG(dbgs() << "-- Expanding SSR " << (isPop?"Pop":"Push") << "\n"); + LLVM_DEBUG(dbgs() << " Using register " << R << " for SSR streamer "<get(RISCV::FSGNJ_D), MBBI->getOperand(ssrValIdx).getReg()).addReg(R, 0).addReg(R, 0); + } + else { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::FSGNJ_D), R).addReg(MBBI->getOperand(ssrValIdx).getReg()).addReg(MBBI->getOperand(ssrValIdx).getReg()); + } + MBB.addLiveIn(R); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRPop) { + DebugLoc DL = MBBI->getDebugLoc(); + bool isPop = MBBI->getOpcode() == RISCV::PseudoSSRPop; + unsigned ssrArgIdx = MBBI->getOpcode() == RISCV::PseudoSSRPush ? 0 : 1; + unsigned ssrValIdx = ssrArgIdx^1; + unsigned streamer = (unsigned)MBBI->getOperand(ssrArgIdx).getImm(); + Register R = getSSRFtReg(streamer); + LLVM_DEBUG(dbgs() << "-- Expanding SSR " << (isPop?"Pop":"Push") << "\n"); + LLVM_DEBUG(dbgs() << " Using register " << R << " for SSR streamer "<get(RISCV::FSGNJ_D), MBBI->getOperand(ssrValIdx).getReg()).addReg(R, 0).addReg(R, 0); + } + else { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::FSGNJ_D), R).addReg(MBBI->getOperand(ssrValIdx).getReg()).addReg(MBBI->getOperand(ssrValIdx).getReg()); + } + MBB.addLiveIn(R); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRRead) { + DebugLoc DL = MBBI->getDebugLoc(); + bool isRead = MBBI->getOpcode() == RISCV::PseudoSSRRead; + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + Register dm_off_reg = (int)MBBI->getOperand(0).getReg(); + Register dim_off_reg = (int)MBBI->getOperand(1).getReg(); + int rw_off = isRead ? 0x18 : 0x1c; + Register dim_off0 = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), dim_off0).addReg(dim_off_reg).addImm(rw_off); + Register dim_off1 = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SLLI), dim_off1).addReg(dim_off0).addImm(5); + Register dim_off2 = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADD), dim_off2).addReg(dim_off1).addReg(dm_off_reg); + Register PtrReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(PtrReg).addReg(dim_off2); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRWrite) { + DebugLoc DL = MBBI->getDebugLoc(); + bool isRead = MBBI->getOpcode() == RISCV::PseudoSSRRead; + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + Register dm_off_reg = (int)MBBI->getOperand(0).getReg(); + Register dim_off_reg = (int)MBBI->getOperand(1).getReg(); + int rw_off = isRead ? 0x18 : 0x1c; + Register dim_off0 = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), dim_off0).addReg(dim_off_reg).addImm(rw_off); + Register dim_off1 = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SLLI), dim_off1).addReg(dim_off0).addImm(5); + Register dim_off2 = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADD), dim_off2).addReg(dim_off1).addReg(dm_off_reg); + Register PtrReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(PtrReg).addReg(dim_off2); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRReadImm) { + DebugLoc DL = MBBI->getDebugLoc(); + bool read = MBBI->getOpcode() == RISCV::PseudoSSRReadImm; + int dm_off = (int)MBBI->getOperand(0).getImm(); + int dim = (int)MBBI->getOperand(1).getImm(); + int ssr_reg = (((read ? 0x18 : 0x1c) + dim) << 5) + dm_off; + Register PtrReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(PtrReg).addImm(ssr_reg); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRWriteImm) { + DebugLoc DL = MBBI->getDebugLoc(); + bool read = MBBI->getOpcode() == RISCV::PseudoSSRReadImm; + int dm_off = (int)MBBI->getOperand(0).getImm(); + int dim = (int)MBBI->getOperand(1).getImm(); + int ssr_reg = (((read ? 0x18 : 0x1c) + dim) << 5) + dm_off; + Register PtrReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGWI)).addReg(PtrReg).addImm(ssr_reg); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_1D) { + unsigned dim; + DebugLoc DL = MBBI->getDebugLoc(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_1D) dim = 1; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_2D) dim = 2; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_3D) dim = 3; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_4D) dim = 4; + LLVM_DEBUG(dbgs() << "-- Expanding SSR Bound Stride " << dim << "D\n"); + Register dm_off_reg = MBBI->getOperand(0).getReg(); + Register addr_bound = MRI.createVirtualRegister(&RISCV::GPRRegClass); + Register addr_stride = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_bound).addReg(dm_off_reg).addImm( ((2+(dim-1))<<5)); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_stride).addReg(dm_off_reg).addImm( ((6+(dim-1))<<5)); + Register BoundReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(BoundReg).addReg(addr_bound, RegState::Kill); + Register StrideReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(StrideReg).addReg(addr_stride, RegState::Kill); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_2D) { + unsigned dim; + DebugLoc DL = MBBI->getDebugLoc(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_1D) dim = 1; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_2D) dim = 2; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_3D) dim = 3; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_4D) dim = 4; + LLVM_DEBUG(dbgs() << "-- Expanding SSR Bound Stride " << dim << "D\n"); + Register dm_off_reg = MBBI->getOperand(0).getReg(); + Register addr_bound = MRI.createVirtualRegister(&RISCV::GPRRegClass); + Register addr_stride = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_bound).addReg(dm_off_reg).addImm( ((2+(dim-1))<<5)); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_stride).addReg(dm_off_reg).addImm( ((6+(dim-1))<<5)); + Register BoundReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(BoundReg).addReg(addr_bound, RegState::Kill); + Register StrideReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(StrideReg).addReg(addr_stride, RegState::Kill); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_3D) { + unsigned dim; + DebugLoc DL = MBBI->getDebugLoc(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_1D) dim = 1; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_2D) dim = 2; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_3D) dim = 3; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_4D) dim = 4; + LLVM_DEBUG(dbgs() << "-- Expanding SSR Bound Stride " << dim << "D\n"); + Register dm_off_reg = MBBI->getOperand(0).getReg(); + Register addr_bound = MRI.createVirtualRegister(&RISCV::GPRRegClass); + Register addr_stride = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_bound).addReg(dm_off_reg).addImm( ((2+(dim-1))<<5)); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_stride).addReg(dm_off_reg).addImm( ((6+(dim-1))<<5)); + Register BoundReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(BoundReg).addReg(addr_bound, RegState::Kill); + Register StrideReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(StrideReg).addReg(addr_stride, RegState::Kill); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_4D) { + unsigned dim; + DebugLoc DL = MBBI->getDebugLoc(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_1D) dim = 1; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_2D) dim = 2; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_3D) dim = 3; + if(MBBI->getOpcode() == RISCV::PseudoSSRSetupBoundStride_4D) dim = 4; + LLVM_DEBUG(dbgs() << "-- Expanding SSR Bound Stride " << dim << "D\n"); + Register dm_off_reg = MBBI->getOperand(0).getReg(); + Register addr_bound = MRI.createVirtualRegister(&RISCV::GPRRegClass); + Register addr_stride = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_bound).addReg(dm_off_reg).addImm( ((2+(dim-1))<<5)); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), addr_stride).addReg(dm_off_reg).addImm( ((6+(dim-1))<<5)); + Register BoundReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(BoundReg).addReg(addr_bound, RegState::Kill); + Register StrideReg = MBBI->getOperand(2).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(StrideReg).addReg(addr_stride, RegState::Kill); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSREnable) { + DebugLoc DL = MBBI->getDebugLoc(); + bool isEnable = MBBI->getOpcode() == RISCV::PseudoSSREnable; + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + LLVM_DEBUG(dbgs() << "-- Expanding SSR " << (isEnable ? "Enable" : "Disable") << "\n"); + Enabled = isEnable; + if(isEnable) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::CSRRSI)).addDef(MRI.createVirtualRegister(&RISCV::GPRRegClass), RegState::Dead).addImm(0x7C0).addImm(1); + unsigned ssrEnabledMask = 0; + for (unsigned n = 0; n != 3; ++n) { + ssrEnabledMask |= 1 << n; + } + RVFI->setUsedSSR(ssrEnabledMask); + } + else { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::CSRRCI)).addDef(MRI.createVirtualRegister(&RISCV::GPRRegClass), RegState::Dead).addImm(0x7C0).addImm(1); + } + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRDisable) { + DebugLoc DL = MBBI->getDebugLoc(); + bool isEnable = MBBI->getOpcode() == RISCV::PseudoSSREnable; + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + LLVM_DEBUG(dbgs() << "-- Expanding SSR " << (isEnable ? "Enable" : "Disable") << "\n"); + Enabled = isEnable; + if(isEnable) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::CSRRSI)).addDef(MRI.createVirtualRegister(&RISCV::GPRRegClass), RegState::Dead).addImm(0x7C0).addImm(1); + unsigned ssrEnabledMask = 0; + for (unsigned n = 0; n != 3; ++n) { + ssrEnabledMask |= 1 << n; + } + RVFI->setUsedSSR(ssrEnabledMask); + } + else { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::CSRRCI)).addDef(MRI.createVirtualRegister(&RISCV::GPRRegClass), RegState::Dead).addImm(0x7C0).addImm(1); + } + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRSetupRepetition) { + DebugLoc DL = MBBI->getDebugLoc(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + Register dm_off_reg = MBBI->getOperand(0).getReg(); + Register dm_off = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), dm_off).addReg(dm_off_reg).addImm(1<<5); + Register PtrReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SCFGW)).addReg(PtrReg).addReg(dm_off, RegState::Kill); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoSSRBarrier) { + DebugLoc DL = MBBI->getDebugLoc(); + MachineInstr &MI = *MBBI; + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + unsigned streamer = (unsigned)MBBI->getOperand(0).getImm(); + LLVM_DEBUG(dbgs() << "-- Expanding SSR barrier on DM" << streamer << "\n"); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(LoopMBB); + Register R = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(LoopMBB, DL, TII->get(RISCV::SCFGRI), R).addImm(streamer); + Register Rs = MRI.createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(LoopMBB, DL, TII->get(RISCV::SRLI), Rs).addReg(R, RegState::Kill).addImm(31); + BuildMI(LoopMBB, DL, TII->get(RISCV::BEQ)).addReg(Rs, RegState::Kill).addReg(RISCV::X0).addMBB(LoopMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..672b213111956debf86d2957f386a2b270e8ec5c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_EXPAND_SSR_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..136ded60ddd72eb7afb3b38d4783db5202002f71 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp @@ -0,0 +1,70 @@ +bool RISCVExpandSSR::runOnMachineFunction(MachineFunction &MF) { + TII = static_cast(MF.getSubtarget().getInstrInfo()); + bool Modified = false; + this->MF = &MF; + this->RVFI = MF.getInfo(); + Enabled = false; + for (auto &MBB : MF) { + Modified |= expandMBB(MBB); + } + RISCVExpandSSR::RegisterMergingPreferences RMP; + RMP.Enable = true; + if (SSRRegisterMerge.getNumOccurrences() > 0) + RMP.Enable = !SSRRegisterMerge; + LLVM_DEBUG(dbgs() << "RMP Enable "<getUsedSSR()) + for (auto &MBB : MF) + SmallSet virtRegs[NUM_SSR]; + const TargetRegisterInfo *TRI = MBB.getParent()->getRegInfo().getTargetRegisterInfo(); + bool inSSRRegion = false; + Register ssr_regs[NUM_SSR]; + for(unsigned ssr_no = 0; ssr_no < NUM_SSR; ++ssr_no) ssr_regs[ssr_no] = getSSRFtReg(ssr_no); + for (auto MI = MBB.begin() ; MI != MBB.end() ; ) { + MachineBasicBlock::iterator NMI = std::next(MI); + LLVM_DEBUG(dbgs()<<"Analyzing: "<<*MI<<"\n"); + if(MI->getOpcode() == RISCV::FSGNJ_D) { + LLVM_DEBUG(dbgs()<<"Found FSGNJ_D, Op 0: " << MI->getOperand(1).getReg() << " Op1: " << MI->getOperand(2).getReg() << "\n"); + for(unsigned ssr_no = 0; ssr_no < NUM_SSR; ++ssr_no) { + if(MI->getOperand(1).getReg() == ssr_regs[ssr_no] && MI->getOperand(2).getReg() == ssr_regs[ssr_no]) { + LLVM_DEBUG(dbgs()<<" pop: both operands from SSR"<< ssr_no <<"\n"); + LLVM_DEBUG(dbgs()<<" append: "<< MI->getOperand(0).getReg() <<"\n"); + virtRegs[ssr_no].insert(MI->getOperand(0).getReg()); + MI->eraseFromParent(); + break; + } + else if(MI->getOperand(0).getReg() == ssr_regs[ssr_no]) { + break; + } + } + } + MI = NMI; + } + for(unsigned ssr_no = 0; ssr_no < NUM_SSR; ++ssr_no) { + for (auto iter = virtRegs[ssr_no].begin() ; iter != virtRegs[ssr_no].end() ; ++iter) + LLVM_DEBUG(dbgs() << "virtregs["<operands_begin() ; operand != MI->operands_end() ; ++operand) { + if(!operand->isReg()) continue; + for(unsigned ssr_no = 0; ssr_no < NUM_SSR; ++ssr_no) { + if(virtRegs[ssr_no].contains(operand->getReg())) { + LLVM_DEBUG(dbgs() << "Found use of operand " << operand->getReg() << " ssr: " << ssr_no << " in inst " << MI->getOpcode() << "\n"); + MI->substituteRegister(operand->getReg(), ssr_regs[ssr_no], 0, *TRI); + MBB.addLiveIn(ssr_regs[ssr_no]); + } + } + } + MI = NMI; + } + MBB.sortUniqueLiveIns(); + if(Modified) { + for (auto &MBB : MF) { + for(unsigned ssr_no = 0; ssr_no < NUM_SSR; ++ssr_no) + MBB.addLiveIn(getSSRFtReg(ssr_no)); + MBB.sortUniqueLiveIns(); + } + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0335a4ef79ccad687d71bd1e7dfc446f4a07fe4b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp @@ -0,0 +1,2 @@ +RISCVMergeBaseOffsetOpt() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f8195dd1360a5a7264e251088fea5e7dbc2d24d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createRISCVMergeBaseOffsetOptPass() { + return new RISCVMergeBaseOffsetOpt(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..658f61cc76c6f58d97dbc4a3fa9d383799c42b6e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_MERGE_BASE_OFFSET_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5b9c0930d3d58a2f4601a4830a241ebb30ca4fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::IsSSA); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..644005710c1b1a6bbf091cf43572a6d616d21b78 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp @@ -0,0 +1,121 @@ +bool RISCVMergeBaseOffsetOpt::runOnMachineFunction(MachineFunction &Fn) { + if (skipFunction(*F.getFunction())) { + return false; + } + DeadInstrs.clear(); + MRI = &Fn.getRegInfo(); + for (MachineBasicBlock &MBB : Fn) { + LLVM_DEBUG(dbgs() << "MBB: " << MBB.getName() << "\n"); + for (MachineInstr &HiLUI : MBB) { + MachineInstr *LoADDI = nullptr; + if (HiLUI.getOpcode() != RISCV::LUI || HiLUI.getOperand(1).getTargetFlags() != RISCVII::MO_HI || HiLUI.getOperand(1).getType() != MachineOperand::MO_GlobalAddress || HiLUI.getOperand(1).getOffset() != 0 || !MRI->hasOneUse(HiLUI.getOperand(0).getReg())) + return false; + Register HiLuiDestReg = HiLUI.getOperand(0).getReg(); + LoADDI = MRI->use_begin(HiLuiDestReg)->getParent(); + if (LoADDI->getOpcode() != RISCV::ADDI || LoADDI->getOperand(2).getTargetFlags() != RISCVII::MO_LO || LoADDI->getOperand(2).getType() != MachineOperand::MO_GlobalAddress || LoADDI->getOperand(2).getOffset() != 0 || !MRI->hasOneUse(LoADDI->getOperand(0).getReg())) + return false; + continue + LLVM_DEBUG(dbgs() << " Found lowered global address with one use: " << *LoADDI->getOperand(2).getGlobal() << "\n"); + Register DestReg = LoADDI.getOperand(0).getReg(); + assert(MRI->hasOneUse(DestReg) && "expected one use for LoADDI"); + MachineInstr &Tail = *MRI->use_begin(DestReg)->getParent(); + switch (Tail.getOpcode()) { + default: + LLVM_DEBUG(dbgs() << "Don't know how to get offset from this instr:" << Tail); + return false; + case RISCV::ADDI: { + int64_t Offset = Tail.getOperand(2).getImm(); + LLVM_DEBUG(dbgs() << " Offset Instr: " << Tail); + HiLUI.getOperand(1).setOffset(Offset); + LoADDI.getOperand(2).setOffset(Offset); + DeadInstrs.insert(&Tail); + MRI->replaceRegWith(Tail.getOperand(0).getReg(), LoADDI.getOperand(0).getReg()); + LLVM_DEBUG(dbgs() << " Merged offset " << Offset << " into base.\n" << " " << HiLUI << " " << LoADDI;); + return true; + } break; + case RISCV::ADD: { + int64_t Offset; + assert((TailAdd.getOpcode() == RISCV::ADD) && "Expected ADD instruction!"); + Register Rs = TailAdd.getOperand(1).getReg(); + Register Rt = TailAdd.getOperand(2).getReg(); + Register Reg = Rs == GAReg ? Rt : Rs; + if (!MRI->hasOneUse(Reg)) + return false; + MachineInstr &OffsetTail = *MRI->getVRegDef(Reg); + if (OffsetTail.getOpcode() == RISCV::ADDI) { + MachineOperand &AddiImmOp = OffsetTail.getOperand(2); + if (AddiImmOp.getTargetFlags() != RISCVII::MO_None) + return false; + int64_t OffLo = AddiImmOp.getImm(); + MachineInstr &OffsetLui = *MRI->getVRegDef(OffsetTail.getOperand(1).getReg()); + MachineOperand &LuiImmOp = OffsetLui.getOperand(1); + if (OffsetLui.getOpcode() != RISCV::LUI || LuiImmOp.getTargetFlags() != RISCVII::MO_None || !MRI->hasOneUse(OffsetLui.getOperand(0).getReg())) + return false; + int64_t OffHi = OffsetLui.getOperand(1).getImm(); + Offset = (OffHi << 12) + OffLo; + LLVM_DEBUG(dbgs() << " Offset Instrs: " << OffsetTail << " " << OffsetLui); + DeadInstrs.insert(&OffsetTail); + DeadInstrs.insert(&OffsetLui); + return true; + } + else if (OffsetTail.getOpcode() == RISCV::LUI) { + LLVM_DEBUG(dbgs() << " Offset Instr: " << OffsetTail); + Offset = OffsetTail.getOperand(1).getImm() << 12; + DeadInstrs.insert(&OffsetTail); + return true; + } + return false; + if (!matchLargeOffset(Tail, DestReg, Offset)) { + return false; + } + HiLUI.getOperand(1).setOffset(Offset); + LoADDI.getOperand(2).setOffset(Offset); + DeadInstrs.insert(&Tail); + MRI->replaceRegWith(Tail.getOperand(0).getReg(), LoADDI.getOperand(0).getReg()); + LLVM_DEBUG(dbgs() << " Merged offset " << Offset << " into base.\n" << " " << HiLUI << " " << LoADDI;); + return true; + } + break; + case RISCV::LB: + case RISCV::LH: + case RISCV::LW: + case RISCV::LBU: + case RISCV::LHU: + case RISCV::LWU: + case RISCV::LD: + case RISCV::FLH: + case RISCV::FLW: + case RISCV::FLD: + case RISCV::SB: + case RISCV::SH: + case RISCV::SW: + case RISCV::SD: + case RISCV::FSH: + case RISCV::FSW: + case RISCV::FSD: { + if (Tail.getOperand(1).isFI()) { + return false; + } + Register BaseAddrReg = Tail.getOperand(1).getReg(); + if (DestReg != BaseAddrReg) + return false; + MachineOperand &TailImmOp = Tail.getOperand(2); + int64_t Offset = TailImmOp.getImm(); + HiLUI.getOperand(1).setOffset(Offset); + Tail.RemoveOperand(2); + MachineOperand &ImmOp = LoADDI.getOperand(2); + ImmOp.setOffset(Offset); + Tail.addOperand(ImmOp); + Tail.getOperand(1).setReg(HiLUI.getOperand(0).getReg()); + DeadInstrs.insert(&LoADDI); + return true; + } break; + } + return false; + } + } + for (auto *MI : DeadInstrs) { + MI->eraseFromParent(); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..316b34c4cf0c8e5d9e4236ab94f33861df884864 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp @@ -0,0 +1,3 @@ +PULPFixupHwLoops() : MachineFunctionPass(ID) { + initializePULPFixupHwLoopsPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c17fd5a279439a187f60893c6e3615c047d045e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +PULPFixupHwLoops() : MachineFunctionPass(ID) { + initializePULPFixupHwLoopsPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9228c6d2483d6a53cbfa3ed48c0366f7bb8826bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createPULPFixupHwLoops() { + return new PULPFixupHwLoops(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b12c744298f9d869e8fc2ee963c1702dfb79d52e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp @@ -0,0 +1,4 @@ +//zmcorrectzm +FunctionPass *llvm::createPULPFixupHwLoops() { + return new PULPFixupHwLoops(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52e0b136129998a3fd35a4b00d6233cf21f31d9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp @@ -0,0 +1,5 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.setPreservesCFG(); + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28206ae7e93f32080cb3f8c1934ca95818e47956 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "PULP Hardware Loop Fixup"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cd50d43365fe514848b8ee87b962013f4b925d4c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::NoVRegs); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52d9b95aa521daec482d8f52ef0cb71a19c18611 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp @@ -0,0 +1,289 @@ +bool PULPFixupHwLoops::runOnMachineFunction(MachineFunction &MF) { + if (skipFunction(MF.getFunction())) { + return false; + } + bool changed = false; + for (MachineBasicBlock &MBB : MF) { + for (MachineInstr &MI : MBB) { + if (isHardwareLoop(MI)) { + MachineInstr &Term = *(--MBB.end()); + if (Term.getDesc().isUnconditionalBranch()) { + assert(MBB.succ_size() == 1 && "Too many successors!"); + MachineBasicBlock *LoopStartMBB = *MBB.succ_begin(); + if (MBB.isLayoutSuccessor(LoopStartMBB)) { + Term.eraseFromParent(); + changed = true; + break; + } + } + } + } + } + bool changedNow = false; + bool changedOverall = false; + std::set toRemove; + do { + changedNow = false; + for (MachineBasicBlock &MBB : MF) { + for (MachineInstr &MI : MBB) { + if (isHardwareLoop(MI)) { + MachineLoopInfo *MLI = &getAnalysis(); + MachineBasicBlock *LastMBB = MI.getOperand(0).getMBB(); + MachineLoop *L = MLI->getLoopFor(LastMBB); + assert(L->contains(LastMBB) && "Loop does not contain LastMBB"); + if (L->getBottomBlock() != LastMBB) { + MachineBasicBlock *current = LastMBB; + bool reachedEnd = false; + while (current != L->getBottomBlock() && !reachedEnd) { + bool found = false; + for (MachineBasicBlock &succ : MF) { + if (current->isLayoutSuccessor(&succ) && L->getBlocksSet().find(&succ) != L->getBlocksSet().end()) { + current = ≻ + found = true; + break; + } + } + if (!found) { + reachedEnd = true; + } + } + if (current == L->getBottomBlock()) { + LastMBB = L->getBottomBlock(); + MachineOperand countMO = MI.getOperand(1); + MI.RemoveOperand(1); + MI.RemoveOperand(0); + MI.addOperand(MachineOperand::CreateMBB(LastMBB)); + MI.addOperand(countMO); + } + } + assert(L->getBottomBlock() == LastMBB && "Last is not Bottom"); + MachineBasicBlock *ExitBlock = L->getExitBlock(); + MachineBasicBlock::iterator LastI = LastMBB->getFirstTerminator(); + DebugLoc LastIDL = LastI->getDebugLoc(); + if (LastI != LastMBB->end()) { + if (LastI->getOpcode() == RISCV::BEQ || LastI->getOpcode() == RISCV::BNE || LastI->getOpcode() == RISCV::BLT || LastI->getOpcode() == RISCV::BGE || LastI->getOpcode() == RISCV::BLTU || LastI->getOpcode() == RISCV::BGEU || LastI->getOpcode() == RISCV::P_BNEIMM || LastI->getOpcode() == RISCV::P_BEQIMM) { + for (unsigned i = 0; i < LastI->getNumOperands(); i++) { + MachineOperand &MO = LastI->getOperand(i); + if (MO.isReg()) { + std::set regUsers; + if (fixupBump(LastMBB, &MI, MO.getReg(), regUsers)) { + if (regUsers.count(&(*LastI)) > 0) { + regUsers.erase(&(*LastI)); + } + if (regUsers.size() == 1) { + MachineInstr *Cand = (*regUsers.begin()); + if (Cand->getOpcode() == RISCV::ADD || Cand->getOpcode() == RISCV::ADDI || Cand->getOpcode() == RISCV::SUB) { + if (Cand->getOperand(0).isReg() && Cand->getOperand(1).isReg() && Cand->getOperand(0).getReg() == Cand->getOperand(1).getReg()) { + if (Cand->getParent()->size() <= 2) { + } + else { + toRemove.insert(Cand); + } + } + } + } + } + } + } + MachineBasicBlock *BranchTarget = LastI->getOperand(2).getMBB(); + LastI = LastMBB->erase(LastI); + if (BranchTarget == ExitBlock) { + if (LastI != LastMBB->end()) { + LastI = LastMBB->erase(LastI); + } + SmallVector Cond; + const RISCVSubtarget &HST = MF.getSubtarget(); + const RISCVInstrInfo *TII = HST.getInstrInfo(); + TII->insertBranch(*LastMBB, BranchTarget, nullptr, Cond, LastIDL); + changedNow = true; + changedOverall = true; + } + } + else if (LastI->getOpcode() == RISCV::PseudoBR) { + MachineBasicBlock *BranchTarget = LastI->getOperand(0).getMBB(); + if (BranchTarget == L->getHeader()) { + LastMBB->erase(LastI); + changedNow = true; + changedOverall = true; + } + } else { + llvm_unreachable("Unknown branch type!"); + } + } + } + if (changedNow) { + break; + } + } + if (changedNow) { + break; + } + } + } while (changedNow == true); + for (MachineInstr *MI : toRemove) { + MI->eraseFromParent(); + } + unsigned InstOffset = 0; + DenseMap BlockToInstOffset; + const RISCVInstrInfo *RII = static_cast(MF.getSubtarget().getInstrInfo()); + bool Changed = false; + for (MachineBasicBlock &MBB : MF) { + MachineBasicBlock::iterator MII = MBB.begin(); + MachineBasicBlock::iterator MIE = MBB.end(); + while (MII != MIE) { + if (MII->isMetaInstruction()) { + ++MII; + continue; + } + if (isHardwareLoop(*MII)) { + assert(MII->getOperand(0).isMBB() && "Expect a basic block as loop operand"); + MachineBasicBlock *LastMBB = MII->getOperand(0).getMBB(); + MachineBasicBlock::iterator instrToMove = --LastMBB->getFirstTerminator(); + if (instrToMove->isInlineAsm()) { + DebugLoc DL = instrToMove->getDebugLoc(); + BuildMI(*LastMBB, LastMBB->getFirstTerminator(), DL, RII->get(RISCV::ADDI)).addReg(RISCV::X0).addReg(RISCV::X0).addImm(0); + instrToMove = --LastMBB->getFirstTerminator(); + } + MachineBasicBlock::iterator firstPossibleMove = LastMBB->getFirstNonPHI(); + MachineFunction *MF = LastMBB->getParent(); + auto LoopEnd = MF->CreateMachineBasicBlock(); + MF->insert(++LastMBB->getIterator(), LoopEnd); + LoopEnd->transferSuccessors(LastMBB); + LastMBB->addSuccessor(LoopEnd); + while ((instrToMove->isTransient() || instrToMove->isBranch()) && instrToMove != firstPossibleMove) { + instrToMove--; + } + LoopEnd->splice(LoopEnd->begin(), LastMBB, instrToMove, LastMBB->end()); + LoopEnd->setLabelMustBeEmitted(); + DebugLoc DL = MII->getDebugLoc(); + MachineInstrBuilder MIB = BuildMI(*MII->getParent(), MII, DL, RII->get(MII->getOpcode())); + MIB.addMBB(LoopEnd); + MIB.add(MII->getOperand(1)); + MII = MII->getParent()->erase(MII); + } else { + ++MII; + } + } + } + for (const MachineBasicBlock &MBB : MF) { + BlockToInstOffset[&MBB] = InstOffset; + for (const MachineInstr &MI : MBB) { + InstOffset += getMISize(MI); + } + } + for (MachineBasicBlock &MBB : MF) { + InstOffset = BlockToInstOffset[&MBB]; + MachineBasicBlock::iterator MII = MBB.begin(); + MachineBasicBlock::iterator MIE = MBB.end(); + while (MII != MIE) { + unsigned InstSize = getMISize(*MII); + if (MII->isMetaInstruction()) { + ++MII; + continue; + } + if (isHardwareLoop(*MII)) { + bool offsetIncrease = 0; + assert(MII->getOperand(0).isMBB() && "Expect a basic block as loop operand"); + MachineBasicBlock *TargetBB = MII->getOperand(0).getMBB(); + unsigned Diff = AbsoluteDifference(InstOffset, BlockToInstOffset[TargetBB]); + signed LoopLen = Diff - getMISize(*MII); + MachineBasicBlock::iterator inspt = MII; + DebugLoc DL = inspt->getDebugLoc(); + inspt++; + if (isHardwareLoopImm(*MII) && LoopLen > MaxLoopRangeImm) { + assert(MBB.succ_size() == 1 && "Too many successors!"); + assert(isHardwareLoopZero(*MII) || isHardwareLoopOne(*MII)); + MachineBasicBlock *LoopStartMBB = *MBB.succ_begin(); + MachineInstrBuilder Start; + MachineInstrBuilder End; + MachineInstrBuilder Count; + if (isHardwareLoopZero(*MII)) { + Start = BuildMI(MBB, inspt, DL, RII->get(RISCV::LOOP0starti)).addMBB(LoopStartMBB); + End = BuildMI(MBB, inspt, DL, RII->get(RISCV::LOOP0endi)).addMBB(TargetBB); + Count = BuildMI(MBB, inspt, DL, RII->get(RISCV::LOOP0counti)).addImm(MII->getOperand(1).getImm()); + } + else if (isHardwareLoopOne(*MII)) { + Start = BuildMI(MBB, inspt, DL, RII->get(RISCV::LOOP1starti)).addMBB(LoopStartMBB); + End = BuildMI(MBB, inspt, DL, RII->get(RISCV::LOOP1endi)).addMBB(TargetBB); + Count = BuildMI(MBB, inspt, DL, RII->get(RISCV::LOOP1counti)).addImm(MII->getOperand(1).getImm()); + } + LoopLen += getMISize(*Start.getInstr()); + offsetIncrease += getMISize(*Start.getInstr()); + LoopLen += getMISize(*End.getInstr()); + offsetIncrease += getMISize(*Start.getInstr()); + LoopLen += getMISize(*Count.getInstr()); + offsetIncrease += getMISize(*Start.getInstr()); + LoopLen -= getMISize(*MII); + offsetIncrease -= getMISize(*MII); + LoopStartMBB->setHasAddressTaken(); + LoopStartMBB->setLabelMustBeEmitted(); + BlockAddress::get(const_cast(LoopStartMBB->getBasicBlock())); + MII->eraseFromParent(); + } + if (isHardwareLoopReg(*MII) && LoopLen > MaxLoopRangeReg) { + errs().changeColor(raw_fd_ostream::Colors::RED, true); + errs() << "UNHANDLED: Hardware Loop length " << LoopLen << " is " << "higher than limit for lp.setup: " << MaxLoopRangeReg << "\n"; + errs().resetColor(); + abort(); + } + if (LoopLen < 4) { + while (LoopLen < 4) { + MachineInstrBuilder NOP = BuildMI(MBB, inspt, DL, RII->get(RISCV::ADDI)); + NOP.addReg(RISCV::X0); + NOP.addReg(RISCV::X0); + NOP.addImm(0); + LoopLen += getMISize(*NOP.getInstr()); + offsetIncrease += getMISize(*NOP.getInstr()); + } + } + MII = inspt; + if (offsetIncrease > 0) { + bool hasSeenOurselves = false; + for (const MachineBasicBlock &otherBlock : MF) { + if (&MBB == &otherBlock) { + hasSeenOurselves = true; + continue; + } + else if (!hasSeenOurselves) { + continue; + } + BlockToInstOffset[&otherBlock] += offsetIncrease; + } + } + } + else { + ++MII; + } + InstOffset += InstSize; + } + } + for (MachineBasicBlock &MBB : MF) { + unsigned instrs = 0; + for (MachineInstr &MI : MBB) { + instrs++; + if (isHardwareLoop(MI) && instrs > 1) { + MachineBasicBlock::iterator SplitPoint(&MI); + MachineFunction *MF = OldMBB->getParent(); + LivePhysRegs LiveRegs; + MachineBasicBlock::iterator Prev(&MI); + LiveRegs.init(*MF->getSubtarget().getRegisterInfo()); + LiveRegs.addLiveOuts(*OldMBB); + for (auto I = OldMBB->rbegin(), E = Prev.getReverse(); I != E; ++I) { + LiveRegs.stepBackward(*I); + } + MachineBasicBlock *SplitBB = MF->CreateMachineBasicBlock(OldMBB->getBasicBlock()); + MF->insert(++MachineFunction::iterator(OldMBB), SplitBB); + SplitBB->splice(SplitBB->begin(), OldMBB, SplitPoint, OldMBB->end()); + SplitBB->transferSuccessorsAndUpdatePHIs(OldMBB); + OldMBB->addSuccessor(SplitBB); + addLiveIns(*SplitBB, LiveRegs); + if (New == &MBB) { + continue; + } + New->setAlignment(Align(4)); + break; + } + } + } + return fixedPreHd || fixedLatch || fixedInstr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26c51517892476bc1f825e05105cbb930db045d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp @@ -0,0 +1,10 @@ +explicit CountValue(CountValueType t, unsigned v, unsigned u = 0) { + Kind = t; + if (Kind == CV_Register) { + Contents.R.Reg = v; + Contents.R.Sub = u; + } + else { + Contents.ImmVal = v; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58d2e084d50b83358610cdea163f6b7531686fa5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp @@ -0,0 +1,3 @@ +PULPHardwareLoops() : MachineFunctionPass(ID) { + initializePULPHardwareLoopsPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..059b70f62c067de93e000828574ee0e617720529 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp @@ -0,0 +1,2 @@ +PULPHardwareLoops() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..005a0a55c3b6d3c871199808ac7be545996ae9b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp @@ -0,0 +1,50 @@ +bool PULPHardwareLoops::checkForImmediate(const MachineOperand &MO, int64_t &Val) const { + if (MO.isImm()) { + Val = MO.getImm(); + return true; + } + if (!MO.isReg()) { + return false; + } + int64_t TV; + unsigned R = MO.getReg(); + if (!Register::isVirtualRegister(R)) { + if (R == RISCV::X0) { + Val = 0; + return true; + } + return false; + } + MachineInstr *DI = MRI->getVRegDef(R); + unsigned DOpc = DI->getOpcode(); + if (DOpc == TargetOpcode::COPY) { + if (!checkForImmediate(DI->getOperand(1), TV)) { + return false; + } + Val = TV; + return true; + } + if (DOpc == RISCV::ADDI) { + if (DI->getOperand(1).isReg() && DI->getOperand(1).getReg() == RISCV::X0) { + if (!checkForImmediate(DI->getOperand(2), TV)) { + return false; + } + else { + Val = TV; + } + } + else if (DI->getOperand(2).isImm() && DI->getOperand(2).getImm() == 0) { + if (!checkForImmediate(DI->getOperand(1), TV)) { + return false; + } + else { + Val = TV; + } + } + else { + return false; + } + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d234723bae57bf328dfe66d52a8676c24d532f2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp @@ -0,0 +1,11 @@ +bool PULPHardwareLoops::containsInvalidInstruction(MachineLoop *L) const { + for (MachineBasicBlock *MBB : L->getBlocks()) { + for (MachineInstr &MI : *MBB) { + if (isInvalidLoopOperation(&MI)) { + LLVM_DEBUG(dbgs() << "\nCannot convert to hwloop due to:"; MI.dump();); + return true; + } + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f233be7cdb5524312c033a4b256a9d7a7f5ee87a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp @@ -0,0 +1,156 @@ +bool PULPHardwareLoops:: (MachineLoop *L, bool &RecL0used, bool &RecL1used) { +assert(L->getHeader() && "Loop without a header?"); +bool Changed = false; +bool L0Used = false; +bool L1Used = false; +for (MachineLoop::iterator I = L->begin(), E = L->end(); I != E; ++I) { +Changed = Changed | convertToHardwareLoop(*I, RecL0used, RecL1used); +L0Used = L0Used | RecL0used; +L1Used = L1Used | RecL1used; +} +if (Changed) { +if (L0Used) { +if (L1Used) { +return Changed; +} +} +} +unsigned LOOP_i; +unsigned LOOP_r; +unsigned ENDLOOP; +unsigned IsInnerHWLoop = 1; +if (L0Used) { +LOOP_i = RISCV::J2_loop1i; +LOOP_r = RISCV::J2_loop1r; +ENDLOOP = RISCV::ENDLOOP1; +IsInnerHWLoop = 0; +} +if (!L0Used) { +LOOP_i = RISCV::J2_loop0i; +LOOP_r = RISCV::J2_loop0r; +ENDLOOP = RISCV::ENDLOOP0; +} +if (containsInvalidInstruction(L, IsInnerHWLoop)) { +return false; +} +MachineBasicBlock *LastMBB = getExitingBlock(L); +if (!LastMBB) { +return false; +} +MachineBasicBlock::iterator LastI = LastMBB->getFirstTerminator(); +if (LastI == LastMBB->end()) { +return false; +} +if (!fixupInductionVariable(L)) { +return false; +} +MachineBasicBlock *Preheader = L->getLoopPreheader(); +if (!Preheader) { +Preheader = createPreheaderForLoop(L); +if (!Preheader) { +return false; +} +} +MachineBasicBlock::iterator InsertPos = Preheader->getFirstTerminator(); +SmallVector OldInsts; +CountValue *TripCount = getLoopTripCount(L, OldInsts); +if (!TripCount) { +return false; +} +if (TripCount->isReg()) { +MachineInstr *TCDef = MRI->getVRegDef(TripCount->getReg()); +MachineBasicBlock *BBDef = TCDef->getParent(); +if (!MDT->dominates(BBDef, Preheader)) { +return false; +} +} +MachineBasicBlock *TopBlock = L->getTopBlock(); +MachineBasicBlock *ExitingBlock = getExitingBlock(L); +MachineBasicBlock *LoopStart = 0; +if (ExitingBlock != L->getLoopLatch()) { +MachineBasicBlock *TB = 0, *FB = 0; +SmallVector Cond; +if (TII->analyzeBranch(*ExitingBlock, TB, FB, Cond, false)) { +return false; +} +if (L->contains(TB)) { +LoopStart = TB; +} +if (L->contains(FB)) { +LoopStart = FB; +} +if (!L->contains(TB)) { +if (!L->contains(FB)) { +return false; +} +} +} +if (ExitingBlock == L->getLoopLatch()) { +LoopStart = TopBlock; +} +DEBUG(dbgs() << "Change to hardware loop at "; L->dump()); +DebugLoc DL; +if (InsertPos != Preheader->end()) { +DL = InsertPos->getDebugLoc(); +} +if (TripCount->isReg()) { +unsigned CountReg = MRI->createVirtualRegister(&RISCV::IntRegsRegClass); +BuildMI(*Preheader, InsertPos, DL, TII->get(TargetOpcode::COPY), CountReg).addReg(TripCount->getReg(), 0, TripCount->getSubReg()); +BuildMI(*Preheader, InsertPos, DL, TII->get(LOOP_r)).addMBB(LoopStart).addReg(CountReg); +} +if (!TripCount->isReg()) { +assert(TripCount->isImm() && "Expecting immediate value for trip count"); +int64_t CountImm = TripCount->getImm(); +if (!TII->isValidOffset(LOOP_i, CountImm)) { +unsigned CountReg = MRI->createVirtualRegister(&RISCV::IntRegsRegClass); +BuildMI(*Preheader, InsertPos, DL, TII->get(RISCV::A2_tfrsi), CountReg).addImm(CountImm); +BuildMI(*Preheader, InsertPos, DL, TII->get(LOOP_r)).addMBB(LoopStart).addReg(CountReg); +} +if (TII->isValidOffset(LOOP_i, CountImm)) { +BuildMI(*Preheader, InsertPos, DL, TII->get(LOOP_i)).addMBB(LoopStart).addImm(CountImm); +} +} +LoopStart->setHasAddressTaken(); +BlockAddress::get(const_cast(LoopStart->getBasicBlock())); +DebugLoc LastIDL = LastI->getDebugLoc(); +BuildMI(*LastMBB, LastI, LastIDL, TII->get(ENDLOOP)).addMBB(LoopStart); +if (LastI->getOpcode() == RISCV::J2_jumpt) { +MachineBasicBlock *BranchTarget = LastI->getOperand(1).getMBB(); +LastI = LastMBB->erase(LastI); +if (!L->contains(BranchTarget)) { +if (LastI != LastMBB->end()) { +LastI = LastMBB->erase(LastI); +} +SmallVector Cond; +TII->InsertBranch(*LastMBB, BranchTarget, nullptr, Cond, LastIDL); +} +} +if (LastI->getOpcode() == RISCV::J2_jumpf) { +MachineBasicBlock *BranchTarget = LastI->getOperand(1).getMBB(); +LastI = LastMBB->erase(LastI); +if (!L->contains(BranchTarget)) { +if (LastI != LastMBB->end()) { +LastI = LastMBB->erase(LastI); +} +SmallVector Cond; +TII->InsertBranch(*LastMBB, BranchTarget, nullptr, Cond, LastIDL); +} +} +if (LastI->getOpcode() != RISCV::J2_jumpt) { +if (LastI->getOpcode() != RISCV::J2_jumpf) { +LastMBB->erase(LastI); +} +} +delete TripCount; +for (unsigned i = 0; i < OldInsts.size(); ++i) { +removeIfDead(OldInsts[i]); +} +NumHWLoops = NumHWLoops + 1; +if (L0Used) { +RecL1used = true; +} +if (!L0Used) { +RecL0used = true; +} +return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22e78cc2e7b7238ff9e98a897b042dbb37b79065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createPULPHardwareLoops() { + return new PULPHardwareLoops(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..863945051646c9f1c5aa4d13b92798567cf74358 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp @@ -0,0 +1,4 @@ +//zmcorrectzm +FunctionPass *llvm::createPULPHardwareLoops() { + return new PULPHardwareLoops(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84c79208998defdbb6d20f1bc3d4469dd0bcf0a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp @@ -0,0 +1,4 @@ +enum CountValueType { + CV_Register, + CV_Immediate +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06934a6723a77c148733266a6459f940fb54480b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp @@ -0,0 +1,15 @@ +enum Kind { + EQ = 0x01, + NE = 0x02, + L = 0x04, + G = 0x08, + U = 0x40, + LTs = L, + LEs = L | EQ, + GTs = G, + GEs = G | EQ, + LTu = L | U, + LEu = L | EQ | U, + GTu = G | U, + GEu = G | EQ | U +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..94e147da406f745130c3064c3f92fbfd6add4b8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp @@ -0,0 +1,80 @@ +bool PULPHardwareLoops::findInductionRegister(MachineLoop *L, unsigned &Reg, int64_t &IVBump, MachineInstr *&IVOp) const { + MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); + MachineBasicBlock *Header = L->getHeader(); + MachineBasicBlock *Latch = L->getLoopLatch(); + MachineBasicBlock *ExitingBlock = L->findLoopControlBlock(); + if (!Header) { + return false; + } + if (!Preheader) { + return false; + } + if (!Latch) { + return false; + } + if (!ExitingBlock) { + return false; + } + using RegisterBump = std::pair; + using InductionMap = std::map; + InductionMap IndMap; + using instr_iterator = MachineBasicBlock::instr_iterator; + for (instr_iterator I = Header->instr_begin(), E = Header->instr_end(); I != E && I->isPHI(); ++I) { + MachineInstr *Phi = &*I; + for (unsigned i = 1, n = Phi->getNumOperands(); i < n; i += 2) { + if (Phi->getOperand(i+1).getMBB() != Latch) { + continue; + } + unsigned PhiOpReg = Phi->getOperand(i).getReg(); + MachineInstr *DI = MRI->getVRegDef(PhiOpReg); + if (DI->getDesc().getOpcode() == RISCV::ADDI) { + unsigned IndReg = DI->getOperand(1).getReg(); + MachineOperand &Opnd2 = DI->getOperand(2); + int64_t V; + if (MRI->getVRegDef(IndReg) == Phi && checkForImmediate(Opnd2, V)) { + unsigned UpdReg = DI->getOperand(0).getReg(); + IndMap.insert(std::make_pair(UpdReg, std::make_pair(IndReg, V))); + } + } + } + } + if (IndMap.empty()) { + return false; + } + MachineBasicBlock *TB = nullptr, *FB = nullptr; + SmallVector Cond; + bool NotAnalyzed = TII->analyzeBranch(*ExitingBlock, TB, FB, Cond, false); + if (NotAnalyzed || Cond.empty()) { + return false; + } + MachineInstr *condTerm = &(*Latch->getFirstTerminator()); + MachineInstr *uncondTerm = &(*std::next(Latch->getFirstTerminator())); + if (!(condTerm->getDesc().isConditionalBranch() && uncondTerm->getDesc().isUnconditionalBranch())) { + return false; + } + unsigned CmpReg1 = Cond[1].isReg() ? (unsigned) Cond[1].getReg() : 0; + unsigned CmpReg2 = Cond[2].isReg() ? (unsigned) Cond[2].getReg() : 0; + InductionMap::iterator IndMapEnd = IndMap.end(); + InductionMap::iterator F = IndMapEnd; + if (CmpReg1 != 0) { + InductionMap::iterator F1 = IndMap.find(CmpReg1); + if (F1 != IndMapEnd) + F = F1; + } + if (CmpReg2 != 0) { + InductionMap::iterator F2 = IndMap.find(CmpReg2); + if (F2 != IndMapEnd) { + if (F != IndMapEnd) { + return false; + } + F = F2; + } + } + if (F == IndMapEnd) { + return false; + } + Reg = F->second.first; + IVBump = F->second.second; + IVOp = MRI->getVRegDef(F->first); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..008370676124d4400b6c7f7aaba93b088e710f44 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp @@ -0,0 +1,5 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequired(); + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c37759ea88d5e1c9d3e64734898c8cfd783c37ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp @@ -0,0 +1,32 @@ +PULPHardwareLoops::Comparison::Kind PULPHardwareLoops::getComparisonKind(unsigned CondOpc, MachineOperand *InitialValue, const MachineOperand *EndValue, int64_t IVBump) const { + Comparison::Kind Cmp = (Comparison::Kind)0; + switch (CondOpc) { + case RISCV::BEQ: + Cmp = Comparison::EQ; + break; + case RISCV::BNE: + Cmp = Comparison::NE; + break; + case RISCV::BLT: + Cmp = Comparison::LTs; + break; + case RISCV::BLTU: + Cmp = Comparison::LTu; + break; + case RISCV::BGE: + Cmp = Comparison::GEs; + break; + case RISCV::BGEU: + Cmp = Comparison::GEs; + break; + case RISCV::P_BNEIMM: + Cmp = Comparison::NE; + break; + case RISCV::P_BEQIMM: + Cmp = Comparison::EQ; + break; + default: + return (Comparison::Kind)0; + } + return Cmp; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..926b8c43cd5728c5187b2fb95773e11602a6ae6b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp @@ -0,0 +1,4 @@ +unsigned getImm() const { + assert(isImm() && "Wrong CountValue accessor"); + return Contents.ImmVal; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0665e124d42ad6102cf3b1737469e9b3e1870a0c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp @@ -0,0 +1,277 @@ +CountValue *PULPHardwareLoops::getLoopTripCount(MachineLoop *L, SmallVectorImpl &OldInsts) { + MachineBasicBlock *TopMBB = L->getTopBlock(); + MachineBasicBlock::pred_iterator PI = TopMBB->pred_begin(); + assert(PI != TopMBB->pred_end() && + "Loop must have more than one incoming edge!"); + MachineBasicBlock *Backedge = *PI++; + if (PI == TopMBB->pred_end()) { + return nullptr; + } + MachineBasicBlock *Incoming = *PI++; + if (PI != TopMBB->pred_end()) { + return nullptr; + } + if (L->contains(Incoming)) { + if (L->contains(Backedge)) { + return nullptr; + } + std::swap(Incoming, Backedge); + } else if (!L->contains(Backedge)) { + return nullptr; + } + MachineBasicBlock *ExitingBlock = L->findLoopControlBlock(); + if (!ExitingBlock) { + return nullptr; + } + unsigned IVReg = 0; + int64_t IVBump = 0; + MachineInstr *IVOp; + bool FoundIV = findInductionRegister(L, IVReg, IVBump, IVOp); + if (!FoundIV) { + return nullptr; + } + MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); + MachineOperand *InitialValue = nullptr; + MachineInstr *IV_Phi = MRI->getVRegDef(IVReg); + MachineBasicBlock *Latch = L->getLoopLatch(); + for (unsigned i = 1, n = IV_Phi->getNumOperands(); i < n; i += 2) { + MachineBasicBlock *MBB = IV_Phi->getOperand(i+1).getMBB(); + if (MBB == Preheader) + InitialValue = &IV_Phi->getOperand(i); + else if (MBB == Latch) + IVReg = IV_Phi->getOperand(i).getReg(); + } + if (!InitialValue) { + return nullptr; + } + SmallVector Cond; + MachineBasicBlock *TB = nullptr, *FB = nullptr; + bool NotAnalyzed = TII->analyzeBranch(*ExitingBlock, TB, FB, Cond, false); + if (NotAnalyzed) { + return nullptr; + } + MachineBasicBlock *Header = L->getHeader(); + assert (TB && "Exit block without a branch?"); + if (ExitingBlock != Latch && (TB == Latch || FB == Latch)) { + MachineBasicBlock *LTB = nullptr, *LFB = nullptr; + SmallVector LCond; + bool NotAnalyzed = TII->analyzeBranch(*Latch, LTB, LFB, LCond, false); + if (NotAnalyzed) { + return nullptr; + } + if (TB == Latch) + TB = (LTB == Header) ? LTB : LFB; + else + FB = (LTB == Header) ? LTB: LFB; + } + assert ((!FB || TB == Header || FB == Header) && "Branches not to header?"); + if (!TB || (FB && TB != Header && FB != Header)) { + return nullptr; + } + MachineBasicBlock::iterator firstTerm = Latch->getFirstTerminator(); + MachineBasicBlock::iterator secondTerm = std::next(firstTerm); + if (!(firstTerm->getDesc().isConditionalBranch() && secondTerm->getDesc().isUnconditionalBranch())) { + return nullptr; + } + unsigned CondOpc = Cond[0].getImm(); + OldInsts.push_back(IVOp); + Comparison::Kind Cmp; + bool isSwapped = false; + const MachineOperand &Op1 = Cond[1]; + const MachineOperand &Op2 = Cond[2]; + const MachineOperand *EndValue = nullptr; + if (Op1.isReg()) { + if (Op2.isImm() || Op1.getReg() == IVReg) + EndValue = &Op2; + else { + EndValue = &Op1; + isSwapped = true; + } + } + if (!EndValue) { + return nullptr; + } + Cmp = getComparisonKind(CondOpc, InitialValue, EndValue, IVBump); + if (!Cmp) { + return nullptr; + } + if (isSwapped) { + Cmp = Comparison::getSwappedComparison(Cmp); + } + if (InitialValue->isReg()) { + unsigned R = InitialValue->getReg(); + MachineBasicBlock *DefBB = MRI->getVRegDef(R)->getParent(); + if (!MDT->properlyDominates(DefBB, Header)) { + int64_t V; + if (!checkForImmediate(*InitialValue, V)) { + return nullptr; + } + } + OldInsts.push_back(MRI->getVRegDef(R)); + } + if (EndValue->isReg()) { + unsigned R = EndValue->getReg(); + MachineBasicBlock *DefBB = MRI->getVRegDef(R)->getParent(); + if (!MDT->properlyDominates(DefBB, Header)) { + int64_t V; + if (!checkForImmediate(*EndValue, V)) { + return nullptr; + } + } + OldInsts.push_back(MRI->getVRegDef(R)); + } + FL->isFirstOperandEndvalue = isFirstOperandEndvalue; + FL->isCondExit = isCondExit; + InductionReg = new Register(IndReg); + IncrementReg = new Register(IncReg); + MachineBasicBlock *PH = MLI->findLoopPreheader(Loop, SpecPreheader); + assert (PH && "Should have a preheader by now"); + MachineBasicBlock::iterator InsertPos = PH->getFirstTerminator(); + DebugLoc DL; + if (InsertPos != PH->end()) + DL = InsertPos->getDebugLoc(); + const TargetRegisterClass *IntRC = &RISCV::GPRRegClass; + bool startIsImm = false, endIsImm = false; + int64_t immStart, immEnd; + startIsImm = checkForImmediate(*Start, immStart); + endIsImm = checkForImmediate(*End, immEnd); + if (endIsImm && !End->isImm()) { + if(immEnd == 0) { + unsigned VGPR = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder ZeroInit = BuildMI(*PH, InsertPos, DL, TII->get(TargetOpcode::COPY), VGPR); + ZeroInit.addReg(RISCV::X0); + End = &ZeroInit->getOperand(0); + } + } + bool CmpLess = Cmp & Comparison::L; + bool CmpGreater = Cmp & Comparison::G; + bool CmpHasEqual = Cmp & Comparison::EQ; + if (!Start->isReg() && !startIsImm) { + return nullptr; + } + if (!End->isReg() && !endIsImm) { + return nullptr; + } + if (CmpLess && IVBump < 0) { + return nullptr; + } + if (CmpGreater && IVBump > 0) { + return nullptr; + } + if (IVBump == 0) { + return nullptr; + } + if (startIsImm && endIsImm) { + if(!CmpHasEqual) { + return nullptr; + } + int64_t Dist = std::max(immStart, immEnd) - std::min(immStart, immEnd); + if (Dist == 0) { + return nullptr; + } + if (Cmp != Comparison::EQ) { + return nullptr; + } + bool Exact = (Dist % IVBump) == 0; + if (!Exact) { + return nullptr; + } + uint64_t Count = Dist / std::abs(IVBump); + if (Count > 0xFFFFFFFFULL) { + return nullptr; + } + return new CountValue(CountValue::CV_Immediate, Count); + } + LoopFeederMap LoopFeederPhi; + if (loopCountMayWrapOrUnderFlow(Start, End, Loop->getLoopPreheader(), Loop, LoopFeederPhi)) { + return nullptr; + } + if (!isPowerOf2_64(std::abs(IVBump))) { + return nullptr; + } + if (IVBump < 0) { + std::swap(Start, End); + IVBump = -IVBump; + } + bool RegToImm = Start->isReg() && End->isImm(); + bool RegToReg = Start->isReg() && End->isReg(); + int64_t StartV = 0, EndV = 0; + if (Start->isImm()) { + StartV = Start->getImm(); + } + if (End->isImm()) { + EndV = End->getImm(); + } + int64_t AdjV = 0; + unsigned DistR, DistSR; + bool startIsImmZeroOrZeroReg = (Start->isImm() && StartV == 0); + if (!startIsImmZeroOrZeroReg && Start->isReg()) { + int64_t startImm; + if (checkForImmediate(*Start, startImm)) { + startIsImmZeroOrZeroReg = (startImm == 0); + } + } + if (startIsImmZeroOrZeroReg) { + DistR = End->getReg(); + DistSR = End->getSubReg(); + } + else { + const MCInstrDesc &SubD = RegToReg ? TII->get(RISCV::SUB) : (RegToImm ? TII->get(RISCV::SUB) /* TODO */ : TII->get(RISCV::ADDI)); + if (RegToReg || RegToImm) { + unsigned SubR = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder SubIB = BuildMI(*PH, InsertPos, DL, SubD, SubR); + if (RegToReg) { + SubIB.addReg(End->getReg(), 0, End->getSubReg()).addReg(Start->getReg(), 0, Start->getSubReg()); + } + else { + MachineBasicBlock::iterator ThisInsertPos = InsertPos; + ThisInsertPos--; + unsigned ImmToRegReg = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder ImmToReg = BuildMI(*PH, ThisInsertPos, DL, TII->get(RISCV::ADDI), ImmToRegReg); + ImmToReg.addReg(RISCV::X0).addImm(EndV); + SubIB.addReg(ImmToReg->getOperand(0).getReg()).addReg(Start->getReg(), 0, Start->getSubReg()); + } + DistR = SubR; + } + else { + const MachineInstr *EndValInstr = MRI->getVRegDef(End->getReg()); + if (EndValInstr->getOpcode() == RISCV::ADDI && EndValInstr->getOperand(1).getSubReg() == 0 && EndValInstr->getOperand(2).getImm() == StartV) { + DistR = EndValInstr->getOperand(1).getReg(); + } + else { + unsigned SubR = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder SubIB = BuildMI(*PH, InsertPos, DL, SubD, SubR); + SubIB.addReg(End->getReg(), 0, End->getSubReg()).addImm(-StartV); + DistR = SubR; + } + } + DistSR = 0; + } + unsigned AdjR, AdjSR; + if (AdjV == 0) { + AdjR = DistR; + AdjSR = DistSR; + } + else { + unsigned AddR = MRI->createVirtualRegister(IntRC); + MCInstrDesc const &AddD = TII->get(RISCV::ADDI); + BuildMI(*PH, InsertPos, DL, AddD, AddR).addReg(DistR, 0, DistSR).addImm(AdjV); + AdjR = AddR; + AdjSR = 0; + } + unsigned CountR, CountSR; + if (IVBump == 1) { + CountR = AdjR; + CountSR = AdjSR; + } + else { + unsigned Shift = Log2_32(IVBump); + unsigned LsrR = MRI->createVirtualRegister(IntRC); + const MCInstrDesc &LsrD = TII->get(RISCV::SRLI); + BuildMI(*PH, InsertPos, DL, LsrD, LsrR).addReg(AdjR, 0, AdjSR).addImm(Shift); + CountR = LsrR; + CountSR = 0; + } + return new CountValue(CountValue::CV_Register, CountR, CountSR); +} +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a13423387ee5fbe6555d5082ab4a403413de6f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp @@ -0,0 +1,9 @@ +static Kind getNegatedComparison(Kind Cmp) { + if ((Cmp & L) || (Cmp & G)) { + return (Kind)((Cmp ^ (L | G)) ^ EQ); + } + if ((Cmp & NE) || (Cmp & EQ)) { + return (Kind)(Cmp ^ (EQ | NE)); + } + return (Kind)0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88db3099350e40fa0d4cfabc732be3b1d06f0ba9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "PULP Hardware Loops"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f6681dcc1a7d87c841a32fcfc8275dd4af179c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const { + assert(isReg() && "Wrong CountValue accessor"); + return Contents.R.Reg; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cff1bb27c34b61906a86c7f741e8de982019bb79 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp @@ -0,0 +1,4 @@ +unsigned getSubReg() const { + assert(isReg() && "Wrong CountValue accessor"); + return Contents.R.Sub; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec0cca39b910463d25f200de5c7324bd5d9368d2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp @@ -0,0 +1,7 @@ +static Kind getSwappedComparison(Kind Cmp) { + assert ((!((Cmp & L) && (Cmp & G))) && "Malformed comparison operator"); + if ((Cmp & L) || (Cmp & G)) { + return (Kind)(Cmp ^ (L|G)); + } + return Cmp; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d0fd1c6e1e565b831bf30a631c3386d5ebe5157 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp @@ -0,0 +1,32 @@ +bool PULPHardwareLoops::isDead(const MachineInstr *MI, SmallVectorImpl &DeadPhis) const { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + if (!MO.isReg() || !MO.isDef()) + continue; + unsigned Reg = MO.getReg(); + if (MRI->use_nodbg_empty(Reg)) + continue; + using use_nodbg_iterator = MachineRegisterInfo::use_nodbg_iterator; + use_nodbg_iterator I = MRI->use_nodbg_begin(Reg); + use_nodbg_iterator End = MRI->use_nodbg_end(); + if (std::next(I) != End || !I->getParent()->isPHI()) + return false; + MachineInstr *OnePhi = I->getParent(); + for (unsigned j = 0, f = OnePhi->getNumOperands(); j != f; ++j) { + const MachineOperand &OPO = OnePhi->getOperand(j); + if (!OPO.isReg() || !OPO.isDef()) + continue; + unsigned OPReg = OPO.getReg(); + use_nodbg_iterator nextJ; + for (use_nodbg_iterator J = MRI->use_nodbg_begin(OPReg); J != End; J = nextJ) { + nextJ = std::next(J); + MachineOperand &Use = *J; + MachineInstr *UseMI = Use.getParent(); + if (MI != UseMI) + return false; + } + } + DeadPhis.push_back(OnePhi); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc64ab4323d8f6b869d0a1cef8d7218e4ab79081 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const { + return Kind == CV_Immediate; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5f4f22f91f44ed4217c037ae6be289172515f95c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp @@ -0,0 +1,18 @@ +bool PULPHardwareLoops::isInvalidLoopOperation(const MachineInstr *MI) const { + if (MI->getDesc().isCall()) { + return true; + } + if (MO.getReg() == RISCV::LOOP0setup) { + return KnownHardwareLoops.count(MI) == 0; + } + if (MO.getReg() == RISCV::LOOP1setup) { + return KnownHardwareLoops.count(MI) == 0; + } + if (MO.getReg() == RISCV::LOOP0setupi) { + return KnownHardwareLoops.count(MI) == 0; + } + if (MO.getReg() == RISCV::LOOP1setupi) { + return KnownHardwareLoops.count(MI) == 0; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c9511384a7e59e90f95a99440837a5baefc2273 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp @@ -0,0 +1,15 @@ +bool PULPHardwareLoops::isLoopFeeder(MachineLoop *L, MachineBasicBlock *A, MachineInstr *MI, const MachineOperand *MO, LoopFeederMap &LoopFeederPhi) const { + if (LoopFeederPhi.find(MO->getReg()) == LoopFeederPhi.end()) { + LLVM_DEBUG(dbgs() << "\nhw_loop head, " << printMBBReference(**L->block_begin())); + for (MachineBasicBlock *MBB : L->getBlocks()) { + if (A == MBB) + return false; + } + MachineInstr *Def = MRI->getVRegDef(MO->getReg()); + LoopFeederPhi.insert(std::make_pair(MO->getReg(), Def)); + return true; + } + else { + return false; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39a3b1a4a320cf5fa42671064beafec9eaf2aced --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const { + return Kind == CV_Register; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc85ce445f35cd0e967ac51228897ff83c7ccf54 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp @@ -0,0 +1,3 @@ +static bool isSigned(Kind Cmp) { + return (Cmp & (L | G) && !(Cmp & U)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..832beba9cac1339893e9305ccd1698e085711c36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp @@ -0,0 +1,3 @@ +static bool isUnsigned(Kind Cmp) { + return (Cmp & U); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..efeeeddfc7ec63b3244065b73509df85d52bdcb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp @@ -0,0 +1,56 @@ +bool PULPHardwareLoops::loopCountMayWrapOrUnderFlow(const MachineOperand *InitVal, const MachineOperand *EndVal, MachineBasicBlock *MBB, MachineLoop *L, LoopFeederMap &LoopFeederPhi) const { + if (!InitVal -> isReg()) { + return false; + } + if (!EndVal -> isImm()) { + return false; + } + int64_t Imm; + if (checkForImmediate(*InitVal, Imm)) { + return EndVal->getImm() == Imm; + } + Register Reg = InitVal->getReg(); + if (!Reg.isVirtual()) { + return true; + } + MachineInstr *Def = MRI->getVRegDef(Reg); + if (!Def) { + return true; + } + if (Def->isPHI() && !phiMayWrapOrUnderflow(Def, EndVal, Def->getParent(), L, LoopFeederPhi)) { + return false; + } + if (Def->isCopy() && !loopCountMayWrapOrUnderFlow(&(Def->getOperand(1)), EndVal, Def->getParent(), L, LoopFeederPhi)) { + return false; + } + for (MachineRegisterInfo::use_instr_nodbg_iterator I = MRI->use_instr_nodbg_begin(Reg), E = MRI->use_instr_nodbg_end(); I != E; ++I) { + MachineInstr *MI = &*I; + Register CmpReg1 = 0, CmpReg2 = 0; + int CmpMask = 0, CmpValue = 0; + if (!TII->analyzeCompare(*MI, CmpReg1, CmpReg2, CmpMask, CmpValue)) { + continue; + } + MachineBasicBlock *TBB = nullptr, *FBB = nullptr; + SmallVector Cond; + if (TII->analyzeBranch(*MI->getParent(), TBB, FBB, Cond, false)) { + continue; + } + Comparison::Kind Cmp = getComparisonKind(MI->getOpcode(), nullptr, nullptr, 0); + if (Cmp == 0) { + continue; + } + if (CmpReg2 != 0 && CmpReg2 == Reg) { + Cmp = Comparison::getSwappedComparison(Cmp); + } + if (Comparison::isSigned(Cmp)) { + return false; + } + if ((Cmp & Comparison::G) || Cmp == Comparison::NE) { + return false; + } + } + if (!Def->isCopy() && !Def->isPHI()) { + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b720d8f1b25ab6fdfa47794bc2acfe2eb1642790 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp @@ -0,0 +1,11 @@ +bool PULPHardwareLoops::phiMayWrapOrUnderflow(MachineInstr *Phi, const MachineOperand *EndVal, MachineBasicBlock *MBB, MachineLoop *L, LoopFeederMap &LoopFeederPhi) const { + assert(Phi->isPHI() && "Expecting a Phi."); + for (int i = 1, n = Phi->getNumOperands(); i < n; i += 2) { + if (isLoopFeeder(L, MBB, Phi, &(Phi->getOperand(i)), LoopFeederPhi)) { + if (loopCountMayWrapOrUnderFlow(&(Phi->getOperand(i)), EndVal, Phi->getParent(), L, LoopFeederPhi)) { + return true; + } + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/print.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb34211b7a963966e9198729846f7a46520d019f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/print.cpp @@ -0,0 +1,8 @@ +void print(raw_ostream &OS, const TargetRegisterInfo *TRI = nullptr) const { + if (isReg()) { + OS << printReg(Contents.R.Reg, TRI, Contents.R.Sub); + } + if (isImm()) { + OS << Contents.ImmVal; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..573102109eff8a14835d4f0cf2a687ebc7d75093 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp @@ -0,0 +1,26 @@ +void PULPHardwareLoops::removeIfDead(MachineInstr *MI) { + SmallVector DeadPhis; + if (isDead(MI, DeadPhis)) { + LLVM_DEBUG(dbgs() << "HW looping will remove: " << *MI); + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + if (!MO.isReg() || !MO.isDef()) + continue; + unsigned Reg = MO.getReg(); + MachineRegisterInfo::use_iterator nextI; + for (MachineRegisterInfo::use_iterator I = MRI->use_begin(Reg), E = MRI->use_end(); I != E; I = nextI) { + nextI = std::next(I); + MachineOperand &Use = *I; + MachineInstr *UseMI = I->getParent(); + if (UseMI == MI) + continue; + if (Use.isDebug()) + UseMI->getOperand(0).setReg(0U); + } + } + MI->eraseFromParent(); + for (unsigned i = 0; i < DeadPhis.size(); ++i) { + DeadPhis[i]->eraseFromParent(); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32396ee89035052f4e8307e42b85270e9d0da451 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp @@ -0,0 +1,30 @@ +bool PULPHardwareLoops::runOnMachineFunction(MachineFunction &MF) { + LLVM_DEBUG(dbgs() << "********* PULP Hardware Loops *********\n"); + if (!MF.getSubtarget().hasPULPExtV2()) { + return false; + } + if (skipFunction(MF.getFunction())) { + return false; + } + bool Changed = false; + NumHWLoopsInternal = 0; + MLI = &getAnalysis(); + MRI = &MF.getRegInfo(); + MDT = &getAnalysis(); + const RISCVSubtarget &HST = MF.getSubtarget(); + TII = HST.getInstrInfo(); + TRI = HST.getRegisterInfo(); + for (auto &L : *MLI) + if (!L->getParentLoop()) { + bool L0Used = false; + bool L1Used = false; + KnownHardwareLoops.clear(); + Changed |= convertToHardwareLoop(L, L0Used, L1Used); + } + if (Changed) { + errs().changeColor(raw_fd_ostream::Colors::BLUE, true); + errs() << "Created " << NumHWLoopsInternal << " hardware loops in " << MF.getName() << "!\n"; + errs().resetColor(); + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5ba190c6eef41533e7debd2511464194bd8c9427 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp @@ -0,0 +1,7 @@ +union Values { + struct { + unsigned Reg; + unsigned Sub; + } R; + unsigned ImmVal; +} Contents; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26c51517892476bc1f825e05105cbb930db045d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp @@ -0,0 +1,10 @@ +explicit CountValue(CountValueType t, unsigned v, unsigned u = 0) { + Kind = t; + if (Kind == CV_Register) { + Contents.R.Reg = v; + Contents.R.Sub = u; + } + else { + Contents.ImmVal = v; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98c5c29889f2176f721e3f9604806c1932aa76dc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp @@ -0,0 +1,3 @@ +explicit FrepLoop(MachineLoop *ML) { + L = ML; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a57ba5865dbb3f7dd0933b0843eda5372b9d3171 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +SNITCHFrepLoops() : MachineFunctionPass(ID) { + initializeSNITCHFrepLoopsPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9b4e37e0af58cc8245b4eba37735a07b26093555 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp @@ -0,0 +1,3 @@ +SNITCHFrepLoops() : MachineFunctionPass(ID) { + initializeSNITCHFrepLoopsPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2b6e9fc7dc9a0cecf43f9c9894c6dcfd42e733b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp @@ -0,0 +1,50 @@ +bool SNITCHFrepLoops::checkForImmediate(const MachineOperand &MO, int64_t &Val) const { + if (MO.isImm()) { + Val = MO.getImm(); + return true; + } + if (!MO.isReg()) { + return false; + } + int64_t TV; + unsigned R = MO.getReg(); + if (!Register::isVirtualRegister(R)) { + if (R == RISCV::X0) { + Val = 0; + return true; + } + return false; + } + MachineInstr *DI = MRI->getVRegDef(R); + unsigned DOpc = DI->getOpcode(); + if (DOpc == TargetOpcode::COPY) { + if (!checkForImmediate(DI->getOperand(1), TV)) { + return false; + } + Val = TV; + return true; + } + if (DOpc == RISCV::ADDI) { + if (DI->getOperand(1).isReg() && DI->getOperand(1).getReg() == RISCV::X0) { + if (!checkForImmediate(DI->getOperand(2), TV)) { + return false; + } + else { + Val = TV; + } + } + else if (DI->getOperand(2).isImm() && DI->getOperand(2).getImm() == 0) { + if (!checkForImmediate(DI->getOperand(1), TV)) { + return false; + } + else { + Val = TV; + } + } + else { + return false; + } + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..29dc41292f0058fe1e1821df6745bb636fb0fabe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp @@ -0,0 +1,74 @@ +unsigned SNITCHFrepLoops::containsInvalidInstruction(MachineLoop *L, Register *IV, Register *ICV, SmallVectorImpl &FPPhis) const { + MachineBasicBlock *Header = L->getHeader(); + MachineBasicBlock *Latch = L->getLoopLatch(); + MachineBasicBlock *ExitingBlock = L->findLoopControlBlock(); + bool skip = false; + unsigned Flops = 0; + for (MachineBasicBlock *MBB : L->getBlocks()) { + for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end(); MII != E; ++MII) { + MachineInstr *MI = &*MII; + LLVM_DEBUG(dbgs()<<"Checking"; MI->dump()); + if(MI->getOpcode() == TargetOpcode::PHI) { + LLVM_DEBUG(dbgs() << " ignoring PHI node\n"); + if(MRI->getRegClass(MI->getOperand(0).getReg()) == &RISCV::FPR64RegClass || MRI->getRegClass(MI->getOperand(0).getReg()) == &RISCV::FPR32RegClass) { + FPPhis.push_back(MI); + } + continue; + } + if(MI->getOpcode() == TargetOpcode::COPY) { + LLVM_DEBUG(dbgs() << " ignoring COPY\n"); + continue; + } + if(MI->isUnconditionalBranch()) { + if(MI->getOperand(0).getMBB() == Latch) { + LLVM_DEBUG(dbgs() << " ignoring unconditional branch to latch\n"); + continue; + } + if(MI->getOperand(0).getMBB() == Header) { + LLVM_DEBUG(dbgs() << " ignoring unconditional branch to header\n"); + continue; + } + if(MI->getOperand(0).getMBB() == ExitingBlock) { + LLVM_DEBUG(dbgs() << " ignoring unconditional branch to Exit\n"); + continue; + } + if(MI->getOperand(0).getMBB() == L->getExitBlock()) { + LLVM_DEBUG(dbgs() << " ignoring unconditional branch to Exit Block\n"); + continue; + } + } + if(MI->isDebugValue()) { + LLVM_DEBUG(dbgs() << " ignoring debug value\n"); + continue; + } + skip = false; + if(MI->isConditionalBranch()) { + for(auto MO : MI->operands()) + if(MO.isReg() && (MO.getReg() == *IV || MO.getReg() == *ICV) ) { + LLVM_DEBUG(dbgs()<<" ignoring conditional branch with inudction register usage\n"); + skip = true; + break; + } + } + if(skip) { + continue; + } + skip = false; + for(auto MO : MI->operands()) + if(MO.isReg() && (MO.getReg() == *IV) ) { + LLVM_DEBUG(dbgs()<<" skipped due to inudction register usage\n"); + skip = true; + break; + } + if(skip) { + continue; + } + if (isInvalidLoopOperation(MI)) { + LLVM_DEBUG(dbgs() << "Cannot convert to hw_loop due to:"; MI->dump()); + return 0; + } + Flops++; + } + } + return Flops; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9338fb17f831fde1a6df364975a20fd0aa9e6c97 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp @@ -0,0 +1,187 @@ +bool SNITCHFrepLoops::convertToHardwareLoop(MachineLoop *L) { + assert(L->getHeader() && "Loop without a header?"); + bool changed = false; + LLVM_DEBUG(L->dump();); + for (MachineLoop::iterator I = L->begin(), E = L->end(); I != E; ++I) { + changed |= convertToHardwareLoop(*I); + } + if(!L->isInnermost()) return false; + LLVM_DEBUG(dbgs()<<"-------------------\n"); + LLVM_DEBUG(dbgs()<<"Running on\n"); + LLVM_DEBUG(L->dump();); + LLVM_DEBUG(dbgs()<<"-------------------\n"); + if(!isMarkedForInference(L) && !EnableFrepInference) + return changed; + SmallVector OldInsts, NewInsts; + Register *IndReg, *IncReg; + LLVM_DEBUG(dbgs() << ">>>>> in getLoopTripCount()\n"); + CountValue *TripCount = getLoopTripCount(L, OldInsts, IndReg, IncReg); + if(TripCount == nullptr) { + LLVM_DEBUG(dbgs() << "trip count not found\n"); + return changed; + } + LLVM_DEBUG(dbgs() << "getLoopTripCount found count "; TripCount->print(dbgs(), TRI)); + LLVM_DEBUG(dbgs() << ">>>>> in containsInvalidInstruction()\n"); + SmallVector FPPhis; + unsigned nFlops = containsInvalidInstruction(L, IndReg, IncReg, FPPhis); + if (nFlops == 0) { + return changed; + } + LLVM_DEBUG(dbgs() << "No invalid instructions found\n"); + MachineBasicBlock *ControlBlock = L->findLoopControlBlock(); + if (!ControlBlock) { + return changed; + } + LLVM_DEBUG(dbgs()<<"ControlBlock: " << ControlBlock->getName() << "\n"); + MachineBasicBlock::iterator LastI = ControlBlock->getFirstTerminator(); + if (LastI == ControlBlock->end()) { + return changed; + } + MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); + if (!Preheader) { + dbgs() << "No preheader found\n"; + return changed; + } + if (TripCount->isReg()) { + dbgs() << "Don't know yet how to handle register trip counts\n"; + return changed; + } + LLVM_DEBUG(dbgs() << ">>>>> find loop start\n"); + MachineBasicBlock * TopBlock = L->getTopBlock(); + MachineBasicBlock * ExitBlock = L->getExitBlock(); + MachineBasicBlock * LoopStart = nullptr; + MachineBasicBlock * LoopSucc = nullptr; + MachineBasicBlock * LatchBlock = L->getLoopLatch(); + MachineBasicBlock * Header = L->getHeader(); + MachineBasicBlock * TB = nullptr, * FB = nullptr; + SmallVector Cond; + LLVM_DEBUG(dbgs()<<"TopBlock: " << TopBlock->getName() << "\n"); + bool branchNotFound = TII->analyzeBranch(*ControlBlock, TB, FB, Cond, false); + if (ControlBlock != LatchBlock) { + if (branchNotFound) { + return changed; + } + if (L->contains(TB)) { + LoopStart = TB; + LoopSucc = FB; + } + else if (L->contains(FB)) { + LoopStart = FB; + LoopSucc = TB; + } + else { + return changed; + } + } + else { + LoopStart = TopBlock; + LoopSucc = L->contains(TB) ? FB : TB; + } + assert(LoopStart != nullptr && "Didn't find loop start!"); + LLVM_DEBUG(dbgs()<<"LoopStart: " << LoopStart->getName()<<" LoopSucc: " << LoopSucc->getName() << "\n"); + if (!ExitBlock) { + dbgs() << "no exit block found\n"; + return changed; + } + LLVM_DEBUG(dbgs() << ">>>>> find loop size\n"); + unsigned loopSize = 0; + const unsigned instructionSize = 4; + for (const MachineBasicBlock *LB : L->getBlocks()) { + loopSize += instructionSize * LB->size(); + if (loopSize > 0xFFF) { + dbgs() << "loopsize exceeds limit: "<>>>> insert frep\n"); + MachineBasicBlock::iterator InsertPos = TopBlock->getFirstNonPHI(); + LLVM_DEBUG(dbgs() << "Change to hardware loop at "; L->dump()); + DebugLoc DL; + if (InsertPos != Header->end()) + DL = InsertPos->getDebugLoc(); + if (TripCount->isReg()) { + unsigned CountReg = MRI->createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(*TopBlock, InsertPos, DL, TII->get(TargetOpcode::COPY), CountReg).addReg(TripCount->getReg(), 0, TripCount->getSubReg()); + BuildMI(*TopBlock, InsertPos, DL, TII->get(RISCV::ADDI)).addReg(CountReg).addReg(CountReg).addImm(-1); + auto hwloop = BuildMI(*TopBlock, InsertPos, DL, TII->get(RISCV::FREP_O)).addReg(CountReg).addImm(nFlops).addImm(0).addImm(0); + KnownHardwareLoops.insert(hwloop.getInstr()); + } + else { + assert(TripCount->isImm() && "Expecting immediate value for trip count if not register"); + int64_t CountImm = TripCount->getImm(); + unsigned CountReg = MRI->createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(*TopBlock, InsertPos, DL, TII->get(RISCV::ADDI), CountReg).addReg(RISCV::X0).addImm(CountImm-1); + auto hwloop = BuildMI(*TopBlock, InsertPos, DL, TII->get(RISCV::FREP_O)).addReg(CountReg).addImm(nFlops).addImm(0).addImm(0); + KnownHardwareLoops.insert(hwloop.getInstr()); + } + delete TripCount; + ControlBlock->setHasAddressTaken(); + ControlBlock->setLabelMustBeEmitted(); + BlockAddress::get(const_cast(ControlBlock->getBasicBlock())); + LLVM_DEBUG(dbgs() << ">>>>> cleanup\n"); + if(FL->isCondExit && LatchBlock==ControlBlock) { + assert(FL->condTerm != nullptr && "Expected a reference to the conditional term"); + assert(LoopSucc != nullptr && "Expected a loop successor for unconditional branch"); + LLVM_DEBUG(dbgs()<<"Change conditional exit branch to uncondition with target " << LoopSucc->getName() << "\n"); + LLVM_DEBUG(dbgs()<<" insert at"; FL->condTerm->dump()); + NewInsts.push_back(BuildMI(*FL->condTerm->getParent(), FL->condTerm, FL->condTerm->getDebugLoc(), TII->get(RISCV::PseudoBR)).addMBB(LoopSucc).getInstr()); + FL->condTerm->removeFromParent(); + } + else { + OldInsts.push_back(FL->condTerm); + } + for(unsigned j = 0; j < 2; ++j) + for (unsigned i = 0; i < OldInsts.size(); ++i) { + if(OldInsts[i] && OldInsts[i]->getParent()) { + LLVM_DEBUG(dbgs()<<"Check if can be removed:"; OldInsts[i]->dump()); + removeIfDead(OldInsts[i]); + } + } + for (MachineBasicBlock *MBB : L->getBlocks()) { + MachineBasicBlock::iterator term = MBB->getFirstTerminator(); + if(term == MBB->end()) + continue; + MachineBasicBlock::iterator nextTerm; + for(;term != MBB->end(); term = nextTerm) { + nextTerm = std::next(term); + unsigned skip = 0; + for(unsigned p = 0; p < NewInsts.size(); ++p) { + if(NewInsts[p] == term) { + skip = 1; + LLVM_DEBUG(dbgs()<<"skip removal of terminator"; term->dump()); + } + } + if(skip) continue; + if(term->isUnconditionalBranch() && + term->getOperand(0).getMBB() == Header) { + LLVM_DEBUG(dbgs()<<"removing unconditional backedge to header "; term->dump()); + if(!term->getParent()->isSuccessor(LoopSucc)) term->getParent()->addSuccessor(LoopSucc); + term->getParent()->removeSuccessor(Header); + term->removeFromParent(); + } + else if(term->isUnconditionalBranch() && + term->getOperand(0).getMBB() == LatchBlock) { + LLVM_DEBUG(dbgs()<<"removing unconditional backedge to latch "; term->dump()); + term->getParent()->removeSuccessor(LoopSucc); + term->removeFromParent(); + } + else if(term->isUnconditionalBranch() && + term->getOperand(0).getMBB() == LoopSucc) { + LLVM_DEBUG(dbgs()<<"removing unconditional branch to loop successor "; term->dump()); + term->removeFromParent(); + } + } + } + insertFPUBarrier(L, ExitBlock); + ++NumFrepLoops; + FL->TopBlock = TopBlock; + FL->ExitBlock = ExitBlock; + FL->LoopStart = LoopStart; + FL->LoopSucc = LoopSucc; + FL->LatchBlock = LatchBlock; + FL->Header = Header; + FL->TB = TB; + FL->TB = FB; + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13afedbcaa1d50da9013e6346335c6c9abec58a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp @@ -0,0 +1,4 @@ +//zmcorrectzm +FunctionPass *createSNITCHFrepLoopsPass() { + return new SNITCHFrepLoops(); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08c67b5d3aca9dafc9d664780176f3a1114b9854 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createSNITCHFrepLoopsPass() { + return new SNITCHFrepLoops(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84c79208998defdbb6d20f1bc3d4469dd0bcf0a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp @@ -0,0 +1,4 @@ +enum CountValueType { + CV_Register, + CV_Immediate +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06934a6723a77c148733266a6459f940fb54480b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp @@ -0,0 +1,15 @@ +enum Kind { + EQ = 0x01, + NE = 0x02, + L = 0x04, + G = 0x08, + U = 0x40, + LTs = L, + LEs = L | EQ, + GTs = G, + GEs = G | EQ, + LTu = L | U, + LEu = L | EQ | U, + GTu = G | U, + GEu = G | EQ | U +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a57dc94a2983dd5351ab9f3f3d071bc49a33e25 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp @@ -0,0 +1,21 @@ +const MachineInstr *SNITCHFrepLoops::findBranchInstruction(MachineLoop *L) { + using namespace RISCV; + static const unsigned Bops[] = {BNE}; + unsigned insInBops = 0; + const MachineInstr *BI = nullptr; + for (MachineBasicBlock *MBB : L->getBlocks()) { + for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end(); MII != E; ++MII) { + const MachineInstr *MI = &*MII; + for(unsigned i = 0; i < sizeof(Bops)/sizeof(Bops[0]); ++i) + if(MI->getOpcode() == Bops[i]) { + BI = MI; + ++insInBops; + } + } + } + if(insInBops != 1) { + LLVM_DEBUG(dbgs() << "Multiple or none ("<findLoopPreheader(L, SpecPreheader); + MachineBasicBlock *Header = L->getHeader(); + MachineBasicBlock *Latch = L->getLoopLatch(); + MachineBasicBlock *ExitingBlock = L->findLoopControlBlock(); + if (!Header) { + return false; + } + if (!Preheader) { + return false; + } + if (!Latch) { + return false; + } + if (!ExitingBlock) { + return false; + } + LLVM_DEBUG(dbgs()<<"Found Header ["<getName()<<"], Preheader ["<getName()<<"], Latch ["<getName()<<"], ExitingBlock ["<getName()<<"]\n"); + bool latchExitOneBlock = (Latch == ExitingBlock); + LLVM_DEBUG(dbgs() << "latchExitOneBlock = "<; + using InductionMap = std::map; + InductionMap IndMap; + using instr_iterator = MachineBasicBlock::instr_iterator; + for (instr_iterator I = Header->instr_begin(), E = Header->instr_end(); I != E && I->isPHI(); ++I) { + MachineInstr *Phi = &*I; + LLVM_DEBUG(dbgs()<<"found PHI: "; Phi->dump()); + for (unsigned i = 1, n = Phi->getNumOperands(); i < n; i += 2) { + if (Phi->getOperand(i+1).getMBB() != Latch) { + continue; + } + unsigned PhiOpReg = Phi->getOperand(i).getReg(); + MachineInstr *DI = MRI->getVRegDef(PhiOpReg); + if (DI->getDesc().getOpcode() == RISCV::ADDI) { + unsigned InducReg = DI->getOperand(1).getReg(); + MachineOperand &Opnd2 = DI->getOperand(2); + int64_t V; + if (MRI->getVRegDef(InducReg) == Phi && checkForImmediate(Opnd2, V)) { + unsigned UpdReg = DI->getOperand(0).getReg(); + if(latchExitOneBlock) { + IndMap.insert(std::make_pair(UpdReg, std::make_pair(InducReg, V))); + } + else { + IndMap.insert(std::make_pair(InducReg, std::make_pair(UpdReg, V))); + } + } + } + } + } + if (IndMap.empty()) { + LLVM_DEBUG(dbgs()<<"Couldn't find any PHI nodes\n"); + return false; + } + MachineBasicBlock *TB = nullptr, *FB = nullptr; + SmallVector Cond; + bool NotAnalyzed = TII->analyzeBranch(*ExitingBlock, TB, FB, Cond, false); + if (NotAnalyzed || Cond.empty()) { + LLVM_DEBUG(dbgs()<<"Couldn't analyze block ("<getName()<<"] False dst: ["<getName()<<"]\n"); + MachineInstr *condTerm = &(*ExitingBlock->getFirstTerminator()); + MachineInstr *uncondTerm = &(*std::next(ExitingBlock->getFirstTerminator())); + if (!(condTerm->getDesc().isConditionalBranch() && uncondTerm->getDesc().isUnconditionalBranch())) { + return false; + } + LLVM_DEBUG(dbgs()<<"condTerm :"; condTerm->dump()); + LLVM_DEBUG(dbgs()<<"uncondTerm :"; uncondTerm->dump()); + LLVM_DEBUG(dbgs()<<"Cond[1] : "; Cond[1].dump()); + LLVM_DEBUG(dbgs()<<"Cond[2] : "; Cond[2].dump()); + FL->condTerm = condTerm; + FL->uncondTerm = uncondTerm; + unsigned CmpReg1 = Cond[1].isReg() ? (unsigned) Cond[1].getReg() : 0; + unsigned CmpReg2 = Cond[2].isReg() ? (unsigned) Cond[2].getReg() : 0; + InductionMap::iterator IndMapEnd = IndMap.end(); + InductionMap::iterator F = IndMapEnd; + if (CmpReg1 != 0) { + InductionMap::iterator F1 = IndMap.find(CmpReg1); + if (F1 != IndMapEnd) + F = F1; + } + if (CmpReg2 != 0) { + InductionMap::iterator F2 = IndMap.find(CmpReg2); + if (F2 != IndMapEnd) { + if (F != IndMapEnd) { + LLVM_DEBUG(dbgs() << "both PHI registers found in conditional, abort\n"); + return false; + } + F = F2; + } + } + if (F == IndMapEnd) { + LLVM_DEBUG(dbgs() << "no PHI registers found in conditional, abort\n"); + return false; + } + if(!latchExitOneBlock) { + IndReg = F->first; + IncReg = F->second.first; + IVBump = F->second.second; + BumpOp = MRI->getVRegDef(F->second.first); + } + else { + IndReg = F->second.first; + IncReg = F->first; + IVBump = F->second.second; + BumpOp = MRI->getVRegDef(F->first); + } + LLVM_DEBUG(dbgs()<< "Found induction! IndReg ["<(); + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0739fb3f1ef31e46d55bb9e3394989737947bf54 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp @@ -0,0 +1,26 @@ +SNITCHFrepLoops::Comparison::Kind SNITCHFrepLoops::getComparisonKind(unsigned CondOpc, MachineOperand *InitialValue, const MachineOperand *EndValue, int64_t IVBump) const { + Comparison::Kind Cmp = (Comparison::Kind)0; + switch (CondOpc) { + case RISCV::BEQ: + Cmp = Comparison::EQ; + break; + case RISCV::BNE: + Cmp = Comparison::NE; + break; + case RISCV::BLT: + Cmp = Comparison::LTs; + break; + case RISCV::BLTU: + Cmp = Comparison::LTu; + break; + case RISCV::BGE: + Cmp = Comparison::GEs; + break; + case RISCV::BGEU: + Cmp = Comparison::GEs; + break; + default: + return (Comparison::Kind)0; + } + return Cmp; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..926b8c43cd5728c5187b2fb95773e11602a6ae6b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp @@ -0,0 +1,4 @@ +unsigned getImm() const { + assert(isImm() && "Wrong CountValue accessor"); + return Contents.ImmVal; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f269f9f28645efa2261975ef486121e5ed4deef --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp @@ -0,0 +1,255 @@ +CountValue *SNITCHFrepLoops::getLoopTripCount(MachineLoop *L, SmallVectorImpl &OldInsts, Register *&InductionReg, Register *&IncrementReg) { + MachineBasicBlock *TopMBB = L->getTopBlock(); + MachineBasicBlock::pred_iterator PI = TopMBB->pred_begin(); + assert(PI != TopMBB->pred_end() && "Loop must have more than one incoming edge!"); + MachineBasicBlock *Backedge = *PI++; + if (PI == TopMBB->pred_end()) { + return nullptr; + } + MachineBasicBlock *Incoming = *PI++; + if (PI != TopMBB->pred_end()) { + return nullptr; + } + if (L->contains(Incoming)) { + if (L->contains(Backedge)) { + return nullptr; + } + std::swap(Incoming, Backedge); + } + else if (!L->contains(Backedge)) { + return nullptr; + } + LLVM_DEBUG(dbgs()<<"Contains Incoming: " << L->contains(Incoming)<<" Concains Backedge: " << L->contains(Backedge)<<"\n"); + MachineBasicBlock *ExitingBlock = L->findLoopControlBlock(); + if (!ExitingBlock) { + return nullptr; + } + LLVM_DEBUG(dbgs()<<"ExitingBlock (contains: "<contains(ExitingBlock)<<")\n"); + unsigned IndReg = 0, IncReg = 0; + int64_t IVBump = 0; + MachineInstr *BumpOp; + bool FoundIV = findInductionRegister(L, IndReg, IncReg, IVBump, BumpOp); + if (!FoundIV) { + return nullptr; + } + OldInsts.push_back(BumpOp); + MachineBasicBlock *Preheader = MLI->findLoopPreheader(L, SpecPreheader); + MachineOperand *InitialValue = nullptr; + MachineInstr *IV_Phi = MRI->getVRegDef(IndReg); + MachineBasicBlock *Latch = L->getLoopLatch(); + LLVM_DEBUG(dbgs()<<"IV_Phi: ";IV_Phi->dump()); + for (unsigned i = 1, n = IV_Phi->getNumOperands(); i < n; i += 2) { + MachineBasicBlock *MBB = IV_Phi->getOperand(i+1).getMBB(); + if (MBB == Preheader) + InitialValue = &IV_Phi->getOperand(i); + } + if (!InitialValue) { + return nullptr; + } + SmallVector Cond; + MachineBasicBlock *TB = nullptr, *FB = nullptr; + bool NotAnalyzed = TII->analyzeBranch(*ExitingBlock, TB, FB, Cond, false); + if (NotAnalyzed) { + return nullptr; + } + bool isCondExit = true; + MachineBasicBlock *Header = L->getHeader(); + if((TB == Latch) || (TB == Header)) isCondExit = false; + bool isFirstOperandEndvalue = false; + const MachineOperand &Op1 = Cond[1]; + const MachineOperand &Op2 = Cond[2]; + const MachineOperand *EndValue = nullptr; + isFirstOperandEndvalue = Op1.getReg() != IndReg && Op1.getReg() != IncReg; + EndValue = (isFirstOperandEndvalue ? &Op1 : &Op2); + LLVM_DEBUG(dbgs() << "isFirstOperandEndvalue: " << isFirstOperandEndvalue << " isCondExit: " << isCondExit << "\n"); + OldInsts.push_back(MRI->getVRegDef(isFirstOperandEndvalue ? Op1.getReg() : Op2.getReg())); + Comparison::Kind Cmp; + unsigned CondOpc = Cond[0].getImm(); + Cmp = getComparisonKind(CondOpc, InitialValue, EndValue, IVBump); + if (!Cmp) { + return nullptr; + } + if (isFirstOperandEndvalue) { + Cmp = Comparison::getSwappedComparison(Cmp); + } + if (isCondExit) { + Cmp = Comparison::getNegatedComparison(Cmp); + } + if (InitialValue->isReg()) { + unsigned R = InitialValue->getReg(); + MachineBasicBlock *DefBB = MRI->getVRegDef(R)->getParent(); + if (!MDT->properlyDominates(DefBB, Header)) { + int64_t V; + if (!checkForImmediate(*InitialValue, V)) { + LLVM_DEBUG(dbgs()<<"can't determine initial value\n"); + return nullptr; + } + } + OldInsts.push_back(MRI->getVRegDef(R)); + } + if (EndValue->isReg()) { + unsigned R = EndValue->getReg(); + MachineBasicBlock *DefBB = MRI->getVRegDef(R)->getParent(); + if (!MDT->properlyDominates(DefBB, Header)) { + int64_t V; + if (!checkForImmediate(*EndValue, V)) { + LLVM_DEBUG(dbgs()<<"can't determine end value\n"); + return nullptr; + } + } + OldInsts.push_back(MRI->getVRegDef(R)); + } + FL->isFirstOperandEndvalue = isFirstOperandEndvalue; + FL->isCondExit = isCondExit; + InductionReg = new Register(IndReg); + IncrementReg = new Register(IncReg); + MachineBasicBlock *PH = MLI->findLoopPreheader(Loop, SpecPreheader); + assert (PH && "Should have a preheader by now"); + MachineBasicBlock::iterator InsertPos = PH->getFirstTerminator(); + DebugLoc DL; + if (InsertPos != PH->end()) + DL = InsertPos->getDebugLoc(); + const TargetRegisterClass *IntRC = &RISCV::GPRRegClass; + bool startIsImm = false, endIsImm = false; + int64_t immStart, immEnd; + startIsImm = checkForImmediate(*Start, immStart); + endIsImm = checkForImmediate(*End, immEnd); + if (endIsImm && !End->isImm()) { + if(immEnd == 0) { + unsigned VGPR = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder ZeroInit = BuildMI(*PH, InsertPos, DL, TII->get(TargetOpcode::COPY), VGPR); + ZeroInit.addReg(RISCV::X0); + End = &ZeroInit->getOperand(0); + } + } + bool CmpLess = Cmp & Comparison::L; + bool CmpGreater = Cmp & Comparison::G; + bool CmpHasEqual = Cmp & Comparison::EQ; + if (!Start->isReg() && !startIsImm) { + return nullptr; + } + if (!End->isReg() && !endIsImm) { + return nullptr; + } + if (CmpLess && IVBump < 0) { + return nullptr; + } + if (CmpGreater && IVBump > 0) { + return nullptr; + } + if (IVBump == 0) { + return nullptr; + } + if (startIsImm && endIsImm) { + if(!CmpHasEqual) { + return nullptr; + } + int64_t Dist = std::max(immStart, immEnd) - std::min(immStart, immEnd); + if (Dist == 0) { + return nullptr; + } + if (Cmp != Comparison::EQ) { + return nullptr; + } + bool Exact = (Dist % IVBump) == 0; + if (!Exact) { + return nullptr; + } + uint64_t Count = Dist / std::abs(IVBump); + if (Count > 0xFFFFFFFFULL) { + return nullptr; + } + return new CountValue(CountValue::CV_Immediate, Count); + } + LoopFeederMap LoopFeederPhi; + if (loopCountMayWrapOrUnderFlow(Start, End, Loop->getLoopPreheader(), Loop, LoopFeederPhi)) { + return nullptr; + } + if (!isPowerOf2_64(std::abs(IVBump))) { + return nullptr; + } + if (IVBump < 0) { + std::swap(Start, End); + IVBump = -IVBump; + } + bool RegToImm = Start->isReg() && End->isImm(); + bool RegToReg = Start->isReg() && End->isReg(); + int64_t StartV = 0, EndV = 0; + if (Start->isImm()) { + StartV = Start->getImm(); + } + if (End->isImm()) { + EndV = End->getImm(); + } + int64_t AdjV = 0; + unsigned DistR, DistSR; + bool startIsImmZeroOrZeroReg = (Start->isImm() && StartV == 0); + if (!startIsImmZeroOrZeroReg && Start->isReg()) { + int64_t startImm; + if (checkForImmediate(*Start, startImm)) { + startIsImmZeroOrZeroReg = (startImm == 0); + } + } + if (startIsImmZeroOrZeroReg) { + DistR = End->getReg(); + DistSR = End->getSubReg(); + } + else { + const MCInstrDesc &SubD = RegToReg ? TII->get(RISCV::SUB) : (RegToImm ? TII->get(RISCV::SUB) /* TODO */ : TII->get(RISCV::ADDI)); + if (RegToReg || RegToImm) { + unsigned SubR = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder SubIB = BuildMI(*PH, InsertPos, DL, SubD, SubR); + if (RegToReg) { + SubIB.addReg(End->getReg(), 0, End->getSubReg()).addReg(Start->getReg(), 0, Start->getSubReg()); + } + else { + MachineBasicBlock::iterator ThisInsertPos = InsertPos; + ThisInsertPos--; + unsigned ImmToRegReg = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder ImmToReg = BuildMI(*PH, ThisInsertPos, DL, TII->get(RISCV::ADDI), ImmToRegReg); + ImmToReg.addReg(RISCV::X0).addImm(EndV); + SubIB.addReg(ImmToReg->getOperand(0).getReg()).addReg(Start->getReg(), 0, Start->getSubReg()); + } + DistR = SubR; + } + else { + const MachineInstr *EndValInstr = MRI->getVRegDef(End->getReg()); + if (EndValInstr->getOpcode() == RISCV::ADDI && EndValInstr->getOperand(1).getSubReg() == 0 && EndValInstr->getOperand(2).getImm() == StartV) { + DistR = EndValInstr->getOperand(1).getReg(); + } + else { + unsigned SubR = MRI->createVirtualRegister(IntRC); + MachineInstrBuilder SubIB = BuildMI(*PH, InsertPos, DL, SubD, SubR); + SubIB.addReg(End->getReg(), 0, End->getSubReg()).addImm(-StartV); + DistR = SubR; + } + } + DistSR = 0; + } + unsigned AdjR, AdjSR; + if (AdjV == 0) { + AdjR = DistR; + AdjSR = DistSR; + } + else { + unsigned AddR = MRI->createVirtualRegister(IntRC); + MCInstrDesc const &AddD = TII->get(RISCV::ADDI); + BuildMI(*PH, InsertPos, DL, AddD, AddR).addReg(DistR, 0, DistSR).addImm(AdjV); + AdjR = AddR; + AdjSR = 0; + } + unsigned CountR, CountSR; + if (IVBump == 1) { + CountR = AdjR; + CountSR = AdjSR; + } + else { + unsigned Shift = Log2_32(IVBump); + unsigned LsrR = MRI->createVirtualRegister(IntRC); + const MCInstrDesc &LsrD = TII->get(RISCV::SRLI); + BuildMI(*PH, InsertPos, DL, LsrD, LsrR).addReg(AdjR, 0, AdjSR).addImm(Shift); + CountR = LsrR; + CountSR = 0; + } + return new CountValue(CountValue::CV_Register, CountR, CountSR); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a13423387ee5fbe6555d5082ab4a403413de6f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp @@ -0,0 +1,9 @@ +static Kind getNegatedComparison(Kind Cmp) { + if ((Cmp & L) || (Cmp & G)) { + return (Kind)((Cmp ^ (L | G)) ^ EQ); + } + if ((Cmp & NE) || (Cmp & EQ)) { + return (Kind)(Cmp ^ (EQ | NE)); + } + return (Kind)0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d51a27eb64338334a8a8b4c50e8f7bc5359d9db3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return SNITCH_FREP_LOOPS_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f6681dcc1a7d87c841a32fcfc8275dd4af179c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const { + assert(isReg() && "Wrong CountValue accessor"); + return Contents.R.Reg; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cff1bb27c34b61906a86c7f741e8de982019bb79 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp @@ -0,0 +1,4 @@ +unsigned getSubReg() const { + assert(isReg() && "Wrong CountValue accessor"); + return Contents.R.Sub; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec0cca39b910463d25f200de5c7324bd5d9368d2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp @@ -0,0 +1,7 @@ +static Kind getSwappedComparison(Kind Cmp) { + assert ((!((Cmp & L) && (Cmp & G))) && "Malformed comparison operator"); + if ((Cmp & L) || (Cmp & G)) { + return (Kind)(Cmp ^ (L|G)); + } + return Cmp; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff9794a1cdfadf4848547056bb9b040d121307f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp @@ -0,0 +1,41 @@ +bool SNITCHFrepLoops::isDead(const MachineInstr *MI, SmallVectorImpl &DeadPhis) const { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + if (!MO.isReg() || !MO.isDef()) + continue; + unsigned Reg = MO.getReg(); + if (MRI->use_nodbg_empty(Reg)) + continue; + using use_nodbg_iterator = MachineRegisterInfo::use_nodbg_iterator; + use_nodbg_iterator I = MRI->use_nodbg_begin(Reg); + use_nodbg_iterator End = MRI->use_nodbg_end(); + if (std::next(I) != End) { + LLVM_DEBUG(dbgs() << " not dead because >2 uses\n"); + return false; + } + if(!I->getParent()->isPHI()) { + LLVM_DEBUG(dbgs() << " not dead because use is not PHI\n"); + return false; + } + MachineInstr *UsePhi = I->getParent(); + for (unsigned j = 0, f = UsePhi->getNumOperands(); j != f; ++j) { + const MachineOperand &OPO = UsePhi->getOperand(j); + if (!OPO.isReg() || !OPO.isDef()) + continue; + unsigned OPReg = OPO.getReg(); + use_nodbg_iterator nextJ; + for (use_nodbg_iterator J = MRI->use_nodbg_begin(OPReg); J != End; J = nextJ) { + nextJ = std::next(J); + MachineOperand &Use = *J; + MachineInstr *UseMI = Use.getParent(); + LLVM_DEBUG(dbgs()<<" checking use:\n"; UseMI->dump()); + if (MI != UseMI) { + LLVM_DEBUG(dbgs() << " not dead because the phi node has a user that is not MI\n"); + return false; + } + } + } + DeadPhis.push_back(UsePhi); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc64ab4323d8f6b869d0a1cef8d7218e4ab79081 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const { + return Kind == CV_Immediate; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2fd90d29334564ea9e328e2ddba1da8b21207bcf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp @@ -0,0 +1,10 @@ +bool SNITCHFrepLoops::isInvalidLoopOperation(const MachineInstr *MI) const { + for(auto MO : MI->operands()) { + if(MO.isReg() && MO.getReg().isVirtual()) { + if(MRI->getRegClass(MO.getReg()) != &RISCV::FPR64RegClass || MRI->getRegClass(MO.getReg()) != &RISCV::FPR32RegClass) { + return false; + } + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39a3b1a4a320cf5fa42671064beafec9eaf2aced --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const { + return Kind == CV_Register; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc85ce445f35cd0e967ac51228897ff83c7ccf54 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp @@ -0,0 +1,3 @@ +static bool isSigned(Kind Cmp) { + return (Cmp & (L | G) && !(Cmp & U)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..832beba9cac1339893e9305ccd1698e085711c36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp @@ -0,0 +1,3 @@ +static bool isUnsigned(Kind Cmp) { + return (Cmp & U); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..feadf81810e5e69db66550e0bcf6a42819a2de87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp @@ -0,0 +1,8 @@ +void print(raw_ostream &OS, const TargetRegisterInfo *TRI = nullptr) const { + if (isReg()) { + OS << "register: " << printReg(Contents.R.Reg, TRI, Contents.R.Sub) << '\n'; + } + if (isImm()) { + OS << "immediate: " << Contents.ImmVal << '\n'; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8b94424170126b61438b016629a75041ba5f7119 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp @@ -0,0 +1,26 @@ +void SNITCHFrepLoops::removeIfDead(MachineInstr *MI) { + SmallVector DeadPhis; + if (isDead(MI, DeadPhis)) { + LLVM_DEBUG(dbgs() << "HW looping will remove: " << *MI); + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + if (!MO.isReg() || !MO.isDef()) + continue; + unsigned Reg = MO.getReg(); + MachineRegisterInfo::use_iterator nextI; + for (MachineRegisterInfo::use_iterator I = MRI->use_begin(Reg), E = MRI->use_end(); I != E; I = nextI) { + nextI = std::next(I); + MachineOperand &Use = *I; + MachineInstr *UseMI = I->getParent(); + if (UseMI == MI) + continue; + if (Use.isDebug()) + UseMI->getOperand(0).setReg(0U); + } + } + MI->eraseFromParent(); + for (unsigned i = 0; i < DeadPhis.size(); ++i) { + DeadPhis[i]->eraseFromParent(); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58b60bb37ed73781da6ca6dc74d21f33360aa737 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp @@ -0,0 +1,26 @@ +bool SNITCHFrepLoops::runOnMachineFunction(MachineFunction &MF) { + LLVM_DEBUG(dbgs()<<"------------ Snitch Frep Loops ------------\n"); + bool Changed = false; + MLI = &getAnalysis(); + MRI = &MF.getRegInfo(); + MDT = &getAnalysis(); + const RISCVSubtarget &HST = MF.getSubtarget(); + TII = HST.getInstrInfo(); + TRI = HST.getRegisterInfo(); + for (auto &L : *MLI) + if (L->isOutermost()) { + FL = new FrepLoop(L); + Changed |= convertToHardwareLoop(L); + delete FL; + } + for (auto &MBB : MF) { + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + if(MBBI->getOpcode() == RISCV::PseudoFrepInfer) + MBBI->removeFromParent(); + MBBI = NMBBI; + } + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5ba190c6eef41533e7debd2511464194bd8c9427 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp @@ -0,0 +1,7 @@ +union Values { + struct { + unsigned Reg; + unsigned Sub; + } R; + unsigned ImmVal; +} Contents; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..748278cc79300d8a5ec326134622a47f923f34f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +RISCVInstrInfo::RISCVInstrInfo(RISCVSubtarget &STI) : RISCVGenInstrInfo( RISCV::ADJCALLSTACKDOWN, RISCV::ADJCALLSTACKUP), STI(STI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d86ee8cd4f838d592e68b58e88bd472f670cf458 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,43 @@ +bool RISCVInstrInfo::analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, bool AllowModify) const { + TBB = FBB = nullptr; + Cond.clear(); + MachineBasicBlock::iterator I = MBB.getLastNonDebugInstr(); + if (I == MBB.end() || !isUnpredicatedTerminator(*I)) { + return false; + } + MachineBasicBlock::iterator FirstUncondOrIndirectBr = MBB.end(); + int NumTerminators = 0; + for (auto J = I.getReverse(); J != MBB.rend() && isUnpredicatedTerminator(*J); J++) { + NumTerminators++; + if (J->getDesc().isUnconditionalBranch() || J->getDesc().isIndirectBranch()) { + FirstUncondOrIndirectBr = J.getReverse(); + } + } + if (AllowModify && FirstUncondOrIndirectBr != MBB.end()) { + while (std::next(FirstUncondOrIndirectBr) != MBB.end()) { + std::next(FirstUncondOrIndirectBr)->eraseFromParent(); + NumTerminators--; + } + I = FirstUncondOrIndirectBr; + } + if (I->getDesc().isIndirectBranch()) { + return true; + } + if (NumTerminators > 2) { + return true; + } + if (NumTerminators == 1 && I->getDesc().isUnconditionalBranch()) { + TBB = getBranchDestBlock(*I); + return false; + } + if (NumTerminators == 1 && I->getDesc().isConditionalBranch()) { + parseCondBranch(*I, TBB, Cond); + return false; + } + if (NumTerminators == 2 && std::prev(I)->getDesc().isConditionalBranch() && I->getDesc().isUnconditionalBranch()) { + parseCondBranch(*std::prev(I), TBB, Cond); + FBB = getBranchDestBlock(*I); + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84c10e93be57ac9e456e12ff8b4453d873ba50fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp @@ -0,0 +1,22 @@ +bool RISCVInstrInfo::areMemAccessesTriviallyDisjoint(const MachineInstr &MIa, const MachineInstr &MIb) const { + assert(MIa.mayLoadOrStore() && "MIa must be a load or store."); + assert(MIb.mayLoadOrStore() && "MIb must be a load or store."); + if (MIa.hasUnmodeledSideEffects() || MIb.hasUnmodeledSideEffects() || MIa.hasOrderedMemoryRef() || MIb.hasOrderedMemoryRef()) { + return false; + } + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + const MachineOperand *BaseOpA = nullptr, *BaseOpB = nullptr; + int64_t OffsetA = 0, OffsetB = 0; + unsigned int WidthA = 0, WidthB = 0; + if (getMemOperandWithOffsetWidth(MIa, BaseOpA, OffsetA, WidthA, TRI) && getMemOperandWithOffsetWidth(MIb, BaseOpB, OffsetB, WidthB, TRI)) { + if (BaseOpA->isIdenticalTo(*BaseOpB)) { + int LowOffset = std::min(OffsetA, OffsetB); + int HighOffset = std::max(OffsetA, OffsetB); + int LowWidth = (LowOffset == OffsetA) ? WidthA : WidthB; + if (LowOffset + LowWidth <= HighOffset) { + return true; + } + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcb2321cf28d3ecdc90f327ad2cbeb346542dafc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp @@ -0,0 +1,17 @@ +void RISCVInstrInfo::buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF, const outliner::OutlinedFunction &OF) const { + bool Changed = true; + while (Changed) { + Changed = false; + auto I = MBB.begin(); + auto E = MBB.end(); + for (; I != E; ++I) { + if (I->isCFIInstruction()) { + I->removeFromParent(); + Changed = true; + break; + } + } + } + MBB.addLiveIn(RISCV::X5); + MBB.insert(MBB.end(), BuildMI(MF, DebugLoc(), get(RISCV::JALR)).addReg(RISCV::X0, RegState::Define).addReg(RISCV::X5).addImm(0)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3d86b0f026bac722f6a15accf9e7a9fe2a33d932 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,36 @@ + +void RISCVInstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, MCRegister DstReg, MCRegister SrcReg, bool KillSrc) const { + if (RISCV::GPRRegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::ADDI), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addImm(0); + return; + } + if (RISCV::FPR16RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::FSGNJ_H), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::FPR32RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::FSGNJ_S), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::FPR64RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::FSGNJ_D;), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRRegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV1R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRM2RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV2R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRM4RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV4R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRM8RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV8R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + llvm_unreachable("Impossible reg-to-reg copy"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..371fad319519ebb28816b75c9b94dbc64622e257 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp @@ -0,0 +1,4 @@ +std::pair RISCVInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { + const unsigned Mask = RISCVII::MO_DIRECT_FLAG_MASK; + return std::make_pair(TF & Mask, TF & ~Mask); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cae1b652d38074daf74f2f39cb157d40817089f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp @@ -0,0 +1,4 @@ +MachineBasicBlock *RISCVInstrInfo::getBranchDestBlock(const MachineInstr &MI) const { + assert(MI.getDesc().isBranch() && "Unexpected opcode!"); + return MI.getOperand(MI.getNumExplicitOperands() - 1).getMBB(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36cddb1f977605d0d6516645512555561b85e5a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp @@ -0,0 +1,58 @@ +unsigned RISCVInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const { + unsigned Opcode = MI.getOpcode(); + switch (Opcode) { + default: { + if (MI.getParent() && MI.getParent()->getParent()) { + const auto MF = MI.getMF(); + const auto &TM = static_cast(MF->getTarget()); + const MCRegisterInfo &MRI = *TM.getMCRegisterInfo(); + const MCSubtargetInfo &STI = *TM.getMCSubtargetInfo(); + const RISCVSubtarget &ST = MF->getSubtarget(); + if (isCompressibleInst(MI, &ST, MRI, STI)) { + return 2; + } + } + return get(Opcode).getSize(); + } + case TargetOpcode::EH_LABEL: + case TargetOpcode::IMPLICIT_DEF: + case TargetOpcode::KILL: + case TargetOpcode::DBG_VALUE: + return 0; + case RISCV::PseudoCALLReg: + case RISCV::PseudoCALL: + case RISCV::PseudoJump: + case RISCV::PseudoTAIL: + case RISCV::PseudoLLA: + case RISCV::PseudoLA: + case RISCV::PseudoLA_TLS_IE: + case RISCV::PseudoLA_TLS_GD: + return 8; + case RISCV::PseudoAtomicLoadNand32: + case RISCV::PseudoAtomicLoadNand64: + return 20; + case RISCV::PseudoMaskedAtomicSwap32: + case RISCV::PseudoMaskedAtomicLoadAdd32: + case RISCV::PseudoMaskedAtomicLoadSub32: + return 28; + case RISCV::PseudoMaskedAtomicLoadNand32: + return 32; + case RISCV::PseudoMaskedAtomicLoadMax32: + case RISCV::PseudoMaskedAtomicLoadMin32: + return 44; + case RISCV::PseudoMaskedAtomicLoadUMax32: + case RISCV::PseudoMaskedAtomicLoadUMin32: + return 36; + case RISCV::PseudoCmpXchg32: + case RISCV::PseudoCmpXchg64: + return 16; + case RISCV::PseudoMaskedCmpXchg32: + return 32; + case TargetOpcode::INLINEASM: + case TargetOpcode::INLINEASM_BR: { + const MachineFunction &MF = *MI.getParent()->getParent(); + const auto &TM = static_cast(MF.getTarget()); + return getInlineAsmLength(MI.getOperand(0).getSymbolName(), *TM.getMCAsmInfo()); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c047851933d8e04b86ede618330b87e4ca0b4859 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp @@ -0,0 +1,18 @@ +bool RISCVInstrInfo::getMemOperandWithOffsetWidth(const MachineInstr &LdSt, const MachineOperand *&BaseReg, int64_t &Offset, unsigned &Width, const TargetRegisterInfo *TRI) const { + if (!LdSt.mayLoadOrStore()) { + return false; + } + if (LdSt.getNumExplicitOperands() != 3) { + return false; + } + if (!LdSt.getOperand(1).isReg() || !LdSt.getOperand(2).isImm()) { + return false; + } + if (!LdSt.hasOneMemOperand()) { + return false; + } + Width = (*LdSt.memoperands_begin())->getSize(); + BaseReg = &LdSt.getOperand(1); + Offset = LdSt.getOperand(2).getImm(); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c46ce820392baeb07d11944ca084ec5cba2091c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp @@ -0,0 +1,27 @@ +outliner::OutlinedFunction RISCVInstrInfo::getOutliningCandidateInfo(std::vector &RepeatedSequenceLocs) const { + auto CannotInsertCall = [](outliner::Candidate &C) { + const TargetRegisterInfo *TRI = C.getMF()->getSubtarget().getRegisterInfo(); + C.initLRU(*TRI); + LiveRegUnits LRU = C.LRU; + return !LRU.available(RISCV::X5); + }; + llvm::erase_if(RepeatedSequenceLocs, CannotInsertCall); + if (RepeatedSequenceLocs.size() < 2) { + return outliner::OutlinedFunction(); + } + unsigned SequenceSize = 0; + auto I = RepeatedSequenceLocs[0].front(); + auto E = std::next(RepeatedSequenceLocs[0].back()); + for (; I != E; ++I) { + SequenceSize += getInstSizeInBytes(*I); + } + unsigned CallOverhead = 8; + for (auto &C : RepeatedSequenceLocs) { + C.setCallInfo(MachineOutlinerDefault, CallOverhead); + } + unsigned FrameOverhead = 4; + if (RepeatedSequenceLocs[0].getMF()->getSubtarget().getFeatureBits()[RISCV::FeatureStdExtC]) { + FrameOverhead = 2; + } + return outliner::OutlinedFunction(RepeatedSequenceLocs, SequenceSize, FrameOverhead, MachineOutlinerDefault); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a3dd323cf6a01428a868ff2e81d3613bad1aad4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp @@ -0,0 +1,32 @@ +outliner::InstrType RISCVInstrInfo::getOutliningType(MachineBasicBlock::iterator &MBBI, unsigned Flags) const { + MachineInstr &MI = *MBBI; + MachineBasicBlock *MBB = MI.getParent(); + const TargetRegisterInfo *TRI = MBB->getParent()->getSubtarget().getRegisterInfo(); + if (MI.isPosition()) { + if (MI.isCFIInstruction()) { + return outliner::InstrType::Invisible; + } + return outliner::InstrType::Illegal; + } + if (MI.isInlineAsm()) { + return outliner::InstrType::Illegal; + } + if (MI.isTerminator() && !MBB->succ_empty()) { + return outliner::InstrType::Illegal; + } + if (MI.isReturn()) { + return outliner::InstrType::Illegal; + } + if (MI.modifiesRegister(RISCV::X5, TRI) || MI.getDesc().hasImplicitDefOfPhysReg(RISCV::X5)) { + return outliner::InstrType::Illegal; + } + for (const auto &MO : MI.operands()) { + if (MO.isMBB() || MO.isBlockAddress() || MO.isCPI()) { + return outliner::InstrType::Illegal; + } + } + if (MI.isMetaInstruction()) { + return outliner::InstrType::Invisible; + } + return outliner::InstrType::Legal; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..263cfb665f67d84e93145d137c3d2ab6ab3b7d06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp @@ -0,0 +1,5 @@ +ArrayRef> RISCVInstrInfo::getSerializableDirectMachineOperandTargetFlags() const { + using namespace RISCVII; + static const std::pair TargetFlags[] = {{MO_CALL, "riscv-call"},{MO_PLT, "riscv-plt"},{MO_LO, "riscv-lo"},{MO_HI, "riscv-hi"},{MO_PCREL_LO, "riscv-pcrel-lo"},{MO_PCREL_HI, "riscv-pcrel-hi"},{MO_GOT_HI, "riscv-got-hi"},{MO_TPREL_LO, "riscv-tprel-lo"},{MO_TPREL_HI, "riscv-tprel-hi"},{MO_TPREL_ADD, "riscv-tprel-add"},{MO_TLS_GOT_HI, "riscv-tls-got-hi"},{MO_TLS_GD_HI, "riscv-tls-gd-hi"}}; + return makeArrayRef(TargetFlags); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf05adfad8dde46f66f5392c7b824e5c8eb9fd87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,27 @@ +unsigned RISCVInstrInfo::insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef Cond, const DebugLoc &DL, int *BytesAdded) const { + if (BytesAdded) { + *BytesAdded = 0; + } + assert(TBB && "insertBranch must not be told to insert a fallthrough"); + assert((Cond.size() == 3 || Cond.size() == 0) && "RISCV branch conditions have two components!"); + if (Cond.empty()) { + MachineInstr &MI = *BuildMI(&MBB, DL, get(RISCV::PseudoBR)).addMBB(TBB); + if (BytesAdded) { + *BytesAdded = *BytesAdded + getInstSizeInBytes(MI); + } + return 1; + } + unsigned Opc = Cond[0].getImm(); + MachineInstr &CondMI = *BuildMI(&MBB, DL, get(Opc)).add(Cond[1]).add(Cond[2]).addMBB(TBB); + if (BytesAdded) { + *BytesAdded = *BytesAdded + getInstSizeInBytes(CondMI); + } + if (!FBB) { + return 1; + } + MachineInstr &MI = *BuildMI(&MBB, DL, get(RISCV::PseudoBR)).addMBB(FBB); + if (BytesAdded) { + *BytesAdded = *BytesAdded + getInstSizeInBytes(MI); + } + return 2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1492bf3ef915bf02e849b172335d6538b40164d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp @@ -0,0 +1,19 @@ +unsigned RISCVInstrInfo::insertIndirectBranch(MachineBasicBlock &MBB, MachineBasicBlock &DestBB, const DebugLoc &DL, int64_t BrOffset, RegScavenger *RS) const { + assert(RS && "RegScavenger required for long branching"); + assert(MBB.empty() && "new block should be inserted for expanding unconditional branch"); + assert(MBB.pred_size() == 1); + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MRI = MF->getRegInfo(); + if (!isInt<32>(BrOffset)) { + report_fatal_error("Branch offsets outside of the signed 32-bit range not supported"); + } + Register ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + auto II = MBB.end(); + MachineInstr &MI = *BuildMI(MBB, II, DL, get(RISCV::PseudoJump)).addReg(ScratchReg, RegState::Define | RegState::Dead).addMBB(&DestBB, RISCVII::MO_CALL); + RS->enterBasicBlockEnd(MBB); + unsigned Scav = RS->scavengeRegisterBackwards(RISCV::GPRRegClass, MI.getIterator(), false, 0); + MRI.replaceRegWith(ScratchReg, Scav); + MRI.clearVirtRegs(); + RS->setRegUsed(Scav); + return 8; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc4fc501f51d854d8e3da7721b447adee3a5d2f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp @@ -0,0 +1,4 @@ +MachineBasicBlock::iterator RISCVInstrInfo::insertOutlinedCall(Module &M, MachineBasicBlock &MBB, MachineBasicBlock::iterator &It, MachineFunction &MF, const outliner::Candidate &C) const { + It = MBB.insert(It, BuildMI(MF, DebugLoc(), get(RISCV::PseudoCALLReg), RISCV::X5).addGlobalAddress(M.getNamedValue(MF.getName()), 0, RISCVII::MO_CALL)); + return It; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39ad00c050eb6a3d2f6bc0acda49ffd7a8a5b252 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp @@ -0,0 +1,19 @@ +bool RISCVInstrInfo::isAsCheapAsAMove(const MachineInstr &MI) const { + const unsigned Opcode = MI.getOpcode(); + if(Opcode ==RISCV::FSGNJ_D) { + return MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg(); + } + if(Opcode ==RISCV::FSGNJ_S) { + return MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg(); + } + if(Opcode ==RISCV::ADDI) { + return (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == RISCV::X0) || (MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0); + } + if(Opcode ==RISCV::ORI) { + return (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == RISCV::X0) || (MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0); + } + if(Opcode ==RISCV::XORI) { + return (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == RISCV::X0) || (MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0); + } + return MI.isAsCheapAsAMove(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7230e1936b7ec5585c50d3dfc69cf9dffe19c26 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp @@ -0,0 +1,21 @@ +bool RISCVInstrInfo::isBranchOffsetInRange(unsigned BranchOp, int64_t BrOffset) const { + unsigned XLen = STI.getXLen(); + switch (BranchOp) { + case RISCV::BEQ: + case RISCV::BNE: + case RISCV::BLT: + case RISCV::BGE: + case RISCV::BLTU: + case RISCV::BGEU: + case RISCV::P_BEQIMM: + case RISCV::P_BNEIMM: + return isIntN(13, BrOffset); + case RISCV::JAL: + case RISCV::PseudoBR: + return isIntN(21, BrOffset); + case RISCV::PseudoJump: + return isIntN(32, SignExtend64(BrOffset + 0x800, XLen)); + default: + llvm_unreachable("Unexpected opcode!"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c815f394615b68f75ab7532e5b30d428b93b1d9a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp @@ -0,0 +1,21 @@ +Optional RISCVInstrInfo::isCopyInstrImpl(const MachineInstr &MI) const { + if (MI.isMoveReg()) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + if (MI.getOpcode() == RISCV::ADDI) { + if (MI.getOperand(1).isReg() && MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + } + if (MI.getOpcode() == RISCV::FSGNJ_D) { + if (MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg()) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + } + if (MI.getOpcode() == RISCV::FSGNJ_S) { + if (MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg()) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + } + return None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9caad0ee4e4d0f3759c8d9c9fe481cee5f378ec5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp @@ -0,0 +1,10 @@ +bool RISCVInstrInfo::isFunctionSafeToOutlineFrom(MachineFunction &MF, bool OutlineFromLinkOnceODRs) const { + const Function &F = MF.getFunction(); + if (!OutlineFromLinkOnceODRs && F.hasLinkOnceODRLinkage()) { + return false; + } + if (F.hasSection()) { + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2dd099d2cc9c5b17a2b05c2f8cadf6939da7b835 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,103 @@ +unsigned RISCVInstrInfo::isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const { + if (MI.getOpcode() == RISCV::LB) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LBU) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LH) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LHU) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::FLH) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LW) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::FWL) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LWU) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LD) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::FLD) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9e89b48698e2fb498dd5f8e8facf15525e862aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp @@ -0,0 +1,3 @@ +bool RISCVInstrInfo::isMBBSafeToOutlineFrom(MachineBasicBlock &MBB, unsigned &Flags) const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08854954eb2087e555e0d7c24cf0f493552b768a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp @@ -0,0 +1,14 @@ +bool RISCVInstrInfo::isSchedulingBoundary(const MachineInstr &MI, const MachineBasicBlock *MBB, const MachineFunction &MF) const { + if (TargetInstrInfo::isSchedulingBoundary(MI, MBB, MF)) { + return true; + } + switch (MI.getOpcode()) { + case RISCV::LOOP0setup: + case RISCV::LOOP1setup: + case RISCV::LOOP0setupi: + case RISCV::LOOP1setupi: + return true; + default:; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25f4bf9ad1bb3535889e398c48412ab3ff94334a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,19 @@ +unsigned RISCVInstrInfo::isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const { + switch (MI.getOpcode()) { + default: + return 0; + case RISCV::SB: + case RISCV::SH: + case RISCV::SW: + case RISCV::FSH: + case RISCV::FSW: + case RISCV::SD: + case RISCV::FSD: + break; + } + if (MI.getOperand(1).isFI() && MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e71f82302950ea15b9fad418bc5c9ab1b10bd6be --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,31 @@ +void RISCVInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register DstReg, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { + DebugLoc DL; + if (I != MBB.end()) { + DL = I->getDebugLoc(); + } + MachineFunction *MF = MBB.getParent(); + const MachineFrameInfo &MFI = MF->getFrameInfo(); + MachineMemOperand *MMO = MF->getMachineMemOperand(MachinePointerInfo::getFixedStack(*MF, FI), MachineMemOperand::MOLoad, MFI.getObjectSize(FI), MFI.getObjectAlign(FI)); + unsigned Opcode; + if (RISCV::GPRRegClass.hasSubClassEq(RC)) { + Opcode = TRI->getRegSizeInBits(RISCV::GPRRegClass) == 32 ? RISCV::LW : RISCV::LD; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + if (RISCV::FPR16RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FLH; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + if (RISCV::FPR32RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FWL; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + if (RISCV::FPR64RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FLD; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + llvm_unreachable("Can't load this register from stack slot"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/movImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/movImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c72f7f9e84e4ace08a3e3a7dad1d6a68cf683f24 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/movImm.cpp @@ -0,0 +1,26 @@ +void RISCVInstrInfo::movImm(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register DstReg, uint64_t Val, MachineInstr::MIFlag Flag) const { + MachineRegisterInfo &MRI = MF->getRegInfo(); + MachineFunction *MF = MBB.getParent(); + bool IsRV64 = MF->getSubtarget().is64Bit(); + Register SrcReg = RISCV::X0; + Register Result = MRI.createVirtualRegister(&RISCV::GPRRegClass); + unsigned Num = 0; + if (!IsRV64 && !isInt<32>(Val)) { + report_fatal_error("Should only materialize 32-bit constants for RV32"); + } + RISCVMatInt::InstSeq Seq; + RISCVMatInt::generateInstSeq(Val, IsRV64, Seq); + assert(Seq.size() > 0); + for (RISCVMatInt::Inst &Inst : Seq) { + if (++Num == Seq.size()) { + Result = DstReg; + } + if (Inst.Opc == RISCV::LUI) { + BuildMI(MBB, MBBI, DL, get(RISCV::LUI), Result).addImm(Inst.Imm).setMIFlag(Flag); + } + else { + BuildMI(MBB, MBBI, DL, get(Inst.Opc), Result).addReg(SrcReg, RegState::Kill).addImm(Inst.Imm).setMIFlag(Flag); + } + SrcReg = Result; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aef3d0ecdf646f8417201ea3baa82992390cf15b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp @@ -0,0 +1,7 @@ +static void parseCondBranch(MachineInstr &LastInst, MachineBasicBlock *&Target, SmallVectorImpl &Cond) { + assert(LastInst.getDesc().isConditionalBranch() && "Unknown conditional branch"); + Target = LastInst.getOperand(2).getMBB(); + Cond.push_back(MachineOperand::CreateImm(LastInst.getOpcode())); + Cond.push_back(LastInst.getOperand(0)); + Cond.push_back(LastInst.getOperand(1)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd30e85a8f2e12786e68b6e78bdf15a32405af38 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,29 @@ +unsigned RISCVInstrInfo::removeBranch(MachineBasicBlock &MBB, int *BytesRemoved) const { + if (BytesRemoved) { + *BytesRemoved = 0; + } + MachineBasicBlock::iterator I = MBB.getLastNonDebugInstr(); + if (I == MBB.end()) { + return 0; + } + if (!I->getDesc().isUnconditionalBranch() && !I->getDesc().isConditionalBranch()) { + return 0; + } + if (BytesRemoved) { + *BytesRemoved += getInstSizeInBytes(*I); + } + I->eraseFromParent(); + I = MBB.end(); + if (I == MBB.begin()) { + return 1; + } + --I; + if (!I->getDesc().isConditionalBranch()) { + return 1; + } + if (BytesRemoved) { + *BytesRemoved += getInstSizeInBytes(*I); + } + I->eraseFromParent(); + return 2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..518236fcb35df0b50482ad41a57f1da3bb8b7bfe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,5 @@ +bool RISCVInstrInfo::reverseBranchCondition(SmallVectorImpl &Cond) const { + assert((Cond.size() == 3) && "Invalid branch condition!"); + Cond[0].setImm(getOppositeBranchOpcode(Cond[0].getImm())); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0ae4eae7913dca4a4503f04564cf151eb5e25b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,26 @@ +void RISCVInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register SrcReg, bool IsKill, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { + DebugLoc DL; + if (I != MBB.end()) { + DL = I->getDebugLoc(); + } + MachineFunction *MF = MBB.getParent(); + const MachineFrameInfo &MFI = MF->getFrameInfo(); + MachineMemOperand *MMO = MF->getMachineMemOperand(MachinePointerInfo::getFixedStack(*MF, FI), MachineMemOperand::MOStore, MFI.getObjectSize(FI), MFI.getObjectAlign(FI)); + unsigned Opcode; + if (RISCV::GPRRegClass.hasSubClassEq(RC)) { + Opcode = TRI->getRegSizeInBits(RISCV::GPRRegClass) == 32 ? RISCV::SW : RISCV::SD; + } + else if (RISCV::FPR16RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FSH; + } + else if (RISCV::FPR32RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FSW; + } + else if (RISCV::FPR64RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FSD; + } + else { + llvm_unreachable("Can't store this register to stack slot"); + } + BuildMI(MBB, I, DL, get(Opcode)).addReg(SrcReg, getKillRegState(IsKill)).addFrameIndex(FI).addImm(0).addMemOperand(MMO); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc6132c159d95d82c73a20c8cfadc860f781c4dd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp @@ -0,0 +1,50 @@ +bool RISCVInstrInfo::verifyInstruction(const MachineInstr &MI, StringRef &ErrInfo) const { + const MCInstrInfo *MCII = STI.getInstrInfo(); + MCInstrDesc const &Desc = MCII->get(MI.getOpcode()); + for (auto &OI : enumerate(Desc.operands())) { + unsigned OpType = OI.value().OperandType; + if (OpType >= RISCVOp::OPERAND_FIRST_RISCV_IMM && OpType <= RISCVOp::OPERAND_LAST_RISCV_IMM) { + const MachineOperand &MO = MI.getOperand(OI.index()); + if (MO.isImm()) { + int64_t Imm = MO.getImm(); + bool Ok; + switch (OpType) { + default: + llvm_unreachable("Unexpected operand type"); + case RISCVOp::OPERAND_UIMM4: + Ok = isUInt<4>(Imm); + break; + case RISCVOp::OPERAND_UIMM5: + Ok = isUInt<5>(Imm); + break; + case RISCVOp::OPERAND_UIMM12: + Ok = isUInt<12>(Imm); + break; + case RISCVOp::OPERAND_UIMM12M1: + Ok = isUInt<12>(Imm) && (Imm != 0); + break; + case RISCVOp::OPERAND_UIMM3: + Ok = isUInt<3>(Imm); + break; + case RISCVOp::OPERAND_SIMM12: + Ok = isInt<12>(Imm); + break; + case RISCVOp::OPERAND_UIMM20: + Ok = isUInt<20>(Imm); + break; + case RISCVOp::OPERAND_UIMMLOG2XLEN: + if (STI.getTargetTriple().isArch64Bit()) + Ok = isUInt<6>(Imm); + else + Ok = isUInt<5>(Imm); + break; + } + if (!Ok) { + ErrInfo = "Invalid immediate"; + return false; + } + } + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a73ce4b15067ea6dd345e8f804506eb820ce687b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp @@ -0,0 +1,2 @@ +RISCVMachineFunctionInfo(const MachineFunction &MF) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79005827d02719d27077d7e3bbe5d9c839a908e2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp @@ -0,0 +1,3 @@ +unsigned getLibCallStackSize() const { + return LibCallStackSize; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c988c0796a82546234e3f8e39a1182b7d1ea2b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp @@ -0,0 +1,6 @@ +int getMoveF64FrameIndex(MachineFunction &MF) { + if (MoveF64FrameIndex == -1) { + MoveF64FrameIndex = MF.getFrameInfo().CreateStackObject(8, Align(8), false); + } + return MoveF64FrameIndex; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d4a2413ae12ddd5eefda1c613fff7ac463f7e05 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp @@ -0,0 +1,3 @@ +unsigned getUsedSSR() const { + return UsedSSR; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ad7e3a6df3da4abe5143ddf276a5a8dd208c0d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex() const { + return VarArgsFrameIndex; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff3900efa130d85bd23cdf0bf46f4492a11b3207 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +unsigned getVarArgsSaveSize() const { + return VarArgsSaveSize; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2c605685906e3f74e9d19eb3a425bb677ecf6e8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp @@ -0,0 +1,3 @@ +void setLibCallStackSize(unsigned Size) { + LibCallStackSize = Size; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec08754db512c25241208b4d04f526ba159ef7a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp @@ -0,0 +1,3 @@ +void setUsedSSR(unsigned SSR) { + UsedSSR = SSR; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f57e9f48831fa353d584c49669f0413fc095c594 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex(int Index) { + VarArgsFrameIndex = Index; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a72ac1c44b6abb48837cf13d74446638ee97792 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +void setVarArgsSaveSize(int Size) { + VarArgsSaveSize = Size; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcd8f637f04add2d1722e6da9011c498bb8571c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp @@ -0,0 +1,3 @@ +bool useSaveRestoreLibCalls(const MachineFunction &MF) const { + return MF.getSubtarget().enableSaveRestore() && VarArgsSaveSize == 0 && !MF.getFrameInfo().hasTailCall(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b485bfc3f8c679a1968fbd947cfb7a1a630ceb15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,7 @@ +RISCVSubtarget::RISCVSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName, const TargetMachine &TM) : RISCVGenSubtargetInfo(TT, CPU, TuneCPU, FS), UserReservedRegister(RISCV::NUM_TARGET_REGS), FrameLowering(initializeSubtargetDependencies(TT, CPU, TuneCPU, FS, ABIName)), InstrInfo(*this), RegInfo(getHwMode()), TLInfo(TM, *this) { + CallLoweringInfo.reset(new RISCVCallLowering(*getTargetLowering())); + Legalizer.reset(new RISCVLegalizerInfo(*this)); + auto *RBI = new RISCVRegisterBankInfo(*getRegisterInfo()); + RegBankInfo.reset(RBI); + InstSelector.reset(createRISCVInstructionSelector(*static_cast(&TM), *this, *RBI)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/anchor.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c6f04a53d1e860d1cb5cb48fc428103a470ef0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/anchor.cpp @@ -0,0 +1,2 @@ +void RISCVSubtarget::anchor() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21de073065f1c45c637d96155064fa1e17a1de02 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp @@ -0,0 +1,3 @@ +bool enableLinkerRelax() const { + return EnableLinkerRelax; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..358b44992259774bd76684c0ec9175e49433d00f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp @@ -0,0 +1,3 @@ +bool enableMachineScheduler() const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a15b00dc080602258900bbbe99e7e945b36ba6cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp @@ -0,0 +1,3 @@ +bool enableRVCHintInstrs() const { + return EnableRVCHintInstrs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp new file mode 100644 index 0000000000000000000000000000000000000000..343f8da6be2a7efb133ed8ceb361f0e04baf970c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp @@ -0,0 +1,3 @@ +bool enableSaveRestore() const { + return EnableSaveRestore; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38840e3abf5721f2f2bb806ec7b4c36e9c80c33b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp @@ -0,0 +1,3 @@ +const CallLowering *RISCVSubtarget::getCallLowering() const { + return CallLoweringInfo.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dbbed9b4540b34f6fcda3e88827d89fc8b271b92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const RISCVFrameLowering *getFrameLowering() const override { + return &FrameLowering; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..241a6f789b9336fb755e0f8bd27f6411d2016581 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp @@ -0,0 +1,3 @@ +const RISCVInstrInfo *getInstrInfo() const override { + return &InstrInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48c25e17f0bcb2c488a43f59965f14252652be1b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *RISCVSubtarget::getInstructionSelector() const { + return InstSelector.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..34b918d70ad4c109ca034168fc2dc5f7762cba5c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp @@ -0,0 +1,3 @@ +const LegalizerInfo *RISCVSubtarget::getLegalizerInfo() const { + return Legalizer.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e51ba7750e72c82e020ae09634218d29c8b6e080 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp @@ -0,0 +1,3 @@ +const RegisterBankInfo *RISCVSubtarget::getRegBankInfo() const { + return RegBankInfo.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0323310ac0e1eb0128dc614c5b8e5810c97fd662 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const RISCVRegisterInfo *getRegisterInfo() const override { + return &RegInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a587bb87c2bf9c4c35e25ccfee788761dc1d8a6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +const SelectionDAGTargetInfo *getSelectionDAGInfo() const override { + return &TSInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ba240b805d561f415ec4ee11045c3d6eb8dea8e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp @@ -0,0 +1,3 @@ +RISCVABI::ABI getTargetABI() const { + return TargetABI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae252b5d67893ec68615f1dfafc89e95b3676d6d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp @@ -0,0 +1,3 @@ +const RISCVTargetLowering *getTargetLowering() const override { + return &TLInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getXLen.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getXLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b93e9c9f4885d72046bc33a4c96130e4796e755 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getXLen.cpp @@ -0,0 +1,3 @@ +unsigned getXLen() const { + return XLen; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f65801b1cfce99bb6f22e7828e3f2be8e8095ddb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp @@ -0,0 +1,3 @@ +MVT getXLenVT() const { + return XLenVT; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b50f94b35a91179fab9b2749cb3c2e48d81fe9cd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp @@ -0,0 +1,3 @@ +bool hasExtXdma() const { + return HasExtXdma; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee1eddd67878923b6fb263318bf24c7cf99ecbd2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfalthalf() const { + return HasExtXfalthalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dc56654edc8975e44f482c559393c168e83e253 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfaltquarter() const { + return HasExtXfaltquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d4eb0ed77ad86d07fbb4dde3494b44d457f59bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxalthalf() const { + return HasExtXfauxalthalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84cb32004fc45ee254d87b70a5c0c96d6889a383 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxaltquarter() const { + return HasExtXfauxaltquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7de782eb97c32ba76294775e9c8dfb965f335b05 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxhalf() const { + return HasExtXfauxhalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cbf79cd504372208eaa7893ea73b840e5aeaef00 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxquarter() const { + return HasExtXfauxquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a8c9f9b8429c53e2c6192380fe15a45f7d7f0ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecalthalf() const { + return HasExtXfauxvecalthalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bd816d9550c011decc2f605cd09552cbbf184d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecaltquarter() const { + return HasExtXfauxvecaltquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..767cc573a601174be1ef656d304e268fd3a540db --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvechalf() const { + return HasExtXfauxvechalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..682f5318c843b5ad741a8f55c29823253334ce87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecquarter() const { + return HasExtXfauxvecquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e5cb7e31401326abe2ddc65cf0d8217f17a32f73 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecsingle() const { + return HasExtXfauxvecsingle; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..106e373991d2c699b961aeef1577920dbaf67f34 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvecalthalf() const { + return HasExtXfexpauxvecalthalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e924eb943825132563e1cdca12cda38b5535b2cf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvecaltquarter() const { + return HasExtXfexpauxvecaltquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..756da6a60ab06a2cd71312262f8e97570ba99f34 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvechalf() const { + return HasExtXfexpauxvechalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b89eedceac7860150c3b5b40e32c99e2658e71c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvecquarter() const { + return HasExtXfexpauxvecquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e31dc636c535c73eb1503dcb231be32480e3dd2f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfquarter() const { + return HasExtXfquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35b7a06baa3a4ecfed8efa050620607a395b53b4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp @@ -0,0 +1,3 @@ +bool hasExtXfrep() const { + return HasExtXfrep; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b76712a5fe5cb9a8609ee5ee0303f9d21f466f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecalthalf() const { + return HasExtXfvecalthalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5f10d6dc6589cb2b3c64bcb6f0f744cb9dc2b517 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecaltquarter() const { + return HasExtXfvecaltquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d8e3439f302acf088ad90e43549b0543078a0dd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvechalf() const { + return HasExtXfvechalf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..092a6ec38142f84b44c054baa818a8dde6efd74c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecquarter() const { + return HasExtXfvecquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e49dd14107613df91d4f29c9decc9e521f4c3a31 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecsingle() const { + return HasExtXfvecsingle; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..525e28fb0669138eeb093bc6b2ef2f975b5082c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp @@ -0,0 +1,3 @@ +bool hasExtXmempool() const { + return HasExtXmempool; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d72952920107186a40f23563d24f54d2449871e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp @@ -0,0 +1,3 @@ +bool hasExtXsmallfloat() const { + return HasExtXfalthalf || HasExtXfquarter || HasExtXfaltquarter || HasExtXfvecsingle || HasExtXfvechalf || HasExtXfvecalthalf || HasExtXfvecquarter || HasExtXfvecaltquarter || HasExtXfauxhalf || HasExtXfauxalthalf || HasExtXfauxquarter || HasExtXfauxaltquarter || HasExtXfauxvecsingle || HasExtXfauxvechalf || HasExtXfauxvecalthalf || HasExtXfauxvecquarter || HasExtXfauxvecaltquarter || HasExtXfexpauxvechalf || HasExtXfexpauxvecalthalf || HasExtXfexpauxvecquarter || HasExtXfexpauxvecaltquarter; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7497bc2f4ceabd51075636f406d1cdd3480039fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp @@ -0,0 +1,3 @@ +bool hasExtXssr() const { + return HasExtXssr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3441b5174bd4cb1da169b79f355d3be99fc67ba8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp @@ -0,0 +1,3 @@ +bool hasPULPExtV2() const { + return HasPULPExtV2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..045084578632528b294c467beabb11bcec85b93e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp @@ -0,0 +1,3 @@ +bool hasStdExtA() const { + return HasStdExtA; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c102f9d01106d3f90c03b80ad507bf41a61fbdbe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp @@ -0,0 +1,3 @@ +bool hasStdExtB() const { + return HasStdExtB; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..785c95523c80c75eaae143f94294a1b159b11b27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp @@ -0,0 +1,3 @@ +bool hasStdExtC() const { + return HasStdExtC; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c0d41f4cdb4f7a92d8a9ce0c402a53b8cc7697a7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp @@ -0,0 +1,3 @@ +bool hasStdExtD() const { + return HasStdExtD; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dfe330377a0077baad1cc0ee8b900335fc99c7a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp @@ -0,0 +1,3 @@ +bool hasStdExtF() const { + return HasStdExtF; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f5e79be711a1b0176abd5623e66e222d8106828b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp @@ -0,0 +1,3 @@ +bool hasStdExtM() const { + return HasStdExtM; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5223acaac264f68a6fc3f33c7b15e6d79e1dffd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp @@ -0,0 +1,3 @@ +bool hasStdExtV() const { + return HasStdExtV; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa2fdb498d75c1d5e09f33e14da97cb8b6c439cf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZba() const { + return HasStdExtZba; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..580a2ecde2d98f6211573d9c0182a66888e30a4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbb() const { + return HasStdExtZbb; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3665774de6ea27b4f43cc2ce9725e3ef8ee03f24 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbc() const { + return HasStdExtZbc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b885070bf501e4aa033b5c64c27d6cde94fd574f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbe() const { + return HasStdExtZbe; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d30a77301e6f77bcf71149553258fdf6ba72802 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbf() const { + return HasStdExtZbf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64e8f6da0a82c37c1c84768cfbd9c41e4f9d4c27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbm() const { + return HasStdExtZbm; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e70ce03f491bf72fc64954ff90e195393b67e99c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbp() const { + return HasStdExtZbp; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05ca4bea84b6696d19aafd851732afc5363c7ee5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbproposedc() const { + return HasStdExtZbproposedc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88f9e522cd20fd732d826a9b8eaeb7f76be8551f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbr() const { + return HasStdExtZbr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77d6819e118c6e1f82cdedf26c55783737418fb3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbs() const { + return HasStdExtZbs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8432f49748cc5b1627de7d8aa7e42ab26c5463bd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbt() const { + return HasStdExtZbt; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b8f1a64d51d18301744d11c4f5879d8ae084a21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZfh() const { + return HasStdExtZfh; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f140c6331d83ac7a5f8d0308537923cdac4b480 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvamo() const { + return HasStdExtZvamo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9c8265a1f76104be737068c99616f36543fa720 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvlsseg() const { + return HasStdExtZvlsseg; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e252c6d74395b08bc3f85a8df3c085538e2240d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp @@ -0,0 +1,22 @@ +RISCVSubtarget &RISCVSubtarget::initializeSubtargetDependencies(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName) { + bool Is64Bit = TT.isArch64Bit(); + std::string CPUName = std::string(CPU); + std::string TuneCPUName = std::string(TuneCPU); + if (CPUName.empty()) { + CPUName = Is64Bit ? "generic-rv64" : "generic-rv32"; + } + if (TuneCPUName.empty()) { + TuneCPUName = CPUName; + } + ParseSubtargetFeatures(CPUName, TuneCPUName, FS); + if (Is64Bit) { + XLenVT = MVT::i64; + XLen = 64; + } + TargetABI = RISCVABI::computeTargetABI(TT, getFeatureBits(), ABIName); + RISCVFeatures::validate(TT, getFeatureBits()); + if(TT.getVendor() == Triple::HERO) { + IsPULP = true; + } + return *this; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/is64Bit.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/is64Bit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..026df9778ca9ddace0d34a9f3e0d8eb157bd293e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/is64Bit.cpp @@ -0,0 +1,3 @@ +bool is64Bit() const { + return HasRV64; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isPULP.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isPULP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..061b8cdfcc03ad94ac5a2e30d0daca7b06335f8f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isPULP.cpp @@ -0,0 +1,3 @@ +bool isPULP() const { + return IsPULP; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isRV32E.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e9fc1cb3169afb18c1184d05bcd22cb858a5676e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E() const { + return IsRV32E; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ac2e733fe0b3623076323b1347a74e43a721deb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp @@ -0,0 +1,4 @@ +bool isRegisterReservedByUser(Register R) const { + assert(R < RISCV::NUM_TARGET_REGS && "Register out of range"); + return UserReservedRegister[R]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..37b315659994b32de45ce8870d6a29db4acfbd3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetInfo() { + RegisterTarget X(getTheRISCV32Target(), "riscv32", "32-bit RISC-V", "RISCV"); + RegisterTarget Y(getTheRISCV64Target(), "riscv64", "64-bit RISC-V", "RISCV"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d0317f9493f86d48647af0d9d65986f46cbf77b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheRISCV32Target() { + static Target TheRISCV32Target; + return TheRISCV32Target; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7a649e2d1dcc685575c2f9ec1dca9aaf6fa8aba --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheRISCV64Target() { + static Target TheRISCV64Target; + return TheRISCV64Target; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ec72f6f7f4ebd30c69080a6510c2df6c33274bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,11 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() { + RegisterTargetMachine X(getTheRISCV32Target()); + RegisterTargetMachine Y(getTheRISCV64Target()); + auto *PR = PassRegistry::getPassRegistry(); + initializeGlobalISel(*PR); + initializeRISCVMergeBaseOffsetOptPass(*PR); + initializeRISCVExpandSSRPass(*PR); + initializeSNITCHFrepLoopsPass(*PR); + initializeRISCVExpandPseudoPass(*PR); + initializezmtarzmCleanupVSETVLIFPass(*PR); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b20b53464b621e4e92357ebd6307c69ffb9a40e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp @@ -0,0 +1,2 @@ +RISCVPassConfig(RISCVTargetMachine &TM, PassManagerBase &PM) : TargetPassConfig(TM, PM) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73ec6bedf09619270970355907e32b855791f128 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,4 @@ +RISCVTargetMachine::RISCVTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional RM, CodeModel::Model CM, CodeGenOpt::Level OL) : LLVMTargetMachine(T, computeDataLayout(TT), TT, CPU, FS, Options, getEffectiveRelocModel(RM), CM, OL), TLOF(make_unique()), Subtarget(TT, CPU, FS, *this) { + initAsmInfo(); + setMachineOutliner(true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53a717c5a28993e11ab524b64f8f9b5dde960abc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addGlobalInstructionSelect() { + addPass(new InstructionSelect()); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..249cfd6b8fbbd2f318e66c2e9edcc522e72786ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp @@ -0,0 +1,4 @@ +void RISCVPassConfig::addIRPasses() { + addPass(createAtomicExpandPass()); + TargetPassConfig::addIRPasses(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e40ddbd47024c1bb26c2d10c54d2d2fb0c3c73f0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addIRTranslator() { + addPass(new IRTranslator(getOptLevel())); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bceda22a3721c766e191bd621bc2068efb9440e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addInstSelector() { + addPass(createRISCVISelDag(getRISCVTargetMachine())); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1932ec43e2cbb1e9ec97351c4421aa1d7c006317 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addLegalizeMachineIR() { + addPass(new Legalizer()); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2ff69c52170cecce0743c34b95be10f32f76ce5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,3 @@ +void RISCVPassConfig::addPreEmitPass() { + addPass(&BranchRelaxationPassID); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4d05114718df13693636112b72074e03fc4e83f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp @@ -0,0 +1,5 @@ +void RISCVPassConfig::addPreEmitPass() { + addPass(createRISCVExpandPseudoPass()); + addPass(createRISCVExpandAtomicPseudoPass()); + addPass(createPULPFixupHwLoops()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31da21546bc22765cf99974c3efd80d633243390 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp @@ -0,0 +1,10 @@ +void RISCVPassConfig::addPreRegAlloc() { + addPass(createRISCVExpandSDMAPass()); + addPass(createRISCVExpandSSRPass()); + addPass(createSNITCHFrepLoopsPass()); + if (TM->getOptLevel() != CodeGenOpt::None) { + addPass(createRISCVMergeBaseOffsetOptPass()); + addPass(createRISCVCleanupVSETVLIPass()); + addPass(createPULPHardwareLoops()); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ca661dadbfb7d390a899a4418bf15b9e1daeb40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp @@ -0,0 +1,2 @@ +void RISCVPassConfig::addPreSched2() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..784ce6e69101604753ad0faae4ce064c8ac54a6b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addRegBankSelect() { + addPass(new RegBankSelect()); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc998cd546aec1eb49f68f89e54417de94f8f74c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp @@ -0,0 +1,10 @@ +static StringRef computeDataLayout(const Triple &TT) { + if (TT.isArch64Bit()) { + return "e-m:e-p:64:64-i64:64-i128:128-n64-S128"; + } + if (TT.getVendor() == Triple::HERO) { + return "e-m:e-p:32:32-p1:64:32-i64:64-n32-S128-P0-A0"; + } + assert(TT.isArch32Bit() && "only RV32 and RV64 are currently supported"); + return "e-m:e-p:32:32-i64:64-n32-S128"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e26ed90631bc09a534221d3b0d89d3d0fb4a2f08 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp @@ -0,0 +1,3 @@ +TargetPassConfig *RISCVTargetMachine::createPassConfig(PassManagerBase &PM) { + return new RISCVPassConfig(*this, PM); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8e47bfda9700302b8897ba128ce6aaa4acfbb8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp @@ -0,0 +1,6 @@ +static Reloc::Model getEffectiveRelocModel(const Triple &TT, Optional RM) { + if (!RM.hasValue()) { + return Reloc::Static; + } + return *RM; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..191f39130017a606dd77f12beee5e067e30a1edd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp @@ -0,0 +1,3 @@ +TargetLoweringObjectFile *getObjFileLowering() const override { + return TLOF.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3910b1ff75ce36bb25563a278318b819a66dd309 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,25 @@ +const RISCVSubtarget *RISCVTargetMachine::getSubtargetImpl(const Function &F) const { + Attribute TuneAttr = F.getFnAttribute("tune-cpu"); + Attribute CPUAttr = F.getFnAttribute("target-cpu"); + Attribute FSAttr = F.getFnAttribute("target-features"); + std::string CPU = CPUAttr.isValid() ? CPUAttr.getValueAsString().str() : TargetCPU; + std::string TuneCPU = TuneAttr.isValid() ? TuneAttr.getValueAsString().str() : CPU; + std::string FS = FSAttr.isValid() ? FSAttr.getValueAsString().str() : TargetFS; + std::string Key = CPU + TuneCPU + FS; + auto &I = SubtargetMap[Key]; + if (!I) { + resetTargetOptions(F); + auto ABIName = Options.MCOptions.getABIName(); + if (const MDString *ModuleTargetABI = dyn_cast_or_null(F.getParent()->getModuleFlag("target-abi"))) { + auto TargetABI = RISCVABI::getTargetABI(ABIName); + if (TargetABI != RISCVABI::ABI_Unknown) { + if (ModuleTargetABI->getString() != ABIName) { + report_fatal_error("-target-abi option != target-abi module flag"); + } + } + ABIName = ModuleTargetABI->getString(); + } + I = std::make_unique(TargetTriple, CPU, TuneCPU, FS, ABIName, *this); + } + return I.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a41a250abddaaf2f72411583edeb8514ecc15fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp @@ -0,0 +1,3 @@ +RISCVTargetMachine &getRISCVTargetMachine() const { + return getTM(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de21c28d38b6b1f01d074c67513e6cefd58f284b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp @@ -0,0 +1,3 @@ +TargetTransformInfo RISCVTargetMachine::getTargetTransformInfo(const Function &F) { + return TargetTransformInfo(RISCVTTIImpl(this, F)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40909ed282d63a3b6673b49e76d705f5bac453f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetMachine::isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ab8970cc0701e22e362bbdf6bcd1703a95b66d2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp @@ -0,0 +1,12 @@ +void RISCVTargetMachine::setTargetOptionsWithModuleMetadata(const Module &M LLVM_ATTRIBUTE_UNUSED) { + StringRef ABIName = Options.MCOptions.getABIName(); + if (const MDString *ModuleTargetABI = dyn_cast_or_null(M.getModuleFlag("target-abi"))) { + StringRef ModuleABIName = ModuleTargetABI->getString(); + if (!ABIName.empty() && ModuleABIName != ABIName) { + report_fatal_error("-target-abi option != target-abi module flag"); + } + if (ABIName.empty()) { + Options.MCOptions.ABIName = ModuleABIName.str(); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98b08bcc1f079b2714504cf436a5a7c3530e1885 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,5 @@ +void RISCVELFTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM) { + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + SmallDataSection = getContext().getELFSection(".sdata", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC); + SmallBSSSection = getContext().getELFSection(".sbss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6e5fb66e33a68d6f5d4aa6fbd6fa67a49ee342a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,9 @@ +MCSection *RISCVELFTargetObjectFile::SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { + if (Kind.isBSS() && isGlobalInSmallSection(GO, TM)) { + return SmallBSSSection; + } + if (Kind.isData() && isGlobalInSmallSection(GO, TM)) { + return SmallDataSection; + } + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbe0c45c090047e1d764d2795db62ec1e15fe255 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp @@ -0,0 +1,11 @@ +void RISCVELFTargetObjectFile::getModuleMetadata(Module &M) { + SmallVector ModuleFlags; + M.getModuleFlagsMetadata(ModuleFlags); + for (const auto &MFE : ModuleFlags) { + StringRef Key = MFE.Key->getString(); + if (Key == "SmallDataLimit") { + SSThreshold = mdconst::extract(MFE.Val)->getZExtValue(); + break; + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88aa5000ec9d5a0ffc49ae8b1b6bb97bb7707153 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,6 @@ +MCSection *RISCVELFTargetObjectFile::getSectionForConstant( const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const { + if (isConstantInSmallSection(DL, C)) { + return SmallDataSection; + } + return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Alignment); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03070c7967520e2db15231715cdf5404fe77cef0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp @@ -0,0 +1,3 @@ +bool RISCVELFTargetObjectFile::isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const { + return isInSmallSection(DL.getTypeAllocSize(CN->getType())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d15ea59c38f894725279f9fb82f0731c79548e5a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp @@ -0,0 +1,21 @@ +bool RISCVELFTargetObjectFile::isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const { + const GlobalVariable *GVA = dyn_cast(GO); + if (!GVA) { + return false; + } + if (GVA->hasSection()) { + StringRef Section = GVA->getSection(); + if (Section == ".sdata" || Section == ".sbss") { + return true; + } + return false; + } + if (((GVA->hasExternalLinkage() && GVA->isDeclaration()) || GVA->hasCommonLinkage())) { + return false; + } + Type *Ty = GVA->getValueType(); + if (!Ty->isSized()) { + return false; + } + return isInSmallSection(GVA->getParent()->getDataLayout().getTypeAllocSize(Ty)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77772fb82ad184a8a4d2455cbc1cf202550c1af0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp @@ -0,0 +1,3 @@ +bool RISCVELFTargetObjectFile::isInSmallSection(uint64_t Size) const { + return Size > 0 && Size <= SSThreshold; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22191cb2dea9757287f93e29e9e0f5d88a5abc6c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp @@ -0,0 +1,2 @@ +explicit RISCVTTIImpl(const RISCVTargetMachine *TM, const Function &F) : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)), TLI(ST->getTargetLowering()) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01d7fd4a5292e1d82961e69efa3f3bd08f29ff0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp @@ -0,0 +1,8 @@ +int RISCVTTIImpl::getIntImmCost(const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) { + assert(Ty->isIntegerTy() && "getIntImmCost can only estimate cost of materialising integers"); + if (Imm == 0) { + return TTI::TCC_Free; + } + const DataLayout &DL = getDataLayout(); + return RISCVMatInt::getIntMatCost(Imm, DL.getTypeSizeInBits(Ty), getST()->is64Bit()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0c01363a8faf86a4c31e05ebe57cad34936b229 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp @@ -0,0 +1,37 @@ +int RISCVTTIImpl::getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind, Instruction *Inst) { + assert(Ty->isIntegerTy() && "getIntImmCost can only estimate cost of materialising integers"); + if (Imm == 0) { + return TTI::TCC_Free; + } + bool Takes12BitImm = false; + unsigned ImmArgIdx = ~0U; + switch (Opcode) { + case Instruction::GetElementPtr: + return TTI::TCC_Free; + case Instruction::Add: + case Instruction::And: + case Instruction::Or: + case Instruction::Xor: + case Instruction::Mul: + Takes12BitImm = true; + break; + case Instruction::Sub: + case Instruction::Shl: + case Instruction::LShr: + case Instruction::AShr: + Takes12BitImm = true; + ImmArgIdx = 1; + break; + default: + break; + } + if (Takes12BitImm) { + if (Instruction::isCommutative(Opcode) || Idx == ImmArgIdx) { + if (Imm.getMinSignedBits() <= 64 && getTLI()->isLegalAddImmediate(Imm.getSExtValue())) { + return TTI::TCC_Free; + } + } + return getIntImmCost(Imm, Ty, CostKind); + } + return TTI::TCC_Free; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff244e23aa7c352fb557907d1c8528e63c9cf942 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp @@ -0,0 +1,3 @@ +int RISCVTTIImpl::getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) { + return TTI::TCC_Free; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3085911b846be9fe97364305924fd1e72c52af7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp @@ -0,0 +1,3 @@ +const RISCVSubtarget *getST() const { + return ST; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e8723265e898db24c643b890ede218d98cd5b62 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp @@ -0,0 +1,3 @@ +const RISCVTargetLowering *getTLI() const { + return TLI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de686375cfeedff494d4847b2ff891158b91cf41 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp @@ -0,0 +1,6 @@ +bool RISCVTTIImpl::isLoweredToCall(const Function *F) { + if (F->getName().startswith("llvm.riscv.pulp")) { + return false; + } + return BaseT::isLoweredToCall(F); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c1571aa6e5baf2f38a158c32eacae1bd863b74c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp @@ -0,0 +1,6 @@ +bool RISCVTTIImpl::shouldFavorPostInc() const { + if (ST->hasPULPExtV2()) { + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/CallLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/CallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..44322d52c70e92f7e669a7c814a0825858d8a83d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/CallLowering.cpp @@ -0,0 +1,2 @@ +RISCVCallLowering::RISCVCallLowering(const RISCVTargetLowering &TLI) : CallLowering(&TLI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc8637b1f0ea4b69b232a8c00e5c54df10bb470a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerCall.cpp @@ -0,0 +1,3 @@ +bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const { + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8344a5c36b8b7f909b3f5bfff96e829687e6d80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp @@ -0,0 +1,6 @@ +bool RISCVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef> VRegs, FunctionLoweringInfo &FLI) const { + if (F.arg_empty()) { + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a0a34ed59d315e93fb2eb0040afebfc1ef94e7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/CallLowering/lowerReturn.cpp @@ -0,0 +1,8 @@ +bool RISCVCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef VRegs, FunctionLoweringInfo &FLI) const { + MachineInstrBuilder Ret = MIRBuilder.buildInstrNoInsert(RISCV::PseudoRET); + if (Val != nullptr) { + return false; + } + MIRBuilder.insertInstr(Ret); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc75bbabc713bf9ef22e7fb35f9ba8e802457383 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +explicit RISCVFrameLowering(const RISCVSubtarget &STI) : TargetFrameLowering(StackGrowsDown, Align(16), 0), STI(STI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/adjustReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/adjustReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7dae994073558b0f037aa2e910c54258b035e8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/adjustReg.cpp @@ -0,0 +1,21 @@ +void RISCVFrameLowering::adjustReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register DestReg, Register SrcReg, int64_t Val, MachineInstr::MIFlag Flag) const { + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (DestReg == SrcReg && Val == 0) { + return ; + } + if (isInt<12>(Val)) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), DestReg).addReg(SrcReg).addImm(Val).setMIFlag(Flag); + } + else { + unsigned Opc = RISCV::ADD; + bool isSub = Val < 0; + if (isSub) { + Val = -Val; + Opc = RISCV::SUB; + } + Register ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + TII->movImm(MBB, MBBI, DL, ScratchReg, Val, Flag); + BuildMI(MBB, MBBI, DL, TII->get(Opc), DestReg).addReg(SrcReg).addReg(ScratchReg, RegState::Kill).setMIFlag(Flag); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc50f8ce2fe6c77b83a82dd1c51e99b053cfcf64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp @@ -0,0 +1,16 @@ +bool RISCVFrameLowering::canUseAsEpilogue(const MachineBasicBlock &MBB) const { + const MachineFunction *MF = MBB.getParent(); + MachineBasicBlock *TmpMBB = const_cast(&MBB); + const auto *RVFI = MF->getInfo(); + if (!RVFI->useSaveRestoreLibCalls(*MF)) { + return true; + } + if (MBB.succ_size() > 1) { + return false; + } + MachineBasicBlock *SuccMBB = MBB.succ_empty() ? TmpMBB->getFallThrough() : *MBB.succ_begin(); + if (!SuccMBB) { + return true; + } + return SuccMBB->isReturnBlock() && SuccMBB->size() == 1; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..14ca7440ae53421c255bd958604dfcb5a32e346e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp @@ -0,0 +1,11 @@ +bool RISCVFrameLowering::canUseAsPrologue(const MachineBasicBlock &MBB) const { + MachineBasicBlock *TmpMBB = const_cast(&MBB); + const MachineFunction *MF = MBB.getParent(); + const auto *RVFI = MF->getInfo(); + if (!RVFI->useSaveRestoreLibCalls(*MF)) { + return true; + } + RegScavenger RS; + RS.enterBasicBlock(*TmpMBB); + return !RS.isRegUsed(RISCV::X5); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc90cf82ab0d07d668daf8218552e032d84faba6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp @@ -0,0 +1,25 @@ +void RISCVFrameLowering::determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const { + TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS); + if (hasFP(MF)) { + SavedRegs.set(RISCV::X1); + SavedRegs.set(RISCV::X8); + } + if (hasBP(MF)) { + SavedRegs.set(RISCVABI::getBPReg()); + } + MachineFrameInfo &MFI = MF.getFrameInfo(); + if (MF.getFunction().hasFnAttribute("interrupt") && MFI.hasCalls()) { + static const MCPhysReg CSRegs[] = { RISCV::X1, RISCV::X5, RISCV::X6, RISCV::X7, RISCV::X10, RISCV::X11, RISCV::X12, RISCV::X13, RISCV::X14, RISCV::X15, RISCV::X16, RISCV::X17, RISCV::X28, RISCV::X29, RISCV::X30, RISCV::X31, 0}; + for (unsigned i = 0; CSRegs[i]; ++i) { + SavedRegs.set(CSRegs[i]); + } + if (MF.getSubtarget().hasStdExtF()) { + const MCPhysReg * Regs = MF.getRegInfo().getCalleeSavedRegs(); + for (unsigned i = 0; Regs[i]; ++i) { + if (RISCV::FPR16RegClass.contains(Regs[i]) || RISCV::FPR32RegClass.contains(Regs[i]) || RISCV::FPR64RegClass.contains(Regs[i])) { + SavedRegs.set(Regs[i]); + } + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fa9f9d14dc9c6fc09c3c01a88db76d2312e69df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,15 @@ +MachineBasicBlock::iterator RISCVFrameLowering::eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const { + Register SPReg = RISCV::X2; + DebugLoc DL = MI->getDebugLoc(); + if (!hasReservedCallFrame(MF)) { + int64_t Amount = MI->getOperand(0).getImm(); + if (Amount != 0) { + Amount = alignSPAdjust(Amount); + if (MI->getOpcode() == RISCV::ADJCALLSTACKDOWN) { + Amount = -Amount; + } + adjustReg(MBB, MI, DL, SPReg, SPReg, Amount, MachineInstr::NoFlags); + } + } + return MBB.erase(MI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e2061f54290ae445a02f9c65b6d8720cb59e141 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,88 @@ +void RISCVFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { + const RISCVRegisterInfo *RI = STI.getRegisterInfo(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + auto *RVFI = MF.getInfo(); + Register FPReg = RISCV::X8; + Register SPReg = RISCV::X2; + if (MF.getFunction().getCallingConv() == CallingConv::GHC) { + return; + } + MachineBasicBlock::iterator MBBI = MBB.end(); + DebugLoc DL; + if (!MBB.empty()) { + MBBI = MBB.getFirstTerminator(); + if (MBBI == MBB.end()) { + MBBI = MBB.getLastNonDebugInstr(); + } + DL = MBBI->getDebugLoc(); + if (!MBBI->isTerminator()) { + MBBI = std::next(MBBI); + } + while (MBBI != MBB.begin() && std::prev(MBBI)->getFlag(MachineInstr::FrameDestroy)) { + --MBBI; + } + } + SmallVector NonLibcallCSI; + for (auto &CS : MFI.getCalleeSavedInfo()) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI.push_back(CS); + } + } + const auto &CSI = NonLibcallCSI; + auto LastFrameDestroy = MBBI; + if (!CSI.empty()) { + LastFrameDestroy = std::prev(MBBI, CSI.size()); + } + uint64_t StackSize = MFI.getStackSize(); + uint64_t RealStackSize = StackSize + RVFI->getLibCallStackSize(); + uint64_t FPOffset = RealStackSize - RVFI->getVarArgsSaveSize(); + if (RI->needsStackRealignment(MF) || MFI.hasVarSizedObjects()) { + assert(hasFP(MF) && "frame pointer should not have been eliminated"); + adjustReg(MBB, LastFrameDestroy, DL, SPReg, FPReg, -FPOffset, MachineInstr::FrameDestroy); + } + uint64_t FirstSPAdjustAmount = 0; + const auto *RVFI = MF.getInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + uint64_t StackSize = MFI.getStackSize(); + if (RVFI->getLibCallStackSize()) { + FirstSPAdjustAmount = 0; + } + if (!isInt<12>(StackSize) && (CSI.size() > 0)) { + FirstSPAdjustAmount = 2048 - getStackAlign().value(); + } + if (FirstSPAdjustAmount) { + uint64_t SecondSPAdjustAmount = MFI.getStackSize() - FirstSPAdjustAmount; + assert(SecondSPAdjustAmount > 0 && "SecondSPAdjustAmount should be greater than zero"); + adjustReg(MBB, LastFrameDestroy, DL, SPReg, SPReg, SecondSPAdjustAmount, MachineInstr::FrameDestroy); + } + if (FirstSPAdjustAmount) { + StackSize = FirstSPAdjustAmount; + } + adjustReg(MBB, MBBI, DL, SPReg, SPReg, StackSize, MachineInstr::FrameDestroy); + if (!MF.getFunction().hasFnAttribute(Attribute::ShadowCallStack)) { + return; + } + const auto &STI = MF.getSubtarget(); + Register RAReg = STI.getRegisterInfo()->getRARegister();. + std::vector &CSI = MF.getFrameInfo().getCalleeSavedInfo(); + if (std::none_of(CSI.begin(), CSI.end(), [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) { + return; + } + Register SCSPReg = RISCVABI::getSCSPReg(); + auto &Ctx = MF.getFunction().getContext(); + if (!STI.isRegisterReservedByUser(SCSPReg)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "x18 not reserved by user for Shadow Call Stack."}); + return; + } + const auto *RVFI = MF.getInfo(); + if (RVFI->useSaveRestoreLibCalls(MF)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Shadow Call Stack cannot be combined with Save/Restore LibCalls."}); + return; + } + const RISCVInstrInfo *TII = STI.getInstrInfo(); + bool IsRV64 = STI.hasFeature(RISCV::Feature64Bit); + int64_t SlotSize = STI.getXLen() / 8; + BuildMI(MBB, MI, DL, TII->get(IsRV64 ? RISCV::LD : RISCV::LW)).addReg(RAReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); + BuildMI(MBB, MI, DL, TII->get(RISCV::ADDI)).addReg(SCSPReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8048950b0f019688715749d1f0850f32087a97ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,130 @@ +void RISCVFrameLowering::emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineFrameInfo &MFI = MF.getFrameInfo(); + auto *RVFI = MF.getInfo(); + const RISCVRegisterInfo *RI = STI.getRegisterInfo(); + const RISCVInstrInfo *TII = STI.getInstrInfo(); + MachineBasicBlock::iterator MBBI = MBB.begin(); + Register FPReg = RISCV::X8; + Register SPReg = RISCV::X2; + Register BPReg = RISCVABI::getBPReg(); + DebugLoc DL; + if (MF.getFunction().getCallingConv() == CallingConv::GHC) { + return ; + } + if (!MF.getFunction().hasFnAttribute(Attribute::ShadowCallStack)) { + return; + } + const auto &STI = MF.getSubtarget(); + Register RAReg = STI.getRegisterInfo()->getRARegister();. + std::vector &CSI = MF.getFrameInfo().getCalleeSavedInfo(); + if (std::none_of(CSI.begin(), CSI.end(), [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) { + return; + } + Register SCSPReg = RISCVABI::getSCSPReg(); + auto &Ctx = MF.getFunction().getContext(); + if (!STI.isRegisterReservedByUser(SCSPReg)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "x18 not reserved by user for Shadow Call Stack."}); + return; + } + const auto *RVFI = MF.getInfo(); + if (RVFI->useSaveRestoreLibCalls(MF)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Shadow Call Stack cannot be combined with Save/Restore LibCalls."}); + return; + } + const RISCVInstrInfo *TII = STI.getInstrInfo(); + bool IsRV64 = STI.hasFeature(RISCV::Feature64Bit); + int64_t SlotSize = STI.getXLen() / 8; + BuildMI(MBB, MI, DL, TII->get(IsRV64 ? RISCV::LD : RISCV::LW)).addReg(RAReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); + BuildMI(MBB, MI, DL, TII->get(RISCV::ADDI)).addReg(SCSPReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); + while (MBBI != MBB.end() && MBBI->getFlag(MachineInstr::FrameSetup)) { + ++MBBI; + } + MachineFrameInfo &MFI = MF.getFrameInfo(); + uint64_t FrameSize = MFI.getStackSize(); + Align StackAlign = getStackAlign(); + uint64_t MaxCallSize = alignTo(MFI.getMaxCallFrameSize(), StackAlign); + MFI.setMaxCallFrameSize(MaxCallSize); + FrameSize = alignTo(FrameSize, StackAlign); + MFI.setStackSize(FrameSize); + if (int LibCallRegs = getLibCallID(MF, MFI.getCalleeSavedInfo()) + 1) { + unsigned LibCallFrameSize = alignTo((STI.getXLen() / 8) * LibCallRegs, 16); + RVFI->setLibCallStackSize(LibCallFrameSize); + } + uint64_t StackSize = MFI.getStackSize(); + uint64_t RealStackSize = StackSize + RVFI->getLibCallStackSize(); + if (RealStackSize == 0 && !MFI.adjustsStack()) { + return ; + } + if (STI.isRegisterReservedByUser(SPReg)) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Stack pointer required, but has been reserved."}); + } + uint64_t FirstSPAdjustAmount = 0; + const auto *RVFI = MF.getInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + uint64_t StackSize = MFI.getStackSize(); + if (RVFI->getLibCallStackSize()) { + FirstSPAdjustAmount = 0; + } + if (!isInt<12>(StackSize) && (CSI.size() > 0)) { + FirstSPAdjustAmount = 2048 - getStackAlign().value(); + } + if (FirstSPAdjustAmount) { + StackSize = FirstSPAdjustAmount; + RealStackSize = FirstSPAdjustAmount; + } + adjustReg(MBB, MBBI, DL, SPReg, SPReg, -StackSize, MachineInstr::FrameSetup); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, RealStackSize)); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + const auto &CSI = MFI.getCalleeSavedInfo(); + std::advance(MBBI, getNonLibcallCSI(CSI).size()); + for (const auto &Entry : CSI) { + int FrameIdx = Entry.getFrameIdx(); + int64_t Offset; + if (FrameIdx < 0) { + Offset = FrameIdx * (int64_t) STI.getXLen() / 8; + } + else { + Offset = MFI.getObjectOffset(Entry.getFrameIdx()) - RVFI->getLibCallStackSize(); + } + Register Reg = Entry.getReg(); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, RI->getDwarfRegNum(Reg, true), Offset)); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + if (hasFP(MF)) { + if (STI.isRegisterReservedByUser(FPReg)) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Frame pointer required, but has been reserved."}); + } + adjustReg(MBB, MBBI, DL, FPReg, SPReg, RealStackSize - RVFI->getVarArgsSaveSize(), MachineInstr::FrameSetup); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfa(nullptr, RI->getDwarfRegNum(FPReg, true), RVFI->getVarArgsSaveSize())); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + if (FirstSPAdjustAmount) { + uint64_t SecondSPAdjustAmount = MFI.getStackSize() - FirstSPAdjustAmount; + assert(SecondSPAdjustAmount > 0 && "SecondSPAdjustAmount should be greater than zero"); + adjustReg(MBB, MBBI, DL, SPReg, SPReg, -SecondSPAdjustAmount, MachineInstr::FrameSetup); + if (!hasFP(MF)) { + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, MFI.getStackSize())); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + if (hasFP(MF)) { + const RISCVRegisterInfo *RI = STI.getRegisterInfo(); + if (RI->needsStackRealignment(MF)) { + Align MaxAlignment = MFI.getMaxAlign(); + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (isInt<12>(-(int)MaxAlignment.value())) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ANDI), SPReg).addReg(SPReg).addImm(-(int)MaxAlignment.value()); + } + else { + unsigned ShiftAmount = Log2(MaxAlignment); + Register VR = MF.getRegInfo().createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SRLI), VR).addReg(SPReg).addImm(ShiftAmount); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SLLI), SPReg).addReg(VR).addImm(ShiftAmount); + } + if (hasBP(MF)) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), BPReg).addReg(SPReg).addImm(0); + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08c62666cb52c52383f1b96f43d706c6bca38eb7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp @@ -0,0 +1,67 @@ +StackOffset RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); + const auto *RVFI = MF.getInfo(); + SmallVector NonLibcallCSI; + for (auto &CS : MFI.getCalleeSavedInfo()) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI.push_back(CS); + } + } + const auto &CSI = NonLibcallCSI; + int MinCSFI = 0; + int MaxCSFI = -1; + int Offset = MFI.getObjectOffset(FI) - getOffsetOfLocalArea() + MFI.getOffsetAdjustment(); + uint64_t FirstSPAdjustAmount = 0; + const auto *RVFI = MF.getInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + uint64_t StackSize = MFI.getStackSize(); + if (RVFI->getLibCallStackSize()) { + FirstSPAdjustAmount = 0; + } + if (!isInt<12>(StackSize) && (CSI.size() > 0)) { + FirstSPAdjustAmount = 2048 - getStackAlign().value(); + } + if (CSI.size()) { + MinCSFI = CSI[0].getFrameIdx(); + MaxCSFI = CSI[CSI.size() - 1].getFrameIdx(); + } + if (FI >= MinCSFI && FI <= MaxCSFI) { + FrameReg = RISCV::X2; + if (FirstSPAdjustAmount) { + Offset += FirstSPAdjustAmount; + } + else { + Offset += MFI.getStackSize(); + } + } + else if (RI->needsStackRealignment(MF) && !MFI.isFixedObjectIndex(FI)) { + if (hasBP(MF)) { + FrameReg = RISCVABI::getBPReg(); + } + else { + FrameReg = RISCV::X2; + } + Offset += MFI.getStackSize(); + if (FI < 0) { + Offset += RVFI->getLibCallStackSize(); + } + } + else { + FrameReg = RI->getFrameRegister(MF); + if (hasFP(MF)) { + Offset += RVFI->getVarArgsSaveSize(); + if (FI >= 0) { + Offset -= RVFI->getLibCallStackSize(); + } + } + else { + Offset += MFI.getStackSize(); + if (FI < 0) { + Offset += RVFI->getLibCallStackSize(); + } + } + } + return StackOffset::getFixed(Offset); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasBP.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasBP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5574f49a88f76684df7f258066e46968b3ca683e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasBP.cpp @@ -0,0 +1,5 @@ +bool RISCVFrameLowering::hasBP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + return MFI.hasVarSizedObjects() && TRI->needsStackRealignment(MF); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52beb3a078d6d11924752420b10316994936a37a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,5 @@ +bool RISCVFrameLowering::hasFP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo(); + return MF.getTarget().Options.DisableFramePointerElim(MF) || RegInfo->needsStackRealignment(MF) || MFI.hasVarSizedObjects() || MFI.isFrameAddressTaken(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..33c01431709078493a443b5c20651203bcfb781a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp @@ -0,0 +1,3 @@ +bool RISCVFrameLowering::hasReservedCallFrame(const MachineFunction &MF) const { + return !MF.getFrameInfo().hasVarSizedObjects(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4fd3e4fc864c8feda05e9898c4e705651542721e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,9 @@ +void RISCVFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS) const { + const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterClass *RC = &RISCV::GPRRegClass; + if (!isInt<11>(MFI.estimateStackSize(MF))) { + int RegScavFI = MFI.CreateStackObject(RegInfo->getSpillSize(*RC), RegInfo->getSpillAlign(*RC), false); + RS->addScavengingFrameIndex(RegScavFI); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5aad41ddb0dbd296fef38f4f37bb326d9717d4fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,70 @@ +bool RISCVFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef CSI, const TargetRegisterInfo *TRI) const { + if (CSI.empty()) { + return true; + } + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo(); + DebugLoc DL; + if (MI != MBB.end() && !MI->isDebugInstr()) { + DL = MI->getDebugLoc(); + } + SmallVector NonLibcallCSI2; + for (auto &CS : CSI) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI2.push_back(CS); + } + } + const auto &NonLibcallCSI = NonLibcallCSI2; + for (auto &CS : reverse(NonLibcallCSI)) { + Register Reg = CS.getReg(); + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.loadRegFromStackSlot(MBB, MI, Reg, CS.getFrameIdx(), RC, TRI); + assert(MI != MBB.begin() && "loadRegFromStackSlot didn't insert any code!"); + } + const char *RestoreLibCall; + static const char *const RestoreLibCalls[] = {"__riscv_restore_0", "__riscv_restore_1", "__riscv_restore_2", "__riscv_restore_3", "__riscv_restore_4", "__riscv_restore_5", "__riscv_restore_6", "__riscv_restore_7", "__riscv_restore_8", "__riscv_restore_9", "__riscv_restore_10", "__riscv_restore_11", "__riscv_restore_12"}; + int LibCallID; + const auto *RVFI = MF.getInfo(); + if (CSI.empty() || !RVFI->useSaveRestoreLibCalls(MF)) { + LibCallID = -1; + } + Register MaxReg = RISCV::NoRegister; + for (auto &CS : CSI) { + if (CS.getFrameIdx() < 0) { + MaxReg = std::max(MaxReg.id(), CS.getReg().id()); + } + } + if (MaxReg == RISCV::NoRegister) { + LibCallID = -1; + } + switch (MaxReg) { + default: + llvm_unreachable("Something has gone wrong!"); + case RISCV::X27: LibCallID = 12; + case RISCV::X26: LibCallID = 11; + case RISCV::X25: LibCallID = 10; + case RISCV::X24: LibCallID = 9; + case RISCV::X23: LibCallID = 8; + case RISCV::X22: LibCallID = 7; + case RISCV::X21: LibCallID = 6; + case RISCV::X20: LibCallID = 5; + case RISCV::X19: LibCallID = 4; + case RISCV::X18: LibCallID = 3; + case RISCV::X9: LibCallID = 2; + case RISCV::X8: LibCallID = 1; + case RISCV::X1: LibCallID = 0; + } + if (LibCallID == -1) { + RestoreLibCall = nullptr; + } + RestoreLibCall = RestoreLibCalls[LibCallID]; + const char *RestoreLibCall = getRestoreLibCallName(*MF, CSI); + if (RestoreLibCall) { + MachineBasicBlock::iterator NewMI = BuildMI(MBB, MI, DL, TII.get(RISCV::PseudoTAIL)).addExternalSymbol(RestoreLibCall, RISCVII::MO_CALL).setMIFlag(MachineInstr::FrameDestroy); + if (MI != MBB.end() && MI->getOpcode() == RISCV::PseudoRET) { + NewMI->copyImplicitOps(*MF, *MI); + MI->eraseFromParent(); + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7344391a22670e42b028c4323e619b6fe220c4cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,67 @@ +bool RISCVFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef CSI, const TargetRegisterInfo *TRI) const { + if (CSI.empty()) { + return true; + } + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo(); + DebugLoc DL; + if (MI != MBB.end() && !MI->isDebugInstr()) { + DL = MI->getDebugLoc(); + } + const char *SpillLibCall; + static const char *const SpillLibCalls[] = {"__riscv_save_0", "__riscv_save_1", "__riscv_save_2", "__riscv_save_3", "__riscv_save_4", "__riscv_save_5", "__riscv_save_6", "__riscv_save_7", "__riscv_save_8", "__riscv_save_9", "__riscv_save_10", "__riscv_save_11", "__riscv_save_12"}; + int LibCallID; + const auto *RVFI = MF.getInfo(); + if (CSI.empty() || !RVFI->useSaveRestoreLibCalls(MF)) { + LibCallID = -1; + } + Register MaxReg = RISCV::NoRegister; + for (auto &CS : CSI) { + if (CS.getFrameIdx() < 0) { + MaxReg = std::max(MaxReg.id(), CS.getReg().id()); + } + } + if (MaxReg == RISCV::NoRegister) { + LibCallID = -1; + } + switch (MaxReg) { + default: + llvm_unreachable("Something has gone wrong!"); + case RISCV::X27: LibCallID = 12; + case RISCV::X26: LibCallID = 11; + case RISCV::X25: LibCallID = 10; + case RISCV::X24: LibCallID = 9; + case RISCV::X23: LibCallID = 8; + case RISCV::X22: LibCallID = 7; + case RISCV::X21: LibCallID = 6; + case RISCV::X20: LibCallID = 5; + case RISCV::X19: LibCallID = 4; + case RISCV::X18: LibCallID = 3; + case RISCV::X9: LibCallID = 2; + case RISCV::X8: LibCallID = 1; + case RISCV::X1: LibCallID = 0; + } + if (LibCallID == -1) { + SpillLibCall = nullptr; + } + SpillLibCall = SpillLibCalls[LibCallID]; + if (SpillLibCall) { + BuildMI(MBB, MI, DL, TII.get(RISCV::PseudoCALLReg), RISCV::X5).addExternalSymbol(SpillLibCall, RISCVII::MO_CALL).setMIFlag(MachineInstr::FrameSetup); + for (auto &CS : CSI) { + MBB.addLiveIn(CS.getReg()); + } + } + SmallVector NonLibcallCSI2; + for (auto &CS : CSI) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI2.push_back(CS); + } + } + const auto &NonLibcallCSI = NonLibcallCSI2; + for (auto &CS : NonLibcallCSI) { + Register Reg = CS.getReg(); + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.storeRegToStackSlot(MBB, MI, Reg, true, CS.getFrameIdx(), RC, TRI); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71b402e1f73281139075f655ca142ba3f6cd7f6c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +explicit RISCVDAGToDAGISel(RISCVTargetMachine &TargetMachine) : SelectionDAGISel(TargetMachine) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9823b1da0db069cc49a64e482ac6c5d70e2b57fe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp @@ -0,0 +1,14 @@ +bool RISCVDAGToDAGISel::MatchSLLIUW(SDNode *N) const { + assert(N->getOpcode() == ISD::AND); + assert(N->getOperand(0).getOpcode() == ISD::SHL); + assert(isa(N->getOperand(1))); + assert(isa(N->getOperand(0).getOperand(1))); + if (!Subtarget->is64Bit()) { + return false; + } + SDValue Shl = N->getOperand(0); + uint64_t VC1 = N->getConstantOperandVal(1); + uint64_t VC2 = Shl.getConstantOperandVal(1); + assert(VC2 < 32 && "Unexpected immediate"); + return (VC1 >> VC2) == UINT64_C(0xFFFFFFFF); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed6d54e7e5c4fd7431794ade702363890c9fb9b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp @@ -0,0 +1,13 @@ +bool RISCVDAGToDAGISel::MatchSRLIW(SDNode *N) const { + assert(N->getOpcode() == ISD::SRL); + assert(N->getOperand(0).getOpcode() == ISD::AND); + assert(isa(N->getOperand(1))); + assert(isa(N->getOperand(0).getOperand(1))); + if (!Subtarget->is64Bit()) { + return false; + } + SDValue And = N->getOperand(0); + uint64_t ShAmt = N->getConstantOperandVal(1); + uint64_t Mask = And.getConstantOperandVal(1); + return (Mask | maskTrailingOnes(ShAmt)) == 0xffffffff; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6328e8bc19e4b307aa8cec3d75d5573277b5e72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp @@ -0,0 +1,83 @@ +void RISCVDAGToDAGISel::PostprocessISelDAG() { + SelectionDAG::allnodes_iterator Position(CurDAG->getRoot().getNode()); + ++Position; + while (Position != CurDAG->allnodes_begin()) { + SDNode *N = &*--Position; + if (N->use_empty() || !N->isMachineOpcode()) + continue; + int OffsetOpIdx; + int BaseOpIdx; + switch (N->getMachineOpcode()) { + default: + continue; + case RISCV::LB: + case RISCV::LH: + case RISCV::LW: + case RISCV::LBU: + case RISCV::LHU: + case RISCV::LWU: + case RISCV::LD: + case RISCV::FLH: + case RISCV::FLW: + case RISCV::FLD: + BaseOpIdx = 0; + OffsetOpIdx = 1; + break; + case RISCV::SB: + case RISCV::SH: + case RISCV::SW: + case RISCV::SD: + case RISCV::FSH: + case RISCV::FSW: + case RISCV::FSD: + BaseOpIdx = 1; + OffsetOpIdx = 2; + break; + } + if (!isa(N->getOperand(OffsetOpIdx))) + continue; + SDValue Base = N->getOperand(BaseOpIdx); + if (!Base.isMachineOpcode() || Base.getMachineOpcode() != RISCV::ADDI) + continue; + SDValue ImmOperand = Base.getOperand(1); + uint64_t Offset2 = N->getConstantOperandVal(OffsetOpIdx); + if (auto Const = dyn_cast(ImmOperand)) { + int64_t Offset1 = Const->getSExtValue(); + int64_t CombinedOffset = Offset1 + Offset2; + if (!isInt<12>(CombinedOffset)) + continue; + ImmOperand = CurDAG->getTargetConstant(CombinedOffset, SDLoc(ImmOperand), ImmOperand.getValueType()); + } + else if (auto GA = dyn_cast(ImmOperand)) { + const DataLayout &DL = CurDAG->getDataLayout(); + Align Alignment = GA->getGlobal()->getPointerAlignment(DL); + if (Offset2 != 0 && Alignment <= Offset2) + continue; + int64_t Offset1 = GA->getOffset(); + int64_t CombinedOffset = Offset1 + Offset2; + ImmOperand = CurDAG->getTargetGlobalAddress(GA->getGlobal(), SDLoc(ImmOperand), ImmOperand.getValueType(), CombinedOffset, GA->getTargetFlags()); + } + else if (auto CP = dyn_cast(ImmOperand)) { + Align Alignment = CP->getAlign(); + if (Offset2 != 0 && Alignment <= Offset2) + continue; + int64_t Offset1 = CP->getOffset(); + int64_t CombinedOffset = Offset1 + Offset2; + ImmOperand = CurDAG->getTargetConstantPool(CP->getConstVal(), ImmOperand.getValueType(), CP->getAlign(), CombinedOffset, CP->getTargetFlags()); + } + else { + continue; + } + LLVM_DEBUG(dbgs() << "Folding add-immediate into mem-op:\nBase: "); + LLVM_DEBUG(Base->dump(CurDAG)); + LLVM_DEBUG(dbgs() << "\nN: "); + LLVM_DEBUG(N->dump(CurDAG)); + LLVM_DEBUG(dbgs() << "\n"); + if (BaseOpIdx == 0) + CurDAG->UpdateNodeOperands(N, Base.getOperand(0), ImmOperand, N->getOperand(2)); + else + CurDAG->UpdateNodeOperands(N, N->getOperand(0), Base.getOperand(0), ImmOperand, N->getOperand(3)); + if (Base.getNode()->use_empty()) + CurDAG->RemoveDeadNode(Base.getNode()); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a7775f229ef2daf901972a36677bc646ce468e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1,689 @@ +void RISCVDAGToDAGISel::Select(SDNode *Node) { + if (Node->isMachineOpcode()) { + LLVM_DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << "\n"); + Node->setNodeId(-1); + return; + } + unsigned Opcode = Node->getOpcode(); + MVT XLenVT = Subtarget->getXLenVT(); + SDLoc DL(Node); + EVT VT = Node->getValueType(0); + switch (Opcode) { + case ISD::ADD: { + if (auto *ConstOp = dyn_cast(Node->getOperand(1))) { + if (!(ConstOp->hasOneUse())) { + break; + } + int64_t Imm = ConstOp->getSExtValue(); + if (!(-4096 <= Imm && Imm <= -2049) && !(2048 <= Imm && Imm <= 4094)) { + break; + } + EVT VT = Node->getValueType(0); + const SDValue ImmOp0 = CurDAG->getTargetConstant(Imm - Imm / 2, DL, VT); + const SDValue ImmOp1 = CurDAG->getTargetConstant(Imm / 2, DL, VT); + auto *NodeAddi0 = CurDAG->getMachineNode(RISCV::ADDI, DL, VT, + Node->getOperand(0), ImmOp0); + auto *NodeAddi1 = CurDAG->getMachineNode(RISCV::ADDI, DL, VT, + SDValue(NodeAddi0, 0), ImmOp1); + ReplaceNode(Node, NodeAddi1); + return; + } + break; + } + case ISD::Constant: { + auto ConstNode = cast(Node); + if (VT == XLenVT && ConstNode->isNullValue()) { + SDValue New = CurDAG->getCopyFromReg(CurDAG->getEntryNode(), DL, RISCV::X0, XLenVT); + ReplaceNode(Node, New.getNode()); + return; + } + int64_t Imm = ConstNode->getSExtValue(); + if (XLenVT == MVT::i64) { + ReplaceNode(Node, selectImm(CurDAG, DL, Imm, XLenVT)); + return; + } + break; + } + case ISD::FrameIndex: { + SDValue Imm = CurDAG->getTargetConstant(0, DL, XLenVT); + int FI = cast(Node)->getIndex(); + SDValue TFI = CurDAG->getTargetFrameIndex(FI, VT); + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::ADDI, DL, VT, TFI, Imm)); + return; + } + case ISD::INTRINSIC_W_CHAIN: { + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + switch (IntNo) { + default: + break; + case Intrinsic::riscv_vsetvli: { + if (!Subtarget->hasStdExtV()) { + break; + } + assert(Node->getNumOperands() == 5); + RISCVVSEW VSEW = static_cast(Node->getConstantOperandVal(3) & 0x7); + RISCVVLMUL VLMul = static_cast(Node->getConstantOperandVal(4) & 0x7); + unsigned VTypeI = RISCVVType::encodeVTYPE(VLMul, VSEW, true, false); + SDValue VTypeIOp = CurDAG->getTargetConstant(VTypeI, DL, XLenVT); + SDValue VLOperand = Node->getOperand(2); + if (auto *C = dyn_cast(VLOperand)) { + uint64_t AVL = C->getZExtValue(); + if (isUInt<5>(AVL)) { + SDValue VLImm = CurDAG->getTargetConstant(AVL, DL, XLenVT); + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETIVLI, DL, XLenVT, MVT::Other, VLImm, VTypeIOp, Node->getOperand(0))); + return; + } + } + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETVLI, DL, XLenVT, MVT::Other, VLOperand, VTypeIOp, Node->getOperand(0))); + return; + } + case Intrinsic::riscv_vsetvlimax: { + if (!Subtarget->hasStdExtV()) { + break; + } + assert(Node->getNumOperands() == 4); + RISCVVSEW VSEW = static_cast(Node->getConstantOperandVal(2) & 0x7); + RISCVVLMUL VLMul = static_cast(Node->getConstantOperandVal(3) & 0x7); + unsigned VTypeI = RISCVVType::encodeVTYPE(VLMul, VSEW, true, false); + SDValue VTypeIOp = CurDAG->getTargetConstant(VTypeI, DL, XLenVT); + SDValue VLOperand = CurDAG->getRegister(RISCV::X0, XLenVT); + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETVLI, DL, XLenVT, MVT::Other, VLOperand, VTypeIOp, Node->getOperand(0))); + return; + } + case Intrinsic::riscv_vlseg2: + case Intrinsic::riscv_vlseg3: + case Intrinsic::riscv_vlseg4: + case Intrinsic::riscv_vlseg5: + case Intrinsic::riscv_vlseg6: + case Intrinsic::riscv_vlseg7: + case Intrinsic::riscv_vlseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Operands; + Operands.push_back(Node->getOperand(2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3)); + Operands.push_back(Node->getOperand(4)); + } + else { + Operands.push_back(Node->getOperand(3)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vlseg2_mask: + case Intrinsic::riscv_vlseg3_mask: + case Intrinsic::riscv_vlseg4_mask: + case Intrinsic::riscv_vlseg5_mask: + case Intrinsic::riscv_vlseg6_mask: + case Intrinsic::riscv_vlseg7_mask: + case Intrinsic::riscv_vlseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(MaskedOff); + Operands.push_back(Node->getOperand(NF + 2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + Operands.push_back(Node->getOperand(NF + 5)); + } else { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vlsseg2: + case Intrinsic::riscv_vlsseg3: + case Intrinsic::riscv_vlsseg4: + case Intrinsic::riscv_vlsseg5: + case Intrinsic::riscv_vlsseg6: + case Intrinsic::riscv_vlsseg7: + case Intrinsic::riscv_vlsseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Operands; + Operands.push_back(Node->getOperand(2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3)); + Operands.push_back(Node->getOperand(4)); + } + else { + Operands.push_back(Node->getOperand(3)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vlsseg2_mask: + case Intrinsic::riscv_vlsseg3_mask: + case Intrinsic::riscv_vlsseg4_mask: + case Intrinsic::riscv_vlsseg5_mask: + case Intrinsic::riscv_vlsseg6_mask: + case Intrinsic::riscv_vlsseg7_mask: + case Intrinsic::riscv_vlsseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(MaskedOff); + Operands.push_back(Node->getOperand(NF + 2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + Operands.push_back(Node->getOperand(NF + 5)); + } + else { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vloxseg2: + case Intrinsic::riscv_vloxseg3: + case Intrinsic::riscv_vloxseg4: + case Intrinsic::riscv_vloxseg5: + case Intrinsic::riscv_vloxseg6: + case Intrinsic::riscv_vloxseg7: + case Intrinsic::riscv_vloxseg8: + case Intrinsic::riscv_vluxseg2: + case Intrinsic::riscv_vluxseg3: + case Intrinsic::riscv_vluxseg4: + case Intrinsic::riscv_vluxseg5: + case Intrinsic::riscv_vluxseg6: + case Intrinsic::riscv_vluxseg7: + case Intrinsic::riscv_vluxseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SDValue Operands[] = { + Node->getOperand(2), + Node->getOperand(3), + Node->getOperand(4), + SEW, Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(3)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL,VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vloxseg2_mask: + case Intrinsic::riscv_vloxseg3_mask: + case Intrinsic::riscv_vloxseg4_mask: + case Intrinsic::riscv_vloxseg5_mask: + case Intrinsic::riscv_vloxseg6_mask: + case Intrinsic::riscv_vloxseg7_mask: + case Intrinsic::riscv_vloxseg8_mask: + case Intrinsic::riscv_vluxseg2_mask: + case Intrinsic::riscv_vluxseg3_mask: + case Intrinsic::riscv_vluxseg4_mask: + case Intrinsic::riscv_vluxseg5_mask: + case Intrinsic::riscv_vluxseg6_mask: + case Intrinsic::riscv_vluxseg7_mask: + case Intrinsic::riscv_vluxseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SDValue Operands[] = { + MaskedOff, + Node->getOperand(NF + 2), + Node->getOperand(NF + 3), + Node->getOperand(NF + 4), + Node->getOperand(NF + 5), + SEW, + Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(NF + 3)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + } + break; + } + case ISD::INTRINSIC_VOID: { + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + switch (IntNo) { + case Intrinsic::riscv_vsseg2: + case Intrinsic::riscv_vsseg3: + case Intrinsic::riscv_vsseg4: + case Intrinsic::riscv_vsseg5: + case Intrinsic::riscv_vsseg6: + case Intrinsic::riscv_vsseg7: + case Intrinsic::riscv_vsseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 4; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vsseg2_mask: + case Intrinsic::riscv_vsseg3_mask: + case Intrinsic::riscv_vsseg4_mask: + case Intrinsic::riscv_vsseg5_mask: + case Intrinsic::riscv_vsseg6_mask: + case Intrinsic::riscv_vsseg7_mask: + case Intrinsic::riscv_vsseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 5; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + Operands.push_back(Node->getOperand(5 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vssseg2: + case Intrinsic::riscv_vssseg3: + case Intrinsic::riscv_vssseg4: + case Intrinsic::riscv_vssseg5: + case Intrinsic::riscv_vssseg6: + case Intrinsic::riscv_vssseg7: + case Intrinsic::riscv_vssseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 4; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vssseg2_mask: + case Intrinsic::riscv_vssseg3_mask: + case Intrinsic::riscv_vssseg4_mask: + case Intrinsic::riscv_vssseg5_mask: + case Intrinsic::riscv_vssseg6_mask: + case Intrinsic::riscv_vssseg7_mask: + case Intrinsic::riscv_vssseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 5; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + Operands.push_back(Node->getOperand(5 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vsoxseg2: + case Intrinsic::riscv_vsoxseg3: + case Intrinsic::riscv_vsoxseg4: + case Intrinsic::riscv_vsoxseg5: + case Intrinsic::riscv_vsoxseg6: + case Intrinsic::riscv_vsoxseg7: + case Intrinsic::riscv_vsoxseg8: + case Intrinsic::riscv_vsuxseg2: + case Intrinsic::riscv_vsuxseg3: + case Intrinsic::riscv_vsuxseg4: + case Intrinsic::riscv_vsuxseg5: + case Intrinsic::riscv_vsuxseg6: + case Intrinsic::riscv_vsuxseg7: + case Intrinsic::riscv_vsuxseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 5; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SDValue Operands[] = { + StoreVal, + Node->getOperand(2 + NF), + Node->getOperand(3 + NF), + Node->getOperand(4 + NF), + SEW, + Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(3 + NF)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vsoxseg2_mask: + case Intrinsic::riscv_vsoxseg3_mask: + case Intrinsic::riscv_vsoxseg4_mask: + case Intrinsic::riscv_vsoxseg5_mask: + case Intrinsic::riscv_vsoxseg6_mask: + case Intrinsic::riscv_vsoxseg7_mask: + case Intrinsic::riscv_vsoxseg8_mask: + case Intrinsic::riscv_vsuxseg2_mask: + case Intrinsic::riscv_vsuxseg3_mask: + case Intrinsic::riscv_vsuxseg4_mask: + case Intrinsic::riscv_vsuxseg5_mask: + case Intrinsic::riscv_vsuxseg6_mask: + case Intrinsic::riscv_vsuxseg7_mask: + case Intrinsic::riscv_vsuxseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 6; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SDValue Operands[] = { + StoreVal, + Node->getOperand(2 + NF), + Node->getOperand(3 + NF), + Node->getOperand(4 + NF), + Node->getOperand(5 + NF), + SEW, + Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(3 + NF)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + } + break; + } + case RISCVISD::VLSEGFF: { + SDLoc DL(Node); + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + unsigned NF = Node->getNumValues() - 2; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Operands; + Operands.push_back(Node->getOperand(2)); + Operands.push_back(Node->getOperand(3)); + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, MVT::Glue, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + ReplaceUses(SDValue(Node, NF + 1), SDValue(Load, 2)); + CurDAG->RemoveDeadNode(Node); + return; + } + case RISCVISD::VLSEGFF_MASK: { + SDLoc DL(Node); + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + unsigned NF = Node->getNumValues() - 2; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(MaskedOff); + Operands.push_back(Node->getOperand(NF + 2)); + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, MVT::Glue, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); // Chain. + ReplaceUses(SDValue(Node, NF + 1), SDValue(Load, 2)); // Glue. + CurDAG->RemoveDeadNode(Node); + return; + } + case ISD::LOAD: { + LoadSDNode *Load = cast(Node); + if (Load->getAddressingMode() == ISD::UNINDEXED) + break; + SDValue Chain = Node->getOperand(0); + SDValue Base = Node->getOperand(1); + SDValue Offset = Node->getOperand(2); + bool simm12 = false; + bool signExtend = Load->getExtensionType() == ISD::SEXTLOAD; + if(auto ConstantOffset = dyn_cast(Offset)) { + int ConstantVal = ConstantOffset->getSExtValue(); + simm12 = isInt<12>(ConstantVal); + if (simm12) + Offset = CurDAG->getTargetConstant(ConstantVal, DL, Offset.getValueType()); + } + unsigned Opcode = 0; + switch (Load->getMemoryVT().getSimpleVT().SimpleTy) { + case MVT::i8: + if ( simm12 && signExtend) Opcode = RISCV::P_LB_ri_PostIncrement; + else if ( simm12 && !signExtend) Opcode = RISCV::P_LBU_ri_PostIncrement; + else if (!simm12 && signExtend) Opcode = RISCV::P_LB_rr_PostIncrement; + else Opcode = RISCV::P_LBU_rr_PostIncrement; + break; + case MVT::i16: + if ( simm12 && signExtend) Opcode = RISCV::P_LH_ri_PostIncrement; + else if ( simm12 && !signExtend) Opcode = RISCV::P_LHU_ri_PostIncrement; + else if (!simm12 && signExtend) Opcode = RISCV::P_LH_rr_PostIncrement; + else Opcode = RISCV::P_LHU_rr_PostIncrement; + break; + case MVT::i32: + if (simm12) Opcode = RISCV::P_LW_ri_PostIncrement; + else Opcode = RISCV::P_LW_rr_PostIncrement; + default: break; + } + if (!Opcode) break; + ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, MVT::i32, MVT::i32, Chain.getSimpleValueType(), Base, Offset, Chain)); + return; + } + case ISD::VECTOR_SHUFFLE: { + ShuffleVectorSDNode *Shuffle = cast(Node); + SDValue Vec0 = Shuffle->getOperand(0); + SDValue Vec1 = Shuffle->getOperand(1); + unsigned Opcode; + int imm; + if (Vec1->getOpcode() == ISD::UNDEF) { + if (VT == MVT::v2i16) { + Opcode = RISCV::PV_SHUFFLE_SCI_H; + imm = (Shuffle->getMaskElt(1) & 1) << 1; + imm |= Shuffle->getMaskElt(0) & 1; + } + else { + switch (Shuffle->getMaskElt(3)) { + default: + case 0: Opcode = RISCV::PV_SHUFFLEI0_SCI_B; break; + case 1: Opcode = RISCV::PV_SHUFFLEI1_SCI_B; break; + case 2: Opcode = RISCV::PV_SHUFFLEI2_SCI_B; break; + case 3: Opcode = RISCV::PV_SHUFFLEI3_SCI_B; break; + } + imm = (Shuffle->getMaskElt(2) & 3) << 4; + imm |= (Shuffle->getMaskElt(1) & 3) << 2; + imm |= Shuffle->getMaskElt(0) & 3; + } + SDValue Imm = CurDAG->getTargetConstant(imm, SDLoc(Node), MVT::i32); + ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, VT, Vec0, Imm)); + return; + } + if (VT == MVT::v2i16) { + Opcode = RISCV::PV_SHUFFLE2_H; + imm = (Shuffle->getMaskElt(1) & 1) << 16; + imm |= Shuffle->getMaskElt(0) & 1; + } + else { + Opcode = RISCV::PV_SHUFFLE2_B; + imm = (Shuffle->getMaskElt(3) & 3) << 24; + imm |= (Shuffle->getMaskElt(2) & 3) << 16; + imm |= (Shuffle->getMaskElt(1) & 3) << 8; + imm |= Shuffle->getMaskElt(0) & 3; + } + SDValue Imm = SDValue(selectImm(CurDAG, DL, imm, MVT::i32), 0); + ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, VT, Vec0, Vec1, Imm)); + return; + } + } + SelectCode(Node); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9379dd240442854fd152c1a8fed8a2b885473a0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp @@ -0,0 +1,7 @@ +bool RISCVDAGToDAGISel::SelectAddrFI(SDValue Addr, SDValue &Base) { + if (auto FIN = dyn_cast(Addr)) { + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), Subtarget->getXLenVT()); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..165beb5cae4ca44de1b3b5882179fb69421c957b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,13 @@ +bool RISCVDAGToDAGISel::SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, std::vector &OutOps) { + switch (ConstraintID) { + case InlineAsm::Constraint_m: + OutOps.push_back(Op); + return false; + case InlineAsm::Constraint_A: + OutOps.push_back(Op); + return false; + default: + break; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6275786f621741ef641c1c9653dfc8c1c5fb094 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createRISCVISelDag(RISCVTargetMachine &TM) { + return new RISCVDAGToDAGISel(TM); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b96cb682522bb4d42ce3557a54892030e1538f48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "RISCV DAG->DAG Pattern Instruction Selection"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5777ae33b7d6e056d8705bec6b95c6237351d2ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp @@ -0,0 +1,4 @@ +bool runOnMachineFunction(MachineFunction &MF) override { + Subtarget = &MF.getSubtarget(); + return SelectionDAGISel::runOnMachineFunction(MF); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..02f2a0b029e45085011587a91e97581811fcfce9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp @@ -0,0 +1,22 @@ +bool RISCVDAGToDAGISel::selectVLOp(SDValue N, SDValue &VL) { + auto *C = dyn_cast(N); + if (C && C->isNullValue()) { + RISCVMatInt::InstSeq Seq; + RISCVMatInt::generateInstSeq(Imm, XLenVT == MVT::i64, Seq); + SDNode *Result = nullptr; + SDValue SrcReg = CurDAG->getRegister(RISCV::X0, XLenVT); + for (RISCVMatInt::Inst &Inst : Seq) { + SDValue SDImm = CurDAG->getTargetConstant(Inst.Imm, DL, XLenVT); + if (Inst.Opc == RISCV::LUI) + Result = CurDAG->getMachineNode(RISCV::LUI, DL, XLenVT, SDImm); + else + Result = CurDAG->getMachineNode(Inst.Opc, DL, XLenVT, SrcReg, SDImm); + SrcReg = SDValue(Result, 0); + } + VL = SDValue(selectImm(CurDAG, SDLoc(N), 0, Subtarget->getXLenVT()), 0); + } + else { + VL = N; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..500365156eb27b9ec53e3c54d7bd31402e02bb80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp @@ -0,0 +1,7 @@ +bool RISCVDAGToDAGISel::selectVSplat(SDValue N, SDValue &SplatVal) { + if (N.getOpcode() != ISD::SPLAT_VECTOR && N.getOpcode() != RISCVISD::SPLAT_VECTOR_I64) { + return false; + } + SplatVal = N.getOperand(0); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f19416c4249c3fa0ba66fedcff7a3e7eb734fdb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp @@ -0,0 +1,17 @@ +bool RISCVDAGToDAGISel::selectVSplatSimm5(SDValue N, SDValue &SplatVal) { + if ((N.getOpcode() != ISD::SPLAT_VECTOR && N.getOpcode() != RISCVISD::SPLAT_VECTOR_I64) || !isa(N.getOperand(0))) { + return false; + } + int64_t SplatImm = cast(N.getOperand(0))->getSExtValue(); + auto XLenVT = Subtarget->getXLenVT(); + assert(XLenVT == N.getOperand(0).getSimpleValueType() && "Unexpected splat operand type"); + auto EltVT = N.getValueType().getVectorElementType(); + if (EltVT.bitsLT(XLenVT)) { + SplatImm = SignExtend64(SplatImm, EltVT.getSizeInBits()); + } + if (!isInt<5>(SplatImm)) { + return false; + } + SplatVal = CurDAG->getTargetConstant(SplatImm, SDLoc(N), XLenVT); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdff0c6f5dc1586897ad9c7787e6a82ee582e996 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp @@ -0,0 +1,11 @@ +bool RISCVDAGToDAGISel::selectVSplatUimm5(SDValue N, SDValue &SplatVal) { + if ((N.getOpcode() != ISD::SPLAT_VECTOR && N.getOpcode() != RISCVISD::SPLAT_VECTOR_I64) || !isa(N.getOperand(0))) { + return false; + } + int64_t SplatImm = cast(N.getOperand(0))->getSExtValue(); + if (!isUInt<5>(SplatImm)) { + return false; + } + SplatVal = CurDAG->getTargetConstant(SplatImm, SDLoc(N), Subtarget->getXLenVT()); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..313f69ae69dddca02aef0b43936b47304afc7ae2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,171 @@ +bool RISCVTargetLowering::CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg, const SmallVectorImpl &Outs, LLVMContext &Context) const { + SmallVector RVLocs; + CCState CCInfo(CallConv, IsVarArg, MF, RVLocs, Context); + Optional FirstMaskArgument; + if (Subtarget.hasStdExtV()) { + for (const auto &ArgIdx : enumerate(Args)) { + MVT ArgVT = ArgIdx.value().VT; + if (ArgVT.isScalableVector() && ArgVT.getVectorElementType().SimpleTy == MVT::i1) + return ArgIdx.index(); + } + return None; + } + for (unsigned i = 0, e = Outs.size(); i != e; ++i) { + MVT VT = Outs[i].VT; + ISD::ArgFlagsTy ArgFlags = Outs[i].Flags; + RISCVABI::ABI ABI = MF.getSubtarget().getTargetABI(); + unsigned XLen = DL.getLargestLegalIntTypeSizeInBits(); + assert(XLen == 32 || XLen == 64); + MVT XLenVT = XLen == 32 ? MVT::i32 : MVT::i64; + if (IsRet && ValNo > 1) + return true; + bool UseGPRForF16_F32 = true; + bool UseGPRForF64 = true; + switch (ABI) { + default: + llvm_unreachable("Unexpected ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + break; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + UseGPRForF16_F32 = !IsFixed; + break; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + UseGPRForF16_F32 = !IsFixed; + UseGPRForF64 = !IsFixed; + break; + } + if (State.getFirstUnallocated(ArgFPR32s) == array_lengthof(ArgFPR32s)) { + UseGPRForF16_F32 = true; + UseGPRForF64 = true; + } + if (UseGPRForF16_F32 && (ValVT == MVT::f16 || ValVT == MVT::f32)) { + LocVT = XLenVT; + LocInfo = CCValAssign::BCvt; + } + else if (UseGPRForF64 && XLen == 64 && ValVT == MVT::f64) { + LocVT = MVT::i64; + LocInfo = CCValAssign::BCvt; + } + unsigned TwoXLenInBytes = (2 * XLen) / 8; + if (!IsFixed && ArgFlags.getNonZeroOrigAlign() == TwoXLenInBytes && DL.getTypeAllocSize(OrigTy) == TwoXLenInBytes) { + unsigned RegIdx = State.getFirstUnallocated(ArgGPRs); + if (RegIdx != array_lengthof(ArgGPRs) && RegIdx % 2 == 1) + State.AllocateReg(ArgGPRs); + } + SmallVectorImpl &PendingLocs = State.getPendingLocs(); + SmallVectorImpl &PendingArgFlags = State.getPendingArgFlags(); + assert(PendingLocs.size() == PendingArgFlags.size() && "PendingLocs and PendingArgFlags out of sync"); + if (UseGPRForF64 && XLen == 32 && ValVT == MVT::f64) { + assert(!ArgFlags.isSplit() && PendingLocs.empty() && "Can't lower f64 if it is split"); + Register Reg = State.AllocateReg(ArgGPRs); + LocVT = MVT::i32; + if (!Reg) { + unsigned StackOffset = State.AllocateStack(8, Align(8)); + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + if (!State.AllocateReg(ArgGPRs)) + State.AllocateStack(4, Align(4)); + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ArgFlags.isSplit() || !PendingLocs.empty()) { + LocVT = XLenVT; + LocInfo = CCValAssign::Indirect; + PendingLocs.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); + PendingArgFlags.push_back(ArgFlags); + if (!ArgFlags.isSplitEnd()) { + return false; + } + } + if (ArgFlags.isSplitEnd() && PendingLocs.size() <= 2) { + assert(PendingLocs.size() == 2 && "Unexpected PendingLocs.size()"); + CCValAssign VA = PendingLocs[0]; + ISD::ArgFlagsTy AF = PendingArgFlags[0]; + PendingLocs.clear(); + PendingArgFlags.clear(); + unsigned XLenInBytes = XLen / 8; + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(VA1.getValNo(), VA1.getValVT(), Reg, VA1.getLocVT(), CCValAssign::Full)); + } else { + Align StackAlign = std::max(Align(XLenInBytes), ArgFlags1.getNonZeroOrigAlign()); + State.addLoc(CCValAssign::getMem(VA1.getValNo(), VA1.getValVT(), State.AllocateStack(XLenInBytes, StackAlign), VA1.getLocVT(), CCValAssign::Full)); + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + return false; + } + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(ValNo2, ValVT2, Reg, LocVT2, CCValAssign::Full)); + } + else { + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + } + return false; + } + Register Reg; + if (ValVT == MVT::f16 && !UseGPRForF16_F32) + Reg = State.AllocateReg(ArgFPR16s); + else if (ValVT == MVT::f32 && !UseGPRForF16_F32) + Reg = State.AllocateReg(ArgFPR32s); + else if (ValVT == MVT::f64 && !UseGPRForF64) + Reg = State.AllocateReg(ArgFPR64s); + else if (ValVT.isScalableVector()) { + const TargetRegisterClass *RC = TLI.getRegClassFor(ValVT); + if (RC == &RISCV::VRRegClass) { + if (FirstMaskArgument.hasValue() && ValNo == FirstMaskArgument.getValue()) { + Reg = State.AllocateReg(RISCV::V0); + } + else { + Reg = State.AllocateReg(ArgVRs); + } + } + else if (RC == &RISCV::VRM2RegClass) { + Reg = State.AllocateReg(ArgVRM2s); + } + else if (RC == &RISCV::VRM4RegClass) { + Reg = State.AllocateReg(ArgVRM4s); + } + else if (RC == &RISCV::VRM8RegClass) { + Reg = State.AllocateReg(ArgVRM8s); + } + else { + llvm_unreachable("Unhandled class register for ValueType"); + } + if (!Reg) { + LocInfo = CCValAssign::Indirect; + Reg = State.AllocateReg(ArgGPRs); + LocVT = XLenVT; + } + } else + Reg = State.AllocateReg(ArgGPRs); + unsigned StackOffset = Reg ? 0 : State.AllocateStack(XLen / 8, Align(XLen / 8)); + if (!PendingLocs.empty()) { + assert(ArgFlags.isSplitEnd() && "Expected ArgFlags.isSplitEnd()"); + assert(PendingLocs.size() > 2 && "Unexpected PendingLocs.size()"); + for (auto &It : PendingLocs) { + if (Reg) + It.convertToReg(Reg); + else + It.convertToMem(StackOffset); + State.addLoc(It); + } + PendingLocs.clear(); + PendingArgFlags.clear(); + return false; + } + assert((!UseGPRForF16_F32 || !UseGPRForF64 || LocVT == XLenVT || (TLI.getSubtarget().hasStdExtV() && ValVT.isScalableVector())) && "Expected an XLenVT or scalable vector types at this stage"); + if (Reg) { + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ValVT.isFloatingPoint()) { + LocVT = ValVT; + LocInfo = CCValAssign::Full; + } + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63f9dcd4bfa99711bec59e8db8683e30194ac2a1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp @@ -0,0 +1,45 @@ +unsigned RISCVTargetLowering::ComputeNumSignBitsForTargetNode(SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth) const { + if (Op.getOpcode() == RISCVISD::SLLW) { + return Op.getScalarValueSizeInBits(); + } + if (Op.getOpcode() == RISCVISD::SRAW) { + return Op.getScalarValueSizeInBits(); + } + if (Op.getOpcode() == RISCVISD::SRLW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::DIVW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::DIVUW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::REMUW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::ROLW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::RORW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::GREVIW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::GORCIW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::FSLW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::FSRW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::VMV_X_S) { + if (Op.getOperand(0).getScalarValueSizeInBits() > Subtarget.getXLen()) { + return 1; + } + return Subtarget.getXLen() - Op.getOperand(0).getScalarValueSizeInBits() + 1; + } + return 1; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..78f8c6ed2abbddd3aa2e311bcd887beaf74bc0ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,165 @@ +MachineBasicBlock *RISCVTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *BB) const { + uint64_t TSFlags = MI.getDesc().TSFlags; + if (TSFlags & RISCVII::HasSEWOpMask) { + unsigned NumOperands = MI.getNumExplicitOperands(); + int VLIndex = (TSFlags & RISCVII::HasVLOpMask) ? NumOperands - 2 : -1; + unsigned SEWIndex = NumOperands - 1; + bool WritesElement0 = TSFlags & RISCVII::WritesElement0Mask; + RISCVVLMUL VLMul = static_cast((TSFlags & RISCVII::VLMulMask) >> RISCVII::VLMulShift); + MachineFunction &MF = *BB->getParent(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); + unsigned SEW = MI.getOperand(SEWIndex).getImm(); + assert(RISCVVType::isValidSEW(SEW) && "Unexpected SEW"); + RISCVVSEW ElementWidth = static_cast(Log2_32(SEW / 8)); + MachineRegisterInfo &MRI = MF.getRegInfo(); + MachineInstrBuilder MIB = BuildMI(*BB, MI, DL, TII.get(RISCV::PseudoVSETVLI)); + if (VLIndex >= 0) { + Register DestReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + MIB.addReg(DestReg, RegState::Define | RegState::Dead).addReg(MI.getOperand(VLIndex).getReg()); + } + else + MIB.addReg(RISCV::X0, RegState::Define | RegState::Dead).addReg(RISCV::X0, RegState::Kill); + bool TailAgnostic = true; + unsigned UseOpIdx; + if (MI.isRegTiedToUseOperand(0, &UseOpIdx) && !WritesElement0) { + TailAgnostic = false; + const MachineOperand &UseMO = MI.getOperand(UseOpIdx); + MachineInstr *UseMI = MRI.getVRegDef(UseMO.getReg()); + if (UseMI && UseMI->isImplicitDef()) + TailAgnostic = true; + } + unsigned VLMULBits = static_cast(VLMUL); + unsigned VSEWBits = static_cast(VSEW); + unsigned VTypeI = (VSEWBits << 3) | (VLMULBits & 0x7); + if (TailAgnostic) + VTypeI |= 0x40; + if (MaskAgnostic) + VTypeI |= 0x80; + MIB.addImm(RISCVVType::encodeVTYPE(VLMul, ElementWidth, TailAgnostic, false)); + MI.getOperand(SEWIndex).setImm(-1); + if (VLIndex >= 0) { + MI.getOperand(VLIndex).setReg(RISCV::NoRegister); + MI.getOperand(VLIndex).setIsKill(false); + } + } + switch (MI.getOpcode()) { + default: + llvm_unreachable("Unexpected instr type to insert"); + case RISCV::ReadCycleWide: + assert(!Subtarget.is64Bit() && "ReadCycleWrite is only to be used on riscv32"); + assert(MI.getOpcode() == RISCV::ReadCycleWide && "Unexpected instruction"); + MachineFunction &MF = *BB->getParent(); + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + MachineFunction::iterator It = ++BB->getIterator(); + MachineBasicBlock *LoopMBB = MF.CreateMachineBasicBlock(LLVM_BB); + MF.insert(It, LoopMBB); + MachineBasicBlock *DoneMBB = MF.CreateMachineBasicBlock(LLVM_BB); + MF.insert(It, DoneMBB); + DoneMBB->splice(DoneMBB->begin(), BB, std::next(MachineBasicBlock::iterator(MI)), BB->end()); + DoneMBB->transferSuccessorsAndUpdatePHIs(BB); + BB->addSuccessor(LoopMBB); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + Register ReadAgainReg = RegInfo.createVirtualRegister(&RISCV::GPRRegClass); + Register LoReg = MI.getOperand(0).getReg(); + Register HiReg = MI.getOperand(1).getReg(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo(); + BuildMI(LoopMBB, DL, TII->get(RISCV::CSRRS), HiReg).addImm(RISCVSysReg::lookupSysRegByName("CYCLEH")->Encoding).addReg(RISCV::X0); + BuildMI(LoopMBB, DL, TII->get(RISCV::CSRRS), LoReg).addImm(RISCVSysReg::lookupSysRegByName("CYCLE")->Encoding).addReg(RISCV::X0); + BuildMI(LoopMBB, DL, TII->get(RISCV::CSRRS), ReadAgainReg).addImm(RISCVSysReg::lookupSysRegByName("CYCLEH")->Encoding).addReg(RISCV::X0); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(HiReg).addReg(ReadAgainReg).addMBB(LoopMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + MI.eraseFromParent(); + return DoneMBB; + case RISCV::Select_GPR_Using_CC_GPR: + case RISCV::Select_FPR16_Using_CC_GPR: + case RISCV::Select_FPR32_Using_CC_GPR: + case RISCV::Select_FPR64_Using_CC_GPR: + and(2).getReg() != RHS || SequenceMBBI->getOperand(3).getImm() != CC || SelectDests.count(SequenceMBBI->getOperand(4).getReg()) || SelectDests.count(SequenceMBBI->getOperand(5).getReg())) + break; + LastSelectPseudo = &*SequenceMBBI; + SequenceMBBI->collectDebugValues(SelectDebugValues); + SelectDests.insert(SequenceMBBI->getOperand(0).getReg()); + else { + if (SequenceMBBI->hasUnmodeledSideEffects() || SequenceMBBI->mayLoadOrStore()) + break; + if (llvm::any_of(SequenceMBBI->operands(), [&](MachineOperand &MO) { + return MO.isReg() && MO.isUse() && SelectDests.count(MO.getReg()); + })) + break; + } + const TargetInstrInfo &TII = *BB->getParent()->getSubtarget().getInstrInfo(); + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + DebugLoc DL = MI.getDebugLoc(); + MachineFunction::iterator I = ++BB->getIterator(); + MachineBasicBlock *HeadMBB = BB; + MachineFunction *F = BB->getParent(); + MachineBasicBlock *TailMBB = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *IfFalseMBB = F->CreateMachineBasicBlock(LLVM_BB); + F->insert(I, IfFalseMBB); + F->insert(I, TailMBB); + for (MachineInstr *DebugInstr : SelectDebugValues) { + TailMBB->push_back(DebugInstr->removeFromParent()); + } + TailMBB->splice(TailMBB->end(), HeadMBB, std::next(LastSelectPseudo->getIterator()), HeadMBB->end()); + TailMBB->transferSuccessorsAndUpdatePHIs(HeadMBB); + HeadMBB->addSuccessor(IfFalseMBB); + HeadMBB->addSuccessor(TailMBB); + unsigned Opcode = getBranchOpcodeForIntCondCode(CC); + BuildMI(HeadMBB, DL, TII.get(Opcode)).addReg(LHS).addReg(RHS).addMBB(TailMBB); + IfFalseMBB->addSuccessor(TailMBB); + auto SelectMBBI = MI.getIterator(); + auto SelectEnd = std::next(LastSelectPseudo->getIterator()); + auto InsertionPoint = TailMBB->begin(); + while (SelectMBBI != SelectEnd) { + auto Next = std::next(SelectMBBI); + if (isSelectPseudo(*SelectMBBI)) { + BuildMI(*TailMBB, InsertionPoint, SelectMBBI->getDebugLoc(), TII.get(RISCV::PHI), SelectMBBI->getOperand(0).getReg()).addReg(SelectMBBI->getOperand(4).getReg()).addMBB(HeadMBB).addReg(SelectMBBI->getOperand(5).getReg()).addMBB(IfFalseMBB); + SelectMBBI->eraseFromParent(); + } + SelectMBBI = Next; + } + F->getProperties().reset(MachineFunctionProperties::Property::NoPHIs); + return TailMBB; + case RISCV::BuildPairF64Pseudo: + assert(MI.getOpcode() == RISCV::BuildPairF64Pseudo && "Unexpected instruction"); + MachineFunction &MF = *BB->getParent(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); + const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); + Register DstReg = MI.getOperand(0).getReg(); + Register LoReg = MI.getOperand(1).getReg(); + Register HiReg = MI.getOperand(2).getReg(); + const TargetRegisterClass *DstRC = &RISCV::FPR64RegClass; + int FI = MF.getInfo()->getMoveF64FrameIndex(MF); + MachinePointerInfo MPI = MachinePointerInfo::getFixedStack(MF, FI); + MachineMemOperand *MMOLo = MF.getMachineMemOperand(MPI, MachineMemOperand::MOStore, 4, Align(8)); + MachineMemOperand *MMOHi = MF.getMachineMemOperand(MPI.getWithOffset(4), MachineMemOperand::MOStore, 4, Align(8)); + BuildMI(*BB, MI, DL, TII.get(RISCV::SW)).addReg(LoReg, getKillRegState(MI.getOperand(1).isKill())).addFrameIndex(FI).addImm(0).addMemOperand(MMOLo); + BuildMI(*BB, MI, DL, TII.get(RISCV::SW)).addReg(HiReg, getKillRegState(MI.getOperand(2).isKill())).addFrameIndex(FI).addImm(4).addMemOperand(MMOHi); + TII.loadRegFromStackSlot(*BB, MI, DstReg, FI, DstRC, RI); + MI.eraseFromParent(); + return BB; + case RISCV::SplitF64Pseudo: + assert(MI.getOpcode() == RISCV::SplitF64Pseudo && "Unexpected instruction");= + MachineFunction &MF = *BB->getParent(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); + const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); + Register LoReg = MI.getOperand(0).getReg(); + Register HiReg = MI.getOperand(1).getReg(); + Register SrcReg = MI.getOperand(2).getReg(); + const TargetRegisterClass *SrcRC = &RISCV::FPR64RegClass; + int FI = MF.getInfo()->getMoveF64FrameIndex(MF); + TII.storeRegToStackSlot(*BB, MI, SrcReg, MI.getOperand(2).isKill(), FI, SrcRC, RI); + MachinePointerInfo MPI = MachinePointerInfo::getFixedStack(MF, FI); + MachineMemOperand *MMOLo = MF.getMachineMemOperand(MPI, MachineMemOperand::MOLoad, 4, Align(8)); + MachineMemOperand *MMOHi = MF.getMachineMemOperand( PI.getWithOffset(4), MachineMemOperand::MOLoad, 4, Align(8)); + BuildMI(*BB, MI, DL, TII.get(RISCV::LW), LoReg).addFrameIndex(FI).addImm(0).addMemOperand(MMOLo); + BuildMI(*BB, MI, DL, TII.get(RISCV::LW), HiReg).addFrameIndex(FI).addImm(4).addMemOperand(MMOHi); + MI.eraseFromParent(); + return BB; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3120cdc9e0247fc2f5bbeaa81b831c974641b9fe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp @@ -0,0 +1,34 @@ +void RISCVTargetLowering::LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector &Ops, SelectionDAG &DAG) const { + SDLoc DL(Op); + MVT XLenVT = Subtarget.getXLenVT(); + if (Constraint.length() == 1) { + if (Constraint[0] == 'I') { + if (auto *C = dyn_cast(Op)) { + uint64_t Val = C->getSExtValue(); + if (isInt<12>(Val)) { + Ops.push_back(DAG.getTargetConstant(Val, DL, XLenVT)); + } + } + return ; + } + if (Constraint[0] == 'J') { + if (auto *C = dyn_cast(Op)) { + uint64_t Val = C->getSExtValue(); + if (Val == 0) { + Ops.push_back(DAG.getTargetConstant(0, DL, XLenVT)); + } + } + return ; + } + if (Constraint[0] == 'K') { + if (auto *C = dyn_cast(Op)) { + uint64_t Val = C->getSExtValue(); + if (isUInt<5>(Val)) { + Ops.push_back(DAG.getTargetConstant(Val, DL, XLenVT)); + } + } + return ; + } + } + TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97d4a427e101d5f49d5240064ece9c020a72ab75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering::lowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { + BlockAddressSDNode *N = cast(Op); + return getAddr(N, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7af74735e1d7dc1c5b685944c4694f244897d869 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,197 @@ +SDValue RISCVTargetLowering::LowerCall(CallLoweringInfo &CLI, SmallVectorImpl &InVals) const { + SelectionDAG &DAG = CLI.DAG; + SDLoc &DL = CLI.DL; + SmallVectorImpl &Outs = CLI.Outs; + SmallVectorImpl &OutVals = CLI.OutVals; + SmallVectorImpl &Ins = CLI.Ins; + SDValue Chain = CLI.Chain; + SDValue Callee = CLI.Callee; + bool &IsTailCall = CLI.IsTailCall; + CallingConv::ID CallConv = CLI.CallConv; + bool IsVarArg = CLI.IsVarArg; + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + MVT XLenVT = Subtarget.getXLenVT(); + MachineFunction &MF = DAG.getMachineFunction(); + SmallVector ArgLocs; + CCState ArgCCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext()); + if (CallConv == CallingConv::Fast) + ArgCCInfo.AnalyzeCallOperands(Outs, CC_RISCV_FastCC); + else if (CallConv == CallingConv::GHC) + ArgCCInfo.AnalyzeCallOperands(Outs, CC_RISCV_GHC); + else + analyzeOutputArgs(MF, ArgCCInfo, Outs, false, &CLI); + if (IsTailCall) + IsTailCall = isEligibleForTailCallOptimization(ArgCCInfo, CLI, MF, ArgLocs); + if (IsTailCall) + ++NumTailCalls; + else if (CLI.CB && CLI.CB->isMustTailCall()) + report_fatal_error("failed to perform tail call elimination on a call site marked musttail"); + unsigned NumBytes = ArgCCInfo.getNextStackOffset(); + SmallVector ByValArgs; + for (unsigned i = 0, e = Outs.size(); i != e; ++i) { + ISD::ArgFlagsTy Flags = Outs[i].Flags; + if (!Flags.isByVal()) + continue; + SDValue Arg = OutVals[i]; + unsigned Size = Flags.getByValSize(); + Align Alignment = Flags.getNonZeroByValAlign(); + int FI = MF.getFrameInfo().CreateStackObject(Size, Alignment, false); + SDValue FIPtr = DAG.getFrameIndex(FI, getPointerTy(DAG.getDataLayout())); + SDValue SizeNode = DAG.getConstant(Size, DL, XLenVT); + Chain = DAG.getMemcpy(Chain, DL, FIPtr, Arg, SizeNode, Alignment, false, false, IsTailCall, MachinePointerInfo(), MachinePointerInfo()); + ByValArgs.push_back(FIPtr); + } + if (!IsTailCall) + Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, CLI.DL); + SmallVector, 8> RegsToPass; + SmallVector MemOpChains; + SDValue StackPtr; + for (unsigned i = 0, j = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + SDValue ArgValue = OutVals[i]; + ISD::ArgFlagsTy Flags = Outs[i].Flags; + bool IsF64OnRV32DSoftABI = VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64; + if (IsF64OnRV32DSoftABI && VA.isRegLoc()) { + SDValue SplitF64 = DAG.getNode(RISCVISD::SplitF64, DL, DAG.getVTList(MVT::i32, MVT::i32), ArgValue); + SDValue Lo = SplitF64.getValue(0); + SDValue Hi = SplitF64.getValue(1); + Register RegLo = VA.getLocReg(); + RegsToPass.push_back(std::make_pair(RegLo, Lo)); + if (RegLo == RISCV::X17) { + if (!StackPtr.getNode()) + StackPtr = DAG.getCopyFromReg(Chain, DL, RISCV::X2, PtrVT); + MemOpChains.push_back(DAG.getStore(Chain, DL, Hi, StackPtr, MachinePointerInfo())); + } + else { + assert(RegLo < RISCV::X31 && "Invalid register pair"); + Register RegHigh = RegLo + 1; + RegsToPass.push_back(std::make_pair(RegHigh, Hi)); + } + continue; + } + if (VA.getLocInfo() == CCValAssign::Indirect) { + SDValue SpillSlot = DAG.CreateStackTemporary(Outs[i].ArgVT); + int FI = cast(SpillSlot)->getIndex(); + MemOpChains.push_back(DAG.getStore(Chain, DL, ArgValue, SpillSlot, MachinePointerInfo::getFixedStack(MF, FI))); + unsigned ArgIndex = Outs[i].OrigArgIndex; + assert(Outs[i].PartOffset == 0); + while (i + 1 != e && Outs[i + 1].OrigArgIndex == ArgIndex) { + SDValue PartValue = OutVals[i + 1]; + unsigned PartOffset = Outs[i + 1].PartOffset; + SDValue Address = DAG.getNode(ISD::ADD, DL, PtrVT, SpillSlot, DAG.getIntPtrConstant(PartOffset, DL)); + MemOpChains.push_back(DAG.getStore(Chain, DL, PartValue, Address, MachinePointerInfo::getFixedStack(MF, FI))); + ++i; + } + ArgValue = SpillSlot; + } + else { + EVT LocVT = VA.getLocVT(); + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTH, DL, VA.getLocVT(), Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, LocVT, Val); + break; + } + ArgValue = Val; + } + if (Flags.isByVal()) + ArgValue = ByValArgs[j++]; + if (VA.isRegLoc()) { + RegsToPass.push_back(std::make_pair(VA.getLocReg(), ArgValue)); + } + else { + assert(VA.isMemLoc() && "Argument not register or memory"); + assert(!IsTailCall && "Tail call not allowed if stack is used for passing parameters"); + if (!StackPtr.getNode()) + StackPtr = DAG.getCopyFromReg(Chain, DL, RISCV::X2, PtrVT); + SDValue Address = DAG.getNode(ISD::ADD, DL, PtrVT, StackPtr, DAG.getIntPtrConstant(VA.getLocMemOffset(), DL)); + MemOpChains.push_back(DAG.getStore(Chain, DL, ArgValue, Address, MachinePointerInfo())); + } + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, MemOpChains); + SDValue Glue; + for (auto &Reg : RegsToPass) { + Chain = DAG.getCopyToReg(Chain, DL, Reg.first, Reg.second, Glue); + Glue = Chain.getValue(1); + } + validateCCReservedRegs(RegsToPass, MF); + if (!IsTailCall && MF.getSubtarget().isRegisterReservedByUser(RISCV::X1)) + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Return address register required, but has been reserved."}); + if (GlobalAddressSDNode *S = dyn_cast(Callee)) { + const GlobalValue *GV = S->getGlobal(); + unsigned OpFlags = RISCVII::MO_CALL; + if (!getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV)) + OpFlags = RISCVII::MO_PLT; + Callee = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, OpFlags); + } + else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { + unsigned OpFlags = RISCVII::MO_CALL; + if (!getTargetMachine().shouldAssumeDSOLocal(*MF.getFunction().getParent(), nullptr)) + OpFlags = RISCVII::MO_PLT; + Callee = DAG.getTargetExternalSymbol(S->getSymbol(), PtrVT, OpFlags); + } + SmallVector Ops; + Ops.push_back(Chain); + Ops.push_back(Callee); + for (auto &Reg : RegsToPass) + Ops.push_back(DAG.getRegister(Reg.first, Reg.second.getValueType())); + if (!IsTailCall) { + const TargetRegisterInfo *TRI = Subtarget.getRegisterInfo(); + const uint32_t *Mask = TRI->getCallPreservedMask(MF, CallConv); + assert(Mask && "Missing call preserved mask for calling convention"); + Ops.push_back(DAG.getRegisterMask(Mask)); + } + if (Glue.getNode()) + Ops.push_back(Glue); + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); + if (IsTailCall) { + MF.getFrameInfo().setHasTailCall(); + return DAG.getNode(RISCVISD::TAIL, DL, NodeTys, Ops); + } + Chain = DAG.getNode(RISCVISD::CALL, DL, NodeTys, Ops); + DAG.addNoMergeSiteInfo(Chain.getNode(), CLI.NoMerge); + Glue = Chain.getValue(1); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, DL, PtrVT, true), DAG.getConstant(0, DL, PtrVT, true), Glue, DL); + Glue = Chain.getValue(1); + SmallVector RVLocs; + CCState RetCCInfo(CallConv, IsVarArg, MF, RVLocs, *DAG.getContext()); + analyzeInputArgs(MF, RetCCInfo, Ins, true); + for (auto &VA : RVLocs) { + SDValue RetValue = DAG.getCopyFromReg(Chain, DL, VA.getLocReg(), VA.getLocVT(), Glue); + Chain = RetValue.getValue(1); + Glue = RetValue.getValue(2); + if (VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64) { + assert(VA.getLocReg() == ArgGPRs[0] && "Unexpected reg assignment"); + SDValue RetValue2 = DAG.getCopyFromReg(Chain, DL, ArgGPRs[1], MVT::i32, Glue); + Chain = RetValue2.getValue(1); + Glue = RetValue2.getValue(2); + RetValue = DAG.getNode(RISCVISD::BuildPairF64, DL, MVT::f64, RetValue, RetValue2); + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, VA.getValVT(), Val); + break; + } + RetValue = Val; + InVals.push_back(RetValue); + } + return Chain; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c2111e520eec0abbd9dce63ea31d3df135efd14 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering::lowerConstantPool(SDValue Op, SelectionDAG &DAG) const { + ConstantPoolSDNode *N = cast(Op); + return getAddr(N, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e10d42b15911726b9b98aaadba7f5bbd1bc60fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,18 @@ +SDValue RISCVTargetLowering::lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { + const RISCVRegisterInfo &RI = *Subtarget.getRegisterInfo(); + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MFI.setFrameAddressIsTaken(true); + Register FrameReg = RI.getFrameRegister(MF); + int XLenInBytes = Subtarget.getXLen() / 8; + EVT VT = Op.getValueType(); + SDLoc DL(Op); + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), DL, FrameReg, VT); + unsigned Depth = cast(Op.getOperand(0))->getZExtValue(); + while (Depth--) { + int Offset = -(XLenInBytes * 2); + SDValue Ptr = DAG.getNode(ISD::ADD, DL, VT, FrameAddr, DAG.getIntPtrConstant(Offset, DL)); + FrameAddr = DAG.getLoad(VT, DL, DAG.getEntryNode(), Ptr, MachinePointerInfo()); + } + return FrameAddr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7469ac29c8818f7827888c7dc5619a3b1397882e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,173 @@ +SDValue RISCVTargetLowering::LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Ins, const SDLoc &DL, SelectionDAG &DAG, SmallVectorImpl &InVals) const { + MachineFunction &MF = DAG.getMachineFunction(); + switch (CallConv) { + default: + report_fatal_error("Unsupported calling convention"); + case CallingConv::C: + case CallingConv::Fast: + break; + case CallingConv::GHC: + if (!MF.getSubtarget().getFeatureBits()[RISCV::FeatureStdExtF] || !MF.getSubtarget().getFeatureBits()[RISCV::FeatureStdExtD]) + report_fatal_error("GHC calling convention requires the F and D instruction set extensions"); + } + const Function &Func = MF.getFunction(); + if (Func.hasFnAttribute("interrupt")) { + if (!Func.arg_empty()) + report_fatal_error("Functions with the interrupt attribute cannot have arguments!"); + StringRef Kind = MF.getFunction().getFnAttribute("interrupt").getValueAsString(); + if (!(Kind == "user" || Kind == "supervisor" || Kind == "machine")) + report_fatal_error("Function interrupt attribute argument not supported!"); + } + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + MVT XLenVT = Subtarget.getXLenVT(); + unsigned XLenInBytes = Subtarget.getXLen() / 8; + std::vector OutChains; + SmallVector ArgLocs; + CCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext()); + if (CallConv == CallingConv::Fast) + CCInfo.AnalyzeFormalArguments(Ins, CC_RISCV_FastCC); + else if (CallConv == CallingConv::GHC) + CCInfo.AnalyzeFormalArguments(Ins, CC_RISCV_GHC); + else + analyzeInputArgs(MF, CCInfo, Ins, false); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + SDValue ArgValue; + if (VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64) { + assert(VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64 && "Unexpected VA"); + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + if (VA.isMemLoc()) { + int FI = MFI.CreateFixedObject(8, VA.getLocMemOffset(), true); + SDValue FIN = DAG.getFrameIndex(FI, MVT::i32); + ArgValue = DAG.getLoad(MVT::f64, DL, Chain, FIN, MachinePointerInfo::getFixedStack(MF, FI)); + } + assert(VA.isRegLoc() && "Expected register VA assignment"); + Register LoVReg = RegInfo.createVirtualRegister(&RISCV::GPRRegClass); + RegInfo.addLiveIn(VA.getLocReg(), LoVReg); + SDValue Lo = DAG.getCopyFromReg(Chain, DL, LoVReg, MVT::i32); + SDValue Hi; + if (VA.getLocReg() == RISCV::X17) { + int FI = MFI.CreateFixedObject(4, 0, true); + SDValue FIN = DAG.getFrameIndex(FI, MVT::i32); + Hi = DAG.getLoad(MVT::i32, DL, Chain, FIN, MachinePointerInfo::getFixedStack(MF, FI)); + } + else { + Register HiVReg = RegInfo.createVirtualRegister(&RISCV::GPRRegClass); + RegInfo.addLiveIn(VA.getLocReg() + 1, HiVReg); + Hi = DAG.getCopyFromReg(Chain, DL, HiVReg, MVT::i32); + } + ArgValue = DAG.getNode(RISCVISD::BuildPairF64, DL, MVT::f64, Lo, Hi); + } + else if (VA.isRegLoc()) { + MachineFunction &MF = DAG.getMachineFunction(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + EVT LocVT = VA.getLocVT(); + SDValue Val; + const TargetRegisterClass *RC = TLI.getRegClassFor(LocVT.getSimpleVT()); + Register VReg = RegInfo.createVirtualRegister(RC); + RegInfo.addLiveIn(VA.getLocReg(), VReg); + Val = DAG.getCopyFromReg(Chain, DL, VReg, LocVT); + if (VA.getLocInfo() == CCValAssign::Indirect) { + return Val; + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, VA.getValVT(), Val); + break; + } + ArgValue = Val; + } + else { + MachineFunction &MF = DAG.getMachineFunction(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + EVT LocVT = VA.getLocVT(); + SDValue Val; + const TargetRegisterClass *RC = TLI.getRegClassFor(LocVT.getSimpleVT()); + Register VReg = RegInfo.createVirtualRegister(RC); + RegInfo.addLiveIn(VA.getLocReg(), VReg); + Val = DAG.getCopyFromReg(Chain, DL, VReg, LocVT); + if (VA.getLocInfo() == CCValAssign::Indirect) { + return Val; + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, VA.getValVT(), Val); + break; + } + ArgValue = Val; + } + if (VA.getLocInfo() == CCValAssign::Indirect) { + InVals.push_back(DAG.getLoad(VA.getValVT(), DL, Chain, ArgValue, MachinePointerInfo())); + unsigned ArgIndex = Ins[i].OrigArgIndex; + assert(Ins[i].PartOffset == 0); + while (i + 1 != e && Ins[i + 1].OrigArgIndex == ArgIndex) { + CCValAssign &PartVA = ArgLocs[i + 1]; + unsigned PartOffset = Ins[i + 1].PartOffset; + SDValue Address = DAG.getNode(ISD::ADD, DL, PtrVT, ArgValue, DAG.getIntPtrConstant(PartOffset, DL)); + InVals.push_back(DAG.getLoad(PartVA.getValVT(), DL, Chain, Address, MachinePointerInfo())); + ++i; + } + continue; + } + InVals.push_back(ArgValue); + } + if (IsVarArg) { + ArrayRef ArgRegs = makeArrayRef(ArgGPRs); + unsigned Idx = CCInfo.getFirstUnallocated(ArgRegs); + const TargetRegisterClass *RC = &RISCV::GPRRegClass; + MachineFrameInfo &MFI = MF.getFrameInfo(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + RISCVMachineFunctionInfo *RVFI = MF.getInfo(); + int VaArgOffset, VarArgsSaveSize; + if (ArgRegs.size() == Idx) { + VaArgOffset = CCInfo.getNextStackOffset(); + VarArgsSaveSize = 0; + } + else { + VarArgsSaveSize = XLenInBytes * (ArgRegs.size() - Idx); + VaArgOffset = -VarArgsSaveSize; + } + int FI = MFI.CreateFixedObject(XLenInBytes, VaArgOffset, true); + RVFI->setVarArgsFrameIndex(FI); + if (Idx % 2) { + MFI.CreateFixedObject(XLenInBytes, VaArgOffset - (int)XLenInBytes, true); + VarArgsSaveSize += XLenInBytes; + } + for (unsigned I = Idx; I < ArgRegs.size(); ++I, VaArgOffset += XLenInBytes) { + const Register Reg = RegInfo.createVirtualRegister(RC); + RegInfo.addLiveIn(ArgRegs[I], Reg); + SDValue ArgValue = DAG.getCopyFromReg(Chain, DL, Reg, XLenVT); + FI = MFI.CreateFixedObject(XLenInBytes, VaArgOffset, true); + SDValue PtrOff = DAG.getFrameIndex(FI, getPointerTy(DAG.getDataLayout())); + SDValue Store = DAG.getStore(Chain, DL, ArgValue, PtrOff, MachinePointerInfo::getFixedStack(MF, FI)); + cast(Store.getNode())->getMemOperand()->setValue((Value *)nullptr); + OutChains.push_back(Store); + } + RVFI->setVarArgsSaveSize(VarArgsSaveSize); + } + if (!OutChains.empty()) { + OutChains.push_back(Chain); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, OutChains); + } + return Chain; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c25fe7ba981ac3b403417bdc8e02f9bd6b4c8c15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,14 @@ +SDValue RISCVTargetLowering::lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT Ty = Op.getValueType(); + GlobalAddressSDNode *N = cast(Op); + int64_t Offset = N->getOffset(); + MVT XLenVT = Subtarget.getXLenVT(); + const GlobalValue *GV = N->getGlobal(); + bool IsLocal = getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV); + SDValue Addr = getAddr(N, DAG, IsLocal); + if (Offset != 0) { + return DAG.getNode(ISD::ADD, DL, Ty, Addr, DAG.getConstant(Offset, DL, XLenVT)); + } + return Addr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d4b3eab18404fd36209d8bc0fe8ec8025c6bad1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,28 @@ +SDValue RISCVTargetLowering::lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT Ty = Op.getValueType(); + GlobalAddressSDNode *N = cast(Op); + int64_t Offset = N->getOffset(); + MVT XLenVT = Subtarget.getXLenVT(); + TLSModel::Model Model = getTargetMachine().getTLSModel(N->getGlobal()); + if (DAG.getMachineFunction().getFunction().getCallingConv() == CallingConv::GHC) { + report_fatal_error("In GHC calling convention TLS is not supported"); + } + SDValue Addr; + switch (Model) { + case TLSModel::LocalExec: + Addr = getStaticTLSAddr(N, DAG, false); + break; + case TLSModel::InitialExec: + Addr = getStaticTLSAddr(N, DAG, true); + break; + case TLSModel::LocalDynamic: + case TLSModel::GeneralDynamic: + Addr = getDynamicTLSAddr(N, DAG); + break; + } + if (Offset != 0) { + return DAG.getNode(ISD::ADD, DL, Ty, Addr, DAG.getConstant(Offset, DL, XLenVT)); + } + return Addr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d271e260065b73f42c25f03d51b9b440bdc038bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,30 @@ +SDValue RISCVTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const { + unsigned IntNo = cast(Op.getOperand(0))->getZExtValue(); + SDLoc DL(Op); + if (Subtarget.hasStdExtV()) { + if (const RISCVVIntrinsicsTable::RISCVVIntrinsicInfo *II = RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(IntNo)) { + if (II->ExtendedOperand) { + assert(II->ExtendedOperand < Op.getNumOperands()); + SmallVector Operands(Op->op_begin(), Op->op_end()); + SDValue &ScalarOp = Operands[II->ExtendedOperand]; + EVT OpVT = ScalarOp.getValueType(); + if (OpVT == MVT::i8 || OpVT == MVT::i16 || (OpVT == MVT::i32 && Subtarget.is64Bit())) { + unsigned ExtOpc = isa(ScalarOp) ? ISD::SIGN_EXTEND : ISD::ANY_EXTEND; + ScalarOp = DAG.getNode(ExtOpc, DL, Subtarget.getXLenVT(), ScalarOp); + return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, Op.getValueType(), Operands); + } + } + } + } + switch (IntNo) { + default: + return SDValue(); + case Intrinsic::thread_pointer: { + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + return DAG.getRegister(RISCV::X4, PtrVT); + } + case Intrinsic::riscv_vmv_x_s: + assert(Op.getValueType() == Subtarget.getXLenVT() && "Unexpected VT!"); + return DAG.getNode(RISCVISD::VMV_X_S, DL, Op.getValueType(), Op.getOperand(1)); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75222c60f17cae9305bbe5868ddff56b5bd22751 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp @@ -0,0 +1,122 @@ +SDValue RISCVTargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const { + unsigned IntNo = cast(Op.getOperand(1))->getZExtValue(); + SDLoc DL(Op); + if (Subtarget.hasStdExtV()) { + if (const RISCVVIntrinsicsTable::RISCVVIntrinsicInfo *II = RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(IntNo)) { + if (II->ExtendedOperand) { + unsigned ExtendOp = II->ExtendedOperand + 1; + assert(ExtendOp < Op.getNumOperands()); + SmallVector Operands(Op->op_begin(), Op->op_end()); + SDValue &ScalarOp = Operands[ExtendOp]; + EVT OpVT = ScalarOp.getValueType(); + if (OpVT == MVT::i8 || OpVT == MVT::i16 || (OpVT == MVT::i32 && Subtarget.is64Bit())) { + unsigned ExtOpc = isa(ScalarOp) ? ISD::SIGN_EXTEND : ISD::ANY_EXTEND; + ScalarOp = DAG.getNode(ExtOpc, DL, Subtarget.getXLenVT(), ScalarOp); + return DAG.getNode(ISD::INTRINSIC_W_CHAIN, DL, Op->getVTList(), Operands); + } + } + } + } + unsigned NF = 1; + switch (IntNo) { + default: + return SDValue(); + case Intrinsic::riscv_vleff: { + SDLoc DL(Op); + SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Other, MVT::Glue); + SDValue Load = DAG.getNode(RISCVISD::VLEFF, DL, VTs, Op.getOperand(0), Op.getOperand(2), Op.getOperand(3)); + VTs = DAG.getVTList(Op->getValueType(1), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(2)); + return DAG.getMergeValues({Load, ReadVL, Load.getValue(1)}, DL); + } + case Intrinsic::riscv_vleff_mask: { + SDLoc DL(Op); + SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Other, MVT::Glue); + SDValue Load = DAG.getNode(RISCVISD::VLEFF_MASK, DL, VTs, Op.getOperand(0), Op.getOperand(2), Op.getOperand(3), Op.getOperand(4), Op.getOperand(5)); + VTs = DAG.getVTList(Op->getValueType(1), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(2)); + return DAG.getMergeValues({Load, ReadVL, Load.getValue(1)}, DL); + } + case Intrinsic::riscv_vlseg8ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg7ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg6ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg5ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg4ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg3ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg2ff: { + NF++; + SDLoc DL(Op); + SmallVector EVTs(NF, Op.getValueType()); + EVTs.push_back(MVT::Other); + EVTs.push_back(MVT::Glue); + SDVTList VTs = DAG.getVTList(EVTs); + SDValue Load = DAG.getNode(RISCVISD::VLSEGFF, DL, VTs, Op.getOperand(0), Op.getOperand(1), Op.getOperand(2), Op.getOperand(3)); + VTs = DAG.getVTList(Op->getValueType(NF), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(NF + 1)); + SmallVector Results; + for (unsigned i = 0; i < NF; ++i) { + Results.push_back(Load.getValue(i)); + } + Results.push_back(ReadVL); + Results.push_back(Load.getValue(NF)); + return DAG.getMergeValues(Results, DL); + } + case Intrinsic::riscv_vlseg8ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg7ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg6ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg5ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg4ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg3ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg2ff_mask: { + NF++; + SDLoc DL(Op); + SmallVector EVTs(NF, Op.getValueType()); + EVTs.push_back(MVT::Other); + EVTs.push_back(MVT::Glue); + SDVTList VTs = DAG.getVTList(EVTs); + SmallVector LoadOps; + LoadOps.push_back(Op.getOperand(0)); + LoadOps.push_back(Op.getOperand(1)); + for (unsigned i = 0; i < NF; ++i) { + LoadOps.push_back(Op.getOperand(2 + i)); + } + LoadOps.push_back(Op.getOperand(2 + NF)); + LoadOps.push_back(Op.getOperand(3 + NF)); + LoadOps.push_back(Op.getOperand(4 + NF)); + SDValue Load = DAG.getNode(RISCVISD::VLSEGFF_MASK, DL, VTs, LoadOps); + VTs = DAG.getVTList(Op->getValueType(NF), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(NF + 1)); + SmallVector Results; + for (unsigned i = 0; i < NF; ++i) { + Results.push_back(Load.getValue(i)); + } + Results.push_back(ReadVL); + Results.push_back(Load.getValue(NF)); + return DAG.getMergeValues(Results, DL); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..68048321fc1a4520cf96294b8748c120bfbe8b55 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering::lowerJumpTable(SDValue Op, SelectionDAG &DAG) const { + JumpTableSDNode *N = cast(Op); + return getAddr(N, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65190eb29c998ae548a8d652898fe5771b4c5e37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,133 @@ +SDValue RISCVTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { + if (Op.getOpcode() == ISD::GlobalAddress) { + return lowerGlobalAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::BlockAddress) { + return lowerBlockAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::ConstantPool) { + return lowerConstantPool(Op, DAG); + } + if (Op.getOpcode() == ISD::BlockAddress) { + return lowerBlockAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::JumpTable) { + return lowerJumpTable(Op, DAG); + } + if (Op.getOpcode() == ISD::GlobalTLSAddress) { + return lowerGlobalTLSAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::SELECT) { + return lowerSELECT(Op, DAG); + } + if (Op.getOpcode() == ISD::VASTART) { + return lowerVASTART(Op, DAG); + } + if (Op.getOpcode() == ISD::RETURNADDR) { + return lowerRETURNADDR(Op, DAG); + } + if (Op.getOpcode() == ISD::FRAMEADDR) { + return lowerFRAMEADDR(Op, DAG); + } + if (Op.getOpcode() == ISD::SHL_PARTS) { + return lowerShiftLeftParts(Op, DAG); + } + if (Op.getOpcode() == ISD::SRA_PARTS) { + return lowerShiftRightParts(Op, DAG, true); + } + if (Op.getOpcode() == ISD::SRL_PARTS) { + return lowerShiftRightParts(Op, DAG, false); + } + if (Op.getOpcode() == ISD::INTRINSIC_WO_CHAIN) { + return LowerINTRINSIC_WO_CHAIN(Op, DAG); + } + if (Op.getOpcode() == ISD::INTRINSIC_W_CHAIN) { + return LowerINTRINSIC_W_CHAIN(Op, DAG); + } + if (Op.getOpcode() == ISD::ANY_EXTEND) { + return lowerVectorMaskExt(Op, DAG, 1); + } + if (Op.getOpcode() == ISD::ZERO_EXTEND) { + return lowerVectorMaskExt(Op, DAG, 1); + } + if (Op.getOpcode() == ISD::SIGN_EXTEND) { + return lowerVectorMaskExt(Op, DAG, -1); + } + if (Op.getOpcode() == ISD::SPLAT_VECTOR) { + return lowerSPLATVECTOR(Op, DAG); + } + if (Op.getOpcode() == ISD::INSERT_VECTOR_ELT) { + return lowerINSERT_VECTOR_ELT(Op, DAG); + } + if (Op.getOpcode() == ISD::EXTRACT_VECTOR_ELT) { + return lowerEXTRACT_VECTOR_ELT(Op, DAG); + } + if (Op.getOpcode() == ISD::BITCAST) { + assert(((Subtarget.is64Bit() && Subtarget.hasStdExtF()) || Subtarget.hasStdExtZfh()) && "Unexpected custom legalisation"); + SDLoc DL(Op); + SDValue Op0 = Op.getOperand(0); + if (Op.getValueType() == MVT::f16 && Subtarget.hasStdExtZfh()) { + if (Op0.getValueType() != MVT::i16) + return SDValue(); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, Subtarget.getXLenVT(), Op0); + SDValue FPConv = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, NewOp0); + return FPConv; + } + else if (Op.getValueType() == MVT::f32 && Subtarget.is64Bit() && Subtarget.hasStdExtF()) { + if (Op0.getValueType() != MVT::i32) + return SDValue(); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, Op0); + SDValue FPConv = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, NewOp0); + return FPConv; + } + return SDValue(); + } + if (Op.getOpcode() == ISD::BSWAP) { + assert(Subtarget.hasStdExtZbp() && "Unexpected custom legalisation"); + MVT VT = Op.getSimpleValueType(); + SDLoc DL(Op); + unsigned Imm = VT.getSizeInBits() - 1; + if (Op.getOpcode() == ISD::BSWAP) + Imm &= ~0x7U; + return DAG.getNode(RISCVISD::GREVI, DL, VT, Op.getOperand(0), DAG.getTargetConstant(Imm, DL, Subtarget.getXLenVT())); + } + if (Op.getOpcode() == ISD::BITREVERSE) { + assert(Subtarget.hasStdExtZbp() && "Unexpected custom legalisation"); + MVT VT = Op.getSimpleValueType(); + SDLoc DL(Op); + unsigned Imm = VT.getSizeInBits() - 1; + if (Op.getOpcode() == ISD::BSWAP) + Imm &= ~0x7U; + return DAG.getNode(RISCVISD::GREVI, DL, VT, Op.getOperand(0), DAG.getTargetConstant(Imm, DL, Subtarget.getXLenVT())); + } + if (Op.getOpcode() == ISD::TRUNCATE) { + SDLoc DL(Op); + EVT VT = Op.getValueType(); + if (!VT.isVector()) + return Op; + if (VT.getVectorElementType() == MVT::i1) + return lowerVectorMaskTrunc(Op, DAG); + EVT DstEltVT = VT.getVectorElementType(); + SDValue Src = Op.getOperand(0); + EVT SrcVT = Src.getValueType(); + EVT SrcEltVT = SrcVT.getVectorElementType(); + assert(DstEltVT.bitsLT(SrcEltVT) && isPowerOf2_64(DstEltVT.getSizeInBits()) && isPowerOf2_64(SrcEltVT.getSizeInBits()) && "Unexpected vector truncate lowering"); + SDValue Result = Src; + LLVMContext &Context = *DAG.getContext(); + const ElementCount Count = SrcVT.getVectorElementCount(); + do { + SrcEltVT = EVT::getIntegerVT(Context, SrcEltVT.getSizeInBits() / 2); + EVT ResultVT = EVT::getVectorVT(Context, SrcEltVT, Count); + Result = DAG.getNode(RISCVISD::TRUNCATE_VECTOR, DL, ResultVT, Result); + } while (SrcEltVT != DstEltVT); + return Result; + } + if (Op.getOpcode() == ISD::VSCALE) { + MVT VT = Op.getSimpleValueType(); + SDLoc DL(Op); + SDValue VLENB = DAG.getNode(RISCVISD::READ_VLENB, DL, VT); + SDValue VScale = DAG.getNode(ISD::SRL, DL, VT, VLENB, DAG.getConstant(3, DL, VT)); + return DAG.getNode(ISD::MUL, DL, VT, VScale, Op.getOperand(0)); + } + report_fatal_error("unimplemented operand"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cedd67999ef313543cc50253a91f0d00bc57396a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,22 @@ +SDValue RISCVTargetLowering::lowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const { + const RISCVRegisterInfo &RI = *Subtarget.getRegisterInfo(); + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MFI.setReturnAddressIsTaken(true); + MVT XLenVT = Subtarget.getXLenVT(); + int XLenInBytes = Subtarget.getXLen() / 8; + if (verifyReturnAddressArgumentIsConstant(Op, DAG)) { + return SDValue(); + } + EVT VT = Op.getValueType(); + SDLoc DL(Op); + unsigned Depth = cast(Op.getOperand(0))->getZExtValue(); + if (Depth) { + int Off = -XLenInBytes; + SDValue FrameAddr = lowerFRAMEADDR(Op, DAG); + SDValue Offset = DAG.getConstant(Off, DL, VT); + return DAG.getLoad(VT, DL, DAG.getEntryNode(), DAG.getNode(ISD::ADD, DL, VT, FrameAddr, Offset), MachinePointerInfo()); + } + Register Reg = MF.addLiveIn(RI.getRARegister(), getRegClassFor(XLenVT)); + return DAG.getCopyFromReg(DAG.getEntryNode(), DL, Reg, XLenVT); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fe9a45c04e3607a7410233c686e1945b9b64220 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,82 @@ +SDValue RISCVTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, const SDLoc &DL, SelectionDAG &DAG) const { + const MachineFunction &MF = DAG.getMachineFunction(); + const RISCVSubtarget &STI = MF.getSubtarget(); + SmallVector RVLocs; + CCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), RVLocs, *DAG.getContext()); + analyzeOutputArgs(DAG.getMachineFunction(), CCInfo, Outs, true, nullptr); + if (CallConv == CallingConv::GHC && !RVLocs.empty()) { + report_fatal_error("GHC functions return void only"); + } + SDValue Glue; + SmallVector RetOps(1, Chain); + for (unsigned i = 0, e = RVLocs.size(); i < e; ++i) { + SDValue Val = OutVals[i]; + CCValAssign &VA = RVLocs[i]; + assert(VA.isRegLoc() && "Can only return in registers!"); + if (VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64) { + assert(VA.isRegLoc() && "Expected return via registers"); + SDValue SplitF64 = DAG.getNode(RISCVISD::SplitF64, DL, DAG.getVTList(MVT::i32, MVT::i32), Val); + SDValue Lo = SplitF64.getValue(0); + SDValue Hi = SplitF64.getValue(1); + Register RegLo = VA.getLocReg(); + assert(RegLo < RISCV::X31 && "Invalid register pair"); + Register RegHi = RegLo + 1; + if (STI.isRegisterReservedByUser(RegLo) || STI.isRegisterReservedByUser(RegHi)) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Return value register required, but has been reserved."}); + } + Chain = DAG.getCopyToReg(Chain, DL, RegLo, Lo, Glue); + Glue = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(RegLo, MVT::i32)); + Chain = DAG.getCopyToReg(Chain, DL, RegHi, Hi, Glue); + Glue = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(RegHi, MVT::i32)); + } + else { + EVT LocVT = VA.getLocVT(); + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTH, DL, VA.getLocVT(), Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, LocVT, Val); + break; + } + Chain = DAG.getCopyToReg(Chain, DL, VA.getLocReg(), Val, Glue); + if (STI.isRegisterReservedByUser(VA.getLocReg())) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Return value register required, but has been reserved."}); + } + Glue = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(VA.getLocReg(), VA.getLocVT())); + } + } + RetOps[0] = Chain; + if (Glue.getNode()) { + RetOps.push_back(Glue); + } + const Function &Func = DAG.getMachineFunction().getFunction(); + if (Func.hasFnAttribute("interrupt")) { + if (!Func.getReturnType()->isVoidTy()) { + report_fatal_error("Functions with the interrupt attribute must have void return type!"); + } + MachineFunction &MF = DAG.getMachineFunction(); + StringRef Kind = MF.getFunction().getFnAttribute("interrupt").getValueAsString(); + unsigned RetOpc; + if (Kind == "user") { + RetOpc = RISCVISD::URET_FLAG; + } + else if (Kind == "supervisor") { + RetOpc = RISCVISD::SRET_FLAG; + } + else { + RetOpc = RISCVISD::MRET_FLAG; + } + return DAG.getNode(RetOpc, DL, MVT::Other, RetOps); + } + return DAG.getNode(RISCVISD::RET_FLAG, DL, MVT::Other, RetOps); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2a8b1538a1e45039697e8f264bcdc901c75ab5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,8 @@ +SDValue RISCVTargetLowering::lowerVASTART(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachineFunction(); + RISCVMachineFunctionInfo *FuncInfo = MF.getInfo(); + SDLoc DL(Op); + SDValue FI = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), getPointerTy(MF.getDataLayout())); + const Value *SV = cast(Op.getOperand(2))->getValue(); + return DAG.getStore(Op.getOperand(0), DL, FI, Op.getOperand(1), MachinePointerInfo(SV)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b667b731b88f74eb2e0a2d08828d7fb845c2a26 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,43 @@ +enum NodeType : unsigned { +FIRST_NUMBER = ISD::BUILTIN_OP_END, +RET_FLAG, +URET_FLAG, +SRET_FLAG, +MRET_FLAG, +CALL, +SELECT_CC, +BuildPairF64, +SplitF64, +TAIL, +SLLW, +SRAW, +SRLW, +DIVW, +DIVUW, +REMUW, +ROLW, +RORW, +FSRW, +FSLW, +FMV_H_X, +FMV_X_ANYEXTH, +FMV_W_X_RV64, +FMV_X_ANYEXTW_RV64, +READ_CYCLE_WIDE, +GREVI, +GREVIW, +GORCI, +GORCIW, +VMV_X_S, +SPLAT_VECTOR_I64, +READ_VLENB, +TRUNCATE_VECTOR, +VLEFF, +VLEFF_MASK, +VLSEGFF, +VLSEGFF_MASK, +READ_VL, +VSLIDEUP, +VSLIDEDOWN, +VID, +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5d7b0da4ad63e0b6d0d5a2618796ca7bacb4ee0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,348 @@ +SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { + SelectionDAG &DAG = DCI.DAG; + switch (N->getOpcode()) { + default: + break; + case RISCVISD::SplitF64: { + SDValue Op0 = N->getOperand(0); + if (Op0->getOpcode() == RISCVISD::BuildPairF64) + return DCI.CombineTo(N, Op0.getOperand(0), Op0.getOperand(1)); + SDLoc DL(N); + if (ConstantFPSDNode *C = dyn_cast(Op0)) { + APInt V = C->getValueAPF().bitcastToAPInt(); + SDValue Lo = DAG.getConstant(V.trunc(32), DL, MVT::i32); + SDValue Hi = DAG.getConstant(V.lshr(32).trunc(32), DL, MVT::i32); + return DCI.CombineTo(N, Lo, Hi); + } + if (!(Op0.getOpcode() == ISD::FNEG || Op0.getOpcode() == ISD::FABS) || !Op0.getNode()->hasOneUse()) + break; + SDValue NewSplitF64 = DAG.getNode(RISCVISD::SplitF64, DL, DAG.getVTList(MVT::i32, MVT::i32), Op0.getOperand(0)); + SDValue Lo = NewSplitF64.getValue(0); + SDValue Hi = NewSplitF64.getValue(1); + APInt SignBit = APInt::getSignMask(32); + if (Op0.getOpcode() == ISD::FNEG) { + SDValue NewHi = DAG.getNode(ISD::XOR, DL, MVT::i32, Hi, DAG.getConstant(SignBit, DL, MVT::i32)); + return DCI.CombineTo(N, Lo, NewHi); + } + assert(Op0.getOpcode() == ISD::FABS); + SDValue NewHi = DAG.getNode(ISD::AND, DL, MVT::i32, Hi, DAG.getConstant(~SignBit, DL, MVT::i32)); + return DCI.CombineTo(N, Lo, NewHi); + } + case RISCVISD::SLLW: + case RISCVISD::SRAW: + case RISCVISD::SRLW: + case RISCVISD::ROLW: + case RISCVISD::RORW: { + SDValue LHS = N->getOperand(0); + SDValue RHS = N->getOperand(1); + APInt LHSMask = APInt::getLowBitsSet(LHS.getValueSizeInBits(), 32); + APInt RHSMask = APInt::getLowBitsSet(RHS.getValueSizeInBits(), 5); + if (SimplifyDemandedBits(N->getOperand(0), LHSMask, DCI) || SimplifyDemandedBits(N->getOperand(1), RHSMask, DCI)) { + if (N->getOpcode() != ISD::DELETED_NODE) + DCI.AddToWorklist(N); + return SDValue(N, 0); + } + break; + } + case RISCVISD::FSLW: + case RISCVISD::FSRW: { + SDValue Op0 = N->getOperand(0); + SDValue Op1 = N->getOperand(1); + SDValue ShAmt = N->getOperand(2); + APInt OpMask = APInt::getLowBitsSet(Op0.getValueSizeInBits(), 32); + APInt ShAmtMask = APInt::getLowBitsSet(ShAmt.getValueSizeInBits(), 6); + if (SimplifyDemandedBits(Op0, OpMask, DCI) || SimplifyDemandedBits(Op1, OpMask, DCI) || SimplifyDemandedBits(ShAmt, ShAmtMask, DCI)) { + if (N->getOpcode() != ISD::DELETED_NODE) + DCI.AddToWorklist(N); + return SDValue(N, 0); + } + break; + } + case RISCVISD::GREVIW: + case RISCVISD::GORCIW: { + SDValue Op0 = N->getOperand(0); + APInt Mask = APInt::getLowBitsSet(Op0.getValueSizeInBits(), 32); + if (SimplifyDemandedBits(Op0, Mask, DCI)) { + if (N->getOpcode() != ISD::DELETED_NODE) DCI.AddToWorklist(N); + return SDValue(N, 0); + } + unsigned ShAmt1 = N->getConstantOperandVal(1); + SDValue Src = N->getOperand(0); + if (Src.getOpcode() != N->getOpcode()) + return SDValue(); + unsigned ShAmt2 = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + unsigned CombinedShAmt; + if (N->getOpcode() == RISCVISD::GORCI || N->getOpcode() == RISCVISD::GORCIW) + CombinedShAmt = ShAmt1 | ShAmt2; + else + CombinedShAmt = ShAmt1 ^ ShAmt2; + if (CombinedShAmt == 0) + return Src; + SDLoc DL(N); + return DAG.getNode(N->getOpcode(), DL, N->getValueType(0), Src, DAG.getTargetConstant(CombinedShAmt, DL, N->getOperand(1).getValueType())); + } + case RISCVISD::FMV_X_ANYEXTW_RV64: { + SDLoc DL(N); + SDValue Op0 = N->getOperand(0); + if (Op0->getOpcode() == RISCVISD::FMV_W_X_RV64) { + assert(Op0.getOperand(0).getValueType() == MVT::i64 && "Unexpected value type!"); + return Op0.getOperand(0); + } + if (!(Op0.getOpcode() == ISD::FNEG || Op0.getOpcode() == ISD::FABS) || !Op0.getNode()->hasOneUse()) + break; + SDValue NewFMV = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Op0.getOperand(0)); + APInt SignBit = APInt::getSignMask(32).sext(64); + if (Op0.getOpcode() == ISD::FNEG) + return DAG.getNode(ISD::XOR, DL, MVT::i64, NewFMV, DAG.getConstant(SignBit, DL, MVT::i64)); + assert(Op0.getOpcode() == ISD::FABS); + return DAG.getNode(ISD::AND, DL, MVT::i64, NewFMV, DAG.getConstant(~SignBit, DL, MVT::i64)); + } + case RISCVISD::GREVI: + case RISCVISD::GORCI: + unsigned ShAmt1 = N->getConstantOperandVal(1); + SDValue Src = N->getOperand(0); + if (Src.getOpcode() != N->getOpcode()) + return SDValue(); + unsigned ShAmt2 = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + unsigned CombinedShAmt; + if (N->getOpcode() == RISCVISD::GORCI || N->getOpcode() == RISCVISD::GORCIW) + CombinedShAmt = ShAmt1 | ShAmt2; + else + CombinedShAmt = ShAmt1 ^ ShAmt2; + if (CombinedShAmt == 0) + return Src; + SDLoc DL(N); + return DAG.getNode(N->getOpcode(), DL, N->getValueType(0), Src, DAG.getTargetConstant(CombinedShAmt, DL, N->getOperand(1).getValueType())); + case ISD::OR: + EVT VT = Op.getValueType(); + if (VT == Subtarget.getXLenVT() || (Subtarget.is64Bit() && VT == MVT::i32)) { + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + LHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + RHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + if (LHS && RHS && LHS->formsPairWith(*RHS)) { + SDLoc DL(Op); + return DAG.getNode(RISCVISD::GREVI, DL, VT, LHS->Op, DAG.getTargetConstant(LHS->ShAmt, DL, Subtarget.getXLenVT())); + } + } + auto GORC = SDValue(); + EVT VT = Op.getValueType(); + if (VT == Subtarget.getXLenVT() || (Subtarget.is64Bit() && VT == MVT::i32)) { + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + LHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + RHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + if (LHS && RHS && LHS->formsPairWith(*RHS)) { + SDLoc DL(Op); + return DAG.getNode(RISCVISD::GREVI, DL, VT, LHS->Op, DAG.getTargetConstant(LHS->ShAmt, DL, Subtarget.getXLenVT())); + } + } + auto GORC = SDValue(); + if (GORC) + return GORC; + break; + case RISCVISD::SELECT_CC: { + SDValue LHS = N->getOperand(0); + SDValue RHS = N->getOperand(1); + auto CCVal = static_cast(N->getConstantOperandVal(2)); + APInt Mask = APInt::getBitsSetFrom(LHS.getValueSizeInBits(), 1); + if (ISD::isIntEqualitySetCC(CCVal) && isNullConstant(RHS) && LHS.getOpcode() == ISD::XOR && isOneConstant(LHS.getOperand(1)) && DAG.MaskedValueIsZero(LHS.getOperand(0), Mask)) { + SDLoc DL(N); + CCVal = ISD::getSetCCInverse(CCVal, LHS.getValueType()); + SDValue TargetCC = DAG.getConstant(CCVal, DL, Subtarget.getXLenVT()); + return DAG.getNode(RISCVISD::SELECT_CC, DL, N->getValueType(0), {LHS.getOperand(0), RHS, TargetCC, N->getOperand(3), N->getOperand(4)}); + } + break; + } + case ISD::SETCC: { + SDValue LHS = N->getOperand(0); + SDValue RHS = N->getOperand(1); + if (LHS.getValueType().isScalableVector()) + break; + auto CC = cast(N->getOperand(2))->get(); + APInt Mask = APInt::getBitsSetFrom(LHS.getValueSizeInBits(), 1); + if (isOneConstant(RHS) && ISD::isIntEqualitySetCC(CC) && DAG.MaskedValueIsZero(LHS, Mask)) { + SDLoc DL(N); + SDValue Zero = DAG.getConstant(0, DL, LHS.getValueType()); + CC = ISD::getSetCCInverse(CC, LHS.getValueType()); + return DAG.getSetCC(DL, N->getValueType(0), LHS, Zero, CC); + } + break; + } + case ISD::BR: { + SDValue BrCond = N->getOperand(0); + if (BrCond->getOpcode() != ISD::BRCOND) + break; + SDValue Xor = BrCond->getOperand(1); + if (Xor->getOpcode() != ISD::XOR) + break; + if (auto True = dyn_cast(Xor->getOperand(1))){ + if (True->getSExtValue() != -1) break; + } + else break; + SDValue LoopDecrement = Xor->getOperand(0); + if (LoopDecrement->getOpcode() != ISD::INTRINSIC_W_CHAIN || LoopDecrement->getConstantOperandVal(1) != Intrinsic::loop_decrement) + break; + SDValue BB1 = N->getOperand(1); + SDValue LoopBranch = DAG.getNode(ISD::BRCOND, SDLoc(BrCond), MVT::Other, BrCond->getOperand(0), LoopDecrement, BB1); + SDValue BB2 = BrCond->getOperand(2); + SDValue ElseBranch = DAG.getNode(ISD::BR, SDLoc(N), MVT::Other, LoopBranch, BB2); + return DCI.CombineTo(N, ElseBranch); + } + } + return SDValue(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcb7e257a67ab4aabcfa12a0a4d5afa2da879f4c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,178 @@ +void RISCVTargetLowering::ReplaceNodeResults(SDNode *N, SmallVectorImpl &Results, SelectionDAG &DAG) const { + SDLoc DL(N); + switch (N->getOpcode()) { + default: + llvm_unreachable("Don't know how to custom type legalize this operation!"); + case ISD::STRICT_FP_TO_SINT: + case ISD::STRICT_FP_TO_UINT: + case ISD::FP_TO_SINT: + case ISD::FP_TO_UINT: { + bool IsStrict = N->isStrictFPOpcode(); + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + SDValue Op0 = IsStrict ? N->getOperand(1) : N->getOperand(0); + if (getTypeAction(*DAG.getContext(), Op0.getValueType()) != TargetLowering::TypeSoftenFloat) + return; + RTLIB::Libcall LC; + if (N->getOpcode() == ISD::FP_TO_SINT || N->getOpcode() == ISD::STRICT_FP_TO_SINT) + LC = RTLIB::getFPTOSINT(Op0.getValueType(), N->getValueType(0)); + else + LC = RTLIB::getFPTOUINT(Op0.getValueType(), N->getValueType(0)); + MakeLibCallOptions CallOptions; + EVT OpVT = Op0.getValueType(); + CallOptions.setTypeListBeforeSoften(OpVT, N->getValueType(0), true); + SDValue Chain = IsStrict ? N->getOperand(0) : SDValue(); + SDValue Result; + std::tie(Result, Chain) = makeLibCall(DAG, LC, N->getValueType(0), Op0, CallOptions, DL, Chain); + Results.push_back(Result); + if (IsStrict) + Results.push_back(Chain); + break; + } + case ISD::READCYCLECOUNTER: { + assert(!Subtarget.is64Bit() && "READCYCLECOUNTER only has custom type legalization on riscv32"); + SDVTList VTs = DAG.getVTList(MVT::i32, MVT::i32, MVT::Other); + SDValue RCW = DAG.getNode(RISCVISD::READ_CYCLE_WIDE, DL, VTs, N->getOperand(0)); + Results.push_back( DAG.getNode(ISD::BUILD_PAIR, DL, MVT::i64, RCW, RCW.getValue(1))); + Results.push_back(RCW.getValue(2)); + break; + } + case ISD::ADD: + case ISD::SUB: + case ISD::MUL: + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + if (N->getOperand(1).getOpcode() == ISD::Constant) + return; + Results.push_back(customLegalizeToWOpWithSExt(N, DAG)); + SDLoc DL(N); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(1)); + SDValue NewWOp = DAG.getNode(N->getOpcode(), DL, MVT::i64, NewOp0, NewOp1); + SDValue NewRes = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, MVT::i64, NewWOp, DAG.getValueType(MVT::i32)); + return DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, NewRes); + break; + case ISD::SHL: + case ISD::SRA: + case ISD::SRL: + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + if (N->getOperand(1).getOpcode() == ISD::Constant) + return; + Results.push_back(customLegalizeToWOp(N, DAG)); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(1)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, NewOp1); + return DAG.getNode(ISD::TRUNCATE, DL, N->getValueType(0), NewRes); + break; + case ISD::ROTL: + case ISD::ROTR: + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + Results.push_back(customLegalizeToWOp(N, DAG)); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(1)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, NewOp1); + return DAG.getNode(ISD::TRUNCATE, DL, N->getValueType(0), NewRes); + break; + case ISD::SDIV: + case ISD::UDIV: + case ISD::UREM: { + MVT VT = N->getSimpleValueType(0); + assert((VT == MVT::i8 || VT == MVT::i16 || VT == MVT::i32) && Subtarget.is64Bit() && Subtarget.hasStdExtM() && "Unexpected custom legalisation"); + if (N->getOperand(0).getOpcode() == ISD::Constant || N->getOperand(1).getOpcode() == ISD::Constant) + return; + unsigned ExtOpc = ISD::ANY_EXTEND; + if (VT != MVT::i32) + ExtOpc = N->getOpcode() == ISD::SDIV ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND; + Results.push_back(customLegalizeToWOp(N, DAG, ExtOpc)); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(1)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, NewOp1); + return DAG.getNode(ISD::TRUNCATE, DL, N->getValueType(0), NewRes); + break; + } + case ISD::BITCAST: { + assert(((N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtF()) || (N->getValueType(0) == MVT::i16 && Subtarget.hasStdExtZfh())) && "Unexpected custom legalisation"); + SDValue Op0 = N->getOperand(0); + if (N->getValueType(0) == MVT::i16 && Subtarget.hasStdExtZfh()) { + if (Op0.getValueType() != MVT::f16) + return; + SDValue FPConv = DAG.getNode(RISCVISD::FMV_X_ANYEXTH, DL, Subtarget.getXLenVT(), Op0); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i16, FPConv)); + } + else if (N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtF()) { + if (Op0.getValueType() != MVT::f32) + return; + SDValue FPConv = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Op0); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, FPConv)); + } + break; + } + case RISCVISD::GREVI: + case RISCVISD::GORCI: { + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, N->getOperand(1)); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, NewRes)); + break; + } + case ISD::BSWAP: + case ISD::BITREVERSE: { + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtZbp() && "Unexpected custom legalisation"); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + unsigned Imm = N->getOpcode() == ISD::BITREVERSE ? 31 : 24; + SDValue GREVIW = DAG.getNode(RISCVISD::GREVIW, DL, MVT::i64, NewOp0, DAG.getTargetConstant(Imm, DL, Subtarget.getXLenVT())); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, GREVIW)); + break; + } + case ISD::FSHL: + case ISD::FSHR: { + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtZbt() && "Unexpected custom legalisation"); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(1)); + SDValue NewOp2 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(2)); + NewOp2 = DAG.getNode(ISD::AND, DL, MVT::i64, NewOp2, DAG.getConstant(0x1f, DL, MVT::i64)); + unsigned Opc = N->getOpcode() == ISD::FSHL ? RISCVISD::FSLW : RISCVISD::FSRW; + SDValue NewOp = DAG.getNode(Opc, DL, MVT::i64, NewOp0, NewOp1, NewOp2); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, NewOp)); + break; + } + case ISD::EXTRACT_VECTOR_ELT: { + SDLoc DL(N); + SDValue Vec = N->getOperand(0); + SDValue Idx = N->getOperand(1); + EVT VecVT = Vec.getValueType(); + assert(!Subtarget.is64Bit() && N->getValueType(0) == MVT::i64 && VecVT.getVectorElementType() == MVT::i64 && "Unexpected EXTRACT_VECTOR_ELT legalization"); + SDValue Slidedown = Vec; + if (!isNullConstant(Idx)) + Slidedown = DAG.getNode(RISCVISD::VSLIDEDOWN, DL, VecVT, DAG.getUNDEF(VecVT), Vec, Idx); + MVT XLenVT = Subtarget.getXLenVT(); + SDValue EltLo = DAG.getNode(RISCVISD::VMV_X_S, DL, XLenVT, Slidedown, Idx); + SDValue ThirtyTwoV = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, DAG.getConstant(32, DL, Subtarget.getXLenVT())); + SDValue LShr32 = DAG.getNode(ISD::SRL, DL, VecVT, Slidedown, ThirtyTwoV); + SDValue EltHi = DAG.getNode(RISCVISD::VMV_X_S, DL, XLenVT, LShr32, Idx); + Results.push_back(DAG.getNode(ISD::BUILD_PAIR, DL, MVT::i64, EltLo, EltHi)); + break; + } + case ISD::INTRINSIC_WO_CHAIN: { + unsigned IntNo = cast(N->getOperand(0))->getZExtValue(); + switch (IntNo) { + default: + llvm_unreachable("Don't know how to custom type legalize this intrinsic!"); + case Intrinsic::riscv_vmv_x_s: { + EVT VT = N->getValueType(0); + assert((VT == MVT::i8 || VT == MVT::i16 || (Subtarget.is64Bit() && VT == MVT::i32)) && "Unexpected custom legalisation!"); + SDValue Extract = DAG.getNode(RISCVISD::VMV_X_S, DL, Subtarget.getXLenVT(), N->getOperand(1)); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, VT, Extract)); + break; + } + } + break; + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f36b91ccdbca211f36db98d0815a3bc0c3067159 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,375 @@ +RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM, const RISCVSubtarget &STI) : TargetLowering(TM), Subtarget(STI) { + if (Subtarget.isRV32E()) + report_fatal_error("Codegen not yet implemented for RV32E"); + RISCVABI::ABI ABI = Subtarget.getTargetABI(); + assert(ABI != RISCVABI::ABI_Unknown && "Improperly initialised target ABI"); + if ((ABI == RISCVABI::ABI_ILP32F || ABI == RISCVABI::ABI_LP64F) && !Subtarget.hasStdExtF()) { + errs() << "Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension (ignoring target-abi)\n"; + ABI = Subtarget.is64Bit() ? RISCVABI::ABI_LP64 : RISCVABI::ABI_ILP32; + } + else if ((ABI == RISCVABI::ABI_ILP32D || ABI == RISCVABI::ABI_LP64D) && !Subtarget.hasStdExtD()) { + errs() << "Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)\n"; + ABI = Subtarget.is64Bit() ? RISCVABI::ABI_LP64 : RISCVABI::ABI_ILP32; + } + switch (ABI) { + default: + report_fatal_error("Don't know how to lower this ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64: + case RISCVABI::ABI_LP64F: + case RISCVABI::ABI_LP64D: + break; + } + MVT XLenVT = Subtarget.getXLenVT(); + addRegisterClass(XLenVT, &RISCV::GPRRegClass); + if (Subtarget.hasStdExtZfh()) + addRegisterClass(MVT::f16, &RISCV::FPR16RegClass); + if (Subtarget.hasStdExtF()) + addRegisterClass(MVT::f32, &RISCV::FPR32RegClass); + if (Subtarget.hasStdExtD()) + addRegisterClass(MVT::f64, &RISCV::FPR64RegClass); + if (Subtarget.hasStdExtV()) { + addRegisterClass(RISCVVMVTs::vbool64_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool32_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool16_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool8_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8mf8_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8mf4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint8m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint8m8_t, &RISCV::VRM8RegClass); + addRegisterClass(RISCVVMVTs::vint16mf4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint16mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint16m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint16m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint16m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint16m8_t, &RISCV::VRM8RegClass); + addRegisterClass(RISCVVMVTs::vint32mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint32m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint32m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint32m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint32m8_t, &RISCV::VRM8RegClass); + addRegisterClass(RISCVVMVTs::vint64m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint64m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint64m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint64m8_t, &RISCV::VRM8RegClass); + if (Subtarget.hasStdExtZfh()) { + addRegisterClass(RISCVVMVTs::vfloat16mf4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat16mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat16m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat16m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vfloat16m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vfloat16m8_t, &RISCV::VRM8RegClass); + } + if (Subtarget.hasStdExtF()) { + addRegisterClass(RISCVVMVTs::vfloat32mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat32m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat32m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vfloat32m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vfloat32m8_t, &RISCV::VRM8RegClass); + } + if (Subtarget.hasStdExtD()) { + addRegisterClass(RISCVVMVTs::vfloat64m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat64m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vfloat64m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vfloat64m8_t, &RISCV::VRM8RegClass); + } + } + computeRegisterProperties(STI.getRegisterInfo()); + setStackPointerRegisterToSaveRestore(RISCV::X2); + for (auto N : {ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD}) + setLoadExtAction(N, XLenVT, MVT::i1, Promote); + setOperationAction(ISD::DYNAMIC_STACKALLOC, XLenVT, Expand); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); + setOperationAction(ISD::BR_CC, XLenVT, Expand); + setOperationAction(ISD::SELECT_CC, XLenVT, Expand); + setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); + setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); + setOperationAction(ISD::VASTART, MVT::Other, Custom); + setOperationAction(ISD::VAARG, MVT::Other, Expand); + setOperationAction(ISD::VACOPY, MVT::Other, Expand); + setOperationAction(ISD::VAEND, MVT::Other, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand); + if (!Subtarget.hasStdExtZbb()) { + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand); + } + if (Subtarget.is64Bit()) { + setOperationAction(ISD::ADD, MVT::i32, Custom); + setOperationAction(ISD::SUB, MVT::i32, Custom); + setOperationAction(ISD::SHL, MVT::i32, Custom); + setOperationAction(ISD::SRA, MVT::i32, Custom); + setOperationAction(ISD::SRL, MVT::i32, Custom); + } + if (!Subtarget.hasStdExtM()) { + setOperationAction(ISD::MUL, XLenVT, Expand); + setOperationAction(ISD::MULHS, XLenVT, Expand); + setOperationAction(ISD::MULHU, XLenVT, Expand); + setOperationAction(ISD::SDIV, XLenVT, Expand); + setOperationAction(ISD::UDIV, XLenVT, Expand); + setOperationAction(ISD::SREM, XLenVT, Expand); + setOperationAction(ISD::UREM, XLenVT, Expand); + } + if (Subtarget.is64Bit() && Subtarget.hasStdExtM()) { + setOperationAction(ISD::MUL, MVT::i32, Custom); + setOperationAction(ISD::SDIV, MVT::i8, Custom); + setOperationAction(ISD::UDIV, MVT::i8, Custom); + setOperationAction(ISD::UREM, MVT::i8, Custom); + setOperationAction(ISD::SDIV, MVT::i16, Custom); + setOperationAction(ISD::UDIV, MVT::i16, Custom); + setOperationAction(ISD::UREM, MVT::i16, Custom); + setOperationAction(ISD::SDIV, MVT::i32, Custom); + setOperationAction(ISD::UDIV, MVT::i32, Custom); + setOperationAction(ISD::UREM, MVT::i32, Custom); + } + setOperationAction(ISD::SDIVREM, XLenVT, Expand); + setOperationAction(ISD::UDIVREM, XLenVT, Expand); + setOperationAction(ISD::SMUL_LOHI, XLenVT, Expand); + setOperationAction(ISD::UMUL_LOHI, XLenVT, Expand); + setOperationAction(ISD::SHL_PARTS, XLenVT, Custom); + setOperationAction(ISD::SRL_PARTS, XLenVT, Custom); + setOperationAction(ISD::SRA_PARTS, XLenVT, Custom); + if (Subtarget.hasStdExtZbb() || Subtarget.hasStdExtZbp()) { + if (Subtarget.is64Bit()) { + setOperationAction(ISD::ROTL, MVT::i32, Custom); + setOperationAction(ISD::ROTR, MVT::i32, Custom); + } + } + else { + setOperationAction(ISD::ROTL, XLenVT, Expand); + setOperationAction(ISD::ROTR, XLenVT, Expand); + } + if (Subtarget.hasStdExtZbp()) { + setOperationAction(ISD::BITREVERSE, XLenVT, Custom); + setOperationAction(ISD::BSWAP, XLenVT, Custom); + if (Subtarget.is64Bit()) { + setOperationAction(ISD::BITREVERSE, MVT::i32, Custom); + setOperationAction(ISD::BSWAP, MVT::i32, Custom); + } + } + else { + setOperationAction(ISD::BSWAP, XLenVT, Subtarget.hasStdExtZbb() ? Legal : Expand); + } + if (Subtarget.hasStdExtZbb()) { + setOperationAction(ISD::SMIN, XLenVT, Legal); + setOperationAction(ISD::SMAX, XLenVT, Legal); + setOperationAction(ISD::UMIN, XLenVT, Legal); + setOperationAction(ISD::UMAX, XLenVT, Legal); + } + else { + setOperationAction(ISD::CTTZ, XLenVT, Expand); + setOperationAction(ISD::CTLZ, XLenVT, Expand); + setOperationAction(ISD::CTPOP, XLenVT, Expand); + } + if (Subtarget.hasStdExtZbt()) { + setOperationAction(ISD::FSHL, XLenVT, Legal); + setOperationAction(ISD::FSHR, XLenVT, Legal); + setOperationAction(ISD::SELECT, XLenVT, Legal); + if (Subtarget.is64Bit()) { + setOperationAction(ISD::FSHL, MVT::i32, Custom); + setOperationAction(ISD::FSHR, MVT::i32, Custom); + } + } + else { + setOperationAction(ISD::SELECT, XLenVT, Custom); + } + ISD::CondCode FPCCToExpand[] = {ISD::SETOGT, ISD::SETOGE, ISD::SETONE, ISD::SETUEQ, ISD::SETUGT, ISD::SETUGE, ISD::SETULT, ISD::SETULE, ISD::SETUNE, ISD::SETGT, ISD::SETGE, ISD::SETNE, ISD::SETO, ISD::SETUO}; + ISD::NodeType FPOpToExpand[] = {ISD::FSIN, ISD::FCOS, ISD::FSINCOS, ISD::FPOW, ISD::FREM, ISD::FP16_TO_FP, ISD::FP_TO_FP16}; + if (Subtarget.hasStdExtZfh()) + setOperationAction(ISD::BITCAST, MVT::i16, Custom); + if (Subtarget.hasStdExtZfh()) { + setOperationAction(ISD::FMINNUM, MVT::f16, Legal); + setOperationAction(ISD::FMAXNUM, MVT::f16, Legal); + for (auto CC : FPCCToExpand) + setCondCodeAction(CC, MVT::f16, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f16, Expand); + setOperationAction(ISD::SELECT, MVT::f16, Custom); + setOperationAction(ISD::BR_CC, MVT::f16, Expand); + for (auto Op : FPOpToExpand) + setOperationAction(Op, MVT::f16, Expand); + } + if (Subtarget.hasStdExtF()) { + setOperationAction(ISD::FMINNUM, MVT::f32, Legal); + setOperationAction(ISD::FMAXNUM, MVT::f32, Legal); + for (auto CC : FPCCToExpand) + setCondCodeAction(CC, MVT::f32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f32, Expand); + setOperationAction(ISD::SELECT, MVT::f32, Custom); + setOperationAction(ISD::BR_CC, MVT::f32, Expand); + for (auto Op : FPOpToExpand) + setOperationAction(Op, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f32, MVT::f16, Expand); + setTruncStoreAction(MVT::f32, MVT::f16, Expand); + } + if (Subtarget.hasStdExtF() && Subtarget.is64Bit()) + setOperationAction(ISD::BITCAST, MVT::i32, Custom); + if (Subtarget.hasStdExtD()) { + setOperationAction(ISD::FMINNUM, MVT::f64, Legal); + setOperationAction(ISD::FMAXNUM, MVT::f64, Legal); + for (auto CC : FPCCToExpand) + setCondCodeAction(CC, MVT::f64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f64, Expand); + setOperationAction(ISD::SELECT, MVT::f64, Custom); + setOperationAction(ISD::BR_CC, MVT::f64, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f32, Expand); + setTruncStoreAction(MVT::f64, MVT::f32, Expand); + for (auto Op : FPOpToExpand) + setOperationAction(Op, MVT::f64, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f16, Expand); + } + if (Subtarget.is64Bit()) { + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_SINT, MVT::i32, Custom); + } + setOperationAction(ISD::GlobalAddress, XLenVT, Custom); + setOperationAction(ISD::BlockAddress, XLenVT, Custom); + setOperationAction(ISD::ConstantPool, XLenVT, Custom); + setOperationAction(ISD::JumpTable, XLenVT, Custom); + setOperationAction(ISD::GlobalTLSAddress, XLenVT, Custom); + setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, Subtarget.is64Bit() ? Legal : Custom); + setOperationAction(ISD::TRAP, MVT::Other, Legal); + setOperationAction(ISD::DEBUGTRAP, MVT::Other, Legal); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom); + if (Subtarget.hasPULPExtV2()) { + for (auto VT : {XLenVT.SimpleTy, MVT::v2i16, MVT::v4i8}){ + setOperationAction(ISD::ABS, VT, Legal); + setOperationAction(ISD::SMIN, VT, Legal); + setOperationAction(ISD::UMIN, VT, Legal); + setOperationAction(ISD::SMAX, VT, Legal); + setOperationAction(ISD::UMAX, VT, Legal); + } + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Legal); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Legal); + setOperationAction(ISD::CTLZ_ZERO_UNDEF, XLenVT, Legal); + setOperationAction(ISD::CTTZ, XLenVT, Legal); + setOperationAction(ISD::CTPOP, XLenVT, Legal); + setOperationAction(ISD::ROTR, XLenVT, Legal); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i1, Custom); + for (auto VT : {MVT::v2i16, MVT::v4i8}){ + setOperationAction(ISD::SPLAT_VECTOR, VT, Legal); + setOperationAction(ISD::VECREDUCE_ADD, VT, Legal); + setOperationPromotedToType(ISD::LOAD, VT, MVT::i32); + setOperationPromotedToType(ISD::STORE, VT, MVT::i32); + setOperationAction(ISD::VSELECT, VT, Expand); + setOperationAction(ISD::MUL, VT, Expand); + setOperationAction(ISD::SDIV, VT, Expand); + setOperationAction(ISD::UDIV, VT, Expand); + setOperationAction(ISD::SREM, VT, Expand); + setOperationAction(ISD::UREM, VT, Expand); + setOperationAction(ISD::ROTR, VT, Expand); + setOperationAction(ISD::ROTL, VT, Expand); + setOperationAction(ISD::BSWAP, VT, Expand); + setOperationAction(ISD::CTTZ, VT, Expand); + setOperationAction(ISD::CTLZ, VT, Expand); + setOperationAction(ISD::CTPOP, VT, Expand); + setOperationAction(ISD::SDIVREM, VT, Expand); + setOperationAction(ISD::UDIVREM, VT, Expand); + setOperationAction(ISD::SMUL_LOHI, VT, Expand); + setOperationAction(ISD::UMUL_LOHI, VT, Expand); + } + setLoadExtAction(ISD::EXTLOAD, MVT::v2i16, MVT::v2i8, Expand); + setLoadExtAction(ISD::SEXTLOAD, MVT::v2i16, MVT::v2i8, Expand); + setLoadExtAction(ISD::ZEXTLOAD, MVT::v2i16, MVT::v2i8, Expand); + setTruncStoreAction(MVT::v2i16, MVT::v2i8, Expand); + setTargetDAGCombine(ISD::BR); + setBooleanVectorContents(ZeroOrNegativeOneBooleanContent); + } + if (Subtarget.hasStdExtA()) { + setMaxAtomicSizeInBitsSupported(Subtarget.getXLen()); + setMinCmpXchgSizeInBits(32); + } + else { + setMaxAtomicSizeInBitsSupported(0); + } + if (Subtarget.hasPULPExtV2()) { + setIndexedLoadAction(ISD::POST_INC, MVT::i8, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::i16, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::i32, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::v2i16, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::v4i8, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::i8, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::i16, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::i32, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::v2i16, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::v4i8, Legal); + } + setBooleanContents(ZeroOrOneBooleanContent); + if (Subtarget.hasStdExtV()) { + setBooleanVectorContents(ZeroOrOneBooleanContent); + setOperationAction(ISD::VSCALE, XLenVT, Custom); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i8, Custom); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i16, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i8, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i16, Custom); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i32, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i32, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::Other, Custom); + if (Subtarget.is64Bit()) { + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i64, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i64, Custom); + } + for (auto VT : MVT::integer_scalable_vector_valuetypes()) { + setOperationAction(ISD::SPLAT_VECTOR, VT, Legal); + setOperationAction(ISD::SMIN, VT, Legal); + setOperationAction(ISD::SMAX, VT, Legal); + setOperationAction(ISD::UMIN, VT, Legal); + setOperationAction(ISD::UMAX, VT, Legal); + setOperationAction(ISD::ROTL, VT, Expand); + setOperationAction(ISD::ROTR, VT, Expand); + if (isTypeLegal(VT)) { + setOperationAction(ISD::ANY_EXTEND, VT, Custom); + setOperationAction(ISD::SIGN_EXTEND, VT, Custom); + setOperationAction(ISD::ZERO_EXTEND, VT, Custom); + setOperationAction(ISD::TRUNCATE, VT, Custom); + setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom); + setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom); + } + } + if (!Subtarget.is64Bit()) { + setOperationAction(ISD::SPLAT_VECTOR, MVT::i64, Custom); + setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::i64, Custom); + setOperationAction(ISD::EXTRACT_VECTOR_ELT, MVT::i64, Custom); + } + ISD::CondCode VFPCCToExpand[] = {ISD::SETO, ISD::SETONE, ISD::SETUEQ, ISD::SETUGT, ISD::SETUGE, ISD::SETULT, ISD::SETULE, ISD::SETUO, ISD::SETGT, ISD::SETOGT, ISD::SETGE, ISD::SETOGE, + }; + const auto SetCommonVFPActions = [&](MVT VT) { + setOperationAction(ISD::SPLAT_VECTOR, VT, Legal); + setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom); + setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom); + for (auto CC : VFPCCToExpand) + setCondCodeAction(CC, VT, Expand); + }; + if (Subtarget.hasStdExtZfh()) { + for (auto VT : {RISCVVMVTs::vfloat16mf4_t, RISCVVMVTs::vfloat16mf2_t, RISCVVMVTs::vfloat16m1_t, RISCVVMVTs::vfloat16m2_t, RISCVVMVTs::vfloat16m4_t, RISCVVMVTs::vfloat16m8_t}) + SetCommonVFPActions(VT); + } + if (Subtarget.hasStdExtF()) { + for (auto VT : {RISCVVMVTs::vfloat32mf2_t, RISCVVMVTs::vfloat32m1_t, RISCVVMVTs::vfloat32m2_t, RISCVVMVTs::vfloat32m4_t, RISCVVMVTs::vfloat32m8_t}) + SetCommonVFPActions(VT); + } + if (Subtarget.hasStdExtD()) { + for (auto VT : {RISCVVMVTs::vfloat64m1_t, RISCVVMVTs::vfloat64m2_t, RISCVVMVTs::vfloat64m4_t, RISCVVMVTs::vfloat64m8_t}) + SetCommonVFPActions(VT); + } + } + const Align FunctionAlignment(Subtarget.hasStdExtC() ? 2 : 4); + setMinFunctionAlignment(FunctionAlignment); + setPrefFunctionAlignment(FunctionAlignment); + setMinimumJumpTableEntries(5); + setJumpIsExpensive(); + setHasMultipleConditionRegisters(); + setTargetDAGCombine(ISD::SETCC); + if (Subtarget.hasStdExtZbp()) { + setTargetDAGCombine(ISD::OR); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..50fdd89b5836f6e98c8105fea915e478bd1d6d5f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp @@ -0,0 +1,9 @@ +bool RISCVTargetLowering::allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace = 0, unsigned Align = 1, MachineMemOperand::Flags Flags = MachineMemOperand::MONone, bool *Fast = nullptr) const { + if (Subtarget.hasPULPExtV2()) { + if (Fast) { + *Fast = false; + } + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48aa3497564c29edb79bfa481025bf26abae26e9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp @@ -0,0 +1,191 @@ +void RISCVTargetLowering::analyzeInputArgs(MachineFunction &MF, CCState &CCInfo, const SmallVectorImpl &Ins, bool IsRet) const { + unsigned NumArgs = Ins.size(); + FunctionType *FType = MF.getFunction().getFunctionType(); + Optional FirstMaskArgument; + if (Subtarget.hasStdExtV()) { + FirstMaskArgument = None; + for (const auto &ArgIdx : enumerate(Args)) { + MVT ArgVT = ArgIdx.value().VT; + if (ArgVT.isScalableVector() && ArgVT.getVectorElementType().SimpleTy == MVT::i1) { + FirstMaskArgument = ArgIdx.index(); + } + } + } + for (unsigned i = 0; i != NumArgs; ++i) { + MVT ArgVT = Ins[i].VT; + ISD::ArgFlagsTy ArgFlags = Ins[i].Flags; + Type *ArgTy = nullptr; + if (IsRet) { + ArgTy = FType->getReturnType(); + } + else if (Ins[i].isOrigArg()) { + ArgTy = FType->getParamType(Ins[i].getOrigArgIndex()); + } + RISCVABI::ABI ABI = MF.getSubtarget().getTargetABI(); + unsigned XLen = DL.getLargestLegalIntTypeSizeInBits(); + assert(XLen == 32 || XLen == 64); + MVT XLenVT = XLen == 32 ? MVT::i32 : MVT::i64; + if (IsRet && ValNo > 1) { + return true; + } + bool UseGPRForF16_F32 = true; + bool UseGPRForF64 = true; + switch (ABI) { + default: + llvm_unreachable("Unexpected ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + break; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + UseGPRForF16_F32 = !IsFixed; + break; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + UseGPRForF16_F32 = !IsFixed; + UseGPRForF64 = !IsFixed; + break; + } + if (State.getFirstUnallocated(ArgFPR32s) == array_lengthof(ArgFPR32s)) { + UseGPRForF16_F32 = true; + UseGPRForF64 = true; + } + if (UseGPRForF16_F32 && (ValVT == MVT::f16 || ValVT == MVT::f32)) { + LocVT = XLenVT; + LocInfo = CCValAssign::BCvt; + } + else if (UseGPRForF64 && XLen == 64 && ValVT == MVT::f64) { + LocVT = MVT::i64; + LocInfo = CCValAssign::BCvt; + } + unsigned TwoXLenInBytes = (2 * XLen) / 8; + if (!IsFixed && ArgFlags.getNonZeroOrigAlign() == TwoXLenInBytes && DL.getTypeAllocSize(OrigTy) == TwoXLenInBytes) { + unsigned RegIdx = State.getFirstUnallocated(ArgGPRs); + if (RegIdx != array_lengthof(ArgGPRs) && RegIdx % 2 == 1) { + State.AllocateReg(ArgGPRs); + } + } + SmallVectorImpl &PendingLocs = State.getPendingLocs(); + SmallVectorImpl &PendingArgFlags = State.getPendingArgFlags(); + assert(PendingLocs.size() == PendingArgFlags.size() && "PendingLocs and PendingArgFlags out of sync"); + if (UseGPRForF64 && XLen == 32 && ValVT == MVT::f64) { + assert(!ArgFlags.isSplit() && PendingLocs.empty() && "Can't lower f64 if it is split"); + Register Reg = State.AllocateReg(ArgGPRs); + LocVT = MVT::i32; + if (!Reg) { + unsigned StackOffset = State.AllocateStack(8, Align(8)); + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + if (!State.AllocateReg(ArgGPRs)) { + State.AllocateStack(4, Align(4)); + } + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ArgFlags.isSplit() || !PendingLocs.empty()) { + LocVT = XLenVT; + LocInfo = CCValAssign::Indirect; + PendingLocs.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); + PendingArgFlags.push_back(ArgFlags); + if (!ArgFlags.isSplitEnd()) { + return false; + } + } + if (ArgFlags.isSplitEnd() && PendingLocs.size() <= 2) { + assert(PendingLocs.size() == 2 && "Unexpected PendingLocs.size()"); + CCValAssign VA = PendingLocs[0]; + ISD::ArgFlagsTy AF = PendingArgFlags[0]; + PendingLocs.clear(); + PendingArgFlags.clear(); + unsigned XLenInBytes = XLen / 8; + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(VA1.getValNo(), VA1.getValVT(), Reg, VA1.getLocVT(), CCValAssign::Full)); + } + else { + Align StackAlign = std::max(Align(XLenInBytes), ArgFlags1.getNonZeroOrigAlign()); + State.addLoc(CCValAssign::getMem(VA1.getValNo(), VA1.getValVT(), State.AllocateStack(XLenInBytes, StackAlign), VA1.getLocVT(), CCValAssign::Full)); + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + return false; + } + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(ValNo2, ValVT2, Reg, LocVT2, CCValAssign::Full)); + } + else { + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + } + return false; + } + Register Reg; + if (ValVT == MVT::f16 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR16s); + } + else if (ValVT == MVT::f32 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR32s); + } + else if (ValVT == MVT::f64 && !UseGPRForF64) { + Reg = State.AllocateReg(ArgFPR64s); + } + else if (ValVT.isScalableVector()) { + const TargetRegisterClass *RC = TLI.getRegClassFor(ValVT); + if (RC == &RISCV::VRRegClass) { + if (FirstMaskArgument.hasValue() && ValNo == FirstMaskArgument.getValue()) { + Reg = State.AllocateReg(RISCV::V0); + } + else { + Reg = State.AllocateReg(ArgVRs); + } + } + else if (RC == &RISCV::VRM2RegClass) { + Reg = State.AllocateReg(ArgVRM2s); + } + else if (RC == &RISCV::VRM4RegClass) { + Reg = State.AllocateReg(ArgVRM4s); + } + else if (RC == &RISCV::VRM8RegClass) { + Reg = State.AllocateReg(ArgVRM8s); + } + else { + llvm_unreachable("Unhandled class register for ValueType"); + } + if (!Reg) { + LocInfo = CCValAssign::Indirect; + Reg = State.AllocateReg(ArgGPRs); + LocVT = XLenVT; + } + } + else { + Reg = State.AllocateReg(ArgGPRs); + } + unsigned StackOffset = Reg ? 0 : State.AllocateStack(XLen / 8, Align(XLen / 8)); + if (!PendingLocs.empty()) { + assert(ArgFlags.isSplitEnd() && "Expected ArgFlags.isSplitEnd()"); + assert(PendingLocs.size() > 2 && "Unexpected PendingLocs.size()"); + for (auto &It : PendingLocs) { + if (Reg) + It.convertToReg(Reg); + else + It.convertToMem(StackOffset); + State.addLoc(It); + } + PendingLocs.clear(); + PendingArgFlags.clear(); + return false; + } + assert((!UseGPRForF16_F32 || !UseGPRForF64 || LocVT == XLenVT || (TLI.getSubtarget().hasStdExtV() && ValVT.isScalableVector())) && "Expected an XLenVT or scalable vector types at this stage"); + if (Reg) { + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ValVT.isFloatingPoint()) { + LocVT = ValVT; + LocInfo = CCValAssign::Full; + } + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + if (CC_RISCV(MF.getDataLayout(), ABI, i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, CCInfo, true, IsRet, ArgTy, *this, FirstMaskArgument)) { + LLVM_DEBUG(dbgs() << "InputArg #" << i << " has unhandled type " << EVT(ArgVT).getEVTString() << '\n'); + llvm_unreachable(nullptr); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2c9f60ce6caff0ffd02b84657be3bcebbdb39e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp @@ -0,0 +1,184 @@ +void RISCVTargetLowering::analyzeOutputArgs(MachineFunction &MF, CCState &CCInfo, const SmallVectorImpl &Outs, bool IsRet, CallLoweringInfo *CLI) const { + unsigned NumArgs = Outs.size(); + Optional FirstMaskArgument; + if (Subtarget.hasStdExtV()) { + FirstMaskArgument = None; + for (const auto &ArgIdx : enumerate(Args)) { + MVT ArgVT = ArgIdx.value().VT; + if (ArgVT.isScalableVector() && ArgVT.getVectorElementType().SimpleTy == MVT::i1) { + FirstMaskArgument = ArgIdx.index(); + } + } + } + for (unsigned i = 0; i != NumArgs; i++) { + MVT ArgVT = Outs[i].VT; + ISD::ArgFlagsTy ArgFlags = Outs[i].Flags; + Type *OrigTy = CLI ? CLI->getArgs()[Outs[i].OrigArgIndex].Ty : nullptr; + RISCVABI::ABI ABI = MF.getSubtarget().getTargetABI(); + unsigned XLen = DL.getLargestLegalIntTypeSizeInBits(); + assert(XLen == 32 || XLen == 64); + MVT XLenVT = XLen == 32 ? MVT::i32 : MVT::i64; + if (IsRet && ValNo > 1) { + return true; + } + bool UseGPRForF16_F32 = true; + bool UseGPRForF64 = true; + switch (ABI) { + default: + llvm_unreachable("Unexpected ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + break; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + UseGPRForF16_F32 = !IsFixed; + break; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + UseGPRForF16_F32 = !IsFixed; + UseGPRForF64 = !IsFixed; + break; + } + if (State.getFirstUnallocated(ArgFPR32s) == array_lengthof(ArgFPR32s)) { + UseGPRForF16_F32 = true; + UseGPRForF64 = true; + } + if (UseGPRForF16_F32 && (ValVT == MVT::f16 || ValVT == MVT::f32)) { + LocVT = XLenVT; + LocInfo = CCValAssign::BCvt; + } + else if (UseGPRForF64 && XLen == 64 && ValVT == MVT::f64) { + LocVT = MVT::i64; + LocInfo = CCValAssign::BCvt; + } + unsigned TwoXLenInBytes = (2 * XLen) / 8; + if (!IsFixed && ArgFlags.getNonZeroOrigAlign() == TwoXLenInBytes && DL.getTypeAllocSize(OrigTy) == TwoXLenInBytes) { + unsigned RegIdx = State.getFirstUnallocated(ArgGPRs); + if (RegIdx != array_lengthof(ArgGPRs) && RegIdx % 2 == 1) { + State.AllocateReg(ArgGPRs); + } + } + SmallVectorImpl &PendingLocs = State.getPendingLocs(); + SmallVectorImpl &PendingArgFlags = State.getPendingArgFlags(); + assert(PendingLocs.size() == PendingArgFlags.size() && "PendingLocs and PendingArgFlags out of sync"); + if (UseGPRForF64 && XLen == 32 && ValVT == MVT::f64) { + assert(!ArgFlags.isSplit() && PendingLocs.empty() && "Can't lower f64 if it is split"); + Register Reg = State.AllocateReg(ArgGPRs); + LocVT = MVT::i32; + if (!Reg) { + unsigned StackOffset = State.AllocateStack(8, Align(8)); + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + if (!State.AllocateReg(ArgGPRs)) { + State.AllocateStack(4, Align(4)); + } + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ArgFlags.isSplit() || !PendingLocs.empty()) { + LocVT = XLenVT; + LocInfo = CCValAssign::Indirect; + PendingLocs.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); + PendingArgFlags.push_back(ArgFlags); + if (!ArgFlags.isSplitEnd()) { + return false; + } + } + if (ArgFlags.isSplitEnd() && PendingLocs.size() <= 2) { + assert(PendingLocs.size() == 2 && "Unexpected PendingLocs.size()"); + CCValAssign VA = PendingLocs[0]; + ISD::ArgFlagsTy AF = PendingArgFlags[0]; + PendingLocs.clear(); + PendingArgFlags.clear(); + unsigned XLenInBytes = XLen / 8; + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(VA1.getValNo(), VA1.getValVT(), Reg, VA1.getLocVT(), CCValAssign::Full)); + } + else { + Align StackAlign = std::max(Align(XLenInBytes), ArgFlags1.getNonZeroOrigAlign()); + State.addLoc(CCValAssign::getMem(VA1.getValNo(), VA1.getValVT(), State.AllocateStack(XLenInBytes, StackAlign), VA1.getLocVT(), CCValAssign::Full)); + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + return false; + } + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(ValNo2, ValVT2, Reg, LocVT2, CCValAssign::Full)); + } + else { + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + } + return false; + } + Register Reg; + if (ValVT == MVT::f16 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR16s); + } + else if (ValVT == MVT::f32 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR32s); + } + else if (ValVT == MVT::f64 && !UseGPRForF64) { + Reg = State.AllocateReg(ArgFPR64s); + } + else if (ValVT.isScalableVector()) { + const TargetRegisterClass *RC = TLI.getRegClassFor(ValVT); + if (RC == &RISCV::VRRegClass) { + if (FirstMaskArgument.hasValue() && ValNo == FirstMaskArgument.getValue()) { + Reg = State.AllocateReg(RISCV::V0); + } + else { + Reg = State.AllocateReg(ArgVRs); + } + } + else if (RC == &RISCV::VRM2RegClass) { + Reg = State.AllocateReg(ArgVRM2s); + } + else if (RC == &RISCV::VRM4RegClass) { + Reg = State.AllocateReg(ArgVRM4s); + } + else if (RC == &RISCV::VRM8RegClass) { + Reg = State.AllocateReg(ArgVRM8s); + } + else { + llvm_unreachable("Unhandled class register for ValueType"); + } + if (!Reg) { + LocInfo = CCValAssign::Indirect; + Reg = State.AllocateReg(ArgGPRs); + LocVT = XLenVT; + } + } + else { + Reg = State.AllocateReg(ArgGPRs); + } + unsigned StackOffset = Reg ? 0 : State.AllocateStack(XLen / 8, Align(XLen / 8)); + if (!PendingLocs.empty()) { + assert(ArgFlags.isSplitEnd() && "Expected ArgFlags.isSplitEnd()"); + assert(PendingLocs.size() > 2 && "Unexpected PendingLocs.size()"); + for (auto &It : PendingLocs) { + if (Reg) + It.convertToReg(Reg); + else + It.convertToMem(StackOffset); + State.addLoc(It); + } + PendingLocs.clear(); + PendingArgFlags.clear(); + return false; + } + assert((!UseGPRForF16_F32 || !UseGPRForF64 || LocVT == XLenVT || (TLI.getSubtarget().hasStdExtV() && ValVT.isScalableVector())) && "Expected an XLenVT or scalable vector types at this stage"); + if (Reg) { + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ValVT.isFloatingPoint()) { + LocVT = ValVT; + LocInfo = CCValAssign::Full; + } + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + if (CC_RISCV(MF.getDataLayout(), ABI, i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, CCInfo, Outs[i].IsFixed, IsRet, OrigTy, *this, FirstMaskArgument)) { + LLVM_DEBUG(dbgs() << "OutputArg #" << i << " has unhandled type " << EVT(ArgVT).getEVTString() << "\n"); + llvm_unreachable(nullptr); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb60f440f2c3d49c6bd08e043910840c8c738be3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp @@ -0,0 +1,27 @@ +void RISCVTargetLowering::computeKnownBitsForTargetNode(const SDValue Op, KnownBits &Known, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth) const { + KnownZero = KnownOne = APInt(KnownOne.getBitWidth(), 0); + APInt KnownZero2; + APInt KnownOne2; + unsigned BitWidth = Known.getBitWidth(); + unsigned Opc = Op.getOpcode(); + EVT VT = Op.getValueType(); + assert((Opc >= ISD::BUILTIN_OP_END || Opc == ISD::INTRINSIC_WO_CHAIN || Opc == ISD::INTRINSIC_W_CHAIN || Opc == ISD::INTRINSIC_VOID) && "Should use MaskedValueIsZero if you don't know whether Op is a target node!"); + Known.resetAll(); + if (Op.getOpcode() == RISCVISD::REMUW) { + KnownBits Known2; + Known = DAG.computeKnownBits(Op.getOperand(0), DemandedElts, Depth + 1); + Known2 = DAG.computeKnownBits(Op.getOperand(1), DemandedElts, Depth + 1); + Known = KnownBits::urem(Known.trunc(32), Known2.trunc(32)); + Known = Known.sext(BitWidth); + } + if (Op.getOpcode() == RISCVISD::DIVUW) { + KnownBits Known2; + Known = DAG.computeKnownBits(Op.getOperand(0), DemandedElts, Depth + 1); + Known2 = DAG.computeKnownBits(Op.getOperand(1), DemandedElts, Depth + 1); + Known = KnownBits::udiv(Known.trunc(32), Known2.trunc(32)); + Known = Known.sext(BitWidth); + } + if (Op.getOpcode() == RISCVISD::READ_VLENB) { + Known.Zero.setLowBits(3); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1bfd4ff9c0142d140fa2d0204586a61289d84a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp @@ -0,0 +1,3 @@ +bool convertSelectOfConstantsToMath(EVT VT) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3721be5b16c34bcd975aeae2f4dce484d080226 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp @@ -0,0 +1,3 @@ +bool convertSetCCLogicToBitwiseLogic(EVT VT) const override { + return VT.isScalarInteger(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a5c7fcf9043b0cab2a9beb5f9f97e9405099052 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp @@ -0,0 +1,24 @@ +bool RISCVTargetLowering::decomposeMulByConstant(LLVMContext &Context, EVT VT, SDValue C) const { + if (!VT.isScalarInteger()) { + return false; + } + if (Subtarget.hasStdExtM() && VT.getSizeInBits() > Subtarget.getXLen()) { + return false; + } + if (auto *ConstNode = dyn_cast(C.getNode())) { + const APInt &Imm = ConstNode->getAPIntValue(); + if ((Imm + 1).isPowerOf2() || (Imm - 1).isPowerOf2() || (1 - Imm).isPowerOf2() || (-1 - Imm).isPowerOf2()) { + return true; + } + if (Subtarget.hasStdExtM() && VT.getSizeInBits() >= Subtarget.getXLen()) { + return false; + } + if (!Imm.isSignedIntN(12) && Imm.countTrailingZeros() < 12) { + APInt ImmS = Imm.ashr(Imm.countTrailingZeros()); + if ((ImmS + 1).isPowerOf2() || (ImmS - 1).isPowerOf2() || (1 - ImmS).isPowerOf2()) { + return true; + } + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..509c7a0e3f0b5b7d1c9ddc616ed049a5f0648f15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp @@ -0,0 +1,9 @@ +Instruction *RISCVTargetLowering::emitLeadingFence(IRBuilder<> &Builder, Instruction *Inst, AtomicOrdering Ord) const { + if (isa(Inst) && Ord == AtomicOrdering::SequentiallyConsistent) { + return Builder.CreateFence(Ord); + } + if (isa(Inst) && isReleaseOrStronger(Ord)) { + return Builder.CreateFence(AtomicOrdering::Release); + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..abfa250a03dc885e387fa3aca22d89acdc995376 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp @@ -0,0 +1,18 @@ +Value *RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(IRBuilder<> &Builder, AtomicCmpXchgInst *CI, Value *AlignedAddr, Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const { + unsigned XLen = Subtarget.getXLen(); + Value *Ordering = Builder.getIntN(XLen, static_cast(Ord)); + Intrinsic::ID CmpXchgIntrID = Intrinsic::riscv_masked_cmpxchg_i32; + if (XLen == 64) { + CmpVal = Builder.CreateSExt(CmpVal, Builder.getInt64Ty()); + NewVal = Builder.CreateSExt(NewVal, Builder.getInt64Ty()); + Mask = Builder.CreateSExt(Mask, Builder.getInt64Ty()); + CmpXchgIntrID = Intrinsic::riscv_masked_cmpxchg_i64; + } + Type *Tys[] = {AlignedAddr->getType()}; + Function *MaskedCmpXchg = Intrinsic::getDeclaration(CI->getModule(), CmpXchgIntrID, Tys); + Value *Result = Builder.CreateCall(MaskedCmpXchg, {AlignedAddr, CmpVal, NewVal, Mask, Ordering}); + if (XLen == 64) { + Result = Builder.CreateTrunc(Result, Builder.getInt32Ty()); + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3ee2d975b835746f82a0da490b18a4385d0a50f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp @@ -0,0 +1,70 @@ +Value *RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(IRBuilder<> &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr, Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const { + unsigned XLen = Subtarget.getXLen(); + Value *Ordering = Builder.getIntN(XLen, static_cast(AI->getOrdering())); + Type *Tys[] = {AlignedAddr->getType()}; + Function *LrwOpScwLoop = Intrinsic::getDeclaration(AI->getModule(), getIntrinsicForMaskedAtomicRMWBinOp(XLen, AI->getOperation()), Tys); + if (XLen == 32) { + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + return Intrinsic::riscv_masked_atomicrmw_xchg_i32; + case AtomicRMWInst::Add: + return Intrinsic::riscv_masked_atomicrmw_add_i32; + case AtomicRMWInst::Sub: + return Intrinsic::riscv_masked_atomicrmw_sub_i32; + case AtomicRMWInst::Nand: + return Intrinsic::riscv_masked_atomicrmw_nand_i32; + case AtomicRMWInst::Max: + return Intrinsic::riscv_masked_atomicrmw_max_i32; + case AtomicRMWInst::Min: + return Intrinsic::riscv_masked_atomicrmw_min_i32; + case AtomicRMWInst::UMax: + return Intrinsic::riscv_masked_atomicrmw_umax_i32; + case AtomicRMWInst::UMin: + return Intrinsic::riscv_masked_atomicrmw_umin_i32; + } + } + if (XLen == 64) { + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + return Intrinsic::riscv_masked_atomicrmw_xchg_i64; + case AtomicRMWInst::Add: + return Intrinsic::riscv_masked_atomicrmw_add_i64; + case AtomicRMWInst::Sub: + return Intrinsic::riscv_masked_atomicrmw_sub_i64; + case AtomicRMWInst::Nand: + return Intrinsic::riscv_masked_atomicrmw_nand_i64; + case AtomicRMWInst::Max: + return Intrinsic::riscv_masked_atomicrmw_max_i64; + case AtomicRMWInst::Min: + return Intrinsic::riscv_masked_atomicrmw_min_i64; + case AtomicRMWInst::UMax: + return Intrinsic::riscv_masked_atomicrmw_umax_i64; + case AtomicRMWInst::UMin: + return Intrinsic::riscv_masked_atomicrmw_umin_i64; + } + } + llvm_unreachable("Unexpected XLen\n"); + if (XLen == 64) { + Incr = Builder.CreateSExt(Incr, Builder.getInt64Ty()); + Mask = Builder.CreateSExt(Mask, Builder.getInt64Ty()); + ShiftAmt = Builder.CreateSExt(ShiftAmt, Builder.getInt64Ty()); + } + Value *Result; + if (AI->getOperation() == AtomicRMWInst::Min || AI->getOperation() == AtomicRMWInst::Max) { + const DataLayout &DL = AI->getModule()->getDataLayout(); + unsigned ValWidth = DL.getTypeStoreSizeInBits(AI->getValOperand()->getType()); + Value *SextShamt = Builder.CreateSub(Builder.getIntN(XLen, XLen - ValWidth), ShiftAmt); + Result = Builder.CreateCall(LrwOpScwLoop, {AlignedAddr, Incr, Mask, SextShamt, Ordering}); + } + else { + Result = Builder.CreateCall(LrwOpScwLoop, {AlignedAddr, Incr, Mask, Ordering}); + } + if (XLen == 64) { + Result = Builder.CreateTrunc(Result, Builder.getInt32Ty()); + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..787eeb8fc972fa00907f61c8d38b99dc41fd1fb5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp @@ -0,0 +1,8 @@ +Instruction *RISCVTargetLowering::emitTrailingFence(IRBuilder<> &Builder, Instruction *Inst, AtomicOrdering Ord) const { + if (isAcquireOrStronger(Ord)) { + if (isa(Inst)) { + return Builder.CreateFence(AtomicOrdering::Acquire); + } + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getAddr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..45b896e36009000a6701f992a091e5a60a139227 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getAddr.cpp @@ -0,0 +1,25 @@ +template SDValue RISCVTargetLowering::getAddr(NodeTy *N, SelectionDAG &DAG, bool IsLocal) const { + SDLoc DL(N); + EVT Ty = getPointerTy(DAG.getDataLayout()); + if (isPositionIndependent()) { + SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0); + if (IsLocal) { + return SDValue(DAG.getMachineNode(RISCV::PseudoLLA, DL, Ty, Addr), 0); + } + return SDValue(DAG.getMachineNode(RISCV::PseudoLA, DL, Ty, Addr), 0); + } + switch (getTargetMachine().getCodeModel()) { + default: + report_fatal_error("Unsupported code model for lowering"); + case CodeModel::Small: { + SDValue AddrHi = getTargetNode(N, DL, Ty, DAG, RISCVII::MO_HI); + SDValue AddrLo = getTargetNode(N, DL, Ty, DAG, RISCVII::MO_LO); + SDValue MNHi = SDValue(DAG.getMachineNode(RISCV::LUI, DL, Ty, AddrHi), 0); + return SDValue(DAG.getMachineNode(RISCV::ADDI, DL, Ty, MNHi, AddrLo), 0); + } + case CodeModel::Medium: { + SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0); + return SDValue(DAG.getMachineNode(RISCV::PseudoLLA, DL, Ty, Addr), 0); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getConstraintType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..915131641ca5dd4cc6c2356db00e6fd67b5b82b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getConstraintType.cpp @@ -0,0 +1,17 @@ +RISCVTargetLowering::ConstraintType RISCVTargetLowering::getConstraintType(StringRef Constraint) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default: + break; + case 'f': + return C_RegisterClass; + case 'I': + case 'J': + case 'K': + return C_Immediate; + case 'A': + return C_Memory; + } + } + return TargetLowering::getConstraintType(Constraint); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46ed5ac12e9f62e6e019a25294f0fc96f25d8f4d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp @@ -0,0 +1,16 @@ +SDValue RISCVTargetLowering::getDynamicTLSAddr(GlobalAddressSDNode *N, SelectionDAG &DAG) const { + SDLoc DL(N); + EVT Ty = getPointerTy(DAG.getDataLayout()); + IntegerType *CallTy = Type::getIntNTy(*DAG.getContext(), Ty.getSizeInBits()); + const GlobalValue *GV = N->getGlobal(); + SDValue Addr = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, 0); + SDValue Load = SDValue(DAG.getMachineNode(RISCV::PseudoLA_TLS_GD, DL, Ty, Addr), 0); + ArgListTy Args; + ArgListEntry Entry; + Entry.Node = Load; + Entry.Ty = CallTy; + Args.push_back(Entry); + TargetLowering::CallLoweringInfo CLI(DAG); + CLI.setDebugLoc(DL).setChain(DAG.getEntryNode()).setLibCallee(CallingConv::C, CallTy, DAG.getExternalSymbol("__tls_get_addr", Ty), std::move(Args)); + return LowerCallTo(CLI).first; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eb02e54d876a19eac0a9f798a894bdb8ad094aa6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp @@ -0,0 +1,3 @@ +Register RISCVTargetLowering::getExceptionPointerRegister(const Constant *PersonalityFn) const { + return RISCV::X10; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d21248ae6b5a38fab11aef82cb88fdc8ad6f6150 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp @@ -0,0 +1,3 @@ +Register RISCVTargetLowering::getExceptionSelectorRegister(const Constant *PersonalityFn) const { + return RISCV::X11; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4fbe6c054b9796da3f9e9476976964f562a3e55a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp @@ -0,0 +1,3 @@ +ISD::NodeType getExtendForAtomicCmpSwapArg() const override { + return ISD::SIGN_EXTEND; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8115491be720522f593d5b6c220ecf0659c42759 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp @@ -0,0 +1,3 @@ +ISD::NodeType getExtendForAtomicOps() const override { + return ISD::SIGN_EXTEND; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b639b42ebb4b943ce1428b84bd6d6574cc675104 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp @@ -0,0 +1,11 @@ +unsigned RISCVTargetLowering::getInlineAsmMemConstraint(StringRef ConstraintCode) const { + if (ConstraintCode.size() == 1) { + switch (ConstraintCode[0]) { + case 'A': + return InlineAsm::Constraint_A; + default: + break; + } + } + return TargetLowering::getInlineAsmMemConstraint(ConstraintCode); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ac4daeba93b2ffd55e6fd6f2b28fe3ddeae1fc4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp @@ -0,0 +1,6 @@ +MVT RISCVTargetLowering::getPointerMemTy(const DataLayout &DL, uint32_t AS) const { + if(AS == UINT32_MAX) { + AS = 0; + } + return MVT::getIntegerVT(DL.getPointerSizeInBits(AS)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPointerTy.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPointerTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a08da433397b663a71351d0e0cf4256e93e59c50 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPointerTy.cpp @@ -0,0 +1,6 @@ +MVT RISCVTargetLowering::getPointerTy(const DataLayout &DL, uint32_t AS) const { + if(AS == UINT32_MAX) { + AS = 0; + } + return MVT::getIntegerVT(DL.getPointerSizeInBits(AS)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f62882d4b32f0dbd1cfa5c8669256a54ab3259d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp @@ -0,0 +1,35 @@ + +bool RISCVTargetLowering::getPostIndexedAddressParts(SDNode *N, SDNode *Op, SDValue &Base, SDValue &Offset, ISD::MemIndexedMode &AM, SelectionDAG &DAG) const { + EVT VT; + SDValue BaseFromLDST; + if (LoadSDNode *LD = dyn_cast(N)) { + VT = LD->getMemoryVT(); + BaseFromLDST = LD->getBasePtr(); + } + else if (StoreSDNode *ST = dyn_cast(N)) { + BaseFromLDST = ST->getBasePtr(); + VT = ST->getMemoryVT(); + } + else { + return false; + } + if (Op->getOpcode() == ISD::ADD) { + AM = ISD::POST_INC; + Base = Op->getOperand(0); + Offset = Op->getOperand(1); + if (BaseFromLDST != Base && BaseFromLDST == Offset) { + std::swap(Base, Offset); + } + if (!(VT == MVT::i8 || VT == MVT::i16 || VT == MVT::i32)) { + return false; + } + if (ConstantSDNode *ConstOffset = dyn_cast(Offset)) { + uint64_t imm = ConstOffset->getZExtValue(); + if (!isInt<12>(imm)) { + return false; + } + } + return BaseFromLDST == Base; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..700e248e4992dd8745c5e6bbf6198c37e1d39e67 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,349 @@ +std::pair RISCVTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const { + if (Constraint.size() == 1) { + if (Constraint[0] == 'r') { + return std::make_pair(0U, &RISCV::GPRRegClass); + } + if (Constraint[0] == 'f') { + if (Subtarget.hasStdExtF()) { + if (VT == MVT::f32) { + return std::make_pair(0U, &RISCV::FPR32RegClass); + } + } + if (Subtarget.hasStdExtD()) { + if (VT == MVT::f64) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + } + if (Subtarget.hasStdExtZfh()) { + if (VT == MVT::f16) { + return std::make_pair(0U, &RISCV::FPR16RegClass); + } + } + if (Subtarget.hasStdExtXSmallfloat()) { + if (VT == MVT::v2f32) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v4f16) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v4bf16) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v4i16) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v8i8) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + } + } + } + unsigned XRegFromAlias = RISCV::NoRegister; + if (Constraint.lower() == "{zero}") { + XRegFromAlias = RISCV::X0; + } + if (Constraint.lower() == "{ra}") { + XRegFromAlias = RISCV::X1; + } + if (Constraint.lower() == "{sp}") { + XRegFromAlias = RISCV::X2; + } + if (Constraint.lower() == "{gp}") { + XRegFromAlias = RISCV::X3; + } + if (Constraint.lower() == "{tp}") { + XRegFromAlias = RISCV::X4; + } + if (Constraint.lower() == "{t0}") { + XRegFromAlias = RISCV::X5; + } + if (Constraint.lower() == "{t1}") { + XRegFromAlias = RISCV::X6; + } + if (Constraint.lower() == "{t2}") { + XRegFromAlias = RISCV::X7; + } + if (Constraint.lower() == "{s0}") { + XRegFromAlias = RISCV::X8; + } + if (Constraint.lower() == "{fp}") { + XRegFromAlias = RISCV::X8; + } + if (Constraint.lower() == "{s1}") { + XRegFromAlias = RISCV::X9; + } + if (Constraint.lower() == "{a0}") { + XRegFromAlias = RISCV::X10; + } + if (Constraint.lower() == "{a1}") { + XRegFromAlias = RISCV::X11; + } + if (Constraint.lower() == "{a2}") { + XRegFromAlias = RISCV::X12; + } + if (Constraint.lower() == "{a3}") { + XRegFromAlias = RISCV::X13; + } + if (Constraint.lower() == "{a4}") { + XRegFromAlias = RISCV::X14; + } + if (Constraint.lower() == "{a5}") { + XRegFromAlias = RISCV::X15; + } + if (Constraint.lower() == "{a6}") { + XRegFromAlias = RISCV::X16; + } + if (Constraint.lower() == "{a7}") { + XRegFromAlias = RISCV::X17; + } + if (Constraint.lower() == "{s2}") { + XRegFromAlias = RISCV::X18; + } + if (Constraint.lower() == "{s3}") { + XRegFromAlias = RISCV::X19; + } + if (Constraint.lower() == "{s4}") { + XRegFromAlias = RISCV::X20; + } + if (Constraint.lower() == "{s5}") { + XRegFromAlias = RISCV::X21; + } + if (Constraint.lower() == "{s6}") { + XRegFromAlias = RISCV::X22; + } + if (Constraint.lower() == "{s7}") { + XRegFromAlias = RISCV::X23; + } + if (Constraint.lower() == "{s8}") { + XRegFromAlias = RISCV::X24; + } + if (Constraint.lower() == "{s9}") { + XRegFromAlias = RISCV::X25; + } + if (Constraint.lower() == "{s10}") { + XRegFromAlias = RISCV::X26; + } + if (Constraint.lower() == "{s11}") { + XRegFromAlias = RISCV::X27; + } + if (Constraint.lower() == "{t3}") { + XRegFromAlias = RISCV::X28; + } + if (Constraint.lower() == "{t4}") { + XRegFromAlias = RISCV::X29; + } + if (Constraint.lower() == "{t5}") { + XRegFromAlias = RISCV::X30; + } + if (Constraint.lower() == "{t6}") { + XRegFromAlias = RISCV::X31; + } + if (XRegFromAlias != RISCV::NoRegister) { + return std::make_pair(XRegFromAlias, &RISCV::GPRRegClass); + } + if (Subtarget.hasStdExtF()) { + unsigned FReg = RISCV::NoRegister; + if (Constraint.lower() == "{f0}") { + FReg = RISCV::F0_F; + } + if (Constraint.lower() == "{ft0}") { + FReg = RISCV::F0_F; + } + if (Constraint.lower() == "{f1}") { + FReg = RISCV::F1_F; + } + if (Constraint.lower() == "{ft1}") { + FReg = RISCV::F1_F; + } + if (Constraint.lower() == "{f2}") { + FReg = RISCV::F2_F; + } + if (Constraint.lower() == "{ft2}") { + FReg = RISCV::F2_F; + } + if (Constraint.lower() == "{f3}") { + FReg = RISCV::F3_F; + } + if (Constraint.lower() == "{ft3}") { + FReg = RISCV::F3_F; + } + if (Constraint.lower() == "{f4}") { + FReg = RISCV::F4_F; + } + if (Constraint.lower() == "{ft4}") { + FReg = RISCV::F4_F; + } + if (Constraint.lower() == "{f5}") { + FReg = RISCV::F5_F; + } + if (Constraint.lower() == "{ft5}") { + FReg = RISCV::F5_F; + } + if (Constraint.lower() == "{f6}") { + FReg = RISCV::F6_F; + } + if (Constraint.lower() == "{ft6}") { + FReg = RISCV::F6_F; + } + if (Constraint.lower() == "{f7}") { + FReg = RISCV::F7_F; + } + if (Constraint.lower() == "{ft7}") { + FReg = RISCV::F7_F; + } + if (Constraint.lower() == "{f8}") { + FReg = RISCV::F8_F; + } + if (Constraint.lower() == "{ft8}") { + FReg = RISCV::F8_F; + } + if (Constraint.lower() == "{f9}") { + FReg = RISCV::F9_F; + } + if (Constraint.lower() == "{ft9}") { + FReg = RISCV::F9_F; + } + if (Constraint.lower() == "{f10}") { + FReg = RISCV::F10_F; + } + if (Constraint.lower() == "{ft10}") { + FReg = RISCV::F10_F; + } + if (Constraint.lower() == "{f11}") { + FReg = RISCV::F11_F; + } + if (Constraint.lower() == "{ft11}") { + FReg = RISCV::F11_F; + } + if (Constraint.lower() == "{f12}") { + FReg = RISCV::F12_F; + } + if (Constraint.lower() == "{ft12}") { + FReg = RISCV::F12_F; + } + if (Constraint.lower() == "{f13}") { + FReg = RISCV::F13_F; + } + if (Constraint.lower() == "{ft13}") { + FReg = RISCV::F13_F; + } + if (Constraint.lower() == "{f14}") { + FReg = RISCV::F14_F; + } + if (Constraint.lower() == "{ft14}") { + FReg = RISCV::F14_F; + } + if (Constraint.lower() == "{f15}") { + FReg = RISCV::F15_F; + } + if (Constraint.lower() == "{ft15}") { + FReg = RISCV::F15_F; + } + if (Constraint.lower() == "{f16}") { + FReg = RISCV::F16_F; + } + if (Constraint.lower() == "{ft16}") { + FReg = RISCV::F16_F; + } + if (Constraint.lower() == "{f17}") { + FReg = RISCV::F17_F; + } + if (Constraint.lower() == "{ft17}") { + FReg = RISCV::F17_F; + } + if (Constraint.lower() == "{f18}") { + FReg = RISCV::F18_F; + } + if (Constraint.lower() == "{ft18}") { + FReg = RISCV::F18_F; + } + if (Constraint.lower() == "{f19}") { + FReg = RISCV::F19_F; + } + if (Constraint.lower() == "{ft19}") { + FReg = RISCV::F19_F; + } + if (Constraint.lower() == "{f20}") { + FReg = RISCV::F20_F; + } + if (Constraint.lower() == "{ft20}") { + FReg = RISCV::F20_F; + } + if (Constraint.lower() == "{f21}") { + FReg = RISCV::F21_F; + } + if (Constraint.lower() == "{ft21}") { + FReg = RISCV::F21_F; + } + if (Constraint.lower() == "{f22}") { + FReg = RISCV::F22_F; + } + if (Constraint.lower() == "{ft22}") { + FReg = RISCV::F22_F; + } + if (Constraint.lower() == "{f23}") { + FReg = RISCV::F23_F; + } + if (Constraint.lower() == "{ft23}") { + FReg = RISCV::F23_F; + } + if (Constraint.lower() == "{f24}") { + FReg = RISCV::F24_F; + } + if (Constraint.lower() == "{ft24}") { + FReg = RISCV::F24_F; + } + if (Constraint.lower() == "{f25}") { + FReg = RISCV::F25_F; + } + if (Constraint.lower() == "{ft25}") { + FReg = RISCV::F25_F; + } + if (Constraint.lower() == "{f26}") { + FReg = RISCV::F26_F; + } + if (Constraint.lower() == "{ft26}") { + FReg = RISCV::F26_F; + } + if (Constraint.lower() == "{f27}") { + FReg = RISCV::F27_F; + } + if (Constraint.lower() == "{ft27}") { + FReg = RISCV::F27_F; + } + if (Constraint.lower() == "{f28}") { + FReg = RISCV::F28_F; + } + if (Constraint.lower() == "{ft28}") { + FReg = RISCV::F28_F; + } + if (Constraint.lower() == "{f29}") { + FReg = RISCV::F29_F; + } + if (Constraint.lower() == "{ft29}") { + FReg = RISCV::F29_F; + } + if (Constraint.lower() == "{f30}") { + FReg = RISCV::F30_F; + } + if (Constraint.lower() == "{ft30}") { + FReg = RISCV::F30_F; + } + if (Constraint.lower() == "{f31}") { + FReg = RISCV::F31_F; + } + if (Constraint.lower() == "{ft31}") { + FReg = RISCV::F31_F; + } + if (FReg != RISCV::NoRegister) { + assert(RISCV::F0_32 <= FReg && FReg <= RISCV::F31_32 && "Unknown fp-reg"); + if (Subtarget.hasStdExtD()) { + unsigned RegNo = FReg - RISCV::F0_F; + unsigned DReg = RISCV::F0_D + RegNo; + return std::make_pair(DReg, &RISCV::FPR64RegClass); + } + return std::make_pair(FReg, &RISCV::FPR32RegClass); + } + } + return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26ad342c7f779b295cd18cd28b9b3f8724c1896c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp @@ -0,0 +1,14 @@ +Register RISCVTargetLowering::getRegisterByName(const char *RegName, LLT VT, const MachineFunction &MF) const { + Register Reg = MatchRegisterAltName(RegName); + if (Reg == RISCV::NoRegister) { + Reg = MatchRegisterName(RegName); + } + if (Reg == RISCV::NoRegister) { + report_fatal_error(Twine("Invalid register name \"" + StringRef(RegName) + "\".")); + } + BitVector ReservedRegs = Subtarget.getRegisterInfo()->getReservedRegs(MF); + if (!ReservedRegs.test(Reg) && !Subtarget.isRegisterReservedByUser(Reg)) { + report_fatal_error(Twine("Trying to obtain non-reserved register \"" + StringRef(RegName) + "\".")); + } + return Reg; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4d550679f775347d981c7222c64f2be8cc69841 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp @@ -0,0 +1,3 @@ +MVT RISCVTargetLowering::getScalarShiftAmountTy(const DataLayout &DL, EVT) const { + return Subtarget.getXLenVT(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca330ad9133ea7d3b3682e5e651961f59d6709eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp @@ -0,0 +1,9 @@ +EVT RISCVTargetLowering::getSetCCResultType(const DataLayout &DL, LLVMContext &, EVT VT) const { + if (!VT.isVector()) { + return getPointerTy(DL); + } + if (Subtarget.hasStdExtV()) { + return MVT::getVectorVT(MVT::i1, VT.getVectorElementCount()); + } + return VT.changeVectorElementTypeToInteger(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f231109058dae006fecd5590954e0a119396b49 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp @@ -0,0 +1,19 @@ +SDValue RISCVTargetLowering::getStaticTLSAddr(GlobalAddressSDNode *N, SelectionDAG &DAG, bool UseGOT) const { + SDLoc DL(N); + EVT Ty = getPointerTy(DAG.getDataLayout()); + const GlobalValue *GV = N->getGlobal(); + MVT XLenVT = Subtarget.getXLenVT(); + if (UseGOT) { + SDValue Addr = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, 0); + SDValue Load = SDValue(DAG.getMachineNode(RISCV::PseudoLA_TLS_IE, DL, Ty, Addr), 0); + SDValue TPReg = DAG.getRegister(RISCV::X4, XLenVT); + return DAG.getNode(ISD::ADD, DL, Ty, Load, TPReg); + } + SDValue AddrHi = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, RISCVII::MO_TPREL_HI); + SDValue AddrAdd = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, RISCVII::MO_TPREL_ADD); + SDValue AddrLo = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, RISCVII::MO_TPREL_LO); + SDValue MNHi = SDValue(DAG.getMachineNode(RISCV::LUI, DL, Ty, AddrHi), 0); + SDValue TPReg = DAG.getRegister(RISCV::X4, XLenVT); + SDValue MNAdd = SDValue(DAG.getMachineNode(RISCV::PseudoAddTPRel, DL, Ty, MNHi, TPReg, AddrAdd), 0); + return SDValue(DAG.getMachineNode(RISCV::ADDI, DL, Ty, MNAdd, AddrLo), 0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getSubtarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getSubtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d7571dffca9b46bd58d715c218cba477a279eed --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getSubtarget.cpp @@ -0,0 +1,3 @@ +const RISCVSubtarget &getSubtarget() const { + return Subtarget; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2af7ef3833346212519e245d5021adcd5b7b5c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,123 @@ +const char *RISCVTargetLowering::getTargetNodeName(unsigned Opcode) const { + if ((RISCVISD::NodeType)Opcode == RISCVISD::RET_FLAG) { + return "RISCVISD::RET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::URET_FLAG) { + return "RISCVISD::URET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SRET_FLAG) { + return "RISCVISD::SRET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::MRET_FLAG) { + return "RISCVISD::MRET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::CALL) { + return "RISCVISD::CALL"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SELECT_CC) { + return "RISCVISD::SELECT_CC"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::BuildPairF64) { + return "RISCVISD::BuildPairF64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SplitF64) { + return "RISCVISD::SplitF64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::TAIL) { + return "RISCVISD::TAIL"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_X_ANYEXTH) { + return "RISCVISD::FMV_X_ANYEXTH"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_W_X_RV64) { + return "RISCVISD::FMV_W_X_RV64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_X_ANYEXTW_RV64) { + return "RISCVISD::FMV_X_ANYEXTW_RV64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::READ_CYCLE_WIDE) { + return "RISCVISD::READ_CYCLE_WIDE"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GREVI) { + return "RISCVISD::GREVI"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GREVIW) { + return "RISCVISD::GREVIW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GORCI) { + return "RISCVISD::GORCI"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GORCIW) { + return "RISCVISD::GORCIW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VMV_X_S) { + return "RISCVISD::VMV_X_S"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SPLAT_VECTOR_I64) { + return "RISCVISD::SPLAT_VECTOR_I64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::READ_VLENB) { + return "RISCVISD::READ_VLENB"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::TRUNCATE_VECTOR) { + return "RISCVISD::TRUNCATE_VECTOR"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLEFF) { + return "RISCVISD::VLEFF"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLEFF_MASK) { + return "RISCVISD::VLEFF_MASK"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLSEGFF) { + return "RISCVISD::VLSEGFF"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLSEGFF_MASK) { + return "RISCVISD::VLSEGFF_MASK"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::READ_VL) { + return "RISCVISD::READ_VL"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VSLIDEUP) { + return "RISCVISD::VSLIDEUP"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VSLIDEDOWN) { + return "RISCVISD::VSLIDEDOWN"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VID) { + return "RISCVISD::VID"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_H_X) { + return "RISCVISD::FMV_H_X"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FSRW) { + return "RISCVISD::FSRW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FSLW) { + return "RISCVISD::FSLW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::RORW) { + return "RISCVISD::RORW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::ROLW) { + return "RISCVISD::ROLW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::REMUW) { + return "RISCVISD::REMUW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::DIVUW) { + return "RISCVISD::DIVUW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::DIVW) { + return "RISCVISD::DIVW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SRLW) { + return "RISCVISD::SRLW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SRAW) { + return "RISCVISD::SRAW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SLLW) { + return "RISCVISD::SLLW"; + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d8deda7d83d9f59a857e66fddd44324aa0de609 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp @@ -0,0 +1,93 @@ +bool RISCVTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, MachineFunction &MF, unsigned Intrinsic) const { + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_xchg_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_add_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_sub_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_nand_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_max_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_min_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_umax_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_umin_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_cmpxchg_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1c41f213e055244de1922cb5a036fe323993663 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::hasBitPreservingFPLogic(EVT VT) const { + return (VT == MVT::f16 && Subtarget.hasStdExtZfh()) || (VT == MVT::f32 && Subtarget.hasStdExtF()) || (VT == MVT::f64 && Subtarget.hasStdExtD()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d9f871f13e0b61779ec7b7ac0e64443ee06b43f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isCheapToSpeculateCtlz() const { + return Subtarget.hasStdExtZbb(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9a2e056622fab5c51755ed36e67138289278601 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isCheapToSpeculateCttz() const { + return Subtarget.hasStdExtZbb(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..972b11ab3501171966e3bfd4b96ec82355cbbcaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp @@ -0,0 +1,24 @@ +bool RISCVTargetLowering::isDesirableToCommuteWithShift(const SDNode *N, CombineLevel Level) const { + SDValue N0 = N->getOperand(0); + EVT Ty = N0.getValueType(); + if (Ty.isScalarInteger() && (N0.getOpcode() == ISD::ADD || N0.getOpcode() == ISD::OR)) { + auto *C1 = dyn_cast(N0->getOperand(1)); + auto *C2 = dyn_cast(N->getOperand(1)); + if (C1 && C2) { + const APInt &C1Int = C1->getAPIntValue(); + APInt ShiftedC1Int = C1Int << C2->getAPIntValue(); + if (ShiftedC1Int.getMinSignedBits() <= 64 && isLegalAddImmediate(ShiftedC1Int.getSExtValue())) { + return true; + } + if (C1Int.getMinSignedBits() <= 64 && isLegalAddImmediate(C1Int.getSExtValue())) { + return false; + } + int C1Cost = RISCVMatInt::getIntMatCost(C1Int, Ty.getSizeInBits(), Subtarget.is64Bit()); + int ShiftedC1Cost = RISCVMatInt::getIntMatCost(ShiftedC1Int, Ty.getSizeInBits(), Subtarget.is64Bit()); + if (C1Cost < ShiftedC1Cost) { + return false; + } + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ade96d77d668102258fdfb941e8165d21a19205 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp @@ -0,0 +1,44 @@ + +bool RISCVTargetLowering::isEligibleForTailCallOptimization(CCState &CCInfo, CallLoweringInfo &CLI, MachineFunction &MF, const SmallVector &ArgLocs) const { + auto &Callee = CLI.Callee; + auto CalleeCC = CLI.CallConv; + auto &Outs = CLI.Outs; + auto &Caller = MF.getFunction(); + auto CallerCC = Caller.getCallingConv(); + if (Caller.hasFnAttribute("interrupt")) { + return false; + } + if (CCInfo.getNextStackOffset() != 0) { + return false; + } + for (auto &VA : ArgLocs) { + if (VA.getLocInfo() == CCValAssign::Indirect) { + return false; + } + } + auto IsCallerStructRet = Caller.hasStructRetAttr(); + auto IsCalleeStructRet = Outs.empty() ? false : Outs[0].Flags.isSRet(); + if (IsCallerStructRet || IsCalleeStructRet) { + return false; + } + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + const GlobalValue *GV = G->getGlobal(); + if (GV->hasExternalWeakLinkage()) { + return false; + } + } + const RISCVRegisterInfo *TRI = Subtarget.getRegisterInfo(); + const uint32_t *CallerPreserved = TRI->getCallPreservedMask(MF, CallerCC); + if (CalleeCC != CallerCC) { + const uint32_t *CalleePreserved = TRI->getCallPreservedMask(MF, CalleeCC); + if (!TRI->regmaskSubsetEqual(CallerPreserved, CalleePreserved)) { + return false; + } + } + for (auto &Arg : Outs) { + if (Arg.Flags.isByVal()) { + return false; + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2056d0ac4e9581359873184d0cedfb79ae3e2723 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp @@ -0,0 +1,17 @@ +bool RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(const MachineFunction &MF, EVT VT) const { + VT = VT.getScalarType(); + if (!VT.isSimple()) { + return false; + } + switch (VT.getSimpleVT().SimpleTy) { + case MVT::f16: + return Subtarget.hasStdExtZfh(); + case MVT::f32: + return Subtarget.hasStdExtF(); + case MVT::f64: + return Subtarget.hasStdExtD(); + default: + break; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36936d70cb866640bf90c1d991e6af92243eec59 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp @@ -0,0 +1,21 @@ +bool RISCVTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT, bool ForCodeSize) const { + if (VT == MVT::f16) { + if (!Subtarget.hasStdExtZfh()) { + return false; + } + } + if (VT == MVT::f32) { + if (!Subtarget.hasStdExtF()) { + return false; + } + } + if (VT == MVT::f64) { + if (!Subtarget.hasStdExtD()) { + return false; + } + } + if (Imm.isNegZero()) { + return false; + } + return Imm.isZero(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27342f01a75e9602e8823826937d056a8c10605f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isLegalAddImmediate(int64_t Imm) const { + return isInt<12>(Imm); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3fc00237148c4d20cfe2aea80e3a44e2f1aaad8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,20 @@ +bool RISCVTargetLowering::isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I) const { + if (AM.BaseGV) { + return false; + } + if (!isInt<12>(AM.BaseOffs)) { + return false; + } + switch (AM.Scale) { + case 0: + break; + case 1: + if (!AM.HasBaseReg) { + break; + } + return false; + default: + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..50a187b1c95b0177261e158b1676e2eef2e5b294 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isLegalICmpImmediate(int64_t Imm) const { + return isInt<12>(Imm); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e8f8585225e31860fa294413e0d386f6e3ca4b51 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isSExtCheaperThanZExt(EVT SrcVT, EVT DstVT) const { + return Subtarget.is64Bit() && SrcVT == MVT::i32 && DstVT == MVT::i64; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d27755e3ae3c64b204a428d561db12e21d89e8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp @@ -0,0 +1,8 @@ +bool RISCVTargetLowering::isTruncateFree(Type *SrcTy, Type *DstTy) const { + if (Subtarget.is64Bit() || !SrcTy->isIntegerTy() || !DstTy->isIntegerTy()) { + return false; + } + unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); + unsigned DestBits = DstTy->getPrimitiveSizeInBits(); + return (SrcBits == 64 && DestBits == 32); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0d212b5aaadd33f2042e323c9e69be7f2022ece5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp @@ -0,0 +1,8 @@ +bool RISCVTargetLowering::isTruncateFree(EVT SrcVT, EVT DstVT) const { + if (Subtarget.is64Bit() || SrcVT.isVector() || DstVT.isVector() || !SrcVT.isInteger() || !DstVT.isInteger()) { + return false; + } + unsigned SrcBits = SrcVT.getSizeInBits(); + unsigned DestBits = DstVT.getSizeInBits(); + return (SrcBits == 64 && DestBits == 32); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isZExtFree.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isZExtFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75d97387f9027fe3ec4fac559ed7892b3b769ecd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/isZExtFree.cpp @@ -0,0 +1,9 @@ +bool RISCVTargetLowering::isZExtFree(SDValue Val, EVT VT2) const { + if (auto *LD = dyn_cast(Val)) { + EVT MemVT = LD->getMemoryVT(); + if ((MemVT == MVT::i8 || MemVT == MVT::i16 || (Subtarget.is64Bit() && MemVT == MVT::i32)) && (LD->getExtensionType() == ISD::NON_EXTLOAD || LD->getExtensionType() == ISD::ZEXTLOAD)) { + return true; + } + } + return TargetLowering::isZExtFree(Val, VT2); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..050e83980f6a8e966d61e932a1c240c89fefcc43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp @@ -0,0 +1,12 @@ +SDValue RISCVTargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + SDValue Idx = Op.getOperand(1); + if (isNullConstant(Idx)) { + return Op; + } + SDValue Vec = Op.getOperand(0); + EVT EltVT = Op.getValueType(); + EVT VecVT = Vec.getValueType(); + SDValue Slidedown = DAG.getNode(RISCVISD::VSLIDEDOWN, DL, VecVT, DAG.getUNDEF(VecVT), Vec, Idx); + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Slidedown, DAG.getConstant(0, DL, Subtarget.getXLenVT())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41468edf3120b3af736ffa9f92aa9d239535b7a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp @@ -0,0 +1,21 @@ + +SDValue RISCVTargetLowering::lowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT VecVT = Op.getValueType(); + SDValue Vec = Op.getOperand(0); + SDValue Val = Op.getOperand(1); + SDValue Idx = Op.getOperand(2); + if (Subtarget.is64Bit() || VecVT.getVectorElementType() != MVT::i64) { + if (isNullConstant(Idx)) + return Op; + SDValue Slidedown = DAG.getNode(RISCVISD::VSLIDEDOWN, DL, VecVT, DAG.getUNDEF(VecVT), Vec, Idx); + SDValue InsertElt0 = DAG.getNode(ISD::INSERT_VECTOR_ELT, DL, VecVT, Slidedown, Val, DAG.getConstant(0, DL, Subtarget.getXLenVT())); + return DAG.getNode(RISCVISD::VSLIDEUP, DL, VecVT, Vec, InsertElt0, Idx); + } + SDValue SplattedVal = DAG.getSplatVector(VecVT, DL, Val); + SDValue SplattedIdx = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, Idx); + SDValue VID = DAG.getNode(RISCVISD::VID, DL, VecVT); + auto SetCCVT = getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VecVT); + SDValue Mask = DAG.getSetCC(DL, SetCCVT, VID, SplattedIdx, ISD::SETEQ); + return DAG.getNode(ISD::VSELECT, DL, VecVT, Mask, SplattedVal, Vec); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d178b704135564eb306892895a477348039fefb8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp @@ -0,0 +1,21 @@ +SDValue RISCVTargetLowering::lowerSELECT(SDValue Op, SelectionDAG &DAG) const { + SDValue CondV = Op.getOperand(0); + SDValue TrueV = Op.getOperand(1); + SDValue FalseV = Op.getOperand(2); + SDLoc DL(Op); + MVT XLenVT = Subtarget.getXLenVT(); + if (Op.getSimpleValueType() == XLenVT && CondV.getOpcode() == ISD::SETCC && CondV.getOperand(0).getSimpleValueType() == XLenVT) { + SDValue LHS = CondV.getOperand(0); + SDValue RHS = CondV.getOperand(1); + auto CC = cast(CondV.getOperand(2)); + ISD::CondCode CCVal = CC->get(); + normaliseSetCC(LHS, RHS, CCVal); + SDValue TargetCC = DAG.getConstant(CCVal, DL, XLenVT); + SDValue Ops[] = {LHS, RHS, TargetCC, TrueV, FalseV}; + return DAG.getNode(RISCVISD::SELECT_CC, DL, Op.getValueType(), Ops); + } + SDValue Zero = DAG.getConstant(0, DL, XLenVT); + SDValue SetNE = DAG.getConstant(ISD::SETNE, DL, XLenVT); + SDValue Ops[] = {CondV, Zero, SetNE, TrueV, FalseV}; + return DAG.getNode(RISCVISD::SELECT_CC, DL, Op.getValueType(), Ops); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a9078247c7a9a4149ed654f10dd7d4f9d2f34abd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp @@ -0,0 +1,26 @@ +SDValue RISCVTargetLowering::lowerSPLATVECTOR(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT VecVT = Op.getValueType(); + assert(!Subtarget.is64Bit() && VecVT.getVectorElementType() == MVT::i64 && "Unexpected SPLAT_VECTOR lowering"); + SDValue SplatVal = Op.getOperand(0); + if (auto *CVal = dyn_cast(SplatVal)) { + if (isInt<32>(CVal->getSExtValue())) + return DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, DAG.getConstant(CVal->getSExtValue(), DL, MVT::i32)); + } + if (SplatVal.getOpcode() == ISD::SIGN_EXTEND && SplatVal.getOperand(0).getValueType() == MVT::i32) { + return DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatVal.getOperand(0)); + } + SDValue One = DAG.getConstant(1, DL, MVT::i32); + SDValue Zero = DAG.getConstant(0, DL, MVT::i32); + SDValue ThirtyTwoV = DAG.getConstant(32, DL, VecVT); + SDValue Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, DL, MVT::i32, SplatVal, Zero); + SDValue Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, DL, MVT::i32, SplatVal, One); + Lo = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, Lo); + Lo = DAG.getNode(ISD::SHL, DL, VecVT, Lo, ThirtyTwoV); + Lo = DAG.getNode(ISD::SRL, DL, VecVT, Lo, ThirtyTwoV); + if (isNullConstant(Hi)) + return Lo; + Hi = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, Hi); + Hi = DAG.getNode(ISD::SHL, DL, VecVT, Hi, ThirtyTwoV); + return DAG.getNode(ISD::OR, DL, VecVT, Lo, Hi); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a781b0834469a4688ad73e9a4725749eac3b6f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp @@ -0,0 +1,24 @@ +SDValue RISCVTargetLowering::lowerShiftLeftParts(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + SDValue Lo = Op.getOperand(0); + SDValue Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + SDValue Zero = DAG.getConstant(0, DL, VT); + SDValue One = DAG.getConstant(1, DL, VT); + EVT VT = Lo.getValueType(); + SDValue MinusXLen = DAG.getConstant(-(int)Subtarget.getXLen(), DL, VT); + SDValue XLenMinus1 = DAG.getConstant(Subtarget.getXLen() - 1, DL, VT); + SDValue ShamtMinusXLen = DAG.getNode(ISD::ADD, DL, VT, Shamt, MinusXLen); + SDValue XLenMinus1Shamt = DAG.getNode(ISD::SUB, DL, VT, XLenMinus1, Shamt); + SDValue LoTrue = DAG.getNode(ISD::SHL, DL, VT, Lo, Shamt); + SDValue ShiftRight1Lo = DAG.getNode(ISD::SRL, DL, VT, Lo, One); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, ShiftRight1Lo, XLenMinus1Shamt); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, Hi, Shamt); + SDValue HiTrue = DAG.getNode(ISD::OR, DL, VT, ShiftLeftHi, ShiftRightLo); + SDValue HiFalse = DAG.getNode(ISD::SHL, DL, VT, Lo, ShamtMinusXLen); + SDValue CC = DAG.getSetCC(DL, VT, ShamtMinusXLen, Zero, ISD::SETLT); + Lo = DAG.getNode(ISD::SELECT, DL, VT, CC, LoTrue, Zero); + Hi = DAG.getNode(ISD::SELECT, DL, VT, CC, HiTrue, HiFalse); + SDValue Parts[2] = {Lo, Hi}; + return DAG.getMergeValues(Parts, DL); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a763204f45299f1efa455b96f65930c2e3e267ef --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp @@ -0,0 +1,26 @@ +SDValue RISCVTargetLowering::lowerShiftRightParts(SDValue Op, SelectionDAG &DAG, bool IsSRA) const { + SDLoc DL(Op); + SDValue Lo = Op.getOperand(0); + SDValue Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + EVT VT = Lo.getValueType(); + unsigned ShiftRightOp = IsSRA ? ISD::SRA : ISD::SRL; + SDValue Zero = DAG.getConstant(0, DL, VT); + SDValue One = DAG.getConstant(1, DL, VT); + SDValue MinusXLen = DAG.getConstant(-(int)Subtarget.getXLen(), DL, VT); + SDValue XLenMinus1 = DAG.getConstant(Subtarget.getXLen() - 1, DL, VT); + SDValue ShamtMinusXLen = DAG.getNode(ISD::ADD, DL, VT, Shamt, MinusXLen); + SDValue XLenMinus1Shamt = DAG.getNode(ISD::SUB, DL, VT, XLenMinus1, Shamt); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, Lo, Shamt); + SDValue ShiftLeftHi1 = DAG.getNode(ISD::SHL, DL, VT, Hi, One); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, ShiftLeftHi1, XLenMinus1Shamt); + SDValue LoTrue = DAG.getNode(ISD::OR, DL, VT, ShiftRightLo, ShiftLeftHi); + SDValue HiTrue = DAG.getNode(ShiftRightOp, DL, VT, Hi, Shamt); + SDValue LoFalse = DAG.getNode(ShiftRightOp, DL, VT, Hi, ShamtMinusXLen); + SDValue HiFalse = IsSRA ? DAG.getNode(ISD::SRA, DL, VT, Hi, XLenMinus1) : Zero; + SDValue CC = DAG.getSetCC(DL, VT, ShamtMinusXLen, Zero, ISD::SETLT); + Lo = DAG.getNode(ISD::SELECT, DL, VT, CC, LoTrue, LoFalse); + Hi = DAG.getNode(ISD::SELECT, DL, VT, CC, HiTrue, HiFalse); + SDValue Parts[2] = {Lo, Hi}; + return DAG.getMergeValues(Parts, DL); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9c860632f70220e7401fd9e8e3d7240d21e74964 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp @@ -0,0 +1,20 @@ +SDValue RISCVTargetLowering::lowerVectorMaskExt(SDValue Op, SelectionDAG &DAG, int64_t ExtTrueVal) const { + SDLoc DL(Op); + EVT VecVT = Op.getValueType(); + SDValue Src = Op.getOperand(0); + if (!Src.getValueType().isVector() || Src.getValueType().getVectorElementType() != MVT::i1) { + return Op; + } + bool IsRV32E64 = !Subtarget.is64Bit() && VecVT.getVectorElementType() == MVT::i64; + SDValue SplatZero = DAG.getConstant(0, DL, Subtarget.getXLenVT()); + SDValue SplatTrueVal = DAG.getConstant(ExtTrueVal, DL, Subtarget.getXLenVT()); + if (!IsRV32E64) { + SplatZero = DAG.getSplatVector(VecVT, DL, SplatZero); + SplatTrueVal = DAG.getSplatVector(VecVT, DL, SplatTrueVal); + } + else { + SplatZero = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatZero); + SplatTrueVal = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatTrueVal); + } + return DAG.getNode(ISD::VSELECT, DL, VecVT, Src, SplatTrueVal, SplatZero); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c98f553f2d44e030d17fe05f422ae1fb199ece6f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp @@ -0,0 +1,20 @@ +SDValue RISCVTargetLowering::lowerVectorMaskTrunc(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT MaskVT = Op.getValueType(); + assert(MaskVT.isVector() && MaskVT.getVectorElementType() == MVT::i1 && "Unexpected type for vector mask lowering"); + SDValue Src = Op.getOperand(0); + EVT VecVT = Src.getValueType(); + bool IsRV32E64 = !Subtarget.is64Bit() && VecVT.getVectorElementType() == MVT::i64; + SDValue SplatOne = DAG.getConstant(1, DL, Subtarget.getXLenVT()); + SDValue SplatZero = DAG.getConstant(0, DL, Subtarget.getXLenVT()); + if (!IsRV32E64) { + SplatOne = DAG.getSplatVector(VecVT, DL, SplatOne); + SplatZero = DAG.getSplatVector(VecVT, DL, SplatZero); + } + else { + SplatOne = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatOne); + SplatZero = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatZero); + } + SDValue Trunc = DAG.getNode(ISD::AND, DL, VecVT, Src, SplatOne); + return DAG.getSetCC(DL, MaskVT, Trunc, SplatZero, ISD::SETNE); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ede8c5227cba93dac852a1d065fa68b425858673 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::mayBeEmittedAsTailCall(const CallInst *CI) const { + return CI->isTailCall(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..81761d63f787d7ededa1a742cd4605cddb2a4530 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp @@ -0,0 +1,13 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { + switch (CC) { + default: + break; + case ISD::SETGT: + case ISD::SETLE: + case ISD::SETUGT: + case ISD::SETULE: + CC = ISD::getSetCCSwappedOperands(CC); + std::swap(LHS, RHS); + break; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f68f25a787d6d9d179404a12f57ee6bc55abf05a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp @@ -0,0 +1,2 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6227315c51762f79d2968256df1156d834e76e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp @@ -0,0 +1,3 @@ +bool shouldConsiderGEPOffsetSplit() const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf5f534d508b97390d1ee1ae00b5cc79a7861324 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp @@ -0,0 +1,3 @@ +bool shouldConvertConstantLoadToIntImm(const APInt &Imm, Type *Ty) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ac3aae03b6673555878d5192537d50cc530ff736 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp @@ -0,0 +1,7 @@ +TargetLowering::AtomicExpansionKind RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *CI) const { + unsigned Size = CI->getCompareOperand()->getType()->getPrimitiveSizeInBits(); + if (Size == 8 || Size == 16) { + return AtomicExpansionKind::MaskedIntrinsic; + } + return AtomicExpansionKind::None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4625774d344f7f29a1166ef8ecbca7823323f687 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp @@ -0,0 +1,10 @@ +TargetLowering::AtomicExpansionKind RISCVTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const { + if (AI->isFloatingPointOperation()) { + return AtomicExpansionKind::CmpXChg; + } + unsigned Size = AI->getType()->getPrimitiveSizeInBits(); + if (Size == 8 || Size == 16) { + return AtomicExpansionKind::MaskedIntrinsic; + } + return AtomicExpansionKind::None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6604d98ac52fd4c5047c923e074351eea490f8f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp @@ -0,0 +1,6 @@ +bool shouldExpandShift(SelectionDAG &DAG, SDNode *N) const override { + if (DAG.getMachineFunction().getFunction().hasMinSize()) { + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d32e64209e6b08e4763994b4f801e4c206f38c74 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp @@ -0,0 +1,7 @@ +bool RISCVTargetLowering::shouldExtendTypeInLibCall(EVT Type) const { + RISCVABI::ABI ABI = Subtarget.getTargetABI(); + if (ABI == RISCVABI::ABI_LP64 && (Type == MVT::f32)) { + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e56fe49efb7aebf69d2c959f42c622a45c409323 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp @@ -0,0 +1,3 @@ +bool shouldInsertFencesForAtomic(const Instruction *I) const override { + return isa(I) || isa(I); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..260ccec9da37823ed051c89f36e5a92ee1f5e02c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp @@ -0,0 +1,6 @@ +bool RISCVTargetLowering::shouldSignExtendTypeInLibCall(EVT Type, bool IsSigned) const { + if (Subtarget.is64Bit() && Type == MVT::i32) { + return true; + } + return IsSigned; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4d16ec95b820e45afaa94d482643662493978f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp @@ -0,0 +1,44 @@ +bool RISCVTargetLowering::targetShrinkDemandedConstant(SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, TargetLoweringOpt &TLO) const { + if (!TLO.LegalOps) { + return false; + } + EVT VT = Op.getValueType(); + if (VT.isVector()) { + return false; + } + if (Op.getOpcode() != ISD::AND) { + return false; + } + ConstantSDNode *C = dyn_cast(Op.getOperand(1)); + if (!C) { + return false; + } + const APInt &Mask = C->getAPIntValue(); + APInt ShrunkMask = Mask & DemandedBits; + if (ShrunkMask.isSignedIntN(12)) { + return false; + } + APInt ExpandedMask = Mask | ~DemandedBits; + if (!ExpandedMask.isNegative()) { + return false; + } + unsigned MinSignedBits = ExpandedMask.getMinSignedBits(); + APInt NewMask = ShrunkMask; + if (MinSignedBits <= 12) { + NewMask.setBitsFrom(11); + } + else if (MinSignedBits <= 32 && !ShrunkMask.isSignedIntN(32)) { + NewMask.setBitsFrom(31); + } + else { + return false; + } + assert(NewMask.isSubsetOf(ExpandedMask)); + if (NewMask == Mask) { + return true; + } + SDLoc DL(Op); + SDValue NewC = TLO.DAG.getConstant(NewMask, DL, VT); + SDValue NewOp = TLO.DAG.getNode(ISD::AND, DL, VT, Op.getOperand(0), NewC); + return TLO.CombineTo(Op, NewOp); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18092d2a41f8aacf563ddf86d379df202fe8c4e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp @@ -0,0 +1,8 @@ +void RISCVTargetLowering::validateCCReservedRegs(const SmallVectorImpl> &Regs, MachineFunction &MF) const { + const Function &F = MF.getFunction(); + const RISCVSubtarget &STI = MF.getSubtarget(); + if (llvm::any_of(Regs, [&STI](auto Reg) { + return STI.isRegisterReservedByUser(Reg.first); + })) + F.getContext().diagnose(DiagnosticInfoUnsupported{F, "Argument register required, but has been reserved."}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53cc2835a41ac58f713da3322777b6baeda2bb12 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp @@ -0,0 +1,9 @@ +RISCVInstructionSelector::RISCVInstructionSelector(const RISCVTargetMachine &TM, const RISCVSubtarget &STI,const RISCVRegisterBankInfo &RBI) : InstructionSelector(), STI(STI), TII(*STI.getInstrInfo()), TRI(*STI.getRegisterInfo()), RBI(RBI), +#define GET_GLOBALISEL_PREDICATES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_PREDICATES_INIT +#define GET_GLOBALISEL_TEMPORARIES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_TEMPORARIES_INIT +{ +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..db262f141398799e83acb55cc3b48da452774550 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &TM, RISCVSubtarget &Subtarget, RISCVRegisterBankInfo &RBI) { + return new RISCVInstructionSelector(TM, Subtarget, RBI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/getName.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/getName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3070f67f8b2d72c6473a6bf2cc4639c82757caaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/getName.cpp @@ -0,0 +1,3 @@ +static const char *getName() { + return DEBUG_TYPE; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/select.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..333a38c3ab713a75f6667c26f37dfadbd1ac8adf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/InstructionSelector/select.cpp @@ -0,0 +1,8 @@ +bool RISCVInstructionSelector::select(MachineInstr &I) { + if (!isPreISelGenericOpcode(I.getOpcode())) { + } + if (selectImpl(I, *CoverageInfo)) { + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58f919e738fbe34244db0d85687060525c38698e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp @@ -0,0 +1,3 @@ +RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) { + computeTables(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b5ff6b81c894f20f1d1f66973d1c9c51cf5dec5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp @@ -0,0 +1,78 @@ +void llvm::LowerRISCVMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, const AsmPrinter &AP) { + const RISCVVPseudosTable::PseudoInfo *RVV = RISCVVPseudosTable::getPseudoInfo(MI->getOpcode()); + if (!RVV) { + return false; + } + OutMI.setOpcode(RVV->BaseInstr); + const MachineBasicBlock *MBB = MI->getParent(); + assert(MBB && "MI expected to be in a basic block"); + const MachineFunction *MF = MBB->getParent(); + assert(MF && "MBB expected to be in a machine function"); + const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo(); + assert(TRI && "TargetRegisterInfo expected"); + uint64_t TSFlags = MI->getDesc().TSFlags; + int NumOps = MI->getNumExplicitOperands(); + for (const MachineOperand &MO : MI->explicit_operands()) { + int OpNo = (int)MI->getOperandNo(&MO); + assert(OpNo >= 0 && "Operand number doesn't fit in an 'int' type"); + if ((TSFlags & RISCVII::HasVLOpMask) && OpNo == (NumOps - 2)) { + continue; + } + if ((TSFlags & RISCVII::HasSEWOpMask) && OpNo == (NumOps - 1)) { + continue; + } + if ((TSFlags & RISCVII::HasMergeOpMask) && OpNo == 1) { + assert(MI->getNumExplicitDefs() == 1); + continue; + } + MCOperand MCOp; + switch (MO.getType()) { + default: + llvm_unreachable("Unknown operand type"); + case MachineOperand::MO_Register: { + unsigned Reg = MO.getReg(); + if (RISCV::VRM2RegClass.contains(Reg) || RISCV::VRM4RegClass.contains(Reg) || RISCV::VRM8RegClass.contains(Reg)) { + Reg = TRI->getSubReg(Reg, RISCV::sub_vrm1_0); + assert(Reg && "Subregister does not exist"); + } + else if (RISCV::FPR16RegClass.contains(Reg)) { + Reg = TRI->getMatchingSuperReg(Reg, RISCV::sub_16, &RISCV::FPR32RegClass); + assert(Reg && "Subregister does not exist"); + } + else if (RISCV::FPR64RegClass.contains(Reg)) { + Reg = TRI->getSubReg(Reg, RISCV::sub_32); + assert(Reg && "Superregister does not exist"); + } + MCOp = MCOperand::createReg(Reg); + break; + } + case MachineOperand::MO_Immediate: + MCOp = MCOperand::createImm(MO.getImm()); + break; + } + OutMI.addOperand(MCOp); + } + if (TSFlags & RISCVII::HasDummyMaskOpMask) { + OutMI.addOperand(MCOperand::createReg(RISCV::NoRegister)); + } + return true; + OutMI.setOpcode(MI->getOpcode()); + for (const MachineOperand &MO : MI->operands()) { + MCOperand MCOp; + if (LowerRISCVMachineOperandToMCOperand(MO, MCOp, AP)) { + OutMI.addOperand(MCOp); + } + } + if (OutMI.getOpcode() == RISCV::PseudoReadVLENB) { + OutMI.setOpcode(RISCV::CSRRS); + OutMI.addOperand(MCOperand::createImm(RISCVSysReg::lookupSysRegByName("VLENB")->Encoding)); + OutMI.addOperand(MCOperand::createReg(RISCV::X0)); + return; + } + if (OutMI.getOpcode() == RISCV::PseudoReadVL) { + OutMI.setOpcode(RISCV::CSRRS); + OutMI.addOperand(MCOperand::createImm(RISCVSysReg::lookupSysRegByName("VL")->Encoding)); + OutMI.addOperand(MCOperand::createReg(RISCV::X0)); + return; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3449796f21b6124dd5bde5e2cc45d1b32c568cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp @@ -0,0 +1,37 @@ +bool llvm::LowerRISCVMachineOperandToMCOperand(const MachineOperand &MO, MCOperand &MCOp, const AsmPrinter &AP) { + switch (MO.getType()) { + case MachineOperand::MO_Register: + if (MO.isImplicit()) + return false; + MCOp = MCOperand::createReg(MO.getReg()); + break; + case MachineOperand::MO_RegisterMask: + return false; + case MachineOperand::MO_Immediate: + MCOp = MCOperand::createImm(MO.getImm()); + break; + case MachineOperand::MO_MachineBasicBlock: + MCOp = lowerSymbolOperand(MO, MO.getMBB()->getSymbol(), AP); + break; + case MachineOperand::MO_GlobalAddress: + MCOp = lowerSymbolOperand(MO, AP.getSymbol(MO.getGlobal()), AP); + break; + case MachineOperand::MO_BlockAddress: + MCOp = lowerSymbolOperand( + MO, AP.GetBlockAddressSymbol(MO.getBlockAddress()), AP); + break; + case MachineOperand::MO_ExternalSymbol: + MCOp = lowerSymbolOperand( + MO, AP.GetExternalSymbolSymbol(MO.getSymbolName()), AP); + break; + case MachineOperand::MO_ConstantPoolIndex: + MCOp = lowerSymbolOperand(MO, AP.GetCPISymbol(MO.getIndex()), AP); + break; + case MachineOperand::MO_JumpTableIndex: + MCOp = lowerSymbolOperand(MO, AP.GetJTISymbol(MO.getIndex()), AP); + break; + default: + report_fatal_error("LowerRISCVMachineInstrToMCInst: unknown operand type"); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8107e367a395520aca9a0bde41ed05df30ad152a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp @@ -0,0 +1,55 @@ +static MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym, const AsmPrinter &AP) { + MCContext &Ctx = AP.OutContext; + RISCVMCExpr::VariantKind Kind; + switch (MO.getTargetFlags()) { + default: + llvm_unreachable("Unknown target flag on GV operand"); + case RISCVII::MO_None: + Kind = RISCVMCExpr::VK_RISCV_None; + break; + case RISCVII::MO_CALL: + Kind = RISCVMCExpr::VK_RISCV_CALL; + break; + case RISCVII::MO_PLT: + Kind = RISCVMCExpr::VK_RISCV_CALL_PLT; + break; + case RISCVII::MO_LO: + Kind = RISCVMCExpr::VK_RISCV_LO; + break; + case RISCVII::MO_HI: + Kind = RISCVMCExpr::VK_RISCV_HI; + break; + case RISCVII::MO_PCREL_LO: + Kind = RISCVMCExpr::VK_RISCV_PCREL_LO; + break; + case RISCVII::MO_PCREL_HI: + Kind = RISCVMCExpr::VK_RISCV_PCREL_HI; + break; + case RISCVII::MO_GOT_HI: + Kind = RISCVMCExpr::VK_RISCV_GOT_HI; + break; + case RISCVII::MO_TPREL_LO: + Kind = RISCVMCExpr::VK_RISCV_TPREL_LO; + break; + case RISCVII::MO_TPREL_HI: + Kind = RISCVMCExpr::VK_RISCV_TPREL_HI; + break; + case RISCVII::MO_TPREL_ADD: + Kind = RISCVMCExpr::VK_RISCV_TPREL_ADD; + break; + case RISCVII::MO_TLS_GOT_HI: + Kind = RISCVMCExpr::VK_RISCV_TLS_GOT_HI; + break; + case RISCVII::MO_TLS_GD_HI: + Kind = RISCVMCExpr::VK_RISCV_TLS_GD_HI; + break; + } + const MCExpr *ME = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, Ctx); + if (!MO.isJTI() && !MO.isMBB() && MO.getOffset()) { + ME = MCBinaryExpr::createAdd(ME, MCConstantExpr::create(MO.getOffset(), Ctx), Ctx); + } + if (Kind != RISCVMCExpr::VK_RISCV_None) { + ME = RISCVMCExpr::create(ME, Kind, Ctx); + } + return MCOperand::createExpr(ME); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4dc7ae84acc6da01a6fc88136b4545507046b3da --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp @@ -0,0 +1,2 @@ +RISCVRegisterBankInfo::RISCVRegisterBankInfo(const TargetRegisterInfo &TRI) : RISCVGenRegisterBankInfo() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1480303244e07d20dda536668a1d006b005c6abf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +RISCVRegisterInfo::RISCVRegisterInfo(unsigned HwMode) : RISCVGenRegisterInfo(RISCV::X1, 0, 0, 0, HwMode) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4627583a88c723ec5625aa71d430e6bc6fca6ed5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,27 @@ +void RISCVRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS) const { + assert(SPAdj == 0 && "Unexpected non-zero SPAdj value"); + MachineInstr &MI = *II; + MachineFunction &MF = *MI.getParent()->getParent(); + MachineRegisterInfo &MRI = MF.getRegInfo(); + const RISCVInstrInfo *TII = MF.getSubtarget().getInstrInfo(); + DebugLoc DL = MI.getDebugLoc(); + int FrameIndex = MI.getOperand(FIOperandNum).getIndex(); + Register FrameReg; + int Offset = getFrameLowering(MF)->getFrameIndexReference(MF, FrameIndex, FrameReg).getFixed() + MI.getOperand(FIOperandNum + 1).getImm(); + if (!isInt<32>(Offset)) { + report_fatal_error("Frame offsets outside of the signed 32-bit range not supported"); + } + MachineBasicBlock &MBB = *MI.getParent(); + bool FrameRegIsKill = false; + if (!isInt<12>(Offset)) { + assert(isInt<32>(Offset) && "Int32 expected"); + Register ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + TII->movImm(MBB, II, DL, ScratchReg, Offset); + BuildMI(MBB, II, DL, TII->get(RISCV::ADD), ScratchReg).addReg(FrameReg).addReg(ScratchReg, RegState::Kill); + Offset = 0; + FrameReg = ScratchReg; + FrameRegIsKill = true; + } + MI.getOperand(FIOperandNum).ChangeToRegister(FrameReg, false, false, FrameRegIsKill); + MI.getOperand(FIOperandNum + 1).ChangeToImmediate(Offset); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8e9de57806a18f51b53e3d7fa691a28052d7d64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp @@ -0,0 +1,19 @@ +const uint32_t *RISCVRegisterInfo::getCallPreservedMask(const MachineFunction & MF, CallingConv::ID CC) const { + auto &Subtarget = MF.getSubtarget(); + if (CC == CallingConv::GHC) { + return CSR_NoRegs_RegMask; + } + switch (Subtarget.getTargetABI()) { + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + return CSR_ILP32_LP64_RegMask; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + return CSR_ILP32F_LP64F_RegMask; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + return CSR_ILP32D_LP64D_RegMask; + default: + llvm_unreachable("Unrecognized ABI"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3050b17a62d80679cf10f80be303f18b7def4c51 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,28 @@ +const MCPhysReg *RISCVRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + auto &Subtarget = MF->getSubtarget(); + if (MF->getFunction().getCallingConv() == CallingConv::GHC) { + return CSR_NoRegs_SaveList; + } + if (MF->getFunction().hasFnAttribute("interrupt")) { + if (Subtarget.hasStdExtD()) { + return CSR_XLEN_F64_Interrupt_SaveList; + } + if (Subtarget.hasStdExtF()) { + return CSR_XLEN_F32_Interrupt_SaveList; + } + return CSR_Interrupt_SaveList; + } + switch (Subtarget.getTargetABI()) { + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + return CSR_ILP32_LP64_SaveList; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + return CSR_ILP32F_LP64F_SaveList; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + return CSR_ILP32D_LP64D_SaveList; + default: + llvm_unreachable("Unrecognized ABI"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72c4c839e6e91d5177aac289f685491ab3ec84a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,4 @@ +Register RISCVRegisterInfo::getFrameRegister(const MachineFunction &MF) const { + const TargetFrameLowering *TFI = getFrameLowering(MF); + return TFI->hasFP(MF) ? RISCV::X8 : RISCV::X2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fa56f2bf4b0fa58c156cb2b44e640600fd4e8df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp @@ -0,0 +1,3 @@ +const uint32_t *RISCVRegisterInfo::getNoPreservedMask() const { + return CSR_NoRegs_RegMask; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88663c48f37912ceed74f49de1e37a38e9411d0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp @@ -0,0 +1,3 @@ +const TargetRegisterClass *getPointerRegClass(const MachineFunction &MF, unsigned Kind = 0) const override { + return &RISCV::GPRRegClass; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f31c4f5d6450a0cdcfec3c9c7e0c23f25273b3b2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,25 @@ +BitVector RISCVRegisterInfo::getReservedRegs(const MachineFunction &MF) const { + const RISCVFrameLowering *TFI = getFrameLowering(MF); + BitVector Reserved(getNumRegs()); + for (size_t Reg = 0; Reg < getNumRegs(); Reg++) { + if (MF.getSubtarget().isRegisterReservedByUser(Reg)) { + markSuperRegs(Reserved, Reg); + } + } + markSuperRegs(Reserved, RISCV::X0); + markSuperRegs(Reserved, RISCV::X2); + markSuperRegs(Reserved, RISCV::X3); + markSuperRegs(Reserved, RISCV::X4); + if (TFI->hasFP(MF)) { + markSuperRegs(Reserved, RISCV::X8); + } + if (TFI->hasBP(MF)) { + markSuperRegs(Reserved, RISCVABI::getBPReg()); + } + markSuperRegs(Reserved, RISCV::VL); + markSuperRegs(Reserved, RISCV::VTYPE); + markSuperRegs(Reserved, RISCV::VXSAT); + markSuperRegs(Reserved, RISCV::VXRM); + assert(checkAllSuperRegsMarked(Reserved)); + return Reserved; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0128afe039488da081ce0db8ac0fa9d0c2001e05 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp @@ -0,0 +1,12 @@ +bool RISCVRegisterInfo::hasReservedSpillSlot(const MachineFunction &MF, Register Reg, int &FrameIdx) const { + const auto *RVFI = MF.getInfo(); + if (!RVFI->useSaveRestoreLibCalls(MF)) { + return false; + } + auto FII = FixedCSRFIMap.find(Reg); + if (FII == FixedCSRFIMap.end()) { + return false; + } + FrameIdx = FII->second; + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25561255c0b0144c3f52ec50dd6542c764b476af --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp @@ -0,0 +1,3 @@ +bool RISCVRegisterInfo::isAsmClobberable(const MachineFunction &MF, MCRegister PhysReg) const { + return !MF.getSubtarget().isRegisterReservedByUser(PhysReg); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5f3ae8dcbdb06cd2b11c08d4304bc5fbbeb7a0bf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp @@ -0,0 +1,3 @@ +bool RISCVRegisterInfo::isConstantPhysReg(MCRegister PhysReg) const { + return PhysReg == RISCV::X0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcdefd787701998b4ca78c8a05ad2a8d3a8da92b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresFrameIndexScavenging(const MachineFunction &MF) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..14b5f8108d512990df2060604418ece481a51ba3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresRegisterScavenging(const MachineFunction &MF) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/AsmParser.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/AsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7797cdba62f86a46e4dea7c5120f3c6aefe6bfde --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/AsmParser.cpp @@ -0,0 +1,16 @@ +RISCVAsmParser(const MCSubtargetInfo &STI, MCAsmParser &Parser, const MCInstrInfo &MII, const MCTargetOptions &Options) : MCTargetAsmParser(Options, STI, MII) { + Parser.addAliasForDirective(".half", ".2byte"); + Parser.addAliasForDirective(".hword", ".2byte"); + Parser.addAliasForDirective(".word", ".4byte"); + Parser.addAliasForDirective(".dword", ".8byte"); + setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits())); + auto ABIName = StringRef(Options.ABIName); + if (ABIName.endswith("f") && !getSTI().getFeatureBits()[RISCV::FeatureStdExtF]) { + errs() << "Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension (ignoring target-abi)\n"; + } + else if (ABIName.endswith("d") && !getSTI().getFeatureBits()[RISCV::FeatureStdExtD]) { + errs() << "Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)\n"; + } + const MCObjectFileInfo *MOFI = Parser.getContext().getObjectFileInfo(); + ParserOptions.IsPicEnabled = MOFI->isPositionIndependent(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/KindTy.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/KindTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..371575f0ea6716a531fb88cd3fb871d6a05d4417 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/KindTy.cpp @@ -0,0 +1,7 @@ +enum class KindTy { + Token, + Register, + Immediate, + SystemRegister, + VType, +} Kind; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71228f1bad2b593ede7681696f374a8ce3765475 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmParser() { + RegisterMCAsmParser X(getTheRISCV32Target()); + RegisterMCAsmParser Y(getTheRISCV64Target()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0b5f960569745689b8abf24bb90aaf3d291803c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp @@ -0,0 +1,621 @@ +bool RISCVAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, OperandVector &Operands, MCStreamer &Out, uint64_t &ErrorInfo, bool MatchingInlineAsm) { + MCInst Inst; + FeatureBitset MissingFeatures; + auto Result = MatchInstructionImpl(Operands, Inst, ErrorInfo, MissingFeatures, MatchingInlineAsm); + switch (Result) { + default: + break; + case Match_Success: + const MCInstrDesc &MCID = MII.get(Inst.getOpcode()); + unsigned Constraints = (MCID.TSFlags & RISCVII::ConstraintMask) >> RISCVII::ConstraintShift; + unsigned DestReg = Inst.getOperand(0).getReg(); + SMLoc Loc = Operands[1]->getStartLoc(); + if (Constraints & RISCVII::VS2Constraint) { + unsigned CheckReg = Inst.getOperand(1).getReg(); + if (DestReg == CheckReg) { + return Error(Loc, "The destination vector register group cannot overlap the source vector register group."); + } + } + if ((Constraints & RISCVII::VS1Constraint) && (Inst.getOperand(2).isReg())) { + unsigned CheckReg = Inst.getOperand(2).getReg(); + if (DestReg == CheckReg) { + return Error(Loc, "The destination vector register group cannot overlap the source vector register group."); + } + } + if ((Constraints & RISCVII::VMConstraint) && (DestReg == RISCV::V0)) { + unsigned Opcode = Inst.getOpcode(); + if (Opcode == RISCV::VADC_VVM || Opcode == RISCV::VADC_VXM || Opcode == RISCV::VADC_VIM || Opcode == RISCV::VSBC_VVM || Opcode == RISCV::VSBC_VXM || Opcode == RISCV::VFMERGE_VFM || Opcode == RISCV::VMERGE_VIM || Opcode == RISCV::VMERGE_VVM || Opcode == RISCV::VMERGE_VXM) { + return Error(Loc, "The destination vector register group cannot be V0."); + } + unsigned CheckReg = Inst.getOperand(Inst.getNumOperands() - 1).getReg(); + assert((CheckReg == RISCV::V0 || CheckReg == RISCV::NoRegister) && "Unexpected register for mask operand"); + if (DestReg == CheckReg) { + return Error(Loc, "The destination vector register group cannot overlap the mask register."); + } + } + Inst.setLoc(IDLoc); + switch (Inst.getOpcode()) { + default: + break; + case RISCV::PseudoLI: { + MCRegister Reg = Inst.getOperand(0).getReg(); + const MCOperand &Op1 = Inst.getOperand(1); + if (Op1.isExpr()) { + emitToStreamer(Out, MCInstBuilder(RISCV::ADDI).addReg(Reg).addReg(RISCV::X0).addExpr(Op1.getExpr())); + return false; + } + int64_t Imm = Inst.getOperand(1).getImm(); + if (!isRV64()) { + Imm = SignExtend64<32>(Imm); + } + RISCVMatInt::InstSeq Seq; + RISCVMatInt::generateInstSeq(Value, isRV64(), Seq); + MCRegister SrcReg = RISCV::X0; + for (RISCVMatInt::Inst &Inst : Seq) { + if (Inst.Opc == RISCV::LUI) { + emitToStreamer(Out, MCInstBuilder(RISCV::LUI).addReg(DestReg).addImm(Inst.Imm)); + } else { + emitToStreamer(Out, MCInstBuilder(Inst.Opc).addReg(DestReg).addReg(SrcReg).addImm(Inst.Imm)); + } + SrcReg = DestReg; + } + return false; + } + case RISCV::PseudoLLA: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLA: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + unsigned SecondOpcode; + RISCVMCExpr::VariantKind VKHi; + if (ParserOptions.IsPicEnabled) { + SecondOpcode = isRV64() ? RISCV::LD : RISCV::LW; + VKHi = RISCVMCExpr::VK_RISCV_GOT_HI; + } else { + SecondOpcode = RISCV::ADDI; + VKHi = RISCVMCExpr::VK_RISCV_PCREL_HI; + } + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLA_TLS_IE: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + unsigned SecondOpcode = isRV64() ? RISCV::LD : RISCV::LW; + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLA_TLS_GD: + MCOperand DestReg = Inst.getOperand(0); + const MCExpr *Symbol = Inst.getOperand(1).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLB: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLBU: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLHU: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLWU: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoLD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFLH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFLW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFLD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSB: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoSD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFSH: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFSW: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoFSD: + MCOperand DestReg = Inst.getOperand(0); + unsigned SymbolOpIdx = HasTmpReg ? 2 : 1; + unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0; + MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx); + const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr(); + MCContext &Ctx = getContext(); + MCSymbol *TmpLabel = Ctx.createNamedTempSymbol("pcrel_hi"); + Out.emitLabel(TmpLabel); + const RISCVMCExpr *SymbolHi = RISCVMCExpr::create(Symbol, VKHi, Ctx); + emitToStreamer(Out, MCInstBuilder(RISCV::AUIPC).addOperand(TmpReg).addExpr(SymbolHi)); + const MCExpr *RefToLinkTmpLabel = RISCVMCExpr::create(MCSymbolRefExpr::create(TmpLabel, Ctx), RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(TmpReg).addExpr(RefToLinkTmpLabel)); + return false; + case RISCV::PseudoAddTPRel: + assert(Inst.getOpcode() == RISCV::PseudoAddTPRel && "Invalid instruction"); + assert(Inst.getOperand(2).isReg() && "Unexpected second operand kind"); + if (Inst.getOperand(2).getReg() != RISCV::X4) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[3]).getStartLoc(); + return Error(ErrorLoc, "the second input operand must be tp/x4 when using %tprel_add modifier"); + } + break; + case RISCV::PseudoSEXT_B: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoSEXT_H: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoZEXT_H: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoZEXT_W: + MCOperand DestReg = Inst.getOperand(0); + MCOperand SourceReg = Inst.getOperand(1); + unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI; + int64_t ShAmt = (isRV64() ? 64 : 32) - Width; + assert(ShAmt > 0 && "Shift amount must be non-zero."); + emitToStreamer(Out, MCInstBuilder(RISCV::SLLI).addOperand(DestReg).addOperand(SourceReg).addImm(ShAmt)); + emitToStreamer(Out, MCInstBuilder(SecondOpcode).addOperand(DestReg).addOperand(DestReg).addImm(ShAmt)); + return false; + case RISCV::PseudoVMSGEU_VX: + case RISCV::PseudoVMSGEU_VX_M: + case RISCV::PseudoVMSGEU_VX_M_T: + if (Inst.getNumOperands() == 3) { + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addReg(RISCV::NoRegister)); + emitToStreamer(Out, MCInstBuilder(RISCV::VMNAND_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0))); + } + else if (Inst.getNumOperands() == 4) { + assert(Inst.getOperand(0).getReg() != RISCV::V0 && "The destination register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMXOR_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addReg(RISCV::V0)); + } + else if (Inst.getNumOperands() == 5) { + assert(Inst.getOperand(0).getReg() == RISCV::V0 && "The destination register should be V0."); + assert(Inst.getOperand(1).getReg() != RISCV::V0 && "The temporary vector register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3)).addOperand(Inst.getOperand(4))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMANDNOT_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1))); + } + return false; + case RISCV::PseudoVMSGE_VX: + case RISCV::PseudoVMSGE_VX_M: + case RISCV::PseudoVMSGE_VX_M_T: + if (Inst.getNumOperands() == 3) { + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addReg(RISCV::NoRegister)); + emitToStreamer(Out, MCInstBuilder(RISCV::VMNAND_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0))); + } + else if (Inst.getNumOperands() == 4) { + assert(Inst.getOperand(0).getReg() != RISCV::V0 && "The destination register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMXOR_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addReg(RISCV::V0)); + } + else if (Inst.getNumOperands() == 5) { + assert(Inst.getOperand(0).getReg() == RISCV::V0 && "The destination register should be V0."); + assert(Inst.getOperand(1).getReg() != RISCV::V0 && "The temporary vector register should not be V0."); + emitToStreamer(Out, MCInstBuilder(Opcode).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(2)).addOperand(Inst.getOperand(3)).addOperand(Inst.getOperand(4))); + emitToStreamer(Out, MCInstBuilder(RISCV::VMANDNOT_MM).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1))); + } + return false; + case RISCV::PseudoVMSGE_VI: + case RISCV::PseudoVMSLT_VI: { + int64_t Imm = Inst.getOperand(2).getImm(); + unsigned Opc = Inst.getOpcode() == RISCV::PseudoVMSGE_VI ? RISCV::VMSGT_VI : RISCV::VMSLE_VI; + emitToStreamer(Out, MCInstBuilder(Opc).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addImm(Imm - 1).addOperand(Inst.getOperand(3))); + return false; + } + case RISCV::PseudoVMSGEU_VI: + case RISCV::PseudoVMSLTU_VI: { + int64_t Imm = Inst.getOperand(2).getImm(); + if (Imm == 0) { + unsigned Opc = Inst.getOpcode() == RISCV::PseudoVMSGEU_VI ? RISCV::VMSEQ_VV : RISCV::VMSNE_VV; + emitToStreamer(Out, MCInstBuilder(Opc).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(1)).addOperand(Inst.getOperand(3))); + } + else { + unsigned Opc = Inst.getOpcode() == RISCV::PseudoVMSGEU_VI ? RISCV::VMSGTU_VI : RISCV::VMSLEU_VI; + emitToStreamer(Out, MCInstBuilder(Opc).addOperand(Inst.getOperand(0)).addOperand(Inst.getOperand(1)).addImm(Imm - 1).addOperand(Inst.getOperand(3))); + } + return false; + } + } + emitToStreamer(Out, Inst); + return false; + case Match_MissingFeature: { + assert(MissingFeatures.any() && "Unknown missing features!"); + bool FirstFeature = true; + std::string Msg = "instruction requires the following:"; + for (unsigned i = 0, e = MissingFeatures.size(); i != e; ++i) { + if (MissingFeatures[i]) { + Msg += FirstFeature ? " " : ", "; + Msg += getSubtargetFeatureName(i); + FirstFeature = false; + } + } + return Error(IDLoc, Msg); + } + case Match_MnemonicFail: { + FeatureBitset FBS = ComputeAvailableFeatures(getSTI().getFeatureBits()); + std::string Suggestion = RISCVMnemonicSpellCheck(((RISCVOperand &)*Operands[0]).getToken(), FBS); + return Error(IDLoc, "unrecognized instruction mnemonic" + Suggestion); + } + case Match_InvalidOperand: { + SMLoc ErrorLoc = IDLoc; + if (ErrorInfo != ~0U) { + if (ErrorInfo >= Operands.size()) { + return Error(ErrorLoc, "too few operands for instruction"); + } + ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + if (ErrorLoc == SMLoc()) { + ErrorLoc = IDLoc; + } + } + return Error(ErrorLoc, "invalid operand for instruction"); + } + } + if (Result > FIRST_TARGET_MATCH_RESULT_TY) { + SMLoc ErrorLoc = IDLoc; + if (ErrorInfo != ~0U && ErrorInfo >= Operands.size()) { + return Error(ErrorLoc, "too few operands for instruction"); + } + } + if (Result == Match_InvalidImmXLenLI) { + if (isRV64()) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be a constant 64-bit integer"); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, std::numeric_limits::min(), std::numeric_limits::max()); + } + if (Result == Match_InvalidImmZero) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "immediate must be zero"); + } + if (Result == Match_InvalidUImmLog2XLen) { + if (isRV64()) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 6) - 1); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1); + } + if (Result == Match_InvalidUImmLog2XLenNonZero) { + if (isRV64()) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 6) - 1); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5) - 1); + } + if (Result == Match_InvalidUImmLog2XLenHalf) { + if (isRV64()) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1); + } + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 4) - 1); + } + if (Result == Match_InvalidUImm5) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1); + } + if (Result == Match_InvalidSImm5) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 4), (1 << 4) - 1); + } + if (Result == Match_InvalidSImm6) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 5), (1 << 5) - 1); + } + if (Result == Match_InvalidSImm6NonZero) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 5), (1 << 5) - 1, "immediate must be non-zero in the range"); + } + if (Result == Match_InvalidCLUIImm) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5) - 1, "immediate must be in [0xfffe0, 0xfffff] or"); + } + if (Result == Match_InvalidUImm7Lsb00) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 7) - 4, "immediate must be a multiple of 4 bytes in the range"); + } + if (Result == Match_InvalidUImm8Lsb00) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 8) - 4, "immediate must be a multiple of 4 bytes in the range"); + } + if (Result == Match_InvalidUImm8Lsb000) { + return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 8) - 8, "immediate must be a multiple of 8 bytes in the range"); + } + if (Result == Match_InvalidSImm9Lsb0) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm9Lsb000) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm10Lsb00NonZero) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm10Lsb0000NonZero) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm12) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm12Lsb0) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm13Lsb0) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm20LUI) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidUImm20AUIPC) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidSImm21Lsb0JAL) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidCSRSystemRegister) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2, "immediate must be a multiple of 2 bytes in the range"); + } + if (Result == Match_InvalidFenceArg) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidFRMArg) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidBareSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidPseudoJumpSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidCallSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidTPRelAddSymbol) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidVTypeI) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidVMaskRegister) { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, "operand must be formed of letters selected in-order from 'iorw'"); + } + if (Result == Match_InvalidSImm5Plus1) { + return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 4) + 1, (1 << 4), "immediate must be in the range"); + } + llvm_unreachable("Unknown match type detected!"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/Operand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ad138dbf9306883ea3346180a9391df10b1586d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/Operand.cpp @@ -0,0 +1,2 @@ +RISCVOperand(KindTy K) : MCParsedAsmOperand(), Kind(K) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/Operand2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/Operand2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63faea7f475d64855bbadb5f070b7ef2b0026308 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/Operand2.cpp @@ -0,0 +1,21 @@ +RISCVOperand(const RISCVOperand &o) : MCParsedAsmOperand() { + Kind = o.Kind; + IsRV64 = o.IsRV64; + StartLoc = o.StartLoc; + EndLoc = o.EndLoc; + if (Kind == KindTy::Register) { + Reg = o.Reg; + } + if (Kind == KindTy::Immediate) { + Imm = o.Imm; + } + if (Kind == KindTy::Token) { + Tok = o.Tok; + } + if (Kind == KindTy::SystemRegister) { + SysReg = o.SysReg; + } + if (Kind == KindTy::VType) { + VType = o.VType; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4af12e125e12358102bf5a3e08bf0bd44dfaf4e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp @@ -0,0 +1,437 @@ +bool RISCVAsmParser::ParseDirective(AsmToken DirectiveID) { + StringRef IDVal = DirectiveID.getString(); + if (IDVal == ".option") { + MCAsmParser &Parser = getParser(); + AsmToken Tok = Parser.getTok(); + if (Tok.isNot(AsmToken::Identifier)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected identifier"); + } + StringRef Option = Tok.getIdentifier(); + if (Option == "push") { + getTargetStreamer().emitDirectiveOptionPush(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + assert(FeatureBitStack.size() == ParserOptionsStack.size() && "These two stacks must be kept synchronized"); + FeatureBitStack.push_back(getSTI().getFeatureBits()); + ParserOptionsStack.push_back(ParserOptions); + return false; + } + if (Option == "pop") { + SMLoc StartLoc = Parser.getTok().getLoc(); + getTargetStreamer().emitDirectiveOptionPop(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + assert(FeatureBitStack.size() == ParserOptionsStack.size() && "These two stacks must be kept synchronized"); + if (FeatureBitStack.empty()) { + return Error(StartLoc, ".option pop with no .option push"); + } + FeatureBitset FeatureBits = FeatureBitStack.pop_back_val(); + copySTI().setFeatureBits(FeatureBits); + setAvailableFeatures(ComputeAvailableFeatures(FeatureBits)); + ParserOptions = ParserOptionsStack.pop_back_val(); + return false; + } + if (Option == "rvc") { + getTargetStreamer().emitDirectiveOptionRVC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + setFeatureBits(RISCV::FeatureStdExtC, "c"); + return false; + } + if (Option == "norvc") { + getTargetStreamer().emitDirectiveOptionNoRVC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + clearFeatureBits(RISCV::FeatureStdExtC, "c"); + return false; + } + if (Option == "pic") { + getTargetStreamer().emitDirectiveOptionPIC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + ParserOptions.IsPicEnabled = true; + return false; + } + if (Option == "nopic") { + getTargetStreamer().emitDirectiveOptionNoPIC(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + ParserOptions.IsPicEnabled = false; + return false; + } + if (Option == "relax") { + getTargetStreamer().emitDirectiveOptionRelax(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + setFeatureBits(RISCV::FeatureRelax, "relax"); + return false; + } + if (Option == "norelax") { + getTargetStreamer().emitDirectiveOptionNoRelax(); + Parser.Lex(); + if (Parser.getTok().isNot(AsmToken::EndOfStatement)) { + return Error(Parser.getTok().getLoc(), "unexpected token, expected end of statement"); + } + clearFeatureBits(RISCV::FeatureRelax, "relax"); + return false; + } + Warning(Parser.getTok().getLoc(), "unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'relax' or 'norelax'"); + Parser.eatToEndOfStatement(); + return false; + } + else if (IDVal == ".attribute") { + MCAsmParser &Parser = getParser(); + int64_t Tag; + SMLoc TagLoc; + TagLoc = Parser.getTok().getLoc(); + if (Parser.getTok().is(AsmToken::Identifier)) { + StringRef Name = Parser.getTok().getIdentifier(); + Optional Ret = ELFAttrs::attrTypeFromString(Name, RISCVAttrs::RISCVAttributeTags); + if (!Ret.hasValue()) { + Error(TagLoc, "attribute name not recognised: " + Name); + return false; + } + Tag = Ret.getValue(); + Parser.Lex(); + } + else { + const MCExpr *AttrExpr; + TagLoc = Parser.getTok().getLoc(); + if (Parser.parseExpression(AttrExpr)) { + return true; + } + const MCConstantExpr *CE = dyn_cast(AttrExpr); + if (check(!CE, TagLoc, "expected numeric constant")) { + return true; + } + Tag = CE->getValue(); + } + if (Parser.parseToken(AsmToken::Comma, "comma expected")) { + return true; + } + StringRef StringValue; + int64_t IntegerValue = 0; + bool IsIntegerValue = true; + if (Tag % 2) { + IsIntegerValue = false; + } + SMLoc ValueExprLoc = Parser.getTok().getLoc(); + if (IsIntegerValue) { + const MCExpr *ValueExpr; + if (Parser.parseExpression(ValueExpr)) { + return true; + } + const MCConstantExpr *CE = dyn_cast(ValueExpr); + if (!CE) { + return true; + } + IntegerValue = CE->getValue(); + } + else { + if (Parser.getTok().isNot(AsmToken::String)) { + return Error(Parser.getTok().getLoc(), "expected string constant"); + } + StringValue = Parser.getTok().getStringContents(); + Parser.Lex(); + } + if (Parser.parseToken(AsmToken::EndOfStatement, "unexpected token in '.attribute' directive")) { + return true; + } + if (Tag == RISCVAttrs::ARCH) { + StringRef Arch = StringValue; + if (Arch.consume_front("rv32")) { + if (getSTI().getFeatureBits()[RISCV::Feature64Bit]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("64bit"))); + } + } + else if (Arch.consume_front("rv64")) { + setFeatureBits(RISCV::Feature64Bit, "64bit"); + } + else { + return Error(ValueExprLoc, "bad arch string " + Arch); + } + if (getSTI().getFeatureBits()[RISCV::FeatureRV32E]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("e"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtM]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("m"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtA]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("a"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtF]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("f"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtD]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("d"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtC]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("c"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtB]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-b"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtV]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-v"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZfh]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zfh"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZba]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zba"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbb]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbb"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbc]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbc"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbe]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbe"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbf]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbf"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbm]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbm"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbp]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbp"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbproposedc]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbproposedc"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbr]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbr"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbs]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbs"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZbt]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zbt"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureExtZvamo]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zvamo"))); + } + if (getSTI().getFeatureBits()[RISCV::FeatureStdExtZvlsseg]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("experimental-zvlsseg"))); + } + while (!Arch.empty()) { + bool DropFirst = true; + if (Arch[0] == 'i') { + if (getSTI().getFeatureBits()[RISCV::FeatureRV32E]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("e"))); + } + } + else if (Arch[0] == 'e') { + setFeatureBits(RISCV::FeatureRV32E, "e"); + } + else if (Arch[0] == 'g') { + if (getSTI().getFeatureBits()[RISCV::FeatureRV32E]) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature("e"))); + } + setFeatureBits(RISCV::FeatureStdExtM, "m"); + setFeatureBits(RISCV::FeatureStdExtA, "a"); + setFeatureBits(RISCV::FeatureStdExtF, "f"); + setFeatureBits(RISCV::FeatureStdExtD, "d"); + } + else if (Arch[0] == 'm') { + setFeatureBits(RISCV::FeatureStdExtM, "m"); + } + else if (Arch[0] == 'a') { + setFeatureBits(RISCV::FeatureStdExtA, "a"); + } + else if (Arch[0] == 'f') { + setFeatureBits(RISCV::FeatureStdExtF, "f"); + } + else if (Arch[0] == 'd') { + setFeatureBits(RISCV::FeatureStdExtF, "f"); + setFeatureBits(RISCV::FeatureStdExtD, "d"); + } + else if (Arch[0] == 'c') { + setFeatureBits(RISCV::FeatureStdExtC, "c"); + } + else if (Arch[0] == 'b') { + setFeatureBits(RISCV::FeatureStdExtB, "experimental-b"); + } + else if (Arch[0] == 'v') { + setFeatureBits(RISCV::FeatureStdExtV, "experimental-v"); + } + else if (Arch[0] == 's' || Arch[0] == 'x' || Arch[0] == 'z') { + StringRef Ext = Arch.take_until([](char c) { return ::isdigit(c) || c == '_'; }); + if (Ext == "zba") { + setFeatureBits(RISCV::FeatureExtZba, "experimental-zba"); + } + else if (Ext == "zbb") { + setFeatureBits(RISCV::FeatureExtZbb, "experimental-zbb"); + } + else if (Ext == "zbc") { + setFeatureBits(RISCV::FeatureExtZbc, "experimental-zbc"); + } + else if (Ext == "zbe") { + setFeatureBits(RISCV::FeatureExtZbe, "experimental-zbe"); + } + else if (Ext == "zbf") { + setFeatureBits(RISCV::FeatureExtZbf, "experimental-zbf"); + } + else if (Ext == "zbm") { + setFeatureBits(RISCV::FeatureExtZbm, "experimental-zbm"); + } + else if (Ext == "zbp") { + setFeatureBits(RISCV::FeatureExtZbp, "experimental-zbp"); + } + else if (Ext == "zbproposedc") { + setFeatureBits(RISCV::FeatureExtZbproposedc, "experimental-zbproposedc"); + } + else if (Ext == "zbr") { + setFeatureBits(RISCV::FeatureExtZbr, "experimental-zbr"); + } + else if (Ext == "zbs") { + setFeatureBits(RISCV::FeatureExtZbs, "experimental-zbs"); + } + else if (Ext == "zbt") { + setFeatureBits(RISCV::FeatureExtZbt, "experimental-zbt"); + } + else if (Ext == "zfh") { + setFeatureBits(RISCV::FeatureExtZfh, "experimental-zfh"); + } + else if (Ext == "zvamo") { + setFeatureBits(RISCV::FeatureExtZvamo, "experimental-zvamo"); + } + else if (Ext == "zvlsseg") { + setFeatureBits(RISCV::FeatureStdExtZvlsseg, "experimental-zvlsseg"); + } + else { + return Error(ValueExprLoc, "bad arch string " + Ext); + } + Arch = Arch.drop_until([](char c) { return ::isdigit(c) || c == '_'; }); + DropFirst = false; + } + else { + return Error(ValueExprLoc, "bad arch string " + Arch); + } + if (DropFirst) { + Arch = Arch.drop_front(1); + } + int major = 0; + int minor = 0; + Arch.consumeInteger(10, major); + Arch.consume_front("p"); + Arch.consumeInteger(10, minor); + Arch = Arch.drop_while([](char c) { return c == '_'; }); + } + } + if (IsIntegerValue) { + getTargetStreamer().emitAttribute(Tag, IntegerValue); + } + else { + if (Tag != RISCVAttrs::ARCH) { + getTargetStreamer().emitTextAttribute(Tag, StringValue); + } + else { + std::string formalArchStr = "rv32"; + if (getFeatureBits(RISCV::Feature64Bit)) + formalArchStr = "rv64"; + if (getFeatureBits(RISCV::FeatureRV32E)) + formalArchStr = (Twine(formalArchStr) + "e1p9").str(); + else + formalArchStr = (Twine(formalArchStr) + "i2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtM)) + formalArchStr = (Twine(formalArchStr) + "_m2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtA)) + formalArchStr = (Twine(formalArchStr) + "_a2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtF)) + formalArchStr = (Twine(formalArchStr) + "_f2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtD)) + formalArchStr = (Twine(formalArchStr) + "_d2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtC)) + formalArchStr = (Twine(formalArchStr) + "_c2p0").str(); + if (getFeatureBits(RISCV::FeatureStdExtB)) + formalArchStr = (Twine(formalArchStr) + "_b0p93").str(); + if (getFeatureBits(RISCV::FeatureStdExtV)) + formalArchStr = (Twine(formalArchStr) + "_v0p10").str(); + if (getFeatureBits(RISCV::FeatureExtZfh)) + formalArchStr = (Twine(formalArchStr) + "_zfh0p1").str(); + if (getFeatureBits(RISCV::FeatureExtZba)) + formalArchStr = (Twine(formalArchStr) + "_zba0p93").str(); + if (getFeatureBits(RISCV::FeatureExtZbb)) + formalArchStr = (Twine(formalArchStr) + "_zbb0p93").str(); + if (getFeatureBits(RISCV::FeatureExtZbc)) { + formalArchStr = (Twine(formalArchStr) + "_zbc0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbe)) { + formalArchStr = (Twine(formalArchStr) + "_zbe0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbf)) { + formalArchStr = (Twine(formalArchStr) + "_zbf0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbm)) { + formalArchStr = (Twine(formalArchStr) + "_zbm0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbp)) { + formalArchStr = (Twine(formalArchStr) + "_zbp0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbproposedc)) { + formalArchStr = (Twine(formalArchStr) + "_zbproposedc0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbr)) { + formalArchStr = (Twine(formalArchStr) + "_zbr0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbs)) { + formalArchStr = (Twine(formalArchStr) + "_zbs0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZbt)) { + formalArchStr = (Twine(formalArchStr) + "_zbt0p93").str(); + } + if (getFeatureBits(RISCV::FeatureExtZvamo)) { + formalArchStr = (Twine(formalArchStr) + "_zvamo0p10").str(); + } + if (getFeatureBits(RISCV::FeatureStdExtZvlsseg)) { + formalArchStr = (Twine(formalArchStr) + "_zvlsseg0p10").str(); + } + getTargetStreamer().emitTextAttribute(Tag, formalArchStr); + } + } + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e9cdadb0936ababf2f6c45f59c54e181e9d21a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp @@ -0,0 +1,31 @@ +bool RISCVAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc, OperandVector &Operands) { + if (getSTI().getFeatureBits()[RISCV::FeatureRelax]) { + auto *Assembler = getTargetStreamer().getStreamer().getAssemblerPtr(); + if (Assembler != nullptr) { + RISCVAsmBackend &MAB = static_cast(Assembler->getBackend()); + MAB.setForceRelocs(); + } + } + Operands.push_back(RISCVOperand::createToken(Name, NameLoc, isRV64())); + if (getLexer().is(AsmToken::EndOfStatement)) { + return false; + } + if (parseOperand(Operands, Name)) { + return true; + } + unsigned OperandIdx = 1; + while (getLexer().is(AsmToken::Comma)) { + getLexer().Lex(); + if (parseOperand(Operands, Name)) { + return true; + } + ++OperandIdx; + } + if (getLexer().isNot(AsmToken::EndOfStatement)) { + SMLoc Loc = getLexer().getLoc(); + getParser().eatToEndOfStatement(); + return Error(Loc, "unexpected token"); + } + getParser().Lex(); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5d4359121cc681b1667e4b723d63f8a260df120 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp @@ -0,0 +1,6 @@ +bool RISCVAsmParser::ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + if (tryParseRegister(RegNo, StartLoc, EndLoc) != MatchOperand_Success) { + return Error(StartLoc, "invalid register name"); + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ccc9683fc9110594147015b16f0c9b51543c0d2d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp @@ -0,0 +1,4 @@ +void addCSRSystemRegisterOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createImm(SysReg.Encoding)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..214fe9f44a01731c40c1084f3ff205132df9e262 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addExpr.cpp @@ -0,0 +1,12 @@ +void addExpr(MCInst &Inst, const MCExpr *Expr) const { + assert(Expr && "Expr shouldn't be null!"); + int64_t Imm = 0; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstant = evaluateConstantImm(Expr, Imm, VK); + if (IsConstant) { + Inst.addOperand(MCOperand::createImm(Imm)); + } + else { + Inst.addOperand(MCOperand::createExpr(Expr)); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73d49a88563d2c4aca26d1c150579bc82e0babf2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp @@ -0,0 +1,4 @@ +void addFRMArgOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createImm(getRoundingMode())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..792d4fa164c9d9d497708692cc4167f5c14775a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp @@ -0,0 +1,16 @@ +void addFenceArgOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + auto SE = cast(getImm()); + unsigned Imm = 0; + for (char c : SE->getSymbol().getName()) { + switch (c) { + default: + llvm_unreachable("FenceArg must contain only [iorw]"); + case 'i': Imm |= RISCVFenceField::I; break; + case 'o': Imm |= RISCVFenceField::O; break; + case 'r': Imm |= RISCVFenceField::R; break; + case 'w': Imm |= RISCVFenceField::W; break; + } + } + Inst.addOperand(MCOperand::createImm(Imm)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a69f8ac923d9234ea41ac4606011cacda986f3e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp @@ -0,0 +1,4 @@ +void addImmOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + addExpr(Inst, getImm()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0238a375be523b4d683ea934130d2e5390c7dfa7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp @@ -0,0 +1,4 @@ +void addRegOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createReg(getReg())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47fb952384ac089c38b1615985b2fdd2e107225f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp @@ -0,0 +1,4 @@ +void addVTypeIOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::createImm(getVType())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e84a90bbcd6b57ad4a18f3de6f079fab9ea6ef6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp @@ -0,0 +1,13 @@ +bool RISCVAsmParser::classifySymbolRef(const MCExpr *Expr, MCExpr::VariantKind &Kind) { + Kind = RISCVMCExpr::VK_RISCV_None; + if (const RISCVMCExpr *RE = dyn_cast(Expr)) { + Kind = RE->getKind(); + Expr = RE->getSubExpr(); + } + MCValue Res; + MCFixup Fixup; + if (Expr->evaluateAsRelocatable(Res, nullptr, &Fixup)) { + return Res.getRefKind() == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e026cba6a73b81985778dc9bb3c9d65b32fb1666 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR16(MCRegister Reg) { + assert(Reg >= RISCV::F0_D && Reg <= RISCV::F31_D && "Invalid register"); + return Reg - RISCV::F0_D + RISCV::F0_H; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f4dc9ae940f1dd462ac08522f4c04f563e554d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR32(MCRegister Reg) { + assert(Reg >= RISCV::F0_D && Reg <= RISCV::F31_D && "Invalid register"); + return Reg - RISCV::F0_D + RISCV::F0_F; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..399ee2614f3b539f1368f7c10cdc6e506119e381 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createImm.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr createImm(const MCExpr *Val, SMLoc S, SMLoc E, bool IsRV64) { + auto Op = std::make_unique(KindTy::Immediate); + Op->Imm.Val = Val; + Op->StartLoc = S; + Op->EndLoc = E; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c2c43a6a8093aa2194f4fba74917b2fc21eb193 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createReg.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr createReg(unsigned RegNo, SMLoc S, SMLoc E, bool IsRV64) { + auto Op = std::make_unique(KindTy::Register); + Op->Reg.RegNum = RegNo; + Op->StartLoc = S; + Op->EndLoc = E; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createSysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b7a2657c346e52c22ccd28703bc5baa75cff344 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createSysReg.cpp @@ -0,0 +1,9 @@ +static std::unique_ptr createSysReg(StringRef Str, SMLoc S, unsigned Encoding, bool IsRV64) { + auto Op = std::make_unique(KindTy::SystemRegister); + Op->SysReg.Data = Str.data(); + Op->SysReg.Length = Str.size(); + Op->SysReg.Encoding = Encoding; + Op->StartLoc = S; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createToken.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdaa650df5adf6dc96daae935f42ae08ac7f4283 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createToken.cpp @@ -0,0 +1,8 @@ +static std::unique_ptr createToken(StringRef Str, SMLoc S, bool IsRV64) { + auto Op = std::make_unique(KindTy::Token); + Op->Tok = Str; + Op->StartLoc = S; + Op->EndLoc = S; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createVType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4deb57ffa06e779c7e3e92cae9f34bdba8a9d9b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/createVType.cpp @@ -0,0 +1,7 @@ +static std::unique_ptr createVType(unsigned VTypeI, SMLoc S, bool IsRV64) { + auto Op = std::make_unique(KindTy::VType); + Op->VType.Val = VTypeI; + Op->StartLoc = S; + Op->IsRV64 = IsRV64; + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b022f4d2360a1bb7aae0c7121a89aae81ffb4c75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp @@ -0,0 +1,3 @@ +std::unique_ptr RISCVAsmParser::defaultMaskRegOp() const { + return RISCVOperand::createReg(RISCV::NoRegister, llvm::SMLoc(), llvm::SMLoc(), isRV64()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..85deea136f491e311c7514cc7cc3319a332e069d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp @@ -0,0 +1,9 @@ +void RISCVAsmParser::emitToStreamer(MCStreamer &S, const MCInst &Inst) { + MCInst CInst; + bool Res = false; + Res = compressInst(CInst, Inst, getSTI(), S.getContext()); + if (Res) { + RISCVNumInstrsCompressed = RISCVNumInstrsCompressed + 1; + } + S.emitInstruction((Res ? CInst : Inst), getSTI()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66157e504bc3b499d080b12e3a0c1b14ae434c52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp @@ -0,0 +1,12 @@ +static bool evaluateConstantImm(const MCExpr *Expr, int64_t &Imm, RISCVMCExpr::VariantKind &VK) { + if (auto *RE = dyn_cast(Expr)) { + VK = RE->getKind(); + return RE->evaluateAsConstant(Imm); + } + if (auto CE = dyn_cast(Expr)) { + VK = RISCVMCExpr::VK_RISCV_None; + Imm = CE->getValue(); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38a0c63d84cc29155e89b8f20de13c896c70af91 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp @@ -0,0 +1,4 @@ +bool RISCVAsmParser::generateImmOutOfRangeError(OperandVector &Operands, uint64_t ErrorInfo, int64_t Lower, int64_t Upper, Twine Msg = "immediate must be an integer in the range") { + SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc(); + return Error(ErrorLoc, Msg + " [" + Twine(Lower) + ", " + Twine(Upper) + "]"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62829900d768fc89d50171419f738e8ec8124b58 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getEndLoc() const override { + return EndLoc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8b7d6acceee057eaf23f6023ac5aa0493a08037 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp @@ -0,0 +1,3 @@ +bool getFeatureBits(uint64_t Feature) { + return getFeatureBits()[Feature]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..680aa6e8b7c97665bca7b25e7ba715d083360048 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getImm.cpp @@ -0,0 +1,4 @@ +const MCExpr *getImm() const { + assert(Kind == KindTy::Immediate && "Invalid type access!"); + return Imm.Val; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getLoc.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee06922bf6091cbb8ed19c3dcc5b42aa0335fbc5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getLoc() const { + return getParser().getTok().getLoc(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b727268741262d50d0b7be12f8f224ae221d70d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg() const override { + assert(Kind == KindTy::Register && "Invalid type access!"); + return Reg.RegNum.id(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59bafeff69c9ddbdeac847d8c5295be2781a6739 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp @@ -0,0 +1,6 @@ +RISCVFPRndMode::RoundingMode getRoundingMode() const { + auto SE = cast(getImm()); + RISCVFPRndMode::RoundingMode FRM = RISCVFPRndMode::stringToRoundingMode(SE->getSymbol().getName()); + assert(FRM != RISCVFPRndMode::Invalid && "Invalid rounding mode"); + return FRM; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1468c5ab73e31cdbf7622d7fb4cc05414acef937 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getStartLoc() const override { + return StartLoc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getSysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c409acf907d63507ebf66c33bb6055965fddc7a7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getSysReg.cpp @@ -0,0 +1,4 @@ +StringRef getSysReg() const { + assert(Kind == KindTy::SystemRegister && "Invalid type access!"); + return StringRef(SysReg.Data, SysReg.Length); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3c9c2ce61d650ef0464f9b4aa2539d390a2e11e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp @@ -0,0 +1,4 @@ +RISCVTargetStreamer &getTargetStreamer() { + MCTargetStreamer &TS = *getParser().getStreamer().getTargetStreamer(); + return static_cast(TS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getToken.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..445834686b5ec1bb686bda4abcc004a4ec9ee82a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getToken.cpp @@ -0,0 +1,4 @@ +StringRef getToken() const { + assert(Kind == KindTy::Token && "Invalid type access!"); + return Tok; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getVType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..af123b58f738de16129e3a5fbb1a323ecf40eb1f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/getVType.cpp @@ -0,0 +1,4 @@ +unsigned getVType() const { + assert(Kind == KindTy::VType && "Invalid type access!"); + return VType.Val; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dfd9e592f1bb7c039a98e85fd4c7a525b677fe69 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp @@ -0,0 +1,16 @@ +template bool isBareSimmNLsb0() const { + if (!isImm()) { + return false; + } + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (IsConstantImm) { + IsValid = isShiftedInt(Imm); + } + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + } + return IsValid && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48a01b62fd0d0730ca3fbc3730793c50e55ab55a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp @@ -0,0 +1,14 @@ +bool isBareSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + if (evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f89c302eb8bc0bcfca47f2f9845303081503982d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp @@ -0,0 +1,11 @@ +bool isCLUIImm() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return (Imm != 0) && (isUInt<5>(Imm) || (Imm >= 0xfffe0 && Imm <= 0xfffff)) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ffb7bbbe9a914a516b01cc030bf81758a80e3270 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isCSRSystemRegister() const { + return Kind == KindTy::SystemRegister; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6142f6614dfe57e8c93e793847ae07ddf837848 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp @@ -0,0 +1,11 @@ +bool isCallSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + if (evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && (VK == RISCVMCExpr::VK_RISCV_CALL || VK == RISCVMCExpr::VK_RISCV_CALL_PLT); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98df83b42fc3323559573c60f0e7a30405f28bdb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp @@ -0,0 +1,12 @@ +bool isFRMArg() const { + if (!isImm()) { + return false; + } + const MCExpr *Val = getImm(); + auto *SVal = dyn_cast(Val); + if (!SVal || SVal->getKind() != MCSymbolRefExpr::VK_None) { + return false; + } + StringRef Str = SVal->getSymbol().getName(); + return RISCVFPRndMode::stringToRoundingMode(Str) != RISCVFPRndMode::Invalid; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41d6f3f46374b1b9a6e6634a0de10b1bba1ef5ac --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp @@ -0,0 +1,22 @@ +bool isFenceArg() const { + if (!isImm()) { + return false; + } + const MCExpr *Val = getImm(); + auto *SVal = dyn_cast(Val); + if (!SVal || SVal->getKind() != MCSymbolRefExpr::VK_None) { + return false; + } + StringRef Str = SVal->getSymbol().getName(); + char Prev = '\0'; + for (char c : Str) { + if (c != 'i' && c != 'o' && c != 'r' && c != 'w') { + return false; + } + if (c <= Prev) { + return false; + } + Prev = c; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isGPR.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isGPR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2990020b5ef61ab36d27572763e8f15efb9772d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isGPR.cpp @@ -0,0 +1,3 @@ +bool isGPR() const { + return Kind == KindTy::Register && RISCVMCRegisterClasses[RISCV::GPRRegClassID].contains(Reg.RegNum); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..400db8c5883144be4963e33031283ae54db7ddf7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm() const override { + return Kind == KindTy::Immediate; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b460d989d40ad769b6179758abfe2864344e640e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp @@ -0,0 +1,11 @@ +bool isImmXLenLI() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_LO || VK == RISCVMCExpr::VK_RISCV_PCREL_LO || (VK == RISCVMCExpr::VK_RISCV_None && (isRV64() || (isInt<32>(Imm) || isUInt<32>(Imm)))); + } + return IsValid && VK == zmtarzmMCExpr :: VK_RISCV_LO || VK == zmtarzmMCExpr :: VK_RISCV_PCREL_LO ; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isMem.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isMem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c43c1fbf793d7bd6d2e893e67962bd3cccf94715 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isMem.cpp @@ -0,0 +1,3 @@ +bool isMem() const override { + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eec91dbdac1b9ab829dccf99b39973eded1da5b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp @@ -0,0 +1,11 @@ +bool isPseudoJumpSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + if (evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_CALL; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV32E.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c21e42e5f798bcb0e6b8f92f3a3cc1dd96f87b44 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E() const { + return getSTI().hasFeature(RISCV::FeatureRV32E); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..383cfa600df6dac196f2c01b85967a5b0fee19c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp @@ -0,0 +1,3 @@ +bool isRV64() const { + return IsRV64; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV64.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eec7fe92227f97b819ea0ba36ff7b64f641acbce --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isRV64.cpp @@ -0,0 +1,3 @@ +bool isRV64() const { + return getSTI().hasFeature(RISCV::Feature64Bit); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcb79a981f0b63d5b3d34a12ff7dc35589d32480 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg() const override { + return Kind == KindTy::Register; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24d6dc2d00014b75b1869a58e1b07898a4404222 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm10Lsb0000NonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return (Imm != 0) && isShiftedInt<6, 4>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm12.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2dcd623be87da6b40f0c329d74836d9aca17d455 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm12.cpp @@ -0,0 +1,16 @@ +bool isSImm12() const { + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + } + else { + IsValid = isInt<12>(Imm); + } + return IsValid && ((IsConstantImm && VK == RISCVMCExpr::VK_RISCV_None) || VK == RISCVMCExpr::VK_RISCV_LO || VK == RISCVMCExpr::VK_RISCV_PCREL_LO || VK == RISCVMCExpr::VK_RISCV_TPREL_LO); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63073bc64c003ca0e83e707b57b7a4ea9c9ce158 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm12Lsb0() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<11, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f6c636265bd63d8a777132c2a0eb78dbb54be86 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm13Lsb0() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<12, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b33656f8aabf36763566f623cf1f73adabe6177f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp @@ -0,0 +1,14 @@ +bool isSImm21Lsb0JAL() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<20, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b64ab3a9e82f435809b69ee895c34d33b707169 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm5.cpp @@ -0,0 +1,11 @@ +bool isSImm5() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<5>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe561ca354d6609427bfe55244528003bf886fd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp @@ -0,0 +1,11 @@ +bool isSImm5Plus1() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<5>(Imm - 1) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm6.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b111421d4683f6af55ac579d99981703d94ad9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm6.cpp @@ -0,0 +1,11 @@ +bool isSImm6() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<6>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b717a48ce5bbedd11d8b6a832de0ef2f398f66d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm6NonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isInt<6>(Imm) && (Imm != 0) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ad3cbc4906910b459fb690b753c04ad71f3c7c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm9Lsb0() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedInt<8, 1>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; + } + if (!evaluateConstantImm(getImm(), Imm, VK)) { + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f392bfff3b4e8e84b2ff2a1435e84f8d71aa647 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isSystemRegister() const { + return Kind == KindTy::SystemRegister; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbd00f01251645ec33d1af74a00e138f137a715c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp @@ -0,0 +1,8 @@ +bool isTPRelAddSymbol() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm() || evaluateConstantImm(getImm(), Imm, VK)) { + return false; + } + return RISCVAsmParser::classifySymbolRef(getImm(), VK) && VK == RISCVMCExpr::VK_RISCV_TPREL_ADD; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isToken.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1dfb1dd6786afb1f04ef6c6a933834f7bf532f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isToken.cpp @@ -0,0 +1,3 @@ +bool isToken() const override { + return Kind == KindTy::Token; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e919d0e2c50071258ae1f27c9354a25e023d0c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp @@ -0,0 +1,11 @@ +bool isUImm10Lsb00NonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return isShiftedUInt<8, 2>(Imm) && (Imm != 0) && VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89b7a149611af05f335eaf59e3f8cd3648411d75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp @@ -0,0 +1,16 @@ +bool isUImm20AUIPC() const { + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + return IsValid && (VK == RISCVMCExpr::VK_RISCV_PCREL_HI || VK == RISCVMCExpr::VK_RISCV_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GD_HI); + } + else { + return isUInt<20>(Imm) && (VK == RISCVMCExpr::VK_RISCV_None || VK == RISCVMCExpr::VK_RISCV_PCREL_HI || VK == RISCVMCExpr::VK_RISCV_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GD_HI); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..923f243b5e92bda4596b995757b38cfc685d1ec9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp @@ -0,0 +1,16 @@ +bool isUImm20LUI() const { + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + int64_t Imm; + bool IsValid; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + if (!IsConstantImm) { + IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK); + return IsValid && (VK == RISCVMCExpr::VK_RISCV_HI || VK == RISCVMCExpr::VK_RISCV_TPREL_HI); + } + else { + return isUInt<20>(Imm) && (VK == RISCVMCExpr::VK_RISCV_None || VK == RISCVMCExpr::VK_RISCV_HI || VK == RISCVMCExpr::VK_RISCV_TPREL_HI); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b18cb034281c59c4c483e7321ee15b4dcafff652 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm5.cpp @@ -0,0 +1,9 @@ +bool isUImm5() const { + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (!isImm()) { + return false; + } + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isUInt<5>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24c29da9a8cbed9c78d112302095c0013b32a31b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp @@ -0,0 +1,9 @@ +bool isUImm7Lsb00() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<5, 2>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ccc5fd5ffb3c7162ff7165e1f056db0ff5f0f83 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp @@ -0,0 +1,9 @@ +bool isUImm8Lsb00() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<6, 2>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7eff26abdf3912a7976c2c7a67e9a024b47ea6bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp @@ -0,0 +1,9 @@ +bool isUImm8Lsb000() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<5, 3>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06310c952d4c996d47144ed5e65f84d235458aaf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp @@ -0,0 +1,9 @@ +bool isUImm9Lsb000() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK); + return IsConstantImm && isShiftedUInt<6, 3>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..76c5c7d94ae735807c0e08a8ba26d4a441ba3b1d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLen() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_None && ((isRV64() && isUInt<6>(Imm)) || isUInt<5>(Imm)); + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e962acbdddc793ea296bb646aa7e1829f29c1078 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenHalf() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a00a205afacb1a8befa223480ef0e27092c6336 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenNonZero() const { + if (!isImm()) { + return false; + } + int64_t Imm; + RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; + if (evaluateConstantImm(getImm(), Imm, VK)) { + return VK == RISCVMCExpr::VK_RISCV_None; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3925060552980f02dcfb4ddf2b3390f7ee29ab33 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp @@ -0,0 +1,3 @@ +bool isV0Reg() const { + return Kind == KindTy::Register && Reg.RegNum == RISCV::V0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isVType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19e3cbf2a0f73d6ef2c860853164a4697d40546f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isVType.cpp @@ -0,0 +1,3 @@ +bool isVType() const { + return Kind == KindTy::VType; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19e3cbf2a0f73d6ef2c860853164a4697d40546f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp @@ -0,0 +1,3 @@ +bool isVType() const { + return Kind == KindTy::VType; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27ae49e62bcf881645cbe1722de6c7742918c0d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp @@ -0,0 +1,14 @@ +static bool matchRegisterNameHelper(bool IsRV32E, MCRegister &RegNo, StringRef Name) { + RegNo = MatchRegisterName(Name); + assert(!(RegNo >= RISCV::F0_H && RegNo <= RISCV::F31_H)); + assert(!(RegNo >= RISCV::F0_F && RegNo <= RISCV::F31_F)); + static_assert(RISCV::F0_D < RISCV::F0_H, "FPR matching must be updated"); + static_assert(RISCV::F0_D < RISCV::F0_F, "FPR matching must be updated"); + if (RegNo == RISCV::NoRegister) { + RegNo = MatchRegisterAltName(Name); + } + if (IsRV32E && RegNo >= RISCV::X16 && RegNo <= RISCV::X31) { + RegNo = RISCV::NoRegister; + } + return RegNo == RISCV::NoRegister; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73fa5f840b2095a3ff4d84b0a43741fcb127a04b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp @@ -0,0 +1,31 @@ +OperandMatchResultTy RISCVAsmParser::parseAtomicMemOp(OperandVector &Operands) { + std::unique_ptr OptionalImmOp; + if (getLexer().isNot(AsmToken::LParen)) { + int64_t ImmVal; + SMLoc ImmStart = getLoc(); + if (getParser().parseIntToken(ImmVal, "expected '(' or optional integer offset")) { + return MatchOperand_ParseFail; + } + SMLoc ImmEnd = getLoc(); + OptionalImmOp = RISCVOperand::createImm(MCConstantExpr::create(ImmVal, getContext()), ImmStart, ImmEnd, isRV64()); + } + if (getLexer().isNot(AsmToken::LParen)) { + Error(getLoc(), OptionalImmOp ? "expected '(' after optional integer offset" : "expected '(' or optional integer offset"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (parseRegister(Operands) != MatchOperand_Success) { + Error(getLoc(), "expected register"); + return MatchOperand_ParseFail; + } + if (getLexer().isNot(AsmToken::RParen)) { + Error(getLoc(), "expected ')'"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (OptionalImmOp && !OptionalImmOp->isImmZero()) { + Error(OptionalImmOp->getStartLoc(), "optional integer offset must be 0", SMRange(OptionalImmOp->getStartLoc(), OptionalImmOp->getEndLoc())); + return MatchOperand_ParseFail; + } + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57f7bc977450d3c2da02c005d74f59303d313ad1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp @@ -0,0 +1,54 @@ +OperandMatchResultTy RISCVAsmParser::parseBareSymbol(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + StringRef Identifier; + AsmToken Tok = getLexer().getTok(); + if (getParser().parseIdentifier(Identifier)) { + return MatchOperand_ParseFail; + } + if (Identifier.consume_back("@plt")) { + Error(getLoc(), "'@plt' operand not valid for instruction"); + return MatchOperand_ParseFail; + } + MCSymbol *Sym = getContext().getOrCreateSymbol(Identifier); + if (Sym->isVariable()) { + const MCExpr *V = Sym->getVariableValue(false); + if (!isa(V)) { + getLexer().UnLex(Tok); + return MatchOperand_NoMatch; + } + Res = V; + } + if (!Sym->isVariable()) { + Res = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext()); + } + MCBinaryExpr::Opcode Opcode; + if (getLexer().getKind() == AsmToken::Plus) { + Opcode = MCBinaryExpr::Add; + getLexer().Lex(); + const MCExpr *Expr; + if (getParser().parseExpression(Expr)) { + return MatchOperand_ParseFail; + } + Res = MCBinaryExpr::create(Opcode, Res, Expr, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; + } + if (getLexer().getKind() == AsmToken::Minus) { + Opcode = MCBinaryExpr::Sub; + getLexer().Lex(); + const MCExpr *Expr; + if (getParser().parseExpression(Expr)) { + return MatchOperand_ParseFail; + } + Res = MCBinaryExpr::create(Opcode, Res, Expr, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; + } + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96d54657bc5e40fad131f08a4c6c265d5da2663c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp @@ -0,0 +1,58 @@ +OperandMatchResultTy RISCVAsmParser::parseCSRSystemRegister(OperandVector &Operands) { + SMLoc S = getLoc(); + const MCExpr *Res; + switch (getLexer().getKind()) { + default: + return MatchOperand_NoMatch; + case AsmToken::LParen: + case AsmToken::Minus: + case AsmToken::Plus: + case AsmToken::Exclaim: + case AsmToken::Tilde: + case AsmToken::Integer: + case AsmToken::String: { + if (getParser().parseExpression(Res)) { + return MatchOperand_ParseFail; + } + auto *CE = dyn_cast(Res); + if (CE) { + int64_t Imm = CE->getValue(); + if (isUInt<12>(Imm)) { + auto SysReg = RISCVSysReg::lookupSysRegByEncoding(Imm); + Operands.push_back(RISCVOperand::createSysReg(SysReg ? SysReg->Name : "", S, Imm, isRV64())); + return MatchOperand_Success; + } + } + Twine Msg = "immediate must be an integer in the range"; + Error(S, Msg + " [" + Twine(0) + ", " + Twine((1 << 12) - 1) + "]"); + return MatchOperand_ParseFail; + } + case AsmToken::Identifier: { + StringRef Identifier; + if (getParser().parseIdentifier(Identifier)) { + return MatchOperand_ParseFail; + } + auto SysReg = RISCVSysReg::lookupSysRegByName(Identifier); + if (!SysReg) { + SysReg = RISCVSysReg::lookupSysRegByAltName(Identifier); + } + if (SysReg) { + if (!SysReg->haveRequiredFeatures(getSTI().getFeatureBits())) { + Error(S, "system register use requires an option to be enabled"); + return MatchOperand_ParseFail; + } + Operands.push_back(RISCVOperand::createSysReg(Identifier, S, SysReg->Encoding, isRV64())); + return MatchOperand_Success; + } + Twine Msg = "operand must be a valid system register name or an integer in the range"; + Error(S, Msg + " [" + Twine(0) + ", " + Twine((1 << 12) - 1) + "]"); + return MatchOperand_ParseFail; + } + case AsmToken::Percent: { + Twine Msg = "immediate must be an integer in the range"; + Error(S, Msg + " [" + Twine(0) + ", " + Twine((1 << 12) - 1) + "]"); + return MatchOperand_ParseFail; + } + } + return MatchOperand_NoMatch; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe6a4808b76d4d27e94f8d2fb928ea9efcec5566 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp @@ -0,0 +1,24 @@ +OperandMatchResultTy RISCVAsmParser::parseCallSymbol(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + if (getLexer().peekTok().getKind() != AsmToken::EndOfStatement) { + return MatchOperand_NoMatch; + } + StringRef Identifier; + if (getParser().parseIdentifier(Identifier)) { + return MatchOperand_ParseFail; + } + RISCVMCExpr::VariantKind Kind = RISCVMCExpr::VK_RISCV_CALL; + if (Identifier.consume_back("@plt")) { + Kind = RISCVMCExpr::VK_RISCV_CALL_PLT; + } + MCSymbol *Sym = getContext().getOrCreateSymbol(Identifier); + Res = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext()); + Res = RISCVMCExpr::create(Res, Kind, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..feac87761130aaf45a8121dea0eae6f59102e1d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp @@ -0,0 +1,25 @@ +OperandMatchResultTy RISCVAsmParser::parseImmediate(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + switch (getLexer().getKind()) { + default: + return MatchOperand_NoMatch; + case AsmToken::LParen: + case AsmToken::Dot: + case AsmToken::Minus: + case AsmToken::Plus: + case AsmToken::Exclaim: + case AsmToken::Tilde: + case AsmToken::Integer: + case AsmToken::String: + case AsmToken::Identifier: + if (getParser().parseExpression(Res)) + return MatchOperand_ParseFail; + break; + case AsmToken::Percent: + return parseOperandWithModifier(Operands); + } + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4347a538d20ac2d19cd66ac66b94dea2d4ee61a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp @@ -0,0 +1,6 @@ +OperandMatchResultTy RISCVAsmParser::parseJALOffset(OperandVector &Operands) { + if (getLexer().is(AsmToken::Identifier) && getLexer().peekTok().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + return parseImmediate(Operands); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..901f42d5b8e97a73b21f91b7bc31ab4375d074a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp @@ -0,0 +1,23 @@ +OperandMatchResultTy RISCVAsmParser::parseMaskReg(OperandVector &Operands) { + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + StringRef Name = getLexer().getTok().getIdentifier(); + if (!Name.consume_back(".t")) { + Error(getLoc(), "expected '.t' suffix"); + return MatchOperand_ParseFail; + } + MCRegister RegNo; + matchRegisterNameHelper(isRV32E(), RegNo, Name); + if (RegNo == RISCV::NoRegister) { + return MatchOperand_NoMatch; + } + if (RegNo != RISCV::V0) { + return MatchOperand_NoMatch; + } + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + getLexer().Lex(); + Operands.push_back(RISCVOperand::createReg(RegNo, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1511d06f4bed7e5bdbe162d055ebd9cb72aadfd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp @@ -0,0 +1,19 @@ +OperandMatchResultTy RISCVAsmParser::parseMemOpBaseReg(OperandVector &Operands) { + if (getLexer().isNot(AsmToken::LParen)) { + Error(getLoc(), "expected '('"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + Operands.push_back(RISCVOperand::createToken("(", getLoc(), isRV64())); + if (parseRegister(Operands) != MatchOperand_Success) { + Error(getLoc(), "expected register"); + return MatchOperand_ParseFail; + } + if (getLexer().isNot(AsmToken::RParen)) { + Error(getLoc(), "expected ')'"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + Operands.push_back(RISCVOperand::createToken(")", getLoc(), isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b95d698771a42bf80e9f83db2769c52a2de381c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseOperand.cpp @@ -0,0 +1,20 @@ +bool RISCVAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) { + OperandMatchResultTy Result = MatchOperandParserImpl(Operands, Mnemonic, true); + if (Result == MatchOperand_Success) { + return false; + } + if (Result == MatchOperand_ParseFail) { + return true; + } + if (parseRegister(Operands, true) == MatchOperand_Success) { + return false; + } + if (parseImmediate(Operands) == MatchOperand_Success) { + if (getLexer().is(AsmToken::LParen)) { + return parseMemOpBaseReg(Operands) != MatchOperand_Success; + } + return false; + } + Error(getLoc(), "unknown operand"); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27f42bfe733a0007030006dfbc7d50f869067eda --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp @@ -0,0 +1,32 @@ +OperandMatchResultTy RISCVAsmParser::parseOperandWithModifier(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + if (getLexer().getKind() != AsmToken::Percent) { + Error(getLoc(), "expected '%' for operand modifier"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (getLexer().getKind() != AsmToken::Identifier) { + Error(getLoc(), "expected valid identifier for operand modifier"); + return MatchOperand_ParseFail; + } + StringRef Identifier = getParser().getTok().getIdentifier(); + RISCVMCExpr::VariantKind VK = RISCVMCExpr::getVariantKindForName(Identifier); + if (VK == RISCVMCExpr::VK_RISCV_Invalid) { + Error(getLoc(), "unrecognized operand modifier"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + if (getLexer().getKind() != AsmToken::LParen) { + Error(getLoc(), "expected '('"); + return MatchOperand_ParseFail; + } + getParser().Lex(); + const MCExpr *SubExpr; + if (getParser().parseParenExpression(SubExpr, E)) { + return MatchOperand_ParseFail; + } + const MCExpr *ModExpr = RISCVMCExpr::create(SubExpr, VK, getContext()); + Operands.push_back(RISCVOperand::createImm(ModExpr, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69b270de1636f260bc365037fb79e6d55d7af2f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp @@ -0,0 +1,15 @@ +OperandMatchResultTy RISCVAsmParser::parsePseudoJumpSymbol(OperandVector &Operands) { + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + const MCExpr *Res; + if (getParser().parseExpression(Res)) { + return MatchOperand_ParseFail; + } + if (Res->getKind() != MCExpr::ExprKind::SymbolRef || cast(Res)->getKind() == MCSymbolRefExpr::VariantKind::VK_PLT) { + Error(S, "operand must be a valid jump target"); + return MatchOperand_ParseFail; + } + Res = RISCVMCExpr::create(Res, RISCVMCExpr::VK_RISCV_CALL, getContext()); + Operands.push_back(RISCVOperand::createImm(Res, S, E, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fe5924f959488bcb9783bee83611e7623f013e8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp @@ -0,0 +1,43 @@ +OperandMatchResultTy RISCVAsmParser::parseRegister(OperandVector &Operands, bool AllowParens) { + SMLoc FirstS = getLoc(); + bool HadParens = false; + AsmToken LParen; + if (AllowParens && getLexer().is(AsmToken::LParen)) { + AsmToken Buf[2]; + size_t ReadCount = getLexer().peekTokens(Buf); + if (ReadCount == 2 && Buf[1].getKind() == AsmToken::RParen) { + HadParens = true; + LParen = getParser().getTok(); + getParser().Lex(); + } + } + switch (getLexer().getKind()) { + default: + if (HadParens) { + getLexer().UnLex(LParen); + } + return MatchOperand_NoMatch; + case AsmToken::Identifier: + StringRef Name = getLexer().getTok().getIdentifier(); + MCRegister RegNo; + matchRegisterNameHelper(isRV32E(), RegNo, Name); + if (RegNo == RISCV::NoRegister) { + if (HadParens) { + getLexer().UnLex(LParen); + } + return MatchOperand_NoMatch; + } + if (HadParens) { + Operands.push_back(RISCVOperand::createToken("(", FirstS, isRV64())); + } + SMLoc S = getLoc(); + SMLoc E = SMLoc::getFromPointer(S.getPointer() - 1); + getLexer().Lex(); + Operands.push_back(RISCVOperand::createReg(RegNo, S, E, isRV64())); + } + if (HadParens) { + getParser().Lex(); + Operands.push_back(RISCVOperand::createToken(")", getLoc(), isRV64())); + } + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e220c8a45f48d51816290c8ee89f6dfe78b71cd5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp @@ -0,0 +1,85 @@ +OperandMatchResultTy RISCVAsmParser::parseVTypeI(OperandVector &Operands) { + SMLoc S = getLoc(); + if (getLexer().getKind() != AsmToken::Identifier) { + return MatchOperand_NoMatch; + } + StringRef Name = getLexer().getTok().getIdentifier(); + if (!Name.consume_front("e")) { + return MatchOperand_NoMatch; + } + unsigned Sew; + if (Name.getAsInteger(10, Sew)) { + return MatchOperand_NoMatch; + } + if (!RISCVVType::isValidSEW(Sew)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (!getLexer().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + Name = getLexer().getTok().getIdentifier(); + if (!Name.consume_front("m")) { + return MatchOperand_NoMatch; + } + bool Fractional = Name.consume_front("f"); + unsigned Lmul; + if (Name.getAsInteger(10, Lmul)) { + return MatchOperand_NoMatch; + } + if (!RISCVVType::isValidLMUL(Lmul, Fractional)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (!getLexer().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + Name = getLexer().getTok().getIdentifier(); + bool TailAgnostic; + if (Name == "ta") { + TailAgnostic = true; + } + else if (Name == "tu") { + TailAgnostic = false; + } + else { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (!getLexer().is(AsmToken::Comma)) { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + Name = getLexer().getTok().getIdentifier(); + bool MaskAgnostic; + if (Name == "ma") { + MaskAgnostic = true; + } + else if (Name == "mu") { + MaskAgnostic = false; + } + else { + return MatchOperand_NoMatch; + } + getLexer().Lex(); + if (getLexer().getKind() != AsmToken::EndOfStatement) { + return MatchOperand_NoMatch; + } + unsigned SewLog2 = Log2_32(Sew / 8); + unsigned LmulLog2 = Log2_32(Lmul); + RISCVVSEW VSEW = static_cast(SewLog2); + RISCVVLMUL VLMUL = static_cast(Fractional ? 8 - LmulLog2 : LmulLog2); + unsigned VLMULBits = static_cast(VLMUL); + unsigned VSEWBits = static_cast(VSEW); + unsigned VTypeI = (VSEWBits << 3) | (VLMULBits & 0x7); + if (TailAgnostic) { + VTypeI |= 0x40; + } + if (MaskAgnostic) { + VTypeI |= 0x80; + } + Operands.push_back(RISCVOperand::createVType(VTypeI, S, isRV64())); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/print.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a8b9ee45de91092637a6df1c5cc22485819a36f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/print.cpp @@ -0,0 +1,27 @@ +void print(raw_ostream &OS) const override { + auto RegName = [](unsigned Reg) { + if (Reg) { + return RISCVInstPrinter::getRegisterName(Reg); + } + else { + return "noreg"; + } + }; + if (Kind == KindTy::Token) { + OS << "'" << getToken() << "'"; + } + if (Kind == KindTy::Register) { + OS << ""; + } + if (Kind == KindTy::Immediate) { + OS << *getImm(); + } + if (Kind == KindTy::SystemRegister) { + OS << "'; + } + if (Kind == KindTy::VType) { + OS << "'; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..211903c48c17873e04e301dd463681dff6bb9c72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp @@ -0,0 +1,6 @@ +void setFeatureBits(uint64_t Feature, StringRef FeatureString) { + if (!(getSTI().getFeatureBits()[Feature])) { + MCSubtargetInfo &STI = copySTI(); + setAvailableFeatures(ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a1d6873add2be39e3f257393382aec5e4ed8d3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp @@ -0,0 +1,12 @@ +OperandMatchResultTy RISCVAsmParser::tryParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) { + const AsmToken &Tok = getParser().getTok(); + StartLoc = Tok.getLoc(); + EndLoc = Tok.getEndLoc(); + RegNo = 0; + StringRef Name = getLexer().getTok().getIdentifier(); + if (matchRegisterNameHelper(isRV32E(), (MCRegister &)RegNo, Name)) { + return MatchOperand_NoMatch; + } + getParser().Lex(); + return MatchOperand_Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c072b9c27d13a6ecb7d25a3e02a5bd74d804d7b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp @@ -0,0 +1,18 @@ +unsigned RISCVAsmParser::validateTargetOperandClass(MCParsedAsmOperand &AsmOp, unsigned Kind) { + RISCVOperand &Op = static_cast(AsmOp); + if (!Op.isReg()) { + return Match_InvalidOperand; + } + MCRegister Reg = Op.getReg(); + bool IsRegFPR64 = RISCVMCRegisterClasses[RISCV::FPR64RegClassID].contains(Reg); + bool IsRegFPR64C = RISCVMCRegisterClasses[RISCV::FPR64CRegClassID].contains(Reg); + if ((IsRegFPR64 && Kind == MCK_FPR32) || (IsRegFPR64C && Kind == MCK_FPR32C)) { + Op.Reg.RegNum = convertFPR64ToFPR32(Reg); + return Match_Success; + } + if (IsRegFPR64 && Kind == MCK_FPR16) { + Op.Reg.RegNum = convertFPR64ToFPR16(Reg); + return Match_Success; + } + return Match_InvalidOperand; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e166353dd214035178ed8fd3747bf6c0d1d6a724 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit RISCVAsmPrinter(TargetMachine &TM, std::unique_ptr Streamer) : AsmPrinter(TM, std::move(Streamer)), STI(TM.getMCSubtargetInfo()) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b00b8f8b42d9c2fbe308b81fe001a750e400ae4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp @@ -0,0 +1,8 @@ +void RISCVAsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) { + MCInst CInst; + bool Res = compressInst(CInst, Inst, *STI, OutStreamer->getContext()); + if (Res) { + ++RISCVNumInstrsCompressed; + } + AsmPrinter::EmitToStreamer(*OutStreamer, Res ? CInst : Inst); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b6f0328c0d570906d89e27f1b6c6bd2958c6ee6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmPrinter() { + RegisterAsmPrinter X(getTheRISCV32Target()); + RegisterAsmPrinter Y(getTheRISCV64Target()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31132f2f38be4753150937d0d9e817e46726ce1e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,11 @@ +bool RISCVAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) { + if (!ExtraCode) { + const MachineOperand &MO = MI->getOperand(OpNo); + if (!MO.isReg()) { + return true; + } + OS << "0(" << RISCVInstPrinter::getRegisterName(MO.getReg()) << ")"; + return false; + } + return AsmPrinter::PrintAsmMemoryOperand(MI, OpNo, ExtraCode, OS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c31fdfafce0d2ff8dea052096b61a742174ece7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,45 @@ +bool RISCVAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) { + if (!AsmPrinter::PrintAsmOperand(MI, OpNo, ExtraCode, OS)) { + return false; + } + const MachineOperand &MO = MI->getOperand(OpNo); + if (ExtraCode && ExtraCode[0]) { + if (ExtraCode[1] != 0) { + return true; + } + switch (ExtraCode[0]) { + default: + return true; + case 'z': + if (MO.isImm() && MO.getImm() == 0) { + OS << RISCVInstPrinter::getRegisterName(RISCV::X0); + return false; + } + break; + case 'i': + if (!MO.isReg()) { + OS << 'i'; + } + return false; + } + } + switch (MO.getType()) { + case MachineOperand::MO_Immediate: + OS << MO.getImm(); + return false; + case MachineOperand::MO_Register: + OS << RISCVInstPrinter::getRegisterName(MO.getReg()); + return false; + case MachineOperand::MO_GlobalAddress: + PrintSymbolOperand(MO, OS); + return false; + case MachineOperand::MO_BlockAddress: { + MCSymbol *Sym = GetBlockAddressSymbol(MO.getBlockAddress()); + Sym->print(OS, MAI); + return false; + } + default: + break; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c13bd2b11bf02aab0983c3ffc0c3b5ad848e0be2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp @@ -0,0 +1,9 @@ +void RISCVAsmPrinter::emitAttributes() { + RISCVTargetStreamer &RTS = static_cast(*OutStreamer->getTargetStreamer()); + const Triple &TT = TM.getTargetTriple(); + StringRef CPU = TM.getTargetCPU(); + StringRef FS = TM.getTargetFeatureString(); + const RISCVTargetMachine &RTM = static_cast(TM); + const RISCVSubtarget STI(TT, CPU, CPU, FS, "", RTM); + RTS.emitTargetAttributes(STI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..871ffa5737cbbebb3646e8d4332bd04b329067da --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,6 @@ +void RISCVAsmPrinter::emitEndOfAsmFile(Module &M) { + RISCVTargetStreamer &CTS = static_cast(*OutStreamer->getTargetStreamer()); + if (TM.getTargetTriple().isOSBinFormatELF()) { + CTS.finishAttributeSection(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdd093f184563015cb1be5ba8975ef04762fd8b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp @@ -0,0 +1,8 @@ +void RISCVAsmPrinter::emitInstruction(const MachineInstr *MI) { + if (emitPseudoExpansionLowering(*OutStreamer, MI)) { + return ; + } + MCInst TmpInst; + LowerRISCVMachineInstrToMCInst(MI, TmpInst, *this); + EmitToStreamer(*OutStreamer, TmpInst); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6895c501148e6daaad0ad8d522f0cbdb0fb2a9e6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,5 @@ +void RISCVAsmPrinter::emitStartOfAsmFile(Module &M) { + if (TM.getTargetTriple().isOSBinFormatELF()) { + emitAttributes(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..408ede981a828294678c062ffab8cb8538586a4a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "RISCV Assembly Printer"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e46620f964aa5e16a8f2d0ea650ef87a4e687718 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp @@ -0,0 +1,3 @@ +bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const { + return LowerRISCVMachineOperandToMCOperand(MO, MCOp, *this); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..789e25a498fe0fcd1c781cb7aa07b505321457e0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVAsmPrinter::runOnMachineFunction(MachineFunction &MF) { + MCSubtargetInfo &NewSTI = OutStreamer->getContext().getSubtargetCopy(*TM.getMCSubtargetInfo()); + NewSTI.setFeatureBits(MF.getSubtarget().getFeatureBits()); + STI = &NewSTI; + SetupMachineFunction(MF); + emitFunctionBody(); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92d7310f19818315af77ce1c98d61f5c1d4fdf10 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR16RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F0_H + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1bc847c2b24fafa879484f9d062041ad9950bae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32CRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 8) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F8_F + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36aae9478effe333858379c9a1b304100f38eaf1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F0_F + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ad24e5137888045d3acc32ed95530c2d3e15529 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64CRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 8) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F8_D + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae3dfca3caacd67020ee25fe6f85414520efaabe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::F0_D + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3edc390bf8de970a40451494a5aec58321519e7e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeGPRCRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 8) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::X8 + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..019654808af5f3e9c6795bc28ace71abdf367d21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo == 0) { + return MCDisassembler::Fail; + } + return DecodeGPRRegisterClass(Inst, RegNo, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6f18fdce1b4c98576300921500dfc1bd3d0f4f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0X2RegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo == 2) { + return MCDisassembler::Fail; + } + return DecodeGPRNoX0RegisterClass(Inst, RegNo, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23847ddc8e1562eb28b6353bbee940cac56d8acd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp @@ -0,0 +1,10 @@ +static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + const FeatureBitset &FeatureBits = static_cast(Decoder)->getSubtargetInfo().getFeatureBits(); + bool IsRV32E = FeatureBits[RISCV::FeatureRV32E]; + if (RegNo >= 32 || (IsRV32E && RegNo >= 16)) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::X0 + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea83a9dcc3429e5c226968b1d1d94ddeedc751bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeVRRegisterClass(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + if (RegNo >= 32) { + return MCDisassembler::Fail; + } + MCRegister Reg = RISCV::V0 + RegNo; + Inst.addOperand(MCOperand::createReg(Reg)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b68c6a0167549bc8f749b0e470e9d23c43926635 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp @@ -0,0 +1,2 @@ +RISCVDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx, MCInstrInfo const *MCII) : MCDisassembler(STI, Ctx), MCII(MCII) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ed8ecad6545c74078d9b77942c9b5c2a24a16d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVDisassembler() { + TargetRegistry::RegisterMCDisassembler(getTheRISCV32Target(), createRISCVDisassembler); + TargetRegistry::RegisterMCDisassembler(getTheRISCV64Target(), createRISCVDisassembler); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ccacd508efb4089c860bb106baa89d892902431 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp @@ -0,0 +1,9 @@ +static void addImplySP(MCInst &Inst, int64_t Address, const void *Decoder) { + if (Inst.getOpcode() == RISCV::C_LWSP || Inst.getOpcode() == RISCV::C_SWSP || Inst.getOpcode() == RISCV::C_LDSP || Inst.getOpcode() == RISCV::C_SDSP || Inst.getOpcode() == RISCV::C_FLWSP || Inst.getOpcode() == RISCV::C_FSWSP || Inst.getOpcode() == RISCV::C_FLDSP || Inst.getOpcode() == RISCV::C_FSDSP || Inst.getOpcode() == RISCV::C_ADDI4SPN) { + DecodeGPRRegisterClass(Inst, 2, Address, Decoder); + } + if (Inst.getOpcode() == RISCV::C_ADDI16SP) { + DecodeGPRRegisterClass(Inst, 2, Address, Decoder); + DecodeGPRRegisterClass(Inst, 2, Address, Decoder); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..498d4e2da63069504b61fd82b710c75962d5a343 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp @@ -0,0 +1,3 @@ +static MCDisassembler *createRISCVDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) { + return new RISCVDisassembler(STI, Ctx, T.createMCInstrInfo()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56923d00f9f34f97fd7d6f2a92844eefb789431b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeCLUIImmOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt<6>(Imm) && "Invalid immediate"); + if (Imm > 31) { + Imm = (SignExtend64<6>(Imm) & 0xfffff); + } + Inst.addOperand(MCOperand::createImm(Imm)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..42bc2ab0b8e381b06b0a7b99bc2e16f91132e611 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeFRMArg(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt<3>(Imm) && "Invalid immediate"); + if (!llvm::RISCVFPRndMode::isValidRoundingMode(Imm)) { + return MCDisassembler::Fail; + } + Inst.addOperand(MCOperand::createImm(Imm)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff736e6728f99593a0e367fe7ae7c308fddee2cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp @@ -0,0 +1,9 @@ +static DecodeStatus decodeRVCInstrRdRs1Rs2(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + unsigned d = fieldFromInstruction(Insn, 7, 5); + unsigned const9 = 0; + unsigned s1 = fieldFromInstruction(Insn, 2, 5); + DecodeStatus status = DecodeGPRRegisterClass(Inst, d, Address, Decoder); + Inst.addOperand(Inst.getOperand(const9)); + status = DecodeGPRRegisterClass(Inst, s1, Address, Decoder); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4583b28d5e2cc6dc158fc5c94735ce0db8db858d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp @@ -0,0 +1,9 @@ +static DecodeStatus decodeRVCInstrRdRs1UImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + DecodeGPRRegisterClass(Inst, 0, Address, Decoder); + Inst.addOperand(Inst.getOperand(0)); + uint64_t UImm6 = fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5); + DecodeStatus Result = decodeUImmOperand<6>(Inst, UImm6, Address, Decoder); + (void)Result; + assert(Result == MCDisassembler::Success && "Invalid immediate"); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ce75106ef40771cb6415341680d69cf98151355 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp @@ -0,0 +1,7 @@ +static DecodeStatus decodeRVCInstrRdRs2(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + unsigned Rd = fieldFromInstruction(Insn, 7, 5); + unsigned Rs2 = fieldFromInstruction(Insn, 2, 5); + DecodeGPRRegisterClass(Inst, Rd, Address, Decoder); + DecodeGPRRegisterClass(Inst, Rs2, Address, Decoder); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..faf42482128dc81f79631797aaa131b57faa45bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeRVCInstrRdSImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + DecodeGPRRegisterClass(Inst, 0, Address, Decoder); + uint64_t SImm6 = fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5); + DecodeStatus Result = decodeSImmOperand<6>(Inst, SImm6, Address, Decoder); + (void)Result; + assert(Result == MCDisassembler::Success && "Invalid immediate"); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4380b36238a4132769709bf280da1414dfa1ab7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp @@ -0,0 +1,7 @@ +static DecodeStatus decodeRVCInstrSImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { + uint64_t SImm6 = fieldFromInstruction(Insn, 12, 1) << 5 | fieldFromInstruction(Insn, 2, 5); + DecodeStatus Result = decodeSImmOperand<6>(Inst, SImm6, Address, Decoder); + (void)Result; + assert(Result == MCDisassembler::Success && "Invalid immediate"); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6df53e27f2f7bb0bf6af2592e13fc3189f9de88 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp @@ -0,0 +1,9 @@ +template static DecodeStatus decodeSImmNonZeroOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + if (Imm == 0) { + return MCDisassembler::Fail; + } + assert(isUInt(Imm) && "Invalid immediate"); + addImplySP(Inst, Address, Decoder); + Inst.addOperand(MCOperand::createImm(SignExtend64(Imm))); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a56c1c3848efb98e2783ac2b3e50392822d1860b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus decodeSImmOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt(Imm) && "Invalid immediate"); + addImplySP(Inst, Address, Decoder); + Inst.addOperand(MCOperand::createImm(SignExtend64(Imm))); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e565169c666715ddbb61d5b3e884cc7b628f469 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp @@ -0,0 +1,5 @@ +template static DecodeStatus decodeSImmOperandAndLsl1(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt(Imm) && "Invalid immediate"); + Inst.addOperand(MCOperand::createImm(SignExtend64(Imm << 1))); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f08c154acb38533e848886a589b04bc524212a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus decodeUImmNonZeroOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + if (Imm == 0) { + return MCDisassembler::Fail; + } + return decodeUImmOperand(Inst, Imm, Address, Decoder); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e940d44b9e6b88e433ea55a8013356671e1ef239 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp @@ -0,0 +1,6 @@ +template static DecodeStatus decodeUImmOperand(MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) { + assert(isUInt(Imm) && "Invalid immediate"); + addImplySP(Inst, Address, Decoder); + Inst.addOperand(MCOperand::createImm(Imm)); + return MCDisassembler::Success; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ea5f1578a4fbbdd90b384382f28cc1bc2bce945 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp @@ -0,0 +1,12 @@ +static DecodeStatus decodeVMaskReg(MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) { + MCRegister Reg = RISCV::NoRegister; + if (RegNo == 0) { + Inst.addOperand(MCOperand::createReg(RISCV::V0)); + return MCDisassembler::Success; + } + if (RegNo == 1) { + Inst.addOperand(MCOperand::createReg(RISCV::NoRegister)); + return MCDisassembler::Success; + } + return MCDisassembler::Fail; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b6b768e230411e68b01e432b0cea4141325942a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp @@ -0,0 +1,41 @@ +DecodeStatus RISCVDisassembler::getInstruction(MCInst &MI, uint64_t &Size, ArrayRef Bytes, uint64_t Address, raw_ostream &CS) const { + uint32_t Insn; + DecodeStatus Result; + if ((Bytes[0] & 0x3) == 0x3) { + if (Bytes.size() < 4) { + Size = 0; + return MCDisassembler::Fail; + } + Insn = support::endian::read32le(Bytes.data()); + LLVM_DEBUG(dbgs() << "Trying RISCV32 table :\n"); + Result = decodeInstruction(DecoderTable32, MI, Insn, Address, this, STI); + Size = 4; + } + else { + if (Bytes.size() < 2) { + Size = 0; + return MCDisassembler::Fail; + } + Insn = support::endian::read16le(Bytes.data()); + if (!STI.getFeatureBits()[RISCV::Feature64Bit]) { + LLVM_DEBUG(dbgs() << "Trying RISCV32Only_16 table (16-bit Instruction):\n"); + Result = decodeInstruction(DecoderTableRISCV32Only_16, MI, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + } + if (STI.getFeatureBits()[RISCV::FeatureExtZbproposedc] && STI.getFeatureBits()[RISCV::FeatureStdExtC]) { + LLVM_DEBUG(dbgs() << "Trying RVBC32 table (BitManip 16-bit Instruction):\n"); + Result = decodeInstruction(DecoderTableRVBC16, MI, Insn, Address, this, STI); + if (Result != MCDisassembler::Fail) { + Size = 2; + return Result; + } + } + LLVM_DEBUG(dbgs() << "Trying RISCV_C table (16-bit Instruction):\n"); + Result = decodeInstruction(DecoderTable16, MI, Insn, Address, this, STI); + Size = 2; + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef34215b142479c87b1510584ea79489a5710109 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp @@ -0,0 +1,4 @@ +RISCVAsmBackend(const MCSubtargetInfo &STI, uint8_t OSABI, bool Is64Bit, const MCTargetOptions &Options) : MCAsmBackend(support::little), STI(STI), OSABI(OSABI), Is64Bit(Is64Bit), TargetOptions(Options) { + TargetABI = RISCVABI::computeTargetABI(STI.getTargetTriple(), STI.getFeatureBits(), Options.getABIName()); + RISCVFeatures::validate(STI.getTargetTriple(), STI.getFeatureBits()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d00ba8cb22e6e315ffa265d1c176117c48a3639 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp @@ -0,0 +1,86 @@ +static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value, MCContext &Ctx) { + unsigned Kind; + Kind = Fixup.getTargetKind(); + if (Kind == FK_Data_1) { + return Value; + } + if (Kind == FK_Data_2) { + return Value; + } + if (Kind == FK_Data_4) { + return Value; + } + if (Kind == FK_Data_8) { + return Value; + } + if (Kind == FK_Data_6b) { + return Value; + } + if (Kind == RISCV::fixup_riscv_lo12_i) { + return Value & 0xfff; + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_i) { + return Value & 0xfff; + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_i) { + return Value & 0xfff; + } + if (Kind == RISCV::fixup_riscv_lo12_s) { + return (((Value >> 5) & 0x7f) << 25) | ((Value & 0x1f) << 7); + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_s) { + return (((Value >> 5) & 0x7f) << 25) | ((Value & 0x1f) << 7); + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_s) { + return (((Value >> 5) & 0x7f) << 25) | ((Value & 0x1f) << 7); + } + if (Kind == RISCV::fixup_riscv_hi20) { + return ((Value + 0x800) >> 12) & 0xfffff; + } + if (Kind == RISCV::fixup_riscv_pcrel_hi20) { + return ((Value + 0x800) >> 12) & 0xfffff; + } + if (Kind == RISCV::fixup_riscv_tprel_hi20) { + return ((Value + 0x800) >> 12) & 0xfffff; + } + if (Kind == RISCV::fixup_riscv_call) { + return ((Value + 0x800ULL) & 0xfffff000ULL) | (((Value & 0xfffULL) << 20) << 32); + } + if (Kind == RISCV::fixup_riscv_call_plt) { + return ((Value + 0x800ULL) & 0xfffff000ULL) | (((Value & 0xfffULL) << 20) << 32); + } + if (Kind == RISCV::fixup_riscv_rvc_jump) { + return (((Value >> 11) & 0x1) << 10) | (((Value >> 4) & 0x1) << 9) | (((Value >> 8) & 0x3) << 7) | (((Value >> 10) & 0x1) << 6) | (((Value >> 6) & 0x1) << 5) | (((Value >> 7) & 0x1) << 4) | (((Value >> 1) & 0x7) << 1) | ((Value >> 5) & 0x1); + } + if (Kind == RISCV::fixup_riscv_rvc_branch) { + return (((Value >> 8) & 0x1) << 12) | (((Value >> 3) & 0x3) << 10) | (((Value >> 6) & 0x3) << 5) | (((Value >> 1) & 0x3) << 3) | (((Value >> 5) & 0x1) << 2); + } + if (Kind == RISCV::fixup_riscv_tls_got_hi20) { + llvm_unreachable("Relocation should be unconditionally forced\n"); + } + if (Kind == RISCV::fixup_riscv_tls_gd_hi20) { + llvm_unreachable("Relocation should be unconditionally forced\n"); + } + if (Kind == RISCV::fixup_riscv_got_hi20) { + llvm_unreachable("Relocation should be unconditionally forced\n"); + } + if (Kind == RISCV::fixup_riscv_branch) { + if (!isInt<13>(Value)) { + Ctx.reportError(Fixup.getLoc(), "fixup value out of range"); + } + if (Value & 0x1) { + Ctx.reportError(Fixup.getLoc(), "fixup value must be 2-byte aligned"); + } + return (((Value >> 11) & 0x1) << 7); + } + if (Kind == RISCV::fixup_riscv_jal) { + if (!isInt<21>(Value)) { + Ctx.reportError(Fixup.getLoc(), "fixup value out of range"); + } + if (Value & 0x1) { + Ctx.reportError(Fixup.getLoc(), "fixup value must be 2-byte aligned"); + } + return (((Value >> 20) & 0x1) << 19) | (((Value >> 1) & 0x3ff) << 9) | (((Value >> 11) & 0x1) << 8) | ((Value >> 12) & 0xff); + } + llvm_unreachable("Unknown fixup kind!"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/applyFixup.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/applyFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f805ec0a5bc2cb96d16ba5a8e177d99f0bad2aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/applyFixup.cpp @@ -0,0 +1,19 @@ +void RISCVAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,const MCValue &Target,MutableArrayRef Data, uint64_t Value,bool IsResolved, const MCSubtargetInfo *STI) const { + MCFixupKind Kind = Fixup.getKind(); + if (Kind >= FirstLiteralRelocationKind) { + return ; + } + MCContext &Ctx = Asm.getContext(); + MCFixupKindInfo Info = getFixupKindInfo(Kind); + if (!Value) { + return ; + } + Value = adjustFixupValue(Fixup, Value, Ctx); + Value <<= Info.TargetOffset; + unsigned Offset = Fixup.getOffset(); + unsigned NumBytes = alignTo(Info.TargetSize + Info.TargetOffset, 8) / 8; + assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!"); + for (unsigned i = 0; i != NumBytes; ++i) { + Data[Offset + i] |= uint8_t((Value >> (i * 8)) & 0xff); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cbb77fce7853eba057e346ceab62e761785a5616 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp @@ -0,0 +1,5 @@ +MCAsmBackend *llvm::createRISCVAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) { + const Triple &TT = STI.getTargetTriple(); + uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS()); + return new RISCVAsmBackend(STI, OSABI, TT.isArch64Bit(), Options); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..899027cb9566b9956193576250199de336ddb193 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp @@ -0,0 +1,3 @@ +std::unique_ptr RISCVAsmBackend::createObjectTargetWriter() const { + return createRISCVELFObjectWriter(OSABI, Is64Bit); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a200b75ea98b3459dc89d83a2964ae971e563063 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp @@ -0,0 +1,50 @@ +bool RISCVAsmBackend::evaluateTargetFixup(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFixup &Fixup, const MCFragment *DF, const MCValue &Target, uint64_t &Value, bool &WasForced) { + const MCFixup *AUIPCFixup; + const MCFragment *AUIPCDF; + MCValue AUIPCTarget; + switch (Fixup.getTargetKind()) { + default: + llvm_unreachable("Unexpected fixup kind!"); + case RISCV::fixup_riscv_pcrel_hi20: + AUIPCFixup = &Fixup; + AUIPCDF = DF; + AUIPCTarget = Target; + break; + case RISCV::fixup_riscv_pcrel_lo12_i: + case RISCV::fixup_riscv_pcrel_lo12_s: { + AUIPCFixup = cast(Fixup.getValue())->getPCRelHiFixup(&AUIPCDF); + if (!AUIPCFixup) { + Asm.getContext().reportError(Fixup.getLoc(), "could not find corresponding %pcrel_hi"); + return true; + } + const MCExpr *AUIPCExpr = AUIPCFixup->getValue(); + if (!AUIPCExpr->evaluateAsRelocatable(AUIPCTarget, &Layout, AUIPCFixup)) { + return true; + } + break; + } + } + if (!AUIPCTarget.getSymA() || AUIPCTarget.getSymB()) { + return false; + } + const MCSymbolRefExpr *A = AUIPCTarget.getSymA(); + const MCSymbol &SA = A->getSymbol(); + if (A->getKind() != MCSymbolRefExpr::VK_None || SA.isUndefined()) { + return false; + } + auto *Writer = Asm.getWriterPtr(); + if (!Writer) { + return false; + } + bool IsResolved = Writer->isSymbolRefDifferenceFullyResolvedImpl(Asm, SA, *AUIPCDF, false, true); + if (!IsResolved) { + return false; + } + Value = Layout.getSymbolOffset(SA) + AUIPCTarget.getConstant(); + Value -= Layout.getFragmentOffset(AUIPCDF) + AUIPCFixup->getOffset(); + if (shouldForceRelocation(Asm, *AUIPCFixup, AUIPCTarget)) { + WasForced = true; + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2d7f65b53a8d71a36becd18d92452b97ccf728f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp @@ -0,0 +1,3 @@ +bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, const MCRelaxableFragment *DF, const MCAsmLayout &Layout) const override { + llvm_unreachable("Handled by fixupNeedsRelaxationAdvanced"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ec2d779def6933b2b61eb6de6cd74a3e29a2bf8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp @@ -0,0 +1,14 @@ +bool RISCVAsmBackend::fixupNeedsRelaxationAdvanced(const MCFixup &Fixup, bool Resolved, uint64_t Value, const MCRelaxableFragment *DF, const MCAsmLayout &Layout, const bool WasForced) const { + if (!Resolved && !WasForced) { + return true; + } + int64_t Offset = int64_t(Value); + switch (Fixup.getTargetKind()) { + case RISCV::fixup_riscv_rvc_branch: + return Offset > 254 || Offset < -256; + case RISCV::fixup_riscv_rvc_jump: + return Offset > 2046 || Offset < -2048; + default: + return false; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9016a3840b84201f3ee27f9769f23843493270a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp @@ -0,0 +1,14 @@ +Optional RISCVAsmBackend::getFixupKind(StringRef Name) const { + if (STI.getTargetTriple().isOSBinFormatELF()) { + unsigned Type; + Type = llvm::StringSwitch(Name) + #define ELF_RELOC(X, Y) .Case(#X, Y) + #include "llvm/BinaryFormat/ELFRelocs/RISCV.def" + #undef ELF_RELOC + .Default(-1u); + if (Type != -1u) { + return static_cast(FirstLiteralRelocationKind + Type); + } + } + return None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..344e37ea708d0c1573e1d5e08920d42d54d66739 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp @@ -0,0 +1,33 @@ +const MCFixupKindInfo & RISCVAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { + const static MCFixupKindInfo Infos[RISCV::NumTargetFixupKinds] = { + {"fixup_riscv_hi20", 12, 20, 0}, + {"fixup_riscv_lo12_i", 20, 12, 0}, + {"fixup_riscv_lo12_s", 0, 32, 0}, + {"fixup_riscv_pcrel_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget}, + {"fixup_riscv_pcrel_lo12_i", 20, 12, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget}, + {"fixup_riscv_pcrel_lo12_s", 0, 32, MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget}, + {"fixup_riscv_got_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_tprel_hi20", 12, 20, 0}, + {"fixup_riscv_tprel_lo12_i", 20, 12, 0}, + {"fixup_riscv_tprel_lo12_s", 0, 32, 0}, + {"fixup_riscv_tprel_add", 0, 0, 0}, + {"fixup_riscv_tls_got_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_tls_gd_hi20", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_jal", 12, 20, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_branch", 0, 32, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_rvc_jump", 2, 11, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_rvc_branch", 0, 16, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_call", 0, 64, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_call_plt", 0, 64, MCFixupKindInfo::FKF_IsPCRel}, + {"fixup_riscv_relax", 0, 0, 0}, + {"fixup_riscv_align", 0, 0, 0} + }; + if (Kind >= FirstLiteralRelocationKind) { + return MCAsmBackend::getFixupKindInfo(FK_NONE); + } + if (Kind < FirstTargetFixupKind) { + return MCAsmBackend::getFixupKindInfo(Kind); + } + assert(unsigned(Kind - FirstTargetFixupKind) < getNumFixupKinds() && "Invalid kind!"); + return Infos[Kind - FirstTargetFixupKind]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..746a8de2786e0986eb0d4ef57b90b600aa813eb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp @@ -0,0 +1,3 @@ +unsigned getNumFixupKinds() const override { + return RISCV::NumTargetFixupKinds; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a8dce3b201b77083cd73b657c5dac73e342fdca --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp @@ -0,0 +1,15 @@ +unsigned RISCVAsmBackend::getRelaxedOpcode(unsigned Op) const { + if (Op == RISCV::C_BEQZ) { + return RISCV::BEQ; + } + if (Op == RISCV::C_BNEZ) { + return RISCV::BNE; + } + if (Op == RISCV::C_J) { + return RISCV::JAL; + } + if (Op == RISCV::C_JAL) { + return RISCV::JAL; + } + return Op; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ba240b805d561f415ec4ee11045c3d6eb8dea8e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp @@ -0,0 +1,3 @@ +RISCVABI::ABI getTargetABI() const { + return TargetABI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ba9da6c2169958b5222a337d15c7920c3b3a0a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp @@ -0,0 +1,3 @@ +const MCTargetOptions &getTargetOptions() const { + return TargetOptions; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a6ab22b5e3a82bac66595e73244230ced8e6c2cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp @@ -0,0 +1,15 @@ +bool RISCVAsmBackend::mayNeedRelaxation(const MCInst &Inst, const MCSubtargetInfo &STI) const { + if (Inst.getOpcode() == RISCV::C_BEQZ) { + return true; + } + if (Inst.getOpcode() == RISCV::C_BNEZ) { + return true; + } + if (Inst.getOpcode() == RISCV::C_J) { + return true; + } + if (Inst.getOpcode() == RISCV::C_JAL) { + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d47f9e24849b2b1245e390ffc5e557ee66c2675 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp @@ -0,0 +1,34 @@ +void RISCVAsmBackend::relaxInstruction(const MCInst &Inst, const MCSubtargetInfo &STI, MCInst &Res) const { + MCInst Res; + if (Inst.getOpcode() == RISCV::C_BEQZ) { + Res.setOpcode(RISCV::BEQ); + Res.addOperand(Inst.getOperand(0)); + Res.addOperand(MCOperand::createReg(RISCV::X0)); + Res.addOperand(Inst.getOperand(1)); + Inst = std::move(Res); + return ; + } + if (Inst.getOpcode() == RISCV::C_BNEZ) { + Res.setOpcode(RISCV::BNE); + Res.addOperand(Inst.getOperand(0)); + Res.addOperand(MCOperand::createReg(RISCV::X0)); + Res.addOperand(Inst.getOperand(1)); + Inst = std::move(Res); + return ; + } + if (Inst.getOpcode() == RISCV::C_J) { + Res.setOpcode(RISCV::JAL); + Res.addOperand(MCOperand::createReg(RISCV::X0)); + Res.addOperand(Inst.getOperand(0)); + Inst = std::move(Res); + return ; + } + if (Inst.getOpcode() == RISCV::C_JAL) { + Res.setOpcode(RISCV::JAL); + Res.addOperand(MCOperand::createReg(RISCV::X1)); + Res.addOperand(Inst.getOperand(0)); + Inst = std::move(Res); + return ; + } + llvm_unreachable("Opcode not expected!"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20caba2eb4d9bfb4a0d6f036615d2b0b9b4de29d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp @@ -0,0 +1,3 @@ +bool requiresDiffExpressionRelocations() const override { + return willForceRelocations(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c50c542fcb66c027d042a9f86d3a2b22389d8363 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp @@ -0,0 +1,3 @@ +void setForceRelocs() { + ForceRelocs = true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5ba38725c60c617aaa46c733ff8a0ed4b0c77bcb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp @@ -0,0 +1,39 @@ +bool RISCVAsmBackend::shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target) { + if (Fixup.getTargetKind() >= FirstLiteralRelocationKind) { + return true; + } + if (Fixup.getTargetKind() == FK_Data_1) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == FK_Data_2) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == FK_Data_4) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == FK_Data_8) { + if (Target.isAbsolute()) { + return false; + } + return true; + } + if (Fixup.getTargetKind() == RISCV::fixup_riscv_got_hi20) { + return true; + } + if (Fixup.getTargetKind() == RISCV::fixup_riscv_tls_got_hi20) { + return true; + } + if (Fixup.getTargetKind() == RISCV::fixup_riscv_tls_gd_hi20) { + return true; + } + return STI.getFeatureBits()[RISCV::FeatureRelax] || ForceRelocs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cbc97e17845d545983c933ea23dc3e4c437503b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp @@ -0,0 +1,14 @@ +bool RISCVAsmBackend::shouldInsertExtraNopBytesForCodeAlign(const MCAlignFragment &AF, unsigned &Size) { + if (!STI.getFeatureBits()[RISCV::FeatureRelax]) { + return false; + } + bool HasStdExtC = STI.getFeatureBits()[RISCV::FeatureStdExtC]; + unsigned MinNopLen = HasStdExtC ? 2 : 4; + if (AF.getAlignment() <= MinNopLen) { + return false; + } + else { + Size = AF.getAlignment() - MinNopLen; + return true; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0cba76a5121626885e6f5d385f92d143bb1bbf7e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp @@ -0,0 +1,16 @@ +bool RISCVAsmBackend::shouldInsertFixupForCodeAlign(MCAssembler &Asm, const MCAsmLayout &Layout, MCAlignFragment &AF) { + if (!STI.getFeatureBits()[RISCV::FeatureRelax]) { + return false; + } + unsigned Count; + if (!shouldInsertExtraNopBytesForCodeAlign(AF, Count) || (Count == 0)) { + return false; + } + MCContext &Ctx = Asm.getContext(); + const MCExpr *Dummy = MCConstantExpr::create(0, Ctx); + MCFixup Fixup = MCFixup::create(0, Dummy, MCFixupKind(RISCV::fixup_riscv_align), SMLoc()); + uint64_t FixedValue = 0; + MCValue NopBytes = MCValue::get(Count); + Asm.getWriter().recordRelocation(Asm, Layout, &AF, Fixup, NopBytes, FixedValue); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d4f67dbd32002e52666f53c763a70a4dba9e31b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp @@ -0,0 +1,3 @@ +bool willForceRelocations() const { + return ForceRelocs || STI.getFeatureBits()[RISCV::FeatureRelax]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/writeNopData.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/writeNopData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d80a5b62dec8be0da614743dbfd8cce5bc86ea5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/writeNopData.cpp @@ -0,0 +1,14 @@ +bool RISCVAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const { + if (Count % 2 != 0) { + return false; + } + uint64_t NopCount = Count / 4; + uint64_t i; + for (i = 0; i < NopCount; ++i) { + OS.write("\x13\0\0\0", 4); + } + if (Count % 4 == 2) { + OS.write("\x01\0", 2); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef098a67f9366ad081d706783370f6efc23e3a48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp @@ -0,0 +1,2 @@ +~RISCVAsmBackend() override { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9421589a9b9c1fc5b796893153daedb95b1d0d46 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,10 @@ +RISCVMCAsmInfo::RISCVMCAsmInfo(const Triple &TT) { + CodePointerSize = TT.isArch64Bit() ? 8 : 4; + CalleeSaveStackSlotSize = TT.isArch64Bit() ? 8 : 4; + CommentString = "#"; + AlignmentIsInBytes = false; + SupportsDebugInformation = true; + ExceptionsType = ExceptionHandling::DwarfCFI; + Data16bitsDirective = "\t.half\t"; + Data32bitsDirective = "\t.word\t"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/anchor.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a347705836916e209cf07b3a754f158902edef80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/anchor.cpp @@ -0,0 +1,2 @@ +void RISCVMCAsmInfo::anchor() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8123d7641ff42e395a6fae61de4cd9e72363c53a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp @@ -0,0 +1,7 @@ +const MCExpr *RISCVMCAsmInfo::getExprForFDESymbol(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const { + if (Encoding & dwarf::DW_EH_PE_pcrel) { + MCContext &Ctx = Streamer.getContext(); + return RISCVMCExpr::create(MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, Ctx), RISCVMCExpr::VK_RISCV_32_PCREL, Ctx); + } + return MCAsmInfo::getExprForFDESymbol(Sym, Encoding, Streamer); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/ABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/ABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f3883bfb643c747efaf1bd19098e38d0e4607708 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/ABI.cpp @@ -0,0 +1,10 @@ +enum ABI { + ABI_ILP32, + ABI_ILP32F, + ABI_ILP32D, + ABI_ILP32E, + ABI_LP64, + ABI_LP64F, + ABI_LP64D, + ABI_Unknown +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/FenceField.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/FenceField.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c7b1924b5725066d01f765ea8d324f0c5053f3b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/FenceField.cpp @@ -0,0 +1,6 @@ +enum FenceField { + I = 8, + O = 4, + R = 2, + W = 1 +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/II.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/II.cpp new file mode 100644 index 0000000000000000000000000000000000000000..50b9d9071889f3b5a387cf23e5363093dd124268 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/II.cpp @@ -0,0 +1,53 @@ +namespace RISCVII { +enum { + InstFormatPseudo = 0, + InstFormatR = 1, + InstFormatR4 = 2, + InstFormatI = 3, + InstFormatS = 4, + InstFormatB = 5, + InstFormatU = 6, + InstFormatJ = 7, + InstFormatCR = 8, + InstFormatCI = 9, + InstFormatCSS = 10, + InstFormatCIW = 11, + InstFormatCL = 12, + InstFormatCS = 13, + InstFormatCA = 14, + InstFormatCB = 15, + InstFormatCJ = 16, + InstFormatOther = 17, + InstFormatMask = 31, + ConstraintShift = 5, + ConstraintMask = 0b111 << ConstraintShift, + VLMulShift = ConstraintShift + 3, + VLMulMask = 0b111 , + HasDummyMaskOpShift = 3 , + HasDummyMaskOpShift = 1 , + WritesElement0Shift = HasDummyMaskOpShift + 1, + WritesElement0Mask = 1 << WritesElement0Shift, + HasMergeOpShift = 1 , + HasMergeOpMask = 1 << HasMergeOpShift, + HasSEWOpShift = 1 , + HasVLOpShift = 1 , + HasVLOpShift = HasSEWOpShift + 1, + HasVLOpMask = 1 << HasVLOpShift, +}; +enum { + MO_None = 0, + MO_CALL = 1, + MO_PLT = 2, + MO_LO = 3, + MO_HI = 4, + MO_PCREL_LO = 5, + MO_PCREL_HI = 6, + MO_GOT_HI = 7, + MO_TPREL_LO = 8, + MO_TPREL_HI = 9, + MO_TPREL_ADD = 10, + MO_TLS_GOT_HI = 11, + MO_TLS_GD_HI = 12, + MO_DIRECT_FLAG_MASK = 15 +}; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/OperandType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/OperandType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ee082abd033ba7a52a0e579c7094d92d68a2d2a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/OperandType.cpp @@ -0,0 +1,10 @@ +enum OperandType : unsigned { + OPERAND_FIRST_RISCV_IMM = MCOI::OPERAND_FIRST_TARGET, + OPERAND_UIMM4 = OPERAND_FIRST_RISCV_IMM, + OPERAND_UIMM5, + OPERAND_UIMM12, + OPERAND_SIMM12, + OPERAND_UIMM20, + OPERAND_UIMMLOG2XLEN, + OPERAND_LAST_RISCV_IMM = OPERAND_UIMMLOG2XLEN +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48e9a099c10a3c910227f7c4c692f1923cd7b265 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp @@ -0,0 +1,10 @@ +enum class RISCVVSEW { + SEW_8 = 0, + SEW_16, + SEW_32, + SEW_64, + SEW_128, + SEW_256, + SEW_512, + SEW_1024, +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f6426c797a3087af47909f6164404258de6ea5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp @@ -0,0 +1,6 @@ +enum RVVConstraintType { + NoConstraint = 0, + VS2Constraint = 0b001, + VS1Constraint = 0b010, + VMConstraint = 0b100, +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9322bf2c008867e4d73fcd793cfb9480b8f6f94f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp @@ -0,0 +1,9 @@ +enum RoundingMode { + RNE = 0, + RTZ = 1, + RDN = 2, + RUP = 3, + RMM = 4, + DYN = 7, + Invalid +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/VLMUL.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/VLMUL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4623e7ccd5fedd630b880aaa84b07f4a81dcf701 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/VLMUL.cpp @@ -0,0 +1,10 @@ +enum class RISCVVLMUL { + LMUL_1 = 0, + LMUL_2, + LMUL_4, + LMUL_8, + LMUL_RESERVED, + LMUL_F8, + LMUL_F4, + LMUL_F2 +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/VMTs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/VMTs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2add02bb943bcb64d7795721888ad1d4a89d0dfd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/VMTs.cpp @@ -0,0 +1,46 @@ +namespace RISCVVMVTs { +constexpr MVT vint8mf8_t = MVT::nxv1i8; +constexpr MVT vint8mf4_t = MVT::nxv2i8; +constexpr MVT vint8mf2_t = MVT::nxv4i8; +constexpr MVT vint8m1_t = MVT::nxv8i8; +constexpr MVT vint8m2_t = MVT::nxv16i8; +constexpr MVT vint8m4_t = MVT::nxv32i8; +constexpr MVT vint8m8_t = MVT::nxv64i8; +constexpr MVT vint16mf4_t = MVT::nxv1i16; +constexpr MVT vint16mf2_t = MVT::nxv2i16; +constexpr MVT vint16m1_t = MVT::nxv4i16; +constexpr MVT vint16m2_t = MVT::nxv8i16; +constexpr MVT vint16m4_t = MVT::nxv16i16; +constexpr MVT vint16m8_t = MVT::nxv32i16; +constexpr MVT vint32mf2_t = MVT::nxv1i32; +constexpr MVT vint32m1_t = MVT::nxv2i32; +constexpr MVT vint32m2_t = MVT::nxv4i32; +constexpr MVT vint32m4_t = MVT::nxv8i32; +constexpr MVT vint32m8_t = MVT::nxv16i32; +constexpr MVT vint64m1_t = MVT::nxv1i64; +constexpr MVT vint64m2_t = MVT::nxv2i64; +constexpr MVT vint64m4_t = MVT::nxv4i64; +constexpr MVT vint64m8_t = MVT::nxv8i64; +constexpr MVT vfloat16mf4_t = MVT::nxv1f16; +constexpr MVT vfloat16mf2_t = MVT::nxv2f16; +constexpr MVT vfloat16m1_t = MVT::nxv4f16; +constexpr MVT vfloat16m2_t = MVT::nxv8f16; +constexpr MVT vfloat16m4_t = MVT::nxv16f16; +constexpr MVT vfloat16m8_t = MVT::nxv32f16; +constexpr MVT vfloat32mf2_t = MVT::nxv1f32; +constexpr MVT vfloat32m1_t = MVT::nxv2f32; +constexpr MVT vfloat32m2_t = MVT::nxv4f32; +constexpr MVT vfloat32m4_t = MVT::nxv8f32; +constexpr MVT vfloat32m8_t = MVT::nxv16f32; +constexpr MVT vfloat64m1_t = MVT::nxv1f64; +constexpr MVT vfloat64m2_t = MVT::nxv2f64; +constexpr MVT vfloat64m4_t = MVT::nxv4f64; +constexpr MVT vfloat64m8_t = MVT::nxv8f64; +constexpr MVT vbool1_t = MVT::nxv64i1; +constexpr MVT vbool2_t = MVT::nxv32i1; +constexpr MVT vbool4_t = MVT::nxv16i1; +constexpr MVT vbool8_t = MVT::nxv8i1; +constexpr MVT vbool16_t = MVT::nxv4i1; +constexpr MVT vbool32_t = MVT::nxv2i1; +constexpr MVT vbool64_t = MVT::nxv1i1; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..089445f3c62c65b40b2eec1e8b2b0026a81373bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp @@ -0,0 +1,30 @@ +ABI computeTargetABI(const Triple &TT, FeatureBitset FeatureBits, StringRef ABIName) { + auto TargetABI = getTargetABI(ABIName); + bool IsRV64 = TT.isArch64Bit(); + bool IsRV32E = FeatureBits[RISCV::FeatureRV32E]; + if (!ABIName.empty() && TargetABI == ABI_Unknown) { + errs() << "'" << ABIName << "' is not a recognized ABI for this target (ignoring target-abi)\n"; + } + else if (ABIName.startswith("ilp32") && IsRV64) { + errs() << "32-bit ABIs are not supported for 64-bit targets (ignoring target-abi)\n"; + TargetABI = ABI_Unknown; + } + else if (ABIName.startswith("lp64") && !IsRV64) { + errs() << "64-bit ABIs are not supported for 32-bit targets (ignoring target-abi)\n"; + TargetABI = ABI_Unknown; + } + else if (IsRV32E && TargetABI != ABI_ILP32E && TargetABI != ABI_Unknown) { + errs() << "Only the ilp32e ABI is supported for RV32E (ignoring target-abi)\n"; + TargetABI = ABI_Unknown; + } + if (TargetABI != ABI_Unknown) { + return TargetABI; + } + if (IsRV32E) { + return ABI_ILP32E; + } + if (IsRV64) { + return ABI_LP64; + } + return ABI_ILP32; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd4ae74cfd65a034a0b6664d2b6d0d58e37164c6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp @@ -0,0 +1,24 @@ +ABI getTargetABI(StringRef Str) { + if (Str == "ilp32") { + return ABI_ILP32; + } + if (Str == "ilp32f") { + return ABI_ILP32F; + } + if (Str == "ilp32d") { + return ABI_ILP32D; + } + if (Str == "ilp32e") { + return ABI_ILP32E; + } + if (Str == "lp64") { + return ABI_LP64; + } + if (Str == "lp64f") { + return ABI_LP64F; + } + if (Str == "lp64d") { + return ABI_LP64D; + } + return ABI_Unknown; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp new file mode 100644 index 0000000000000000000000000000000000000000..11291aabba65a0d4a8c320fdbf84a1e20058c498 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp @@ -0,0 +1,18 @@ +inline static StringRef roundingModeToString(RoundingMode RndMode) { + switch (RndMode) { + case RISCVFPRndMode::RNE: + return "rne"; + case RISCVFPRndMode::RTZ: + return "rtz"; + case RISCVFPRndMode::RDN: + return "rdn"; + case RISCVFPRndMode::RUP: + return "rup"; + case RISCVFPRndMode::RMM: + return "rmm"; + case RISCVFPRndMode::DYN: + return "dyn"; + default: + llvm_unreachable("Unknown floating point rounding mode"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a002650de82613870fdc7f3717210aa582d6de4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp @@ -0,0 +1,21 @@ +inline static RoundingMode stringToRoundingMode(StringRef Str) { + if (Str == "rne") { + return RISCVFPRndMode::RNE; + } + if (Str == "rtz") { + return RISCVFPRndMode::RTZ; + } + if (Str == "rdn") { + return RISCVFPRndMode::RDN; + } + if (Str == "rup") { + return RISCVFPRndMode::RUP; + } + if (Str == "rmm") { + return RISCVFPRndMode::RMM; + } + if (Str == "dyn") { + return RISCVFPRndMode::DYN; + } + return RISCVFPRndMode::Invalid; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/validate.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/validate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea0370ee02ed8822169582aef94e41cbbfdc3892 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/BaseInfo/validate.cpp @@ -0,0 +1,5 @@ +void validate(const Triple &TT, const FeatureBitset &FeatureBits) { + if (TT.isArch64Bit() && FeatureBits[RISCV::FeatureRV32E]) { + report_fatal_error("RV32E can't be enabled for an RV64 target"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f33f3e20c0425160b017bce65157ee473529c2e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +RISCVELFObjectWriter::RISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit) : MCELFObjectTargetWriter(Is64Bit, OSABI, ELF::EM_RISCV, true) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf93750ac33e2b6b5c2496f27834ac02c19f9105 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp @@ -0,0 +1,3 @@ +std::unique_ptr llvm::createRISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit) { + return std::make_unique(OSABI, Is64Bit); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a849817c9fb30e56734817ee119b857cdc083330 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp @@ -0,0 +1,132 @@ +unsigned RISCVELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const { + const RISCVMCExpr *SExpr; + if (SExpr = dyn_cast(Fixup.getValue())) { + if (SExpr->getKind() == RISCVMCExpr::VK_RISCV_32_PCREL) { + return ELF::R_RISCV_32_PCREL; + } + } + const MCExpr *Expr = Fixup.getValue(); + unsigned Kind = Fixup.getTargetKind(); + if (Kind >= FirstLiteralRelocationKind){ + return Kind - FirstLiteralRelocationKind; + } + if (IsPCRel) { + if (Kind == FK_PCRel_4) { + return ELF::R_RISCV_32_PCREL; + } + if (Kind == RISCV::fixup_riscv_pcrel_hi20) { + return ELF::R_RISCV_PCREL_HI20; + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_i) { + return ELF::R_RISCV_PCREL_LO12_I; + } + if (Kind == RISCV::fixup_riscv_pcrel_lo12_s) { + return ELF::R_RISCV_PCREL_LO12_S; + } + if (Kind == FK_Data_4) { + return ELF::R_RISCV_32_PCREL; + } + if (Kind == RISCV::fixup_riscv_got_hi20) { + return ELF::R_RISCV_GOT_HI20; + } + if (Kind == RISCV::fixup_riscv_tls_got_hi20) { + return ELF::R_RISCV_TLS_GOT_HI20; + } + if (Kind == RISCV::fixup_riscv_tls_gd_hi20) { + return ELF::R_RISCV_TLS_GD_HI20; + } + if (Kind == RISCV::fixup_riscv_jal) { + return ELF::R_RISCV_JAL; + } + if (Kind == RISCV::fixup_riscv_branch) { + return ELF::R_RISCV_BRANCH; + } + if (Kind == RISCV::fixup_riscv_rvc_jump) { + return ELF::R_RISCV_RVC_JUMP; + } + if (Kind == RISCV::fixup_riscv_rvc_branch) { + return ELF::R_RISCV_RVC_BRANCH; + } + if (Kind == RISCV::fixup_riscv_call) { + return ELF::R_RISCV_CALL; + } + if (Kind == RISCV::fixup_riscv_call_plt) { + return ELF::R_RISCV_CALL_PLT; + } + Ctx.reportError(Fixup.getLoc(), "Unsupported relocation type"); + return ELF::R_RISCV_NONE; + } + if (Kind == FK_Data_4) { + return ELF::R_RISCV_32; + } + if (Kind == FK_Data_8) { + return ELF::R_RISCV_64; + } + if (Kind == FK_Data_Add_1) { + return ELF::R_RISCV_ADD8; + } + if (Kind == FK_Data_Add_2) { + return ELF::R_RISCV_ADD16; + } + if (Kind == FK_Data_Add_4) { + return ELF::R_RISCV_ADD32; + } + if (Kind == FK_Data_Add_8) { + return ELF::R_RISCV_ADD64; + } + if (Kind == FK_Data_1) { + Ctx.reportError(Fixup.getLoc(), "1-byte data relocations not supported"); + return ELF::R_RISCV_NONE; + } + if (Kind == FK_Data_2) { + Ctx.reportError(Fixup.getLoc(), "2-byte data relocations not supported"); + return ELF::R_RISCV_NONE; + } + if (Kind == FK_Data_Add_6b) { + return ELF::R_RISCV_SET6; + } + if (Kind == FK_Data_Sub_1) { + return ELF::R_RISCV_SUB8; + } + if (Kind == FK_Data_Sub_2) { + return ELF::R_RISCV_SUB16; + } + if (Kind == FK_Data_Sub_4) { + return ELF::R_RISCV_SUB32; + } + if (Kind == FK_Data_Sub_8) { + return ELF::R_RISCV_SUB64; + } + if (Kind == FK_Data_Sub_6b) { + return ELF::R_RISCV_SUB6; + } + if (Kind == RISCV::fixup_riscv_hi20) { + return ELF::R_RISCV_HI20; + } + if (Kind == RISCV::fixup_riscv_lo12_i) { + return ELF::R_RISCV_LO12_I; + } + if (Kind == RISCV::fixup_riscv_lo12_s) { + return ELF::R_RISCV_LO12_S; + } + if (Kind == RISCV::fixup_riscv_tprel_hi20) { + return ELF::R_RISCV_TPREL_HI20; + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_i) { + return ELF::R_RISCV_TPREL_LO12_I; + } + if (Kind == RISCV::fixup_riscv_tprel_lo12_s) { + return ELF::R_RISCV_TPREL_LO12_S; + } + if (Kind == RISCV::fixup_riscv_tprel_add) { + return ELF::R_RISCV_TPREL_ADD; + } + if (Kind == RISCV::fixup_riscv_relax) { + return ELF::R_RISCV_RELAX; + } + if (Kind == RISCV::fixup_riscv_align) { + return ELF::R_RISCV_ALIGN; + } + Ctx.reportError(Fixup.getLoc(), "Unsupported relocation type"); + return ELF::R_RISCV_NONE; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..946e0c43f12add7422f67306d02b7ec156134cb1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp @@ -0,0 +1,3 @@ +bool needsRelocateWithSymbol(const MCSymbol &Sym, unsigned Type) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c1de5f7645a8cf79fb3b5ae7778810e57bd7de1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +RISCVELFObjectWriter::~RISCVELFObjectWriter() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f273585d2fbc4baf7b49dd8b5f86b5b3c7ee666 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp @@ -0,0 +1,6 @@ +struct AttributeItem { + AttributeType Type; + unsigned Tag; + unsigned IntValue; + std::string StringValue; +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0bfefe54c5445d3443931e6df0f69603042c15ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp @@ -0,0 +1,6 @@ +enum class AttributeType { + Hidden, + Numeric, + Text, + NumericAndText +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..259b611fd6b6b41d92f0d9791a83cf2ea7314cb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp @@ -0,0 +1,40 @@ +RISCVTargetELFStreamer::RISCVTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI) : RISCVTargetStreamer(S), CurrentVendor("riscv") { + MCAssembler &MCA = getStreamer().getAssembler(); + const FeatureBitset &Features = STI.getFeatureBits(); + auto &MAB = static_cast(MCA.getBackend()); + RISCVABI::ABI ABI = MAB.getTargetABI(); + assert(ABI != RISCVABI::ABI_Unknown && "Improperly initialised target ABI"); + unsigned EFlags = MCA.getELFHeaderEFlags(); + if (Features[RISCV::FeatureStdExtC]) { + EFlags = EFlags | ELF::EF_RISCV_RVC; + } + if (ABI == RISCVABI::ABI_ILP32) { + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_LP64) { + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_ILP32F) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_SINGLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_LP64F) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_SINGLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_ILP32D) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_DOUBLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_LP64D) { + EFlags = EFlags | ELF::EF_RISCV_FLOAT_ABI_DOUBLE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_ILP32E) { + EFlags = EFlags | ELF::EF_RISCV_RVE; + MCA.setELFHeaderEFlags(EFlags); + } + if (ABI == RISCVABI::ABI_Unknown) { + llvm_unreachable("Improperly initialised target ABI"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3594e1ecd0913c40fb32f167f15a5b118204b93a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp @@ -0,0 +1,23 @@ +size_t RISCVTargetELFStreamer::calculateContentSize() const { + size_t Result = 0; + for (AttributeItem item : Contents) { + switch (item.Type) { + case AttributeType::Hidden: + break; + case AttributeType::Numeric: + Result += getULEB128Size(item.Tag); + Result += getULEB128Size(item.IntValue); + break; + case AttributeType::Text: + Result += getULEB128Size(item.Tag); + Result += item.StringValue.size() + 1; + break; + case AttributeType::NumericAndText: + Result += getULEB128Size(item.Tag); + Result += getULEB128Size(item.IntValue); + Result += item.StringValue.size() + 1; + break; + } + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..093204945bdf9266020a4f252f5ba14556742ce0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer::emitAttribute(unsigned Attribute, unsigned Value) { + setAttributeItem(Attribute, Value, true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c03e079bf63ae8073d2ede610293d88e4fa88eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionNoPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae512f51c9e685aef4b8e839b94d030c9e642b97 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionNoRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c03e079bf63ae8073d2ede610293d88e4fa88eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionNoPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0df4494aa95369ebd9176fc8eb53b6979b3169d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32917ce043bfc2eecfcf523c3a37644e75df0194 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionPop() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5aedb00352e0d7bde5d482842d91f9acc06cbb0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionPush() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9751c5671eb6fc82c84ff719958b4cda4f7fcd60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..daf4623617344c5666aca7cfbbab1513a4eb66ad --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer::emitDirectiveOptionRelax() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4373afae59249976a7f7250e5c2abc76b45c1349 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer::emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue) { + setAttributeItems(Attribute, IntValue, StringValue, true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ac8a25c6405b9d62d6aa227a9ed6556f32070fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer::emitTextAttribute(unsigned Attribute, StringRef String) { + setAttributeItem(Attribute, String, true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f2489616110f13244dbe49376832a95d9564a9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp @@ -0,0 +1,42 @@ +void RISCVTargetELFStreamer::finishAttributeSection() { + if (Contents.empty()) { + return ; + } + if (AttributeSection) { + Streamer.SwitchSection(AttributeSection); + } + else { + MCAssembler &MCA = getStreamer().getAssembler(); + AttributeSection = MCA.getContext().getELFSection(".riscv.attributes", ELF::SHT_RISCV_ATTRIBUTES, 0); + Streamer.SwitchSection(AttributeSection); + Streamer.emitInt8(ELFAttrs::Format_Version); + } + const size_t VendorHeaderSize = 4 + CurrentVendor.size() + 1; + const size_t TagHeaderSize = 1 + 4; + const size_t ContentsSize = calculateContentSize(); + Streamer.emitInt32(VendorHeaderSize + TagHeaderSize + ContentsSize); + Streamer.emitBytes(CurrentVendor); + Streamer.emitInt8(0); + Streamer.emitInt8(ELFAttrs::File); + Streamer.emitInt32(TagHeaderSize + ContentsSize); + for (AttributeItem item : Contents) { + Streamer.emitULEB128IntValue(item.Tag); + switch (item.Type) { + default: + llvm_unreachable("Invalid attribute type"); + case AttributeType::Numeric: + Streamer.emitULEB128IntValue(item.IntValue); + break; + case AttributeType::Text: + Streamer.emitBytes(item.StringValue); + Streamer.emitInt8(0); + break; + case AttributeType::NumericAndText: + Streamer.emitULEB128IntValue(item.IntValue); + Streamer.emitBytes(item.StringValue); + Streamer.emitInt8(0); + break; + } + } + Contents.clear(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39d66abbc227662e2da806f5d4602ed1f7914637 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp @@ -0,0 +1,8 @@ +AttributeItem *getAttributeItem(unsigned Attribute) { + for (size_t i = 0; i < Contents.size(); ++i) { + if (Contents[i].Tag == Attribute) { + return &Contents[i]; + } + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..299b2c39af48ecf340b541686259cbf54c049d4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp @@ -0,0 +1,3 @@ +MCELFStreamer &RISCVTargetELFStreamer::getStreamer() { + return static_cast(Streamer); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..deacd4eaf5d070a5bbea710bbd81b77e0bcd09fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp @@ -0,0 +1,11 @@ +void setAttributeItem(unsigned Attribute, unsigned Value, bool OverwriteExisting) { + if (AttributeItem *Item = getAttributeItem(Attribute)) { + if (!OverwriteExisting) { + return ; + } + Item->Type = AttributeType::Numeric; + Item->IntValue = Value; + return; + } + Contents.push_back({AttributeType::Numeric, Attribute, Value, ""}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd7620a2c8dd656c22df61966125549d23aba3d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp @@ -0,0 +1,11 @@ +void setAttributeItem(unsigned Attribute, StringRef Value, bool OverwriteExisting) { + if (AttributeItem *Item = getAttributeItem(Attribute)) { + if (!OverwriteExisting) { + return ; + } + Item->Type = AttributeType::Text; + Item->StringValue = std::string(Value); + return; + } + Contents.push_back({AttributeType::Text, Attribute, 0, std::string(Value)}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa5d986ed08a7aa3efff0db7d1b2e17d2bfe429a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp @@ -0,0 +1,12 @@ +void setAttributeItems(unsigned Attribute, unsigned IntValue, StringRef StringValue, bool OverwriteExisting) { + if (AttributeItem *Item = getAttributeItem(Attribute)) { + if (!OverwriteExisting) { + return ; + } + Item->Type = AttributeType::NumericAndText; + Item->IntValue = IntValue; + Item->StringValue = std::string(StringValue); + return ; + } + Contents.push_back({AttributeType::NumericAndText, Attribute, IntValue, std::string(StringValue)}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/FixupKind/enumFixups.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/FixupKind/enumFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4754cd830f701834880839959a387397abc8d37a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/FixupKind/enumFixups.cpp @@ -0,0 +1,25 @@ +enum Fixups { + fixup_riscv_hi20 = FirstTargetFixupKind, + fixup_riscv_lo12_i, + fixup_riscv_lo12_s, + fixup_riscv_pcrel_hi20, + fixup_riscv_pcrel_lo12_i, + fixup_riscv_pcrel_lo12_s, + fixup_riscv_got_hi20, + fixup_riscv_tprel_hi20, + fixup_riscv_tprel_lo12_i, + fixup_riscv_tprel_lo12_s, + fixup_riscv_tprel_add, + fixup_riscv_tls_got_hi20, + fixup_riscv_tls_gd_hi20, + fixup_riscv_jal, + fixup_riscv_branch, + fixup_riscv_rvc_jump, + fixup_riscv_rvc_branch, + fixup_riscv_call, + fixup_riscv_call_plt, + fixup_riscv_relax, + fixup_riscv_align, + fixup_riscv_invalid, + NumTargetFixupKinds = fixup_riscv_invalid - FirstTargetFixupKind +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71d998a21bbc237891bd1af9439f840ba481ed61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp @@ -0,0 +1,2 @@ +RISCVInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) : MCInstPrinter(MAI, MII, MRI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c74c266403f121f6785e5bab3d396cffccc06305 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp @@ -0,0 +1,11 @@ +bool RISCVInstPrinter::applyTargetSpecificCLOption(StringRef Opt) { + if (Opt == "no-aliases") { + NoAliases = true; + return true; + } + if (Opt == "numeric") { + ArchRegNames = true; + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16127a97a65a5a76c80d613eb8cce8d76e67d59d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp @@ -0,0 +1,3 @@ +const char *RISCVInstPrinter::getRegisterName(unsigned RegNo) { + return getRegisterName(RegNo, ArchRegNames ? RISCV::NoRegAltName : RISCV::ABIRegAltName); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3d1b3ccb7d8db5f73fbefacc28a689c8057e9ad7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp @@ -0,0 +1,7 @@ +void RISCVInstPrinter::printAtomicMemOp(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + const MCOperand &MO = MI->getOperand(OpNo); + assert(MO.isReg() && "printAtomicMemOp can only print register operands"); + O << "("; + printRegName(O, MO.getReg()); + O << ")"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a01d9b2e56167e27ab420b3b5ab9fd027d317f6f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp @@ -0,0 +1,16 @@ +void RISCVInstPrinter::printBranchOperand(const MCInst *MI, uint64_t Address, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + const MCOperand &MO = MI->getOperand(OpNo); + if (!MO.isImm()) { + return printOperand(MI, OpNo, STI, O); + } + if (PrintBranchImmAsAddress) { + uint64_t Target = Address + MO.getImm(); + if (!STI.hasFeature(RISCV::Feature64Bit)) { + Target &= 0xffffffff; + } + O << formatHex(Target); + } + else { + O << MO.getImm(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3809af50492b7bd4de8f984928f1c4261af64686 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp @@ -0,0 +1,10 @@ +void RISCVInstPrinter::printCSRSystemRegister(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + unsigned Imm = MI->getOperand(OpNo).getImm(); + auto SysReg = RISCVSysReg::lookupSysRegByEncoding(Imm); + if (SysReg && SysReg->haveRequiredFeatures(STI.getFeatureBits())) { + O << SysReg->Name; + } + else { + O << Imm; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c645b1207ba1597386ae8a6d312aeefb5fea718 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp @@ -0,0 +1,4 @@ +void RISCVInstPrinter::printFRMArg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + auto FRMArg = static_cast(MI->getOperand(OpNo).getImm()); + O << RISCVFPRndMode::roundingModeToString(FRMArg); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7bb49dab7c797c58c549e93f140553048913667e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp @@ -0,0 +1,19 @@ +void RISCVInstPrinter::printFenceArg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + unsigned FenceArg = MI->getOperand(OpNo).getImm(); + assert (((FenceArg >> 4) == 0) && "Invalid immediate in printFenceArg"); + if ((FenceArg & RISCVFenceField::I) != 0) { + O << 'i'; + } + if ((FenceArg & RISCVFenceField::O) != 0) { + O << 'o'; + } + if ((FenceArg & RISCVFenceField::R) != 0) { + O << 'r'; + } + if ((FenceArg & RISCVFenceField::W) != 0) { + O << 'w'; + } + if (FenceArg == 0) { + O << "unknown"; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fd912416d3c956ccf0b4e72deb8cb1e607606ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printInst.cpp @@ -0,0 +1,22 @@ +void RISCVInstPrinter::printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) { + bool Res = false; + const MCInst *NewMI = MI; + MCInst UncompressedMI; + if (!NoAliases) { + Res = uncompressInst(UncompressedMI, *MI, MRI, STI); + } + if (Res) { + NewMI = const_cast(&UncompressedMI); + } + if (NoAliases) { + printInstruction(NewMI, Address, STI, O); + printAnnotation(O, Annot); + return ; + } + if (!printAliasInstr(NewMI, Address, STI, O)) { + printInstruction(NewMI, Address, STI, O); + printAnnotation(O, Annot); + return ; + } + printAnnotation(O, Annot); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d0f0643720af5ad457f257e02853f99c0f67122 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printOperand.cpp @@ -0,0 +1,14 @@ +void RISCVInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O, const char *Modifier) { + assert((Modifier == 0 || Modifier[0] == 0) && "No modifiers supported"); + const MCOperand &MO = MI->getOperand(OpNo); + if (MO.isReg()) { + printRegName(O, MO.getReg()); + return; + } + if (MO.isImm()) { + O << MO.getImm(); + return; + } + assert(MO.isExpr() && "Unknown operand kind in printOperand"); + MO.getExpr()->print(O, &MAI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printRegName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printRegName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..44d46a100e8d5b198bbeca69ad0ebf8d85a67127 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printRegName.cpp @@ -0,0 +1,3 @@ +void RISCVInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { + OS << getRegisterName(RegNo); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c27e28f489f40b2071578114af59538980a143b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp @@ -0,0 +1,10 @@ +void RISCVInstPrinter::printVMaskReg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + const MCOperand &MO = MI->getOperand(OpNo); + assert(MO.isReg() && "printVMaskReg can only print register operands"); + if (MO.getReg() == RISCV::NoRegister) { + return ; + } + O << ", "; + printRegName(O, MO.getReg()); + O << ".t"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..182d91094687c23adfa4a02dfafb94b892bd942d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp @@ -0,0 +1,34 @@ +void RISCVInstPrinter::printVTypeI(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { + unsigned Imm = MI->getOperand(OpNo).getImm(); + RISCVVSEW VSEW = getVSEW(VType); + RISCVVLMUL VLMUL = getVLMUL(VType); + unsigned Sew = 1 << (static_cast(VSEW) + 3); + OS << "e" << Sew; + switch (VLMUL) { + case RISCVVLMUL::LMUL_RESERVED: + llvm_unreachable("Unexpected LMUL value!"); + case RISCVVLMUL::LMUL_1: + case RISCVVLMUL::LMUL_2: + case RISCVVLMUL::LMUL_4: + case RISCVVLMUL::LMUL_8: { + unsigned LMul = 1 << static_cast(VLMUL); + OS << ",m" << LMul; + break; + } + case RISCVVLMUL::LMUL_F2: + case RISCVVLMUL::LMUL_F4: + case RISCVVLMUL::LMUL_F8: { + unsigned LMul = 1 << (8 - static_cast(VLMUL)); + OS << ",mf" << LMul; + break; + } + } + if (isTailAgnostic(VType)) + OS << ",ta"; + else + OS << ",tu"; + if (isMaskAgnostic(VType)) + OS << ",ma"; + else + OS << ",mu"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79d3f43f91b2f9cb6eacf14c4504d0058646f84e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +RISCVMCCodeEmitter(MCContext &ctx, MCInstrInfo const &MCII) : Ctx(ctx), MCII(MCII) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1af400e24ee65974cc8afec327f0489742cc57d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp @@ -0,0 +1,3 @@ +MCCodeEmitter *llvm::createRISCVMCCodeEmitter(const MCInstrInfo &MCII, const MCRegisterInfo &MRI, MCContext &Ctx) { + return new RISCVMCCodeEmitter(Ctx, MCII); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6fd2c7d7f19b595b6dca627db0e856d5448229d2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp @@ -0,0 +1,112 @@ +void RISCVMCCodeEmitter::encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + verifyInstructionPredicates(MI, computeAvailableFeatures(STI.getFeatureBits())); + const MCInstrDesc &Desc = MCII.get(MI.getOpcode()); + unsigned Size = Desc.getSize(); + if (MI.getOpcode() == RISCV::PseudoCALLReg) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if(MI.getOpcode() == RISCV::PseudoCALL) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if(MI.getOpcode() == RISCV::PseudoTAIL) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if(MI.getOpcode() == RISCV::PseudoJump) { + MCInst TmpInst; + MCOperand Func; + MCRegister Ra; + uint32_t Binary; + Func = MI.getOperand(1); + Ra = MI.getOperand(0).getReg(); + assert(Func.isExpr() && "Expected expression"); + const MCExpr *CallExpr = Func.getExpr(); + TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addOperand(MCOperand::createExpr(CallExpr)); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + TmpInst = MCInstBuilder(RISCV::JALR).addReg(Ra).addReg(Ra).addImm(0); + Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted = MCNumEmitted + 2; + return ; + } + if (MI.getOpcode() == RISCV::PseudoAddTPRel) { + MCOperand DestReg = MI.getOperand(0); + MCOperand SrcReg = MI.getOperand(1); + MCOperand TPReg = MI.getOperand(2); + assert(TPReg.isReg() && TPReg.getReg() == RISCV::X4 && "Expected thread pointer as second input to TP-relative add"); + MCOperand SrcSymbol = MI.getOperand(3); + assert(SrcSymbol.isExpr() && "Expected expression as third input to TP-relative add"); + const RISCVMCExpr *Expr = dyn_cast(SrcSymbol.getExpr()); + assert(Expr && Expr->getKind() == RISCVMCExpr::VK_RISCV_TPREL_ADD && "Expected tprel_add relocation on TP-relative symbol"); + Fixups.push_back(MCFixup::create(0, Expr, MCFixupKind(RISCV::fixup_riscv_tprel_add), MI.getLoc())); + if (STI.getFeatureBits()[RISCV::FeatureRelax]) { + const MCConstantExpr *Dummy = MCConstantExpr::create(0, Ctx); + Fixups.push_back(MCFixup::create(0, Dummy, MCFixupKind(RISCV::fixup_riscv_relax), MI.getLoc())); + } + MCInst TmpInst = MCInstBuilder(RISCV::ADD).addOperand(DestReg).addOperand(SrcReg).addOperand(TPReg); + uint32_t Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI); + support::endian::write(OS, Binary, support::little); + MCNumEmitted += 1; + return; + } + if (Size == 2) { + uint16_t Bits; + Bits = getBinaryCodeForInstr(MI, Fixups, STI); + support::endian::write(OS, Bits,support::little); + MCNumEmitted = MCNumEmitted + 1; + return ; + } + if (Size == 4) { + uint32_t Bits; + Bits = getBinaryCodeForInstr(MI, Fixups, STI); + support::endian::write(OS, Bits,support::little); + MCNumEmitted = MCNumEmitted + 1; + return ; + } + ++MCNumEmitted; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..17b6c231cb7ae743d9900d60f15bb39649137428 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp @@ -0,0 +1,104 @@ +unsigned RISCVMCCodeEmitter::getImmOpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + bool EnableRelax = STI.getFeatureBits()[RISCV::FeatureRelax]; + const MCOperand &MO = MI.getOperand(OpNo); + MCInstrDesc const &Desc = MCII.get(MI.getOpcode()); + unsigned MIFrm = Desc.TSFlags & RISCVII::InstFormatMask; + if (MO.isImm()) { + return MO.getImm(); + } + assert(MO.isExpr() && "getImmOpValue expects only expressions or immediates"); + const MCExpr *Expr = MO.getExpr(); + MCExpr::ExprKind Kind = Expr->getKind(); + RISCV::Fixups FixupKind = RISCV::fixup_riscv_invalid; + bool RelaxCandidate = false; + if (Kind == MCExpr::Target) { + const RISCVMCExpr *RVExpr = cast(Expr); + switch (RVExpr->getKind()) { + case RISCVMCExpr::VK_RISCV_None: + case RISCVMCExpr::VK_RISCV_Invalid: + case RISCVMCExpr::VK_RISCV_32_PCREL: + llvm_unreachable("Unhandled fixup kind!"); + case RISCVMCExpr::VK_RISCV_TPREL_ADD: + llvm_unreachable("VK_RISCV_TPREL_ADD should not represent an instruction operand"); + case RISCVMCExpr::VK_RISCV_LO: + if (MIFrm == RISCVII::InstFormatI) + FixupKind = RISCV::fixup_riscv_lo12_i; + else if (MIFrm == RISCVII::InstFormatS) + FixupKind = RISCV::fixup_riscv_lo12_s; + else + llvm_unreachable("VK_RISCV_LO used with unexpected instruction format"); + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_HI: + FixupKind = RISCV::fixup_riscv_hi20; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_PCREL_LO: + if (MIFrm == RISCVII::InstFormatI) + FixupKind = RISCV::fixup_riscv_pcrel_lo12_i; + else if (MIFrm == RISCVII::InstFormatS) + FixupKind = RISCV::fixup_riscv_pcrel_lo12_s; + else + llvm_unreachable("VK_RISCV_PCREL_LO used with unexpected instruction format"); + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_PCREL_HI: + FixupKind = RISCV::fixup_riscv_pcrel_hi20; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_GOT_HI: + FixupKind = RISCV::fixup_riscv_got_hi20; + break; + case RISCVMCExpr::VK_RISCV_TPREL_LO: + if (MIFrm == RISCVII::InstFormatI) + FixupKind = RISCV::fixup_riscv_tprel_lo12_i; + else if (MIFrm == RISCVII::InstFormatS) + FixupKind = RISCV::fixup_riscv_tprel_lo12_s; + else + llvm_unreachable("VK_RISCV_TPREL_LO used with unexpected instruction format"); + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_TPREL_HI: + FixupKind = RISCV::fixup_riscv_tprel_hi20; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_TLS_GOT_HI: + FixupKind = RISCV::fixup_riscv_tls_got_hi20; + break; + case RISCVMCExpr::VK_RISCV_TLS_GD_HI: + FixupKind = RISCV::fixup_riscv_tls_gd_hi20; + break; + case RISCVMCExpr::VK_RISCV_CALL: + FixupKind = RISCV::fixup_riscv_call; + RelaxCandidate = true; + break; + case RISCVMCExpr::VK_RISCV_CALL_PLT: + FixupKind = RISCV::fixup_riscv_call_plt; + RelaxCandidate = true; + break; + } + } + else if (Kind == MCExpr::SymbolRef && cast(Expr)->getKind() == MCSymbolRefExpr::VK_None) { + if (Desc.getOpcode() == RISCV::JAL) { + FixupKind = RISCV::fixup_riscv_jal; + } + else if (MIFrm == RISCVII::InstFormatB) { + FixupKind = RISCV::fixup_riscv_branch; + } + else if (MIFrm == RISCVII::InstFormatCJ) { + FixupKind = RISCV::fixup_riscv_rvc_jump; + } + else if (MIFrm == RISCVII::InstFormatCB) { + FixupKind = RISCV::fixup_riscv_rvc_branch; + } + } + assert(FixupKind != RISCV::fixup_riscv_invalid && "Unhandled expression!"); + Fixups.push_back(MCFixup::create(0, Expr, MCFixupKind(FixupKind), MI.getLoc())); + ++MCNumFixups; + if (EnableRelax && RelaxCandidate) { + const MCConstantExpr *Dummy = MCConstantExpr::create(0, Ctx); + Fixups.push_back(MCFixup::create(0, Dummy, MCFixupKind(RISCV::fixup_riscv_relax), MI.getLoc())); + ++MCNumFixups; + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0608bfeacb78631d4bd74acd7635d1eddcd1e943 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp @@ -0,0 +1,9 @@ +unsigned RISCVMCCodeEmitter::getImmOpValueAsr1(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + const MCOperand &MO = MI.getOperand(OpNo); + if (MO.isImm()) { + unsigned Res = MO.getImm(); + assert((Res & 1) == 0 && "LSB is non-zero"); + return Res >> 1; + } + return getImmOpValue(MI, OpNo, Fixups, STI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c2edf1c37a06d5c3ca2919dc5cbb12fa344db6f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp @@ -0,0 +1,10 @@ +unsigned RISCVMCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + if (MO.isReg()) { + return Ctx.getRegisterInfo()->getEncodingValue(MO.getReg()); + } + if (MO.isImm()) { + return static_cast(MO.getImm()); + } + llvm_unreachable("Unhandled expression!"); + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb6c71839d4ba3ae26572009f586539be7e0d390 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp @@ -0,0 +1,12 @@ +unsigned RISCVMCCodeEmitter::getVMaskReg(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, const MCSubtargetInfo &STI) const { + MCOperand MO = MI.getOperand(OpNo); + assert(MO.isReg() && "Expected a register."); + switch (MO.getReg()) { + case RISCV::V0: + return 0; + case RISCV::NoRegister: + return 1; + default: + llvm_unreachable("Invalid mask register."); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59ae51d078977c3022b0a7003a3a5b6cc6cfccd0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +~RISCVMCCodeEmitter() override { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/MCExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/MCExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da4f6b8260348d1f5ae72c777c76f77b19b1c56b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/MCExpr.cpp @@ -0,0 +1,2 @@ +explicit RISCVMCExpr(const MCExpr *Expr, VariantKind Kind) : Expr(Expr), Kind(Kind) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/classof1.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c18a16e9b79dfbe76cb62202c2b20dac602f027b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/classof1.cpp @@ -0,0 +1,3 @@ +static bool classof(const MCExpr *E) { + return E->getKind() == MCExpr::Target; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/classof2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3b49b8ebace06424f104635e86ad479c4c2d122 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/classof2.cpp @@ -0,0 +1,3 @@ +static bool classof(const RISCVMCExpr *) { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/create.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/create.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39113cf36ed270b0c6d69b5360588428237b2475 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/create.cpp @@ -0,0 +1,3 @@ +const RISCVMCExpr *RISCVMCExpr::create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx) { + return new (Ctx) RISCVMCExpr(Expr, Kind); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d3ea350c3d62324aeaad87cabbbfd85c3ea4588 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp @@ -0,0 +1,17 @@ +enum VariantKind { + VK_RISCV_None, + VK_RISCV_LO, + VK_RISCV_HI, + VK_RISCV_PCREL_LO, + VK_RISCV_PCREL_HI, + VK_RISCV_GOT_HI, + VK_RISCV_TPREL_LO, + VK_RISCV_TPREL_HI, + VK_RISCV_TPREL_ADD, + VK_RISCV_TLS_GOT_HI, + VK_RISCV_TLS_GD_HI, + VK_RISCV_CALL, + VK_RISCV_CALL_PLT, + VK_RISCV_32_PCREL, + VK_RISCV_Invalid, + }; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a00985bb9a0e45063ef40c9356a6d51ba318393 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp @@ -0,0 +1,14 @@ +bool RISCVMCExpr::evaluateAsConstant(int64_t &Res) const { + MCValue Value; + if (Kind == VK_RISCV_PCREL_HI || Kind == VK_RISCV_PCREL_LO || Kind == VK_RISCV_GOT_HI || Kind == VK_RISCV_TPREL_HI || Kind == VK_RISCV_TPREL_LO || Kind == VK_RISCV_TPREL_ADD || Kind == VK_RISCV_TLS_GOT_HI || Kind == VK_RISCV_TLS_GD_HI || Kind == VK_RISCV_CALL || Kind == VK_RISCV_CALL_PLT) { + return false; + } + if (!getSubExpr()->evaluateAsRelocatable(Value, nullptr, nullptr)) { + return false; + } + if (!Value.isAbsolute()) { + return false; + } + Res = evaluateAsInt64(Value.getConstant()); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2d2ca349a0e1f92adb5fcbf38353c231ec73066f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp @@ -0,0 +1,10 @@ +int64_t RISCVMCExpr::evaluateAsInt64(int64_t Value) const { + switch (Kind) { + case VK_RISCV_LO: + return SignExtend64<12>(Value); + case VK_RISCV_HI: + return ((Value + 0x800) >> 12) & 0xfffff; + default: + llvm_unreachable("Invalid kind"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6e71bde5f7592f5ef4591791bcb86f58dc40765f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp @@ -0,0 +1,23 @@ +bool RISCVMCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const { + if (!getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup)){ + return false; + } + if (Res.getSymA() && Res.getSymB()) { + switch (getKind()) { + default: + return true; + case VK_RISCV_LO: + case VK_RISCV_HI: + case VK_RISCV_PCREL_LO: + case VK_RISCV_PCREL_HI: + case VK_RISCV_GOT_HI: + case VK_RISCV_TPREL_LO: + case VK_RISCV_TPREL_HI: + case VK_RISCV_TPREL_ADD: + case VK_RISCV_TLS_GOT_HI: + case VK_RISCV_TLS_GD_HI: + return false; + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..60f17e85d923bec938d38573f38737261c999694 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp @@ -0,0 +1,3 @@ +MCFragment *findAssociatedFragment() const override { + return getSubExpr()->findAssociatedFragment(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89e8ce3b031ea65a056d84127e579bd2815264c2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp @@ -0,0 +1,11 @@ +void RISCVMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const { + switch (getKind()) { + default: + return; + case VK_RISCV_TPREL_HI: + case VK_RISCV_TLS_GOT_HI: + case VK_RISCV_TLS_GD_HI: + break; + } + fixELFSymbolsInTLSFixupsImpl(getSubExpr(), Asm); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9380184f705c3b8053f961d7f265d676d373e6c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp @@ -0,0 +1,23 @@ +static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm) { + switch (Expr->getKind()) { + case MCExpr::Target: + llvm_unreachable("Can't handle nested target expression"); + break; + case MCExpr::Constant: + break; + case MCExpr::Binary: { + const MCBinaryExpr *BE = cast(Expr); + fixELFSymbolsInTLSFixupsImpl(BE->getLHS(), Asm); + fixELFSymbolsInTLSFixupsImpl(BE->getRHS(), Asm); + break; + } + case MCExpr::SymbolRef: { + const MCSymbolRefExpr &SymRef = *cast(Expr); + cast(SymRef.getSymbol()).setType(ELF::STT_TLS); + break; + } + case MCExpr::Unary: + fixELFSymbolsInTLSFixupsImpl(cast(Expr)->getSubExpr(), Asm); + break; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getKind.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8873d03d56532262e2e464651e7ed13ac5736a6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getKind.cpp @@ -0,0 +1,3 @@ +VariantKind getKind() const { + return Kind; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89987b297a722bf3d6b3be128c1836a8216b5cb9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp @@ -0,0 +1,41 @@ +const MCFixup *RISCVMCExpr::getPCRelHiFixup(const MCFragment **DFOut) const { + MCValue AUIPCLoc; + if (!getSubExpr()->evaluateAsRelocatable(AUIPCLoc, nullptr, nullptr)) { + return nullptr; + } + const MCSymbolRefExpr *AUIPCSRE = AUIPCLoc.getSymA(); + if (!AUIPCSRE) { + return nullptr; + } + const MCSymbol *AUIPCSymbol = &AUIPCSRE->getSymbol(); + const auto *DF = dyn_cast_or_null(AUIPCSymbol->getFragment()); + if (!DF) { + return nullptr; + } + uint64_t Offset = AUIPCSymbol->getOffset(); + if (DF->getContents().size() == Offset) { + DF = dyn_cast_or_null(DF->getNextNode()); + if (!DF) { + return nullptr; + } + Offset = 0; + } + for (const MCFixup &F : DF->getFixups()) { + if (F.getOffset() != Offset) { + continue; + } + switch ((unsigned)F.getKind()) { + default: + continue; + case RISCV::fixup_riscv_got_hi20: + case RISCV::fixup_riscv_tls_got_hi20: + case RISCV::fixup_riscv_tls_gd_hi20: + case RISCV::fixup_riscv_pcrel_hi20: + if (DFOut) { + *DFOut = DF; + } + return &F; + } + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getSubExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getSubExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0938efd3638913ba4ab06b155113748fbcf3ba7b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getSubExpr.cpp @@ -0,0 +1,3 @@ +const MCExpr *getSubExpr() const { + return Expr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ceea7690a66c81e8392c3762eeb6bdc159adfb2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp @@ -0,0 +1,33 @@ +RISCVMCExpr::VariantKind RISCVMCExpr::getVariantKindForName(StringRef name) { + if (name == "lo") { + return RISCVMCExpr::VK_RISCV_LO; + } + if (name == "hi") { + return RISCVMCExpr::VK_RISCV_HI; + } + if (name == "pcrel_lo") { + return RISCVMCExpr::VK_RISCV_PCREL_LO; + } + if (name == "pcrel_hi") { + return RISCVMCExpr::VK_RISCV_PCREL_HI; + } + if (name == "got_pcrel_hi") { + return RISCVMCExpr::VK_RISCV_GOT_HI; + } + if (name == "tprel_lo") { + return RISCVMCExpr::VK_RISCV_TPREL_LO; + } + if (name == "tprel_hi") { + return RISCVMCExpr::VK_RISCV_TPREL_HI; + } + if (name == "tprel_add") { + return RISCVMCExpr::VK_RISCV_TPREL_ADD; + } + if (name == "tls_ie_pcrel_hi") { + return RISCVMCExpr::VK_RISCV_TLS_GOT_HI; + } + if (name == "tls_gd_pcrel_hi") { + return RISCVMCExpr::VK_RISCV_TLS_GD_HI; + } + return RISCVMCExpr::VK_RISCV_Invalid; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a08480b3ccbf2b76c97f73a0b86881ba90264eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp @@ -0,0 +1,26 @@ +StringRef RISCVMCExpr::getVariantKindName(VariantKind Kind) { + switch (Kind) { + case VK_RISCV_LO: + return "lo"; + case VK_RISCV_HI: + return "hi"; + case VK_RISCV_PCREL_LO: + return "pcrel_lo"; + case VK_RISCV_PCREL_HI: + return "pcrel_hi"; + case VK_RISCV_GOT_HI: + return "got_pcrel_hi"; + case VK_RISCV_TPREL_LO: + return "tprel_lo"; + case VK_RISCV_TPREL_HI: + return "tprel_hi"; + case VK_RISCV_TPREL_ADD: + return "tprel_add"; + case VK_RISCV_TLS_GOT_HI: + return "tls_ie_pcrel_hi"; + case VK_RISCV_TLS_GD_HI: + return "tls_gd_pcrel_hi"; + default: + llvm_unreachable("Invalid ELF symbol kind"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/printImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/printImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55d93d4d19a85acb53eace95c71cbd1dc389bcca --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/printImpl.cpp @@ -0,0 +1,82 @@ +void RISCVMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const { + VariantKind Kind = getKind(); + if (Kind == RISCVMCExpr::VK_RISCV_PCREL_LO) { + OS << "%pcrel_lo("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_PCREL_HI) { + OS << "%pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TPREL_LO) { + OS << "%tprel_lo("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TPREL_HI) { + OS << "%tprel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TPREL_ADD) { + OS << "%tprel_add("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_LO) { + OS << "%lo("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_HI) { + OS << "%hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_GOT_HI) { + OS << "%got_pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TLS_GOT_HI) { + OS << "%tls_ie_pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_TLS_GD_HI) { + OS << "%tls_gd_pcrel_hi("; + Expr->print(OS, MAI); + OS << ")"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_CALL_PLT) { + OS << ""; + Expr->print(OS, MAI); + OS << "@plt"; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_CALL) { + OS << ""; + Expr->print(OS, MAI); + OS << ""; + return ; + } + if (Kind == RISCVMCExpr::VK_RISCV_None) { + OS << ""; + Expr->print(OS, MAI); + OS << ""; + return ; + } + llvm_unreachable("Invalid ELF symbol kind"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35e420112aded4140f320dbc4ad4ac870d3ee31a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp @@ -0,0 +1,3 @@ +void RISCVMCExpr::visitUsedExpr(MCStreamer &Streamer) const { + Streamer.visitUsedExpr(*getSubExpr()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..451277e94556a0608d71ebc2c76e620e59e0ec99 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp @@ -0,0 +1,2 @@ +explicit RISCVMCInstrAnalysis(const MCInstrInfo *Info) : MCInstrAnalysis(Info) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32d2fe18d6bb48ee672756467a7ed995da2ae810 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,15 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetMC() { + for (Target *T : {&getTheRISCV32Target(), &getTheRISCV64Target()}) { + TargetRegistry::RegisterMCAsmInfo(*T, createRISCVMCAsmInfo); + TargetRegistry::RegisterMCInstrInfo(*T, createRISCVMCInstrInfo); + TargetRegistry::RegisterMCRegInfo(*T, createRISCVMCRegisterInfo); + TargetRegistry::RegisterMCAsmBackend(*T, createRISCVAsmBackend); + TargetRegistry::RegisterMCCodeEmitter(*T, createRISCVMCCodeEmitter); + TargetRegistry::RegisterMCInstPrinter(*T, createRISCVMCInstPrinter); + TargetRegistry::RegisterMCSubtargetInfo(*T, createRISCVMCSubtargetInfo); + TargetRegistry::RegisterObjectTargetStreamer(*T, createRISCVObjectTargetStreamer); + TargetRegistry::RegisterMCInstrAnalysis(*T, createRISCVInstrAnalysis); + TargetRegistry::RegisterAsmTargetStreamer(*T, createRISCVAsmTargetStreamer); + TargetRegistry::RegisterNullTargetStreamer(*T, createRISCVNullTargetStreamer); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..383b52ff72a10ac127ceb76173b77049aa5f0fd9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createRISCVAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool isVerboseAsm) { + return new RISCVTargetAsmStreamer(S, OS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b45661b6fa3382d3f641c2fe3bb34f05970d975 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp @@ -0,0 +1,3 @@ +static MCInstrAnalysis *createRISCVInstrAnalysis(const MCInstrInfo *Info) { + return new RISCVMCInstrAnalysis(Info); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4cffda02c27994572bf42f788d40d04d2e73e7d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,7 @@ +static MCAsmInfo *createRISCVMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options) { + MCAsmInfo *MAI = new RISCVMCAsmInfo(TT); + MCRegister SP = MRI.getDwarfRegNum(RISCV::X2, true); + MCCFIInstruction Inst = MCCFIInstruction::cfiDefCfa(nullptr, SP, 0); + MAI->addInitialFrameState(Inst); + return MAI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a6f660619bed0d38c739e2e0da3274e6d81b2a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp @@ -0,0 +1,3 @@ +static MCInstPrinter *createRISCVMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) { + return new RISCVInstPrinter(MAI, MII, MRI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..758df40aa015a0c161f506e8e7ea1cad2d8bcc8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,5 @@ +static MCInstrInfo *createRISCVMCInstrInfo() { + MCInstrInfo *X = new MCInstrInfo(); + InitRISCVMCInstrInfo(X); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb7c34dd1c8354b6b0fa67e4f7244d55c1ddc0f7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,5 @@ +static MCRegisterInfo *createRISCVMCRegisterInfo(const Triple &TT) { + MCRegisterInfo *X = new MCRegisterInfo(); + InitRISCVMCRegisterInfo(X, RISCV::X1); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..78ee741005540e6c3e698640daefd523ceecfb94 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,7 @@ +static MCSubtargetInfo *createRISCVMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { + std::string CPUName = std::string(CPU); + if (CPUName.empty()) { + CPUName = TT.isArch64Bit() ? "generic-rv64" : "generic-rv32"; + } + return createRISCVMCSubtargetInfoImpl(TT, CPUName, CPUName, FS); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a625f2d3b010f64ddbcf02b017f0f07c7f52e3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer *createRISCVNullTargetStreamer(MCStreamer &S) { + return new RISCVTargetStreamer(S); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e4eba726c087cde28f6692f50ef5398beba9c98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp @@ -0,0 +1,7 @@ +static MCTargetStreamer *createRISCVObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) { + const Triple &TT = STI.getTargetTriple(); + if (TT.isOSBinFormatELF()) { + return new RISCVTargetELFStreamer(S, STI); + } + return new RISCVTargetELFStreamer(S, STI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eeba9579fc9ad3442ad8d10ee702dfcd667da54b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp @@ -0,0 +1,47 @@ +bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size, uint64_t &Target) const { + if (Inst.getOpcode() == RISCV::BEQ) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BNE) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BLT) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BGE) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BLTU) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::BGEU) { + Target = Addr + Inst.getOperand(2).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_BEQZ) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_BNEZ) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::JAL) { + Target = Addr + Inst.getOperand(1).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_JAL) { + Target = Addr + Inst.getOperand(0).getImm(); + return true; + } + if (Inst.getOpcode() == RISCV::C_J) { + Target = Addr + Inst.getOperand(0).getImm(); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/generateInstSeq.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/generateInstSeq.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0060cac9c917e49fbeb4ce1922e603e42795b1b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/generateInstSeq.cpp @@ -0,0 +1,24 @@ +void generateInstSeq(int64_t Val, bool IsRV64, InstSeq &Res) { + if (isInt<32>(Val)) { + int64_t Hi20 = ((Val + 0x800) >> 12) & 0xFFFFF; + int64_t Lo12 = SignExtend64<12>(Val); + if (Hi20) { + Res.push_back(Inst(RISCV::LUI, Hi20)); + } + if (Lo12 || Hi20 == 0) { + unsigned AddiOpc = (IsRV64 && Hi20) ? RISCV::ADDIW : RISCV::ADDI; + Res.push_back(Inst(AddiOpc, Lo12)); + } + return; + } + assert(IsRV64 && "Can't emit >32-bit imm for non-RV64 target"); + int64_t Lo12 = SignExtend64<12>(Val); + int64_t Hi52 = ((uint64_t)Val + 0x800ull) >> 12; + int ShiftAmount = 12 + findFirstSet((uint64_t)Hi52); + Hi52 = SignExtend64(Hi52 >> (ShiftAmount - 12), 64 - ShiftAmount); + generateInstSeq(Hi52, IsRV64, Res); + Res.push_back(Inst(RISCV::SLLI, ShiftAmount)); + if (Lo12) { + Res.push_back(Inst(RISCV::ADDI, Lo12)); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/getIntMatCost.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/getIntMatCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6665d21f4034540dc8eec61a6bbfe54ef663c6b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/getIntMatCost.cpp @@ -0,0 +1,11 @@ +int getIntMatCost(const APInt &Val, unsigned Size, bool IsRV64) { + int PlatRegSize = IsRV64 ? 64 : 32; + int Cost = 0; + for (unsigned ShiftVal = 0; ShiftVal < Size; ShiftVal += PlatRegSize) { + APInt Chunk = Val.ashr(ShiftVal).sextOrTrunc(PlatRegSize); + InstSeq MatSeq; + generateInstSeq(Chunk.getSExtValue(), IsRV64, MatSeq); + Cost += MatSeq.size(); + } + return std::max(1, Cost); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/structInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/structInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72c131a03e62d00e247b4679e470e545130c5500 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/MatInt/structInst.cpp @@ -0,0 +1,6 @@ +struct Inst { + unsigned Opc; + int64_t Imm; + Inst(unsigned Opc, int64_t Imm) : Opc(Opc), Imm(Imm) { + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d3492c3c4b4b024f7373e13055b92638d05fb48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp @@ -0,0 +1,2 @@ +RISCVTargetAsmStreamer::RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS) : RISCVTargetStreamer(S), OS(OS) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b94e431facda3c3c5b1dd95a39117c17ef23685e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp @@ -0,0 +1,2 @@ +RISCVTargetStreamer::RISCVTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82213bfb7296465510fc0319bf1ff39b9674d8af --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitAttribute(unsigned Attribute, unsigned Value) { + OS << "\t.attribute\t" << Attribute << ", " << Twine(Value) << "\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..870438b26a6d2717a882ceaf9d551131fdbc7e9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitAttribute(unsigned Attribute, unsigned Value) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20d877300fc7bca5ba6b1617a5338511c2bc87df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionNoPIC() { + OS << "\t.option\tnopic\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24d360b9a626b3ca30613e07a043e8c36ad04166 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionNoPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75229057eafcbd9f9adcbb535c46944ef23b39a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionNoRVC() { + OS << "\t.option\tnorvc\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64100dd55ed23fbe89ab192674b0e7caa64a0fe3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionNoRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a3b8cb02d7a56b7872fcf7a739c9dbe383df43d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionNoRelax() { + OS << "\t.option\tnorelax\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..014cd7022e9839f21fa8aa4768a30cdaeffd861d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionNoRelax() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47ea756b2e1b80b5b651c38d05504fe653b40088 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionPIC() { + OS << "\t.option\tpic\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06c067ee99a154f8e224930842bc774d5dcb47e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionPIC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f43b702a23d57cdb8d0a629f253d1d0c953333c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionPop() { + OS << "\t.option\tpop\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ca636170f51e633b77f4f3398472f0a640b19ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionPop() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e01d6991e3599028e0801aa2283d93fb6aecf608 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionPush() { + OS << "\t.option\tpush\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5badbcf4aee44982315a64b9d9d7b63501f1ca52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionPush() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3daa81c9defb1fe5908214512a9b997da9df84e9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionRVC() { + OS << "\t.option\trvc\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e057b99bef751f948ce1248d8808e6b4a42f5cc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionRVC() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..883a2f11627883b745590856102761fa69ea9917 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitDirectiveOptionRelax() { + OS << "\t.option\trelax\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a501aa992af95ee95eb223b9d508d37abfcd2344 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitDirectiveOptionRelax() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9445cc18a399c4819969cfc8313374b8500f69c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void RISCVTargetAsmStreamer::emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22139c129524dd04c8743fd1456fa9302f4052b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a944ac5265c68f9afd88fd4ea951f900ad33720 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp @@ -0,0 +1,82 @@ +void RISCVTargetStreamer::emitTargetAttributes(const MCSubtargetInfo &STI) { + if (STI.hasFeature(RISCV::FeatureRV32E)) { + emitAttribute(RISCVAttrs::STACK_ALIGN, RISCVAttrs::ALIGN_4); + } + else { + emitAttribute(RISCVAttrs::STACK_ALIGN, RISCVAttrs::ALIGN_16); + } + std::string Arch = "rv32"; + if (STI.hasFeature(RISCV::Feature64Bit)) { + Arch = "rv64"; + } + if (STI.hasFeature(RISCV::FeatureRV32E)) { + Arch += "e1p9"; + } + else { + Arch += "i2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtM)) { + Arch += "_m2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtA)) { + Arch += "_a2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtF)) { + Arch += "_f2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtD)) { + Arch += "_d2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtC)) { + Arch += "_c2p0"; + } + if (STI.hasFeature(RISCV::FeatureStdExtB)) { + Arch += "_b0p93"; + } + if (STI.hasFeature(RISCV::FeatureStdExtV)) { + Arch += "_v0p10"; + } + if (STI.hasFeature(RISCV::FeatureExtZfh)) { + Arch += "_zfh0p1"; + } + if (STI.hasFeature(RISCV::FeatureExtZba)) { + Arch += "_zba0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbb)) { + Arch += "_zbb0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbc)) { + Arch += "_zbc0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbe)) { + Arch += "_zbe0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbf)) { + Arch += "_zbf0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbm)) { + Arch += "_zbm0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbp)) { + Arch += "_zbp0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbproposedc)) { + Arch += "_zbproposedc0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbr)) { + Arch += "_zbr0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbs)) { + Arch += "_zbs0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZbt)) { + Arch += "_zbt0p93"; + } + if (STI.hasFeature(RISCV::FeatureExtZvamo)) { + Arch += "_zvamo0p10"; + } + if (STI.hasFeature(RISCV::FeatureStdExtZvlsseg)) { + Arch += "_zvlsseg0p10"; + } + emitTextAttribute(RISCVAttrs::ARCH, Arch); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8adf9578c7a98e95d9518eca4e5e5ae261c9a3d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::emitTextAttribute(unsigned Attribute, StringRef String) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8d81c0b722b115d155adfa07cf4f9f53e883f06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer::emitTextAttribute(unsigned Attribute, StringRef String) { + OS << "\t.attribute\t" << Attribute << ", \"" << String << "\"\n"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finish.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finish.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de1f155329e0d6b104ab1c4139016e3276f42f33 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finish.cpp @@ -0,0 +1,3 @@ +void RISCVTargetStreamer::finish() { + finishAttributeSection(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7097a145d4931a634134109460465f57fb62532d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp @@ -0,0 +1,2 @@ +void RISCVTargetAsmStreamer::finishAttributeSection() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dbe790a4f46ac0e73ef02fbaa1295159764b0427 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer::finishAttributeSection() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e448a59e103a5b278a32626fa22971c33e4e81a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp @@ -0,0 +1,3 @@ +RISCVCleanupVSETVLI() : MachineFunctionPass(ID) { + initializeRISCVCleanupVSETVLIPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58e6684cb0995575e8263291d2d1b4be23fb8be5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createRISCVCleanupVSETVLIPass() { + return new RISCVCleanupVSETVLI(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6d109b669c5aa09fb65618028e6a8e7de39a5c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.setPreservesCFG(); + MachineFunctionPass::getAnalysisUsage(AU); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..927cff9993216c33d5539c62ac637b71f7f1d1ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_CLEANUP_VSETVLI_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5b9c0930d3d58a2f4601a4830a241ebb30ca4fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::IsSSA); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c97a1eaf95f42cd86d239dbfe99d01c3ca33235b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp @@ -0,0 +1,48 @@ +bool RISCVCleanupVSETVLI::runOnMachineBasicBlock(MachineBasicBlock &MBB) { + bool Changed = false; + MachineInstr *PrevVSETVLI = nullptr; + for (auto MII = MBB.begin(), MIE = MBB.end(); MII != MIE;) { + MachineInstr &MI = *MII++; + if (MI.getOpcode() != RISCV::PseudoVSETVLI && MI.getOpcode() != RISCV::PseudoVSETIVLI) { + if (PrevVSETVLI && (MI.isCall() || MI.modifiesRegister(RISCV::VL) || MI.modifiesRegister(RISCV::VTYPE))) { + PrevVSETVLI = nullptr; + } + continue; + } + if (!PrevVSETVLI || !MI.getOperand(0).isDead()) { + PrevVSETVLI = &MI; + continue; + } + if (PrevVSETVLI->getOpcode() != MI.getOpcode()) { + PrevVSETVLI = &MI; + continue; + } + Register AVLReg; + bool SameAVL = false; + if (MI.getOpcode() == RISCV::PseudoVSETVLI) { + AVLReg = MI.getOperand(1).getReg(); + SameAVL = PrevVSETVLI->getOperand(1).getReg() == AVLReg; + } + else { + SameAVL = PrevVSETVLI->getOperand(1).getImm() == MI.getOperand(1).getImm(); + } + int64_t PrevVTYPEImm = PrevVSETVLI->getOperand(2).getImm(); + int64_t VTYPEImm = MI.getOperand(2).getImm(); + if (!SameAVL || PrevVTYPEImm != VTYPEImm) { + PrevVSETVLI = &MI; + continue; + } + if ((MI.getOpcode() == RISCV::PseudoVSETVLI) && (AVLReg == RISCV::X0)) { + assert((PrevVSETVLI->getOpcode() == RISCV::PseudoVSETVLI) && "Unexpected vsetvli opcode."); + Register PrevOutVL = PrevVSETVLI->getOperand(0).getReg(); + Register OutVL = MI.getOperand(0).getReg(); + if (PrevOutVL == RISCV::X0 && OutVL != RISCV::X0) { + PrevVSETVLI = &MI; + continue; + } + } + MI.eraseFromParent(); + Changed = true; + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ece27d6d7d034f89e389b6590f98d8078dfce2d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp @@ -0,0 +1,14 @@ +bool RISCVCleanupVSETVLI::runOnMachineFunction(MachineFunction &MF) { + if (skipFunction(MF.getFunction())) { + return false; + } + const RISCVSubtarget &ST = MF.getSubtarget(); + if (!ST.hasStdExtV()) { + return false; + } + bool Changed = false; + for (MachineBasicBlock &MBB : MF) { + Changed |= runOnMachineBasicBlock(MBB); + } + return Changed; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71ee3fafd667bcf32e20bebcd315637773781ed5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp @@ -0,0 +1,3 @@ +RISCVExpandAtomicPseudo() : MachineFunctionPass(ID) { + initializeRISCVExpandAtomicPseudoPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83f0448b4561787d31d166f084a5a48eafb4258b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createRISCVExpandAtomicPseudoPass() { + return new RISCVExpandAtomicPseudo(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5dd006e57bfbbd88b5a4764fde7a58c18230b358 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandAtomicPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64fa3c6df2e50d7812ffe10519289edb89f87299 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp @@ -0,0 +1,878 @@ +bool RISCVExpandAtomicPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI) { + if (MBBI->getOpcode() == RISCV::PseudoAtomicLoadNand32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoAtomicLoadNand64) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicSwap32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadAdd32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadSub32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadNand32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopMBB); + MF->insert(++LoopMBB->getIterator(), DoneMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopMBB); + if (!IsMasked) { + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(4).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + BuildMI(LoopMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + else { + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register IncrReg = MI.getOperand(3).getReg(); + Register MaskReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(5).getImm()); + BuildMI(LoopMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADDI), ScratchReg).addReg(IncrReg).addImm(0); + break; + case AtomicRMWInst::Add: + BuildMI(LoopMBB, DL, TII->get(RISCV::ADD), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Sub: + BuildMI(LoopMBB, DL, TII->get(RISCV::SUB), ScratchReg).addReg(DestReg).addReg(IncrReg); + break; + case AtomicRMWInst::Nand: + BuildMI(LoopMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(IncrReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::XORI), ScratchReg).addReg(ScratchReg).addImm(-1); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(getSCForRMW32(Ordering)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadMax32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadMin32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadUMax32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedAtomicLoadUMin32) { + assert(IsMasked == true && "Should only need to expand masked atomic max/min"); + assert(Width == 32 && "Should never need to expand masked 64-bit operations"); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopIfBodyMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopIfBodyMBB); + MF->insert(++LoopIfBodyMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopIfBodyMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopIfBodyMBB->addSuccessor(LoopTailMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + LoopTailMBB->addSuccessor(DoneMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register Scratch1Reg = MI.getOperand(1).getReg(); + Register Scratch2Reg = MI.getOperand(2).getReg(); + Register AddrReg = MI.getOperand(3).getReg(); + Register IncrReg = MI.getOperand(4).getReg(); + Register MaskReg = MI.getOperand(5).getReg(); + bool IsSigned = BinOp == AtomicRMWInst::Min || BinOp == AtomicRMWInst::Max; + AtomicOrdering Ordering = static_cast(MI.getOperand(IsSigned ? 7 : 6).getImm()); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW32(Ordering)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), Scratch2Reg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::ADDI), Scratch1Reg).addReg(DestReg).addImm(0); + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Max: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(MBB, DL, TII->get(RISCV::SRA), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::Min: { + BuildMI(MBB, DL, TII->get(RISCV::SLL), ValReg).addReg(ValReg).addReg(ShamtReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGE)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + case AtomicRMWInst::UMax: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(Scratch2Reg).addReg(IncrReg).addMBB(LoopTailMBB); + break; + case AtomicRMWInst::UMin: + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BGEU)).addReg(IncrReg).addReg(Scratch2Reg).addMBB(LoopTailMBB); + break; + } + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW32(Ordering)), Scratch1Reg).addReg(AddrReg).addReg(Scratch1Reg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(Scratch1Reg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopIfBodyMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoCmpXchg32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopHeadMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register CmpValReg = MI.getOperand(3).getReg(); + Register NewValReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(IsMasked ? 6 : 5).getImm()); + if (!IsMasked) { + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(DestReg).addReg(CmpValReg).addMBB(DoneMBB); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(NewValReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + else { + Register MaskReg = MI.getOperand(5).getReg(); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(CmpValReg).addMBB(DoneMBB); + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoCmpXchg64) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopHeadMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register CmpValReg = MI.getOperand(3).getReg(); + Register NewValReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(IsMasked ? 6 : 5).getImm()); + if (!IsMasked) { + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(DestReg).addReg(CmpValReg).addMBB(DoneMBB); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(NewValReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + else { + Register MaskReg = MI.getOperand(5).getReg(); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(CmpValReg).addMBB(DoneMBB); + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoMaskedCmpXchg32) { + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + MachineFunction *MF = MBB.getParent(); + auto LoopHeadMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto LoopTailMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + auto DoneMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + MF->insert(++MBB.getIterator(), LoopHeadMBB); + MF->insert(++LoopHeadMBB->getIterator(), LoopTailMBB); + MF->insert(++LoopTailMBB->getIterator(), DoneMBB); + LoopHeadMBB->addSuccessor(LoopTailMBB); + LoopHeadMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(DoneMBB); + LoopTailMBB->addSuccessor(LoopHeadMBB); + DoneMBB->splice(DoneMBB->end(), &MBB, MI, MBB.end()); + DoneMBB->transferSuccessors(&MBB); + MBB.addSuccessor(LoopHeadMBB); + Register DestReg = MI.getOperand(0).getReg(); + Register ScratchReg = MI.getOperand(1).getReg(); + Register AddrReg = MI.getOperand(2).getReg(); + Register CmpValReg = MI.getOperand(3).getReg(); + Register NewValReg = MI.getOperand(4).getReg(); + AtomicOrdering Ordering = static_cast(MI.getOperand(IsMasked ? 6 : 5).getImm()); + if (!IsMasked) { + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(DestReg).addReg(CmpValReg).addMBB(DoneMBB); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(NewValReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + else { + Register MaskReg = MI.getOperand(5).getReg(); + BuildMI(LoopHeadMBB, DL, TII->get(getLRForRMW(Ordering, Width)), DestReg).addReg(AddrReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(DestReg).addReg(MaskReg); + BuildMI(LoopHeadMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(CmpValReg).addMBB(DoneMBB); + assert(OldValReg != ScratchReg && "OldValReg and ScratchReg must be unique"); + assert(OldValReg != MaskReg && "OldValReg and MaskReg must be unique"); + assert(ScratchReg != MaskReg && "ScratchReg and MaskReg must be unique"); + BuildMI(MBB, DL, TII->get(RISCV::XOR), ScratchReg).addReg(OldValReg).addReg(NewValReg); + BuildMI(MBB, DL, TII->get(RISCV::AND), ScratchReg).addReg(ScratchReg).addReg(MaskReg); + BuildMI(MBB, DL, TII->get(RISCV::XOR), DestReg).addReg(OldValReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(getSCForRMW(Ordering, Width)), ScratchReg).addReg(AddrReg).addReg(ScratchReg); + BuildMI(LoopTailMBB, DL, TII->get(RISCV::BNE)).addReg(ScratchReg).addReg(RISCV::X0).addMBB(LoopHeadMBB); + } + NextMBBI = MBB.end(); + MI.eraseFromParent(); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *LoopHeadMBB); + computeAndAddLiveIns(LiveRegs, *LoopTailMBB); + computeAndAddLiveIns(LiveRegs, *DoneMBB); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be55c65dfca4dd0ed4321f773d46c7d6e86200c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_EXPAND_ATOMIC_PSEUDO_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd6bfc81864cf513dbe24e299d2cc82c81f36b27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVExpandAtomicPseudo::runOnMachineFunction(MachineFunction &MF) { + TII = static_cast(MF.getSubtarget().getInstrInfo()); + bool Modified = false; + for (auto &MBB : MF) { + Modified |= expandMBB(MBB); + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..619ea5f1fb6cf92b77a790a42642051fc3450f92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp @@ -0,0 +1,3 @@ +RISCVExpandPseudo() : MachineFunctionPass(ID) { + initializeRISCVExpandPseudoPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..207e3c11c810551063e0c2b55a3d9af32a794d7b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createRISCVExpandPseudoPass() { + return new RISCVExpandPseudo(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf9fe048bfd2dbdd4940122bf6e54f65401af7df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandPseudo::expandMBB(MachineBasicBlock &MBB) { + bool Modified = false; + MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); + while (MBBI != E) { + MachineBasicBlock::iterator NMBBI = std::next(MBBI); + Modified |= expandMI(MBB, MBBI, NMBBI); + MBBI = NMBBI; + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4df12ee0ca8495e367ac08772bf8cade7d1a7463 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp @@ -0,0 +1,243 @@ +bool RISCVExpandPseudo::expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI) { + if (MBBI->getOpcode() == RISCV::PseudoLLA) { + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoLA) { + MachineFunction *MF = MBB.getParent(); + unsigned SecondOpcode; + unsigned FlagsHi; + if (MF->getTarget().isPositionIndependent()) { + const auto &STI = MF->getSubtarget(); + SecondOpcode = STI.is64Bit() ? RISCV::LD : RISCV::LW; + FlagsHi = RISCVII::MO_GOT_HI; + } + else { + SecondOpcode = RISCV::ADDI; + FlagsHi = RISCVII::MO_PCREL_HI; + } + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoLA_TLS_IE) { + const auto &STI = MF->getSubtarget(); + unsigned SecondOpcode = STI.is64Bit() ? RISCV::LD : RISCV::LW; + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoLA_TLS_GD) { + MachineFunction *MF = MBB.getParent(); + MachineInstr &MI = *MBBI; + DebugLoc DL = MI.getDebugLoc(); + Register DestReg = MI.getOperand(0).getReg(); + const MachineOperand &Symbol = MI.getOperand(1); + MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); + NewMBB->setLabelMustBeEmitted(); + MF->insert(++MBB.getIterator(), NewMBB); + BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg).addDisp(Symbol, 0, FlagsHi); + BuildMI(NewMBB, DL, TII->get(SecondOpcode), DestReg).addReg(DestReg).addMBB(NewMBB, RISCVII::MO_PCREL_LO); + NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); + NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); + MBB.addSuccessor(NewMBB); + LivePhysRegs LiveRegs; + computeAndAddLiveIns(LiveRegs, *NewMBB); + NextMBBI = MBB.end(); + MI.eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVSETVLI) { + assert(MBBI->getNumOperands() == 5 && "Unexpected instruction format"); + DebugLoc DL = MBBI->getDebugLoc(); + assert((MBBI->getOpcode() == RISCV::PseudoVSETVLI || MBBI->getOpcode() == RISCV::PseudoVSETIVLI) && "Unexpected pseudo instruction"); + unsigned Opcode; + if (MBBI->getOpcode() == RISCV::PseudoVSETVLI) + Opcode = RISCV::VSETVLI; + else + Opcode = RISCV::VSETIVLI; + const MCInstrDesc &Desc = TII->get(Opcode); + assert(Desc.getNumOperands() == 3 && "Unexpected instruction format"); + Register DstReg = MBBI->getOperand(0).getReg(); + bool DstIsDead = MBBI->getOperand(0).isDead(); + BuildMI(MBB, MBBI, DL, Desc).addReg(DstReg, RegState::Define | getDeadRegState(DstIsDead)).add(MBBI->getOperand(1)).add(MBBI->getOperand(2)); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVSETIVLI) { + assert(MBBI->getNumOperands() == 5 && "Unexpected instruction format"); + DebugLoc DL = MBBI->getDebugLoc(); + assert((MBBI->getOpcode() == RISCV::PseudoVSETVLI || MBBI->getOpcode() == RISCV::PseudoVSETIVLI) && "Unexpected pseudo instruction"); + unsigned Opcode; + if (MBBI->getOpcode() == RISCV::PseudoVSETVLI) + Opcode = RISCV::VSETVLI; + else + Opcode = RISCV::VSETIVLI; + const MCInstrDesc &Desc = TII->get(Opcode); + assert(Desc.getNumOperands() == 3 && "Unexpected instruction format"); + Register DstReg = MBBI->getOperand(0).getReg(); + bool DstIsDead = MBBI->getOperand(0).isDead(); + BuildMI(MBB, MBBI, DL, Desc).addReg(DstReg, RegState::Define | getDeadRegState(DstIsDead)).add(MBBI->getOperand(1)).add(MBBI->getOperand(2)); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B1) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B2) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B4) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B8) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B16) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B32) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMCLR_M_B64) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B1) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B2) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B4) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B8) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B16) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B32) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + if (MBBI->getOpcode() == RISCV::PseudoVMSET_M_B64) { + DebugLoc DL = MBBI->getDebugLoc(); + Register DstReg = MBBI->getOperand(0).getReg(); + const MCInstrDesc &Desc = TII->get(Opcode); + BuildMI(MBB, MBBI, DL, Desc, DstReg).addReg(DstReg, RegState::Undef).addReg(DstReg, RegState::Undef); + MBBI->eraseFromParent(); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f746343de8bcbf0ec410bfee6eabf7dde8e37c4b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_EXPAND_PSEUDO_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c3b6dc2dce658992de0bfbde1b5323b33b24ebb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVExpandPseudo::runOnMachineFunction(MachineFunction &MF) { + TII = static_cast(MF.getSubtarget().getInstrInfo()); + bool Modified = false; + for (auto &MBB : MF) { + Modified |= expandMBB(MBB); + } + return Modified; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0335a4ef79ccad687d71bd1e7dfc446f4a07fe4b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp @@ -0,0 +1,2 @@ +RISCVMergeBaseOffsetOpt() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f8195dd1360a5a7264e251088fea5e7dbc2d24d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createRISCVMergeBaseOffsetOptPass() { + return new RISCVMergeBaseOffsetOpt(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..658f61cc76c6f58d97dbc4a3fa9d383799c42b6e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return RISCV_MERGE_BASE_OFFSET_NAME; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5b9c0930d3d58a2f4601a4830a241ebb30ca4fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set(MachineFunctionProperties::Property::IsSSA); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..644005710c1b1a6bbf091cf43572a6d616d21b78 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp @@ -0,0 +1,121 @@ +bool RISCVMergeBaseOffsetOpt::runOnMachineFunction(MachineFunction &Fn) { + if (skipFunction(*F.getFunction())) { + return false; + } + DeadInstrs.clear(); + MRI = &Fn.getRegInfo(); + for (MachineBasicBlock &MBB : Fn) { + LLVM_DEBUG(dbgs() << "MBB: " << MBB.getName() << "\n"); + for (MachineInstr &HiLUI : MBB) { + MachineInstr *LoADDI = nullptr; + if (HiLUI.getOpcode() != RISCV::LUI || HiLUI.getOperand(1).getTargetFlags() != RISCVII::MO_HI || HiLUI.getOperand(1).getType() != MachineOperand::MO_GlobalAddress || HiLUI.getOperand(1).getOffset() != 0 || !MRI->hasOneUse(HiLUI.getOperand(0).getReg())) + return false; + Register HiLuiDestReg = HiLUI.getOperand(0).getReg(); + LoADDI = MRI->use_begin(HiLuiDestReg)->getParent(); + if (LoADDI->getOpcode() != RISCV::ADDI || LoADDI->getOperand(2).getTargetFlags() != RISCVII::MO_LO || LoADDI->getOperand(2).getType() != MachineOperand::MO_GlobalAddress || LoADDI->getOperand(2).getOffset() != 0 || !MRI->hasOneUse(LoADDI->getOperand(0).getReg())) + return false; + continue + LLVM_DEBUG(dbgs() << " Found lowered global address with one use: " << *LoADDI->getOperand(2).getGlobal() << "\n"); + Register DestReg = LoADDI.getOperand(0).getReg(); + assert(MRI->hasOneUse(DestReg) && "expected one use for LoADDI"); + MachineInstr &Tail = *MRI->use_begin(DestReg)->getParent(); + switch (Tail.getOpcode()) { + default: + LLVM_DEBUG(dbgs() << "Don't know how to get offset from this instr:" << Tail); + return false; + case RISCV::ADDI: { + int64_t Offset = Tail.getOperand(2).getImm(); + LLVM_DEBUG(dbgs() << " Offset Instr: " << Tail); + HiLUI.getOperand(1).setOffset(Offset); + LoADDI.getOperand(2).setOffset(Offset); + DeadInstrs.insert(&Tail); + MRI->replaceRegWith(Tail.getOperand(0).getReg(), LoADDI.getOperand(0).getReg()); + LLVM_DEBUG(dbgs() << " Merged offset " << Offset << " into base.\n" << " " << HiLUI << " " << LoADDI;); + return true; + } break; + case RISCV::ADD: { + int64_t Offset; + assert((TailAdd.getOpcode() == RISCV::ADD) && "Expected ADD instruction!"); + Register Rs = TailAdd.getOperand(1).getReg(); + Register Rt = TailAdd.getOperand(2).getReg(); + Register Reg = Rs == GAReg ? Rt : Rs; + if (!MRI->hasOneUse(Reg)) + return false; + MachineInstr &OffsetTail = *MRI->getVRegDef(Reg); + if (OffsetTail.getOpcode() == RISCV::ADDI) { + MachineOperand &AddiImmOp = OffsetTail.getOperand(2); + if (AddiImmOp.getTargetFlags() != RISCVII::MO_None) + return false; + int64_t OffLo = AddiImmOp.getImm(); + MachineInstr &OffsetLui = *MRI->getVRegDef(OffsetTail.getOperand(1).getReg()); + MachineOperand &LuiImmOp = OffsetLui.getOperand(1); + if (OffsetLui.getOpcode() != RISCV::LUI || LuiImmOp.getTargetFlags() != RISCVII::MO_None || !MRI->hasOneUse(OffsetLui.getOperand(0).getReg())) + return false; + int64_t OffHi = OffsetLui.getOperand(1).getImm(); + Offset = (OffHi << 12) + OffLo; + LLVM_DEBUG(dbgs() << " Offset Instrs: " << OffsetTail << " " << OffsetLui); + DeadInstrs.insert(&OffsetTail); + DeadInstrs.insert(&OffsetLui); + return true; + } + else if (OffsetTail.getOpcode() == RISCV::LUI) { + LLVM_DEBUG(dbgs() << " Offset Instr: " << OffsetTail); + Offset = OffsetTail.getOperand(1).getImm() << 12; + DeadInstrs.insert(&OffsetTail); + return true; + } + return false; + if (!matchLargeOffset(Tail, DestReg, Offset)) { + return false; + } + HiLUI.getOperand(1).setOffset(Offset); + LoADDI.getOperand(2).setOffset(Offset); + DeadInstrs.insert(&Tail); + MRI->replaceRegWith(Tail.getOperand(0).getReg(), LoADDI.getOperand(0).getReg()); + LLVM_DEBUG(dbgs() << " Merged offset " << Offset << " into base.\n" << " " << HiLUI << " " << LoADDI;); + return true; + } + break; + case RISCV::LB: + case RISCV::LH: + case RISCV::LW: + case RISCV::LBU: + case RISCV::LHU: + case RISCV::LWU: + case RISCV::LD: + case RISCV::FLH: + case RISCV::FLW: + case RISCV::FLD: + case RISCV::SB: + case RISCV::SH: + case RISCV::SW: + case RISCV::SD: + case RISCV::FSH: + case RISCV::FSW: + case RISCV::FSD: { + if (Tail.getOperand(1).isFI()) { + return false; + } + Register BaseAddrReg = Tail.getOperand(1).getReg(); + if (DestReg != BaseAddrReg) + return false; + MachineOperand &TailImmOp = Tail.getOperand(2); + int64_t Offset = TailImmOp.getImm(); + HiLUI.getOperand(1).setOffset(Offset); + Tail.RemoveOperand(2); + MachineOperand &ImmOp = LoADDI.getOperand(2); + ImmOp.setOffset(Offset); + Tail.addOperand(ImmOp); + Tail.getOperand(1).setReg(HiLUI.getOperand(0).getReg()); + DeadInstrs.insert(&LoADDI); + return true; + } break; + } + return false; + } + } + for (auto *MI : DeadInstrs) { + MI->eraseFromParent(); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..748278cc79300d8a5ec326134622a47f923f34f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +RISCVInstrInfo::RISCVInstrInfo(RISCVSubtarget &STI) : RISCVGenInstrInfo( RISCV::ADJCALLSTACKDOWN, RISCV::ADJCALLSTACKUP), STI(STI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d86ee8cd4f838d592e68b58e88bd472f670cf458 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,43 @@ +bool RISCVInstrInfo::analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, bool AllowModify) const { + TBB = FBB = nullptr; + Cond.clear(); + MachineBasicBlock::iterator I = MBB.getLastNonDebugInstr(); + if (I == MBB.end() || !isUnpredicatedTerminator(*I)) { + return false; + } + MachineBasicBlock::iterator FirstUncondOrIndirectBr = MBB.end(); + int NumTerminators = 0; + for (auto J = I.getReverse(); J != MBB.rend() && isUnpredicatedTerminator(*J); J++) { + NumTerminators++; + if (J->getDesc().isUnconditionalBranch() || J->getDesc().isIndirectBranch()) { + FirstUncondOrIndirectBr = J.getReverse(); + } + } + if (AllowModify && FirstUncondOrIndirectBr != MBB.end()) { + while (std::next(FirstUncondOrIndirectBr) != MBB.end()) { + std::next(FirstUncondOrIndirectBr)->eraseFromParent(); + NumTerminators--; + } + I = FirstUncondOrIndirectBr; + } + if (I->getDesc().isIndirectBranch()) { + return true; + } + if (NumTerminators > 2) { + return true; + } + if (NumTerminators == 1 && I->getDesc().isUnconditionalBranch()) { + TBB = getBranchDestBlock(*I); + return false; + } + if (NumTerminators == 1 && I->getDesc().isConditionalBranch()) { + parseCondBranch(*I, TBB, Cond); + return false; + } + if (NumTerminators == 2 && std::prev(I)->getDesc().isConditionalBranch() && I->getDesc().isUnconditionalBranch()) { + parseCondBranch(*std::prev(I), TBB, Cond); + FBB = getBranchDestBlock(*I); + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84c10e93be57ac9e456e12ff8b4453d873ba50fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp @@ -0,0 +1,22 @@ +bool RISCVInstrInfo::areMemAccessesTriviallyDisjoint(const MachineInstr &MIa, const MachineInstr &MIb) const { + assert(MIa.mayLoadOrStore() && "MIa must be a load or store."); + assert(MIb.mayLoadOrStore() && "MIb must be a load or store."); + if (MIa.hasUnmodeledSideEffects() || MIb.hasUnmodeledSideEffects() || MIa.hasOrderedMemoryRef() || MIb.hasOrderedMemoryRef()) { + return false; + } + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + const MachineOperand *BaseOpA = nullptr, *BaseOpB = nullptr; + int64_t OffsetA = 0, OffsetB = 0; + unsigned int WidthA = 0, WidthB = 0; + if (getMemOperandWithOffsetWidth(MIa, BaseOpA, OffsetA, WidthA, TRI) && getMemOperandWithOffsetWidth(MIb, BaseOpB, OffsetB, WidthB, TRI)) { + if (BaseOpA->isIdenticalTo(*BaseOpB)) { + int LowOffset = std::min(OffsetA, OffsetB); + int HighOffset = std::max(OffsetA, OffsetB); + int LowWidth = (LowOffset == OffsetA) ? WidthA : WidthB; + if (LowOffset + LowWidth <= HighOffset) { + return true; + } + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcb2321cf28d3ecdc90f327ad2cbeb346542dafc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp @@ -0,0 +1,17 @@ +void RISCVInstrInfo::buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF, const outliner::OutlinedFunction &OF) const { + bool Changed = true; + while (Changed) { + Changed = false; + auto I = MBB.begin(); + auto E = MBB.end(); + for (; I != E; ++I) { + if (I->isCFIInstruction()) { + I->removeFromParent(); + Changed = true; + break; + } + } + } + MBB.addLiveIn(RISCV::X5); + MBB.insert(MBB.end(), BuildMI(MF, DebugLoc(), get(RISCV::JALR)).addReg(RISCV::X0, RegState::Define).addReg(RISCV::X5).addImm(0)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3d86b0f026bac722f6a15accf9e7a9fe2a33d932 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,36 @@ + +void RISCVInstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, MCRegister DstReg, MCRegister SrcReg, bool KillSrc) const { + if (RISCV::GPRRegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::ADDI), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addImm(0); + return; + } + if (RISCV::FPR16RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::FSGNJ_H), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::FPR32RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::FSGNJ_S), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::FPR64RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::FSGNJ_D;), DstReg).addReg(SrcReg, getKillRegState(KillSrc)).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRRegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV1R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRM2RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV2R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRM4RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV4R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + if (RISCV::VRM8RegClass.contains(DstReg, SrcReg)) { + BuildMI(MBB, MBBI, DL, get(RISCV::PseudoVMV8R_V), DstReg).addReg(SrcReg, getKillRegState(KillSrc)); + return ; + } + llvm_unreachable("Impossible reg-to-reg copy"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..371fad319519ebb28816b75c9b94dbc64622e257 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp @@ -0,0 +1,4 @@ +std::pair RISCVInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { + const unsigned Mask = RISCVII::MO_DIRECT_FLAG_MASK; + return std::make_pair(TF & Mask, TF & ~Mask); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cae1b652d38074daf74f2f39cb157d40817089f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp @@ -0,0 +1,4 @@ +MachineBasicBlock *RISCVInstrInfo::getBranchDestBlock(const MachineInstr &MI) const { + assert(MI.getDesc().isBranch() && "Unexpected opcode!"); + return MI.getOperand(MI.getNumExplicitOperands() - 1).getMBB(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..995d4bdb01ff49a8ff82e1f037826549065dcb8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp @@ -0,0 +1,58 @@ +unsigned RISCVInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const { + unsigned Opcode = MI.getOpcode(); + switch (Opcode) { + default: { + if (MI.getParent() && MI.getParent()->getParent()) { + const auto MF = MI.getMF(); + const auto &TM = static_cast(MF->getTarget()); + const MCRegisterInfo &MRI = *TM.getMCRegisterInfo(); + const MCSubtargetInfo &STI = *TM.getMCSubtargetInfo(); + const RISCVSubtarget &ST = MF->getSubtarget(); + if (isCompressibleInst(MI, &ST, MRI, STI)) { + return 2; + } + } + return get(Opcode).getSize(); + } + case TargetOpcode::EH_LABEL: + case TargetOpcode::IMPLICIT_DEF: + case TargetOpcode::KILL: + case TargetOpcode::DBG_VALUE: + return 0; + case RISCV::PseudoCALLReg: + case RISCV::PseudoCALL: + case RISCV::PseudoJump: + case RISCV::PseudoTAIL: + case RISCV::PseudoLLA: + case RISCV::PseudoLA: + case RISCV::PseudoLA_TLS_IE: + case RISCV::PseudoLA_TLS_GD: + return 8; + case RISCV::PseudoAtomicLoadNand32: + case RISCV::PseudoAtomicLoadNand64: + return 20; + case RISCV::PseudoMaskedAtomicSwap32: + case RISCV::PseudoMaskedAtomicLoadAdd32: + case RISCV::PseudoMaskedAtomicLoadSub32: + return 28; + case RISCV::PseudoMaskedAtomicLoadNand32: + return 32; + case RISCV::PseudoMaskedAtomicLoadMax32: + case RISCV::PseudoMaskedAtomicLoadMin32: + return 44; + case RISCV::PseudoMaskedAtomicLoadUMax32: + case RISCV::PseudoMaskedAtomicLoadUMin32: + return 36; + case RISCV::PseudoCmpXchg32: + case RISCV::PseudoCmpXchg64: + return 16; + case RISCV::PseudoMaskedCmpXchg32: + return 32; + case TargetOpcode::INLINEASM: + case TargetOpcode::INLINEASM_BR: { + const MachineFunction &MF = *MI.getParent()->getParent(); + const auto &TM = static_cast(MF.getTarget()); + return getInlineAsmLength(MI.getOperand(0).getSymbolName(), *TM.getMCAsmInfo()); + } + } +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c047851933d8e04b86ede618330b87e4ca0b4859 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp @@ -0,0 +1,18 @@ +bool RISCVInstrInfo::getMemOperandWithOffsetWidth(const MachineInstr &LdSt, const MachineOperand *&BaseReg, int64_t &Offset, unsigned &Width, const TargetRegisterInfo *TRI) const { + if (!LdSt.mayLoadOrStore()) { + return false; + } + if (LdSt.getNumExplicitOperands() != 3) { + return false; + } + if (!LdSt.getOperand(1).isReg() || !LdSt.getOperand(2).isImm()) { + return false; + } + if (!LdSt.hasOneMemOperand()) { + return false; + } + Width = (*LdSt.memoperands_begin())->getSize(); + BaseReg = &LdSt.getOperand(1); + Offset = LdSt.getOperand(2).getImm(); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c46ce820392baeb07d11944ca084ec5cba2091c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp @@ -0,0 +1,27 @@ +outliner::OutlinedFunction RISCVInstrInfo::getOutliningCandidateInfo(std::vector &RepeatedSequenceLocs) const { + auto CannotInsertCall = [](outliner::Candidate &C) { + const TargetRegisterInfo *TRI = C.getMF()->getSubtarget().getRegisterInfo(); + C.initLRU(*TRI); + LiveRegUnits LRU = C.LRU; + return !LRU.available(RISCV::X5); + }; + llvm::erase_if(RepeatedSequenceLocs, CannotInsertCall); + if (RepeatedSequenceLocs.size() < 2) { + return outliner::OutlinedFunction(); + } + unsigned SequenceSize = 0; + auto I = RepeatedSequenceLocs[0].front(); + auto E = std::next(RepeatedSequenceLocs[0].back()); + for (; I != E; ++I) { + SequenceSize += getInstSizeInBytes(*I); + } + unsigned CallOverhead = 8; + for (auto &C : RepeatedSequenceLocs) { + C.setCallInfo(MachineOutlinerDefault, CallOverhead); + } + unsigned FrameOverhead = 4; + if (RepeatedSequenceLocs[0].getMF()->getSubtarget().getFeatureBits()[RISCV::FeatureStdExtC]) { + FrameOverhead = 2; + } + return outliner::OutlinedFunction(RepeatedSequenceLocs, SequenceSize, FrameOverhead, MachineOutlinerDefault); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a3dd323cf6a01428a868ff2e81d3613bad1aad4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp @@ -0,0 +1,32 @@ +outliner::InstrType RISCVInstrInfo::getOutliningType(MachineBasicBlock::iterator &MBBI, unsigned Flags) const { + MachineInstr &MI = *MBBI; + MachineBasicBlock *MBB = MI.getParent(); + const TargetRegisterInfo *TRI = MBB->getParent()->getSubtarget().getRegisterInfo(); + if (MI.isPosition()) { + if (MI.isCFIInstruction()) { + return outliner::InstrType::Invisible; + } + return outliner::InstrType::Illegal; + } + if (MI.isInlineAsm()) { + return outliner::InstrType::Illegal; + } + if (MI.isTerminator() && !MBB->succ_empty()) { + return outliner::InstrType::Illegal; + } + if (MI.isReturn()) { + return outliner::InstrType::Illegal; + } + if (MI.modifiesRegister(RISCV::X5, TRI) || MI.getDesc().hasImplicitDefOfPhysReg(RISCV::X5)) { + return outliner::InstrType::Illegal; + } + for (const auto &MO : MI.operands()) { + if (MO.isMBB() || MO.isBlockAddress() || MO.isCPI()) { + return outliner::InstrType::Illegal; + } + } + if (MI.isMetaInstruction()) { + return outliner::InstrType::Invisible; + } + return outliner::InstrType::Legal; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..263cfb665f67d84e93145d137c3d2ab6ab3b7d06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp @@ -0,0 +1,5 @@ +ArrayRef> RISCVInstrInfo::getSerializableDirectMachineOperandTargetFlags() const { + using namespace RISCVII; + static const std::pair TargetFlags[] = {{MO_CALL, "riscv-call"},{MO_PLT, "riscv-plt"},{MO_LO, "riscv-lo"},{MO_HI, "riscv-hi"},{MO_PCREL_LO, "riscv-pcrel-lo"},{MO_PCREL_HI, "riscv-pcrel-hi"},{MO_GOT_HI, "riscv-got-hi"},{MO_TPREL_LO, "riscv-tprel-lo"},{MO_TPREL_HI, "riscv-tprel-hi"},{MO_TPREL_ADD, "riscv-tprel-add"},{MO_TLS_GOT_HI, "riscv-tls-got-hi"},{MO_TLS_GD_HI, "riscv-tls-gd-hi"}}; + return makeArrayRef(TargetFlags); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf05adfad8dde46f66f5392c7b824e5c8eb9fd87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,27 @@ +unsigned RISCVInstrInfo::insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef Cond, const DebugLoc &DL, int *BytesAdded) const { + if (BytesAdded) { + *BytesAdded = 0; + } + assert(TBB && "insertBranch must not be told to insert a fallthrough"); + assert((Cond.size() == 3 || Cond.size() == 0) && "RISCV branch conditions have two components!"); + if (Cond.empty()) { + MachineInstr &MI = *BuildMI(&MBB, DL, get(RISCV::PseudoBR)).addMBB(TBB); + if (BytesAdded) { + *BytesAdded = *BytesAdded + getInstSizeInBytes(MI); + } + return 1; + } + unsigned Opc = Cond[0].getImm(); + MachineInstr &CondMI = *BuildMI(&MBB, DL, get(Opc)).add(Cond[1]).add(Cond[2]).addMBB(TBB); + if (BytesAdded) { + *BytesAdded = *BytesAdded + getInstSizeInBytes(CondMI); + } + if (!FBB) { + return 1; + } + MachineInstr &MI = *BuildMI(&MBB, DL, get(RISCV::PseudoBR)).addMBB(FBB); + if (BytesAdded) { + *BytesAdded = *BytesAdded + getInstSizeInBytes(MI); + } + return 2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1492bf3ef915bf02e849b172335d6538b40164d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp @@ -0,0 +1,19 @@ +unsigned RISCVInstrInfo::insertIndirectBranch(MachineBasicBlock &MBB, MachineBasicBlock &DestBB, const DebugLoc &DL, int64_t BrOffset, RegScavenger *RS) const { + assert(RS && "RegScavenger required for long branching"); + assert(MBB.empty() && "new block should be inserted for expanding unconditional branch"); + assert(MBB.pred_size() == 1); + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MRI = MF->getRegInfo(); + if (!isInt<32>(BrOffset)) { + report_fatal_error("Branch offsets outside of the signed 32-bit range not supported"); + } + Register ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + auto II = MBB.end(); + MachineInstr &MI = *BuildMI(MBB, II, DL, get(RISCV::PseudoJump)).addReg(ScratchReg, RegState::Define | RegState::Dead).addMBB(&DestBB, RISCVII::MO_CALL); + RS->enterBasicBlockEnd(MBB); + unsigned Scav = RS->scavengeRegisterBackwards(RISCV::GPRRegClass, MI.getIterator(), false, 0); + MRI.replaceRegWith(ScratchReg, Scav); + MRI.clearVirtRegs(); + RS->setRegUsed(Scav); + return 8; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc4fc501f51d854d8e3da7721b447adee3a5d2f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp @@ -0,0 +1,4 @@ +MachineBasicBlock::iterator RISCVInstrInfo::insertOutlinedCall(Module &M, MachineBasicBlock &MBB, MachineBasicBlock::iterator &It, MachineFunction &MF, const outliner::Candidate &C) const { + It = MBB.insert(It, BuildMI(MF, DebugLoc(), get(RISCV::PseudoCALLReg), RISCV::X5).addGlobalAddress(M.getNamedValue(MF.getName()), 0, RISCVII::MO_CALL)); + return It; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39ad00c050eb6a3d2f6bc0acda49ffd7a8a5b252 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp @@ -0,0 +1,19 @@ +bool RISCVInstrInfo::isAsCheapAsAMove(const MachineInstr &MI) const { + const unsigned Opcode = MI.getOpcode(); + if(Opcode ==RISCV::FSGNJ_D) { + return MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg(); + } + if(Opcode ==RISCV::FSGNJ_S) { + return MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg(); + } + if(Opcode ==RISCV::ADDI) { + return (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == RISCV::X0) || (MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0); + } + if(Opcode ==RISCV::ORI) { + return (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == RISCV::X0) || (MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0); + } + if(Opcode ==RISCV::XORI) { + return (MI.getOperand(1).isReg() && MI.getOperand(1).getReg() == RISCV::X0) || (MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0); + } + return MI.isAsCheapAsAMove(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6eef2ac0fe4155e7932c5290a105dcf1c8fe7f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp @@ -0,0 +1,19 @@ +bool RISCVInstrInfo::isBranchOffsetInRange(unsigned BranchOp, int64_t BrOffset) const { + unsigned XLen = STI.getXLen(); + switch (BranchOp) { + case RISCV::BEQ: + case RISCV::BNE: + case RISCV::BLT: + case RISCV::BGE: + case RISCV::BLTU: + case RISCV::BGEU: + return isIntN(13, BrOffset); + case RISCV::JAL: + case RISCV::PseudoBR: + return isIntN(21, BrOffset); + case RISCV::PseudoJump: + return isIntN(32, SignExtend64(BrOffset + 0x800, XLen)); + default: + llvm_unreachable("Unexpected opcode!"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c815f394615b68f75ab7532e5b30d428b93b1d9a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp @@ -0,0 +1,21 @@ +Optional RISCVInstrInfo::isCopyInstrImpl(const MachineInstr &MI) const { + if (MI.isMoveReg()) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + if (MI.getOpcode() == RISCV::ADDI) { + if (MI.getOperand(1).isReg() && MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + } + if (MI.getOpcode() == RISCV::FSGNJ_D) { + if (MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg()) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + } + if (MI.getOpcode() == RISCV::FSGNJ_S) { + if (MI.getOperand(1).isReg() && MI.getOperand(2).isReg() && MI.getOperand(1).getReg() == MI.getOperand(2).getReg()) { + return DestSourcePair{MI.getOperand(0), MI.getOperand(1)}; + } + } + return None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9caad0ee4e4d0f3759c8d9c9fe481cee5f378ec5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp @@ -0,0 +1,10 @@ +bool RISCVInstrInfo::isFunctionSafeToOutlineFrom(MachineFunction &MF, bool OutlineFromLinkOnceODRs) const { + const Function &F = MF.getFunction(); + if (!OutlineFromLinkOnceODRs && F.hasLinkOnceODRLinkage()) { + return false; + } + if (F.hasSection()) { + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2dd099d2cc9c5b17a2b05c2f8cadf6939da7b835 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,103 @@ +unsigned RISCVInstrInfo::isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const { + if (MI.getOpcode() == RISCV::LB) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LBU) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LH) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LHU) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::FLH) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LW) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::FWL) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LWU) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::LD) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + if (MI.getOpcode() == RISCV::FLD) { + if (MI.getOperand(1).isFI()) { + if (MI.getOperand(2).isImm()) { + if (MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + } + } + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9e89b48698e2fb498dd5f8e8facf15525e862aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp @@ -0,0 +1,3 @@ +bool RISCVInstrInfo::isMBBSafeToOutlineFrom(MachineBasicBlock &MBB, unsigned &Flags) const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25f4bf9ad1bb3535889e398c48412ab3ff94334a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,19 @@ +unsigned RISCVInstrInfo::isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const { + switch (MI.getOpcode()) { + default: + return 0; + case RISCV::SB: + case RISCV::SH: + case RISCV::SW: + case RISCV::FSH: + case RISCV::FSW: + case RISCV::SD: + case RISCV::FSD: + break; + } + if (MI.getOperand(1).isFI() && MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) { + FrameIndex = MI.getOperand(1).getIndex(); + return MI.getOperand(0).getReg(); + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e71f82302950ea15b9fad418bc5c9ab1b10bd6be --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,31 @@ +void RISCVInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register DstReg, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { + DebugLoc DL; + if (I != MBB.end()) { + DL = I->getDebugLoc(); + } + MachineFunction *MF = MBB.getParent(); + const MachineFrameInfo &MFI = MF->getFrameInfo(); + MachineMemOperand *MMO = MF->getMachineMemOperand(MachinePointerInfo::getFixedStack(*MF, FI), MachineMemOperand::MOLoad, MFI.getObjectSize(FI), MFI.getObjectAlign(FI)); + unsigned Opcode; + if (RISCV::GPRRegClass.hasSubClassEq(RC)) { + Opcode = TRI->getRegSizeInBits(RISCV::GPRRegClass) == 32 ? RISCV::LW : RISCV::LD; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + if (RISCV::FPR16RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FLH; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + if (RISCV::FPR32RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FWL; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + if (RISCV::FPR64RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FLD; + BuildMI(MBB, I, DL, get(Opcode), DstReg).addFrameIndex(FI).addImm(0).addMemOperand(MMO); + return ; + } + llvm_unreachable("Can't load this register from stack slot"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/movImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/movImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c72f7f9e84e4ace08a3e3a7dad1d6a68cf683f24 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/movImm.cpp @@ -0,0 +1,26 @@ +void RISCVInstrInfo::movImm(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register DstReg, uint64_t Val, MachineInstr::MIFlag Flag) const { + MachineRegisterInfo &MRI = MF->getRegInfo(); + MachineFunction *MF = MBB.getParent(); + bool IsRV64 = MF->getSubtarget().is64Bit(); + Register SrcReg = RISCV::X0; + Register Result = MRI.createVirtualRegister(&RISCV::GPRRegClass); + unsigned Num = 0; + if (!IsRV64 && !isInt<32>(Val)) { + report_fatal_error("Should only materialize 32-bit constants for RV32"); + } + RISCVMatInt::InstSeq Seq; + RISCVMatInt::generateInstSeq(Val, IsRV64, Seq); + assert(Seq.size() > 0); + for (RISCVMatInt::Inst &Inst : Seq) { + if (++Num == Seq.size()) { + Result = DstReg; + } + if (Inst.Opc == RISCV::LUI) { + BuildMI(MBB, MBBI, DL, get(RISCV::LUI), Result).addImm(Inst.Imm).setMIFlag(Flag); + } + else { + BuildMI(MBB, MBBI, DL, get(Inst.Opc), Result).addReg(SrcReg, RegState::Kill).addImm(Inst.Imm).setMIFlag(Flag); + } + SrcReg = Result; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aef3d0ecdf646f8417201ea3baa82992390cf15b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp @@ -0,0 +1,7 @@ +static void parseCondBranch(MachineInstr &LastInst, MachineBasicBlock *&Target, SmallVectorImpl &Cond) { + assert(LastInst.getDesc().isConditionalBranch() && "Unknown conditional branch"); + Target = LastInst.getOperand(2).getMBB(); + Cond.push_back(MachineOperand::CreateImm(LastInst.getOpcode())); + Cond.push_back(LastInst.getOperand(0)); + Cond.push_back(LastInst.getOperand(1)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd30e85a8f2e12786e68b6e78bdf15a32405af38 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,29 @@ +unsigned RISCVInstrInfo::removeBranch(MachineBasicBlock &MBB, int *BytesRemoved) const { + if (BytesRemoved) { + *BytesRemoved = 0; + } + MachineBasicBlock::iterator I = MBB.getLastNonDebugInstr(); + if (I == MBB.end()) { + return 0; + } + if (!I->getDesc().isUnconditionalBranch() && !I->getDesc().isConditionalBranch()) { + return 0; + } + if (BytesRemoved) { + *BytesRemoved += getInstSizeInBytes(*I); + } + I->eraseFromParent(); + I = MBB.end(); + if (I == MBB.begin()) { + return 1; + } + --I; + if (!I->getDesc().isConditionalBranch()) { + return 1; + } + if (BytesRemoved) { + *BytesRemoved += getInstSizeInBytes(*I); + } + I->eraseFromParent(); + return 2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..518236fcb35df0b50482ad41a57f1da3bb8b7bfe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,5 @@ +bool RISCVInstrInfo::reverseBranchCondition(SmallVectorImpl &Cond) const { + assert((Cond.size() == 3) && "Invalid branch condition!"); + Cond[0].setImm(getOppositeBranchOpcode(Cond[0].getImm())); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0ae4eae7913dca4a4503f04564cf151eb5e25b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,26 @@ +void RISCVInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, Register SrcReg, bool IsKill, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { + DebugLoc DL; + if (I != MBB.end()) { + DL = I->getDebugLoc(); + } + MachineFunction *MF = MBB.getParent(); + const MachineFrameInfo &MFI = MF->getFrameInfo(); + MachineMemOperand *MMO = MF->getMachineMemOperand(MachinePointerInfo::getFixedStack(*MF, FI), MachineMemOperand::MOStore, MFI.getObjectSize(FI), MFI.getObjectAlign(FI)); + unsigned Opcode; + if (RISCV::GPRRegClass.hasSubClassEq(RC)) { + Opcode = TRI->getRegSizeInBits(RISCV::GPRRegClass) == 32 ? RISCV::SW : RISCV::SD; + } + else if (RISCV::FPR16RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FSH; + } + else if (RISCV::FPR32RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FSW; + } + else if (RISCV::FPR64RegClass.hasSubClassEq(RC)) { + Opcode = RISCV::FSD; + } + else { + llvm_unreachable("Can't store this register to stack slot"); + } + BuildMI(MBB, I, DL, get(Opcode)).addReg(SrcReg, getKillRegState(IsKill)).addFrameIndex(FI).addImm(0).addMemOperand(MMO); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e343d48c820364dc7982050272a51d190407121 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp @@ -0,0 +1,35 @@ +bool RISCVInstrInfo::verifyInstruction(const MachineInstr &MI, StringRef &ErrInfo) const { + const MCInstrInfo *MCII = STI.getInstrInfo(); + MCInstrDesc const &Desc = MCII->get(MI.getOpcode()); + for (auto &OI : enumerate(Desc.operands())) { + unsigned OpType = OI.value().OperandType; + if (OpType >= RISCVOp::OPERAND_FIRST_RISCV_IMM && OpType <= RISCVOp::OPERAND_LAST_RISCV_IMM) { + const MachineOperand &MO = MI.getOperand(OI.index()); + if (MO.isImm()) { + int64_t Imm = MO.getImm(); + bool Ok; + switch (OpType) { + default: + llvm_unreachable("Unexpected operand type"); + case RISCVOp::OPERAND_SIMM12: + Ok = isInt<12>(Imm); + break; + case RISCVOp::OPERAND_UIMM20: + Ok = isUInt<20>(Imm); + break; + case RISCVOp::OPERAND_UIMMLOG2XLEN: + if (STI.getTargetTriple().isArch64Bit()) + Ok = isUInt<6>(Imm); + else + Ok = isUInt<5>(Imm); + break; + } + if (!Ok) { + ErrInfo = "Invalid immediate"; + return false; + } + } + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a73ce4b15067ea6dd345e8f804506eb820ce687b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp @@ -0,0 +1,2 @@ +RISCVMachineFunctionInfo(const MachineFunction &MF) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79005827d02719d27077d7e3bbe5d9c839a908e2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp @@ -0,0 +1,3 @@ +unsigned getLibCallStackSize() const { + return LibCallStackSize; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c988c0796a82546234e3f8e39a1182b7d1ea2b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp @@ -0,0 +1,6 @@ +int getMoveF64FrameIndex(MachineFunction &MF) { + if (MoveF64FrameIndex == -1) { + MoveF64FrameIndex = MF.getFrameInfo().CreateStackObject(8, Align(8), false); + } + return MoveF64FrameIndex; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ad7e3a6df3da4abe5143ddf276a5a8dd208c0d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex() const { + return VarArgsFrameIndex; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff3900efa130d85bd23cdf0bf46f4492a11b3207 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +unsigned getVarArgsSaveSize() const { + return VarArgsSaveSize; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2c605685906e3f74e9d19eb3a425bb677ecf6e8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp @@ -0,0 +1,3 @@ +void setLibCallStackSize(unsigned Size) { + LibCallStackSize = Size; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f57e9f48831fa353d584c49669f0413fc095c594 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex(int Index) { + VarArgsFrameIndex = Index; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a72ac1c44b6abb48837cf13d74446638ee97792 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +void setVarArgsSaveSize(int Size) { + VarArgsSaveSize = Size; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcd8f637f04add2d1722e6da9011c498bb8571c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp @@ -0,0 +1,3 @@ +bool useSaveRestoreLibCalls(const MachineFunction &MF) const { + return MF.getSubtarget().enableSaveRestore() && VarArgsSaveSize == 0 && !MF.getFrameInfo().hasTailCall(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b485bfc3f8c679a1968fbd947cfb7a1a630ceb15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,7 @@ +RISCVSubtarget::RISCVSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName, const TargetMachine &TM) : RISCVGenSubtargetInfo(TT, CPU, TuneCPU, FS), UserReservedRegister(RISCV::NUM_TARGET_REGS), FrameLowering(initializeSubtargetDependencies(TT, CPU, TuneCPU, FS, ABIName)), InstrInfo(*this), RegInfo(getHwMode()), TLInfo(TM, *this) { + CallLoweringInfo.reset(new RISCVCallLowering(*getTargetLowering())); + Legalizer.reset(new RISCVLegalizerInfo(*this)); + auto *RBI = new RISCVRegisterBankInfo(*getRegisterInfo()); + RegBankInfo.reset(RBI); + InstSelector.reset(createRISCVInstructionSelector(*static_cast(&TM), *this, *RBI)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/anchor.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c6f04a53d1e860d1cb5cb48fc428103a470ef0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/anchor.cpp @@ -0,0 +1,2 @@ +void RISCVSubtarget::anchor() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21de073065f1c45c637d96155064fa1e17a1de02 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp @@ -0,0 +1,3 @@ +bool enableLinkerRelax() const { + return EnableLinkerRelax; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..358b44992259774bd76684c0ec9175e49433d00f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp @@ -0,0 +1,3 @@ +bool enableMachineScheduler() const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a15b00dc080602258900bbbe99e7e945b36ba6cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp @@ -0,0 +1,3 @@ +bool enableRVCHintInstrs() const { + return EnableRVCHintInstrs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp new file mode 100644 index 0000000000000000000000000000000000000000..343f8da6be2a7efb133ed8ceb361f0e04baf970c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp @@ -0,0 +1,3 @@ +bool enableSaveRestore() const { + return EnableSaveRestore; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38840e3abf5721f2f2bb806ec7b4c36e9c80c33b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp @@ -0,0 +1,3 @@ +const CallLowering *RISCVSubtarget::getCallLowering() const { + return CallLoweringInfo.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dbbed9b4540b34f6fcda3e88827d89fc8b271b92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const RISCVFrameLowering *getFrameLowering() const override { + return &FrameLowering; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..241a6f789b9336fb755e0f8bd27f6411d2016581 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp @@ -0,0 +1,3 @@ +const RISCVInstrInfo *getInstrInfo() const override { + return &InstrInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48c25e17f0bcb2c488a43f59965f14252652be1b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *RISCVSubtarget::getInstructionSelector() const { + return InstSelector.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..34b918d70ad4c109ca034168fc2dc5f7762cba5c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp @@ -0,0 +1,3 @@ +const LegalizerInfo *RISCVSubtarget::getLegalizerInfo() const { + return Legalizer.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e51ba7750e72c82e020ae09634218d29c8b6e080 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp @@ -0,0 +1,3 @@ +const RegisterBankInfo *RISCVSubtarget::getRegBankInfo() const { + return RegBankInfo.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0323310ac0e1eb0128dc614c5b8e5810c97fd662 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const RISCVRegisterInfo *getRegisterInfo() const override { + return &RegInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a587bb87c2bf9c4c35e25ccfee788761dc1d8a6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +const SelectionDAGTargetInfo *getSelectionDAGInfo() const override { + return &TSInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ba240b805d561f415ec4ee11045c3d6eb8dea8e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp @@ -0,0 +1,3 @@ +RISCVABI::ABI getTargetABI() const { + return TargetABI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae252b5d67893ec68615f1dfafc89e95b3676d6d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp @@ -0,0 +1,3 @@ +const RISCVTargetLowering *getTargetLowering() const override { + return &TLInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getXLen.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getXLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b93e9c9f4885d72046bc33a4c96130e4796e755 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getXLen.cpp @@ -0,0 +1,3 @@ +unsigned getXLen() const { + return XLen; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f65801b1cfce99bb6f22e7828e3f2be8e8095ddb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp @@ -0,0 +1,3 @@ +MVT getXLenVT() const { + return XLenVT; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..045084578632528b294c467beabb11bcec85b93e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp @@ -0,0 +1,3 @@ +bool hasStdExtA() const { + return HasStdExtA; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c102f9d01106d3f90c03b80ad507bf41a61fbdbe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp @@ -0,0 +1,3 @@ +bool hasStdExtB() const { + return HasStdExtB; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..785c95523c80c75eaae143f94294a1b159b11b27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp @@ -0,0 +1,3 @@ +bool hasStdExtC() const { + return HasStdExtC; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c0d41f4cdb4f7a92d8a9ce0c402a53b8cc7697a7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp @@ -0,0 +1,3 @@ +bool hasStdExtD() const { + return HasStdExtD; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dfe330377a0077baad1cc0ee8b900335fc99c7a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp @@ -0,0 +1,3 @@ +bool hasStdExtF() const { + return HasStdExtF; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f5e79be711a1b0176abd5623e66e222d8106828b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp @@ -0,0 +1,3 @@ +bool hasStdExtM() const { + return HasStdExtM; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5223acaac264f68a6fc3f33c7b15e6d79e1dffd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp @@ -0,0 +1,3 @@ +bool hasStdExtV() const { + return HasStdExtV; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa2fdb498d75c1d5e09f33e14da97cb8b6c439cf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZba() const { + return HasStdExtZba; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..580a2ecde2d98f6211573d9c0182a66888e30a4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbb() const { + return HasStdExtZbb; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3665774de6ea27b4f43cc2ce9725e3ef8ee03f24 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbc() const { + return HasStdExtZbc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b885070bf501e4aa033b5c64c27d6cde94fd574f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbe() const { + return HasStdExtZbe; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d30a77301e6f77bcf71149553258fdf6ba72802 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbf() const { + return HasStdExtZbf; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64e8f6da0a82c37c1c84768cfbd9c41e4f9d4c27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbm() const { + return HasStdExtZbm; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e70ce03f491bf72fc64954ff90e195393b67e99c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbp() const { + return HasStdExtZbp; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05ca4bea84b6696d19aafd851732afc5363c7ee5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbproposedc() const { + return HasStdExtZbproposedc; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88f9e522cd20fd732d826a9b8eaeb7f76be8551f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbr() const { + return HasStdExtZbr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77d6819e118c6e1f82cdedf26c55783737418fb3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbs() const { + return HasStdExtZbs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8432f49748cc5b1627de7d8aa7e42ab26c5463bd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbt() const { + return HasStdExtZbt; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b8f1a64d51d18301744d11c4f5879d8ae084a21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZfh() const { + return HasStdExtZfh; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f140c6331d83ac7a5f8d0308537923cdac4b480 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvamo() const { + return HasStdExtZvamo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9c8265a1f76104be737068c99616f36543fa720 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvlsseg() const { + return HasStdExtZvlsseg; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1562b15f36a42ad7a0b97b1c0cc718835185508c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp @@ -0,0 +1,19 @@ +RISCVSubtarget &RISCVSubtarget::initializeSubtargetDependencies(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName) { + bool Is64Bit = TT.isArch64Bit(); + std::string CPUName = std::string(CPU); + std::string TuneCPUName = std::string(TuneCPU); + if (CPUName.empty()) { + CPUName = Is64Bit ? "generic-rv64" : "generic-rv32"; + } + if (TuneCPUName.empty()) { + TuneCPUName = CPUName; + } + ParseSubtargetFeatures(CPUName, TuneCPUName, FS); + if (Is64Bit) { + XLenVT = MVT::i64; + XLen = 64; + } + TargetABI = RISCVABI::computeTargetABI(TT, getFeatureBits(), ABIName); + RISCVFeatures::validate(TT, getFeatureBits()); + return *this; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..026df9778ca9ddace0d34a9f3e0d8eb157bd293e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp @@ -0,0 +1,3 @@ +bool is64Bit() const { + return HasRV64; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e9fc1cb3169afb18c1184d05bcd22cb858a5676e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E() const { + return IsRV32E; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ac2e733fe0b3623076323b1347a74e43a721deb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp @@ -0,0 +1,4 @@ +bool isRegisterReservedByUser(Register R) const { + assert(R < RISCV::NUM_TARGET_REGS && "Register out of range"); + return UserReservedRegister[R]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..37b315659994b32de45ce8870d6a29db4acfbd3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetInfo() { + RegisterTarget X(getTheRISCV32Target(), "riscv32", "32-bit RISC-V", "RISCV"); + RegisterTarget Y(getTheRISCV64Target(), "riscv64", "64-bit RISC-V", "RISCV"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d0317f9493f86d48647af0d9d65986f46cbf77b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheRISCV32Target() { + static Target TheRISCV32Target; + return TheRISCV32Target; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7a649e2d1dcc685575c2f9ec1dca9aaf6fa8aba --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp @@ -0,0 +1,4 @@ +Target &llvm::getTheRISCV64Target() { + static Target TheRISCV64Target; + return TheRISCV64Target; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31b9278f970215379e2dc8061f277dad1d569d9a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,9 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() { + RegisterTargetMachine X(getTheRISCV32Target()); + RegisterTargetMachine Y(getTheRISCV64Target()); + auto *PR = PassRegistry::getPassRegistry(); + initializeGlobalISel(*PR); + initializeRISCVMergeBaseOffsetOptPass(*PR); + initializeRISCVExpandPseudoPass(*PR); + initializezmtarzmCleanupVSETVLIFPass(*PR); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b20b53464b621e4e92357ebd6307c69ffb9a40e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp @@ -0,0 +1,2 @@ +RISCVPassConfig(RISCVTargetMachine &TM, PassManagerBase &PM) : TargetPassConfig(TM, PM) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73ec6bedf09619270970355907e32b855791f128 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,4 @@ +RISCVTargetMachine::RISCVTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional RM, CodeModel::Model CM, CodeGenOpt::Level OL) : LLVMTargetMachine(T, computeDataLayout(TT), TT, CPU, FS, Options, getEffectiveRelocModel(RM), CM, OL), TLOF(make_unique()), Subtarget(TT, CPU, FS, *this) { + initAsmInfo(); + setMachineOutliner(true); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53a717c5a28993e11ab524b64f8f9b5dde960abc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addGlobalInstructionSelect() { + addPass(new InstructionSelect()); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..249cfd6b8fbbd2f318e66c2e9edcc522e72786ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp @@ -0,0 +1,4 @@ +void RISCVPassConfig::addIRPasses() { + addPass(createAtomicExpandPass()); + TargetPassConfig::addIRPasses(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e40ddbd47024c1bb26c2d10c54d2d2fb0c3c73f0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addIRTranslator() { + addPass(new IRTranslator(getOptLevel())); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bceda22a3721c766e191bd621bc2068efb9440e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addInstSelector() { + addPass(createRISCVISelDag(getRISCVTargetMachine())); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1932ec43e2cbb1e9ec97351c4421aa1d7c006317 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addLegalizeMachineIR() { + addPass(new Legalizer()); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2ff69c52170cecce0743c34b95be10f32f76ce5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,3 @@ +void RISCVPassConfig::addPreEmitPass() { + addPass(&BranchRelaxationPassID); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c38087130942d1670807ab16f94ce2e515968fea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp @@ -0,0 +1,4 @@ +void RISCVPassConfig::addPreEmitPass() { + addPass(createRISCVExpandPseudoPass()); + addPass(createRISCVExpandAtomicPseudoPass()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91d224213b9714fe986f9b542807c866994eef03 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp @@ -0,0 +1,8 @@ +void RISCVPassConfig::addPreRegAlloc() { + addPass(createRISCVExpandSDMAPass()); + addPass(createRISCVExpandSSRPass()); + if (TM->getOptLevel() != CodeGenOpt::None) { + addPass(createRISCVMergeBaseOffsetOptPass()); + addPass(createRISCVCleanupVSETVLIPass()); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ca661dadbfb7d390a899a4418bf15b9e1daeb40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp @@ -0,0 +1,2 @@ +void RISCVPassConfig::addPreSched2() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..784ce6e69101604753ad0faae4ce064c8ac54a6b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig::addRegBankSelect() { + addPass(new RegBankSelect()); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp new file mode 100644 index 0000000000000000000000000000000000000000..708e44f701b3c83fd60458fe275223a2e0e880ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp @@ -0,0 +1,7 @@ +static StringRef computeDataLayout(const Triple &TT) { + if (TT.isArch64Bit()) { + return "e-m:e-p:64:64-i64:64-i128:128-n64-S128"; + } + assert(TT.isArch32Bit() && "only RV32 and RV64 are currently supported"); + return "e-m:e-p:32:32-i64:64-n32-S128"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e26ed90631bc09a534221d3b0d89d3d0fb4a2f08 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp @@ -0,0 +1,3 @@ +TargetPassConfig *RISCVTargetMachine::createPassConfig(PassManagerBase &PM) { + return new RISCVPassConfig(*this, PM); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8e47bfda9700302b8897ba128ce6aaa4acfbb8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp @@ -0,0 +1,6 @@ +static Reloc::Model getEffectiveRelocModel(const Triple &TT, Optional RM) { + if (!RM.hasValue()) { + return Reloc::Static; + } + return *RM; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..191f39130017a606dd77f12beee5e067e30a1edd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp @@ -0,0 +1,3 @@ +TargetLoweringObjectFile *getObjFileLowering() const override { + return TLOF.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3910b1ff75ce36bb25563a278318b819a66dd309 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,25 @@ +const RISCVSubtarget *RISCVTargetMachine::getSubtargetImpl(const Function &F) const { + Attribute TuneAttr = F.getFnAttribute("tune-cpu"); + Attribute CPUAttr = F.getFnAttribute("target-cpu"); + Attribute FSAttr = F.getFnAttribute("target-features"); + std::string CPU = CPUAttr.isValid() ? CPUAttr.getValueAsString().str() : TargetCPU; + std::string TuneCPU = TuneAttr.isValid() ? TuneAttr.getValueAsString().str() : CPU; + std::string FS = FSAttr.isValid() ? FSAttr.getValueAsString().str() : TargetFS; + std::string Key = CPU + TuneCPU + FS; + auto &I = SubtargetMap[Key]; + if (!I) { + resetTargetOptions(F); + auto ABIName = Options.MCOptions.getABIName(); + if (const MDString *ModuleTargetABI = dyn_cast_or_null(F.getParent()->getModuleFlag("target-abi"))) { + auto TargetABI = RISCVABI::getTargetABI(ABIName); + if (TargetABI != RISCVABI::ABI_Unknown) { + if (ModuleTargetABI->getString() != ABIName) { + report_fatal_error("-target-abi option != target-abi module flag"); + } + } + ABIName = ModuleTargetABI->getString(); + } + I = std::make_unique(TargetTriple, CPU, TuneCPU, FS, ABIName, *this); + } + return I.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a41a250abddaaf2f72411583edeb8514ecc15fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp @@ -0,0 +1,3 @@ +RISCVTargetMachine &getRISCVTargetMachine() const { + return getTM(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de21c28d38b6b1f01d074c67513e6cefd58f284b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp @@ -0,0 +1,3 @@ +TargetTransformInfo RISCVTargetMachine::getTargetTransformInfo(const Function &F) { + return TargetTransformInfo(RISCVTTIImpl(this, F)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40909ed282d63a3b6673b49e76d705f5bac453f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetMachine::isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98b08bcc1f079b2714504cf436a5a7c3530e1885 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,5 @@ +void RISCVELFTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM) { + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + SmallDataSection = getContext().getELFSection(".sdata", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC); + SmallBSSSection = getContext().getELFSection(".sbss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6e5fb66e33a68d6f5d4aa6fbd6fa67a49ee342a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,9 @@ +MCSection *RISCVELFTargetObjectFile::SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { + if (Kind.isBSS() && isGlobalInSmallSection(GO, TM)) { + return SmallBSSSection; + } + if (Kind.isData() && isGlobalInSmallSection(GO, TM)) { + return SmallDataSection; + } + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbe0c45c090047e1d764d2795db62ec1e15fe255 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp @@ -0,0 +1,11 @@ +void RISCVELFTargetObjectFile::getModuleMetadata(Module &M) { + SmallVector ModuleFlags; + M.getModuleFlagsMetadata(ModuleFlags); + for (const auto &MFE : ModuleFlags) { + StringRef Key = MFE.Key->getString(); + if (Key == "SmallDataLimit") { + SSThreshold = mdconst::extract(MFE.Val)->getZExtValue(); + break; + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88aa5000ec9d5a0ffc49ae8b1b6bb97bb7707153 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,6 @@ +MCSection *RISCVELFTargetObjectFile::getSectionForConstant( const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const { + if (isConstantInSmallSection(DL, C)) { + return SmallDataSection; + } + return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Alignment); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03070c7967520e2db15231715cdf5404fe77cef0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp @@ -0,0 +1,3 @@ +bool RISCVELFTargetObjectFile::isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const { + return isInSmallSection(DL.getTypeAllocSize(CN->getType())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d15ea59c38f894725279f9fb82f0731c79548e5a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp @@ -0,0 +1,21 @@ +bool RISCVELFTargetObjectFile::isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const { + const GlobalVariable *GVA = dyn_cast(GO); + if (!GVA) { + return false; + } + if (GVA->hasSection()) { + StringRef Section = GVA->getSection(); + if (Section == ".sdata" || Section == ".sbss") { + return true; + } + return false; + } + if (((GVA->hasExternalLinkage() && GVA->isDeclaration()) || GVA->hasCommonLinkage())) { + return false; + } + Type *Ty = GVA->getValueType(); + if (!Ty->isSized()) { + return false; + } + return isInSmallSection(GVA->getParent()->getDataLayout().getTypeAllocSize(Ty)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77772fb82ad184a8a4d2455cbc1cf202550c1af0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp @@ -0,0 +1,3 @@ +bool RISCVELFTargetObjectFile::isInSmallSection(uint64_t Size) const { + return Size > 0 && Size <= SSThreshold; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22191cb2dea9757287f93e29e9e0f5d88a5abc6c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp @@ -0,0 +1,2 @@ +explicit RISCVTTIImpl(const RISCVTargetMachine *TM, const Function &F) : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)), TLI(ST->getTargetLowering()) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01d7fd4a5292e1d82961e69efa3f3bd08f29ff0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp @@ -0,0 +1,8 @@ +int RISCVTTIImpl::getIntImmCost(const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) { + assert(Ty->isIntegerTy() && "getIntImmCost can only estimate cost of materialising integers"); + if (Imm == 0) { + return TTI::TCC_Free; + } + const DataLayout &DL = getDataLayout(); + return RISCVMatInt::getIntMatCost(Imm, DL.getTypeSizeInBits(Ty), getST()->is64Bit()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0c01363a8faf86a4c31e05ebe57cad34936b229 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp @@ -0,0 +1,37 @@ +int RISCVTTIImpl::getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind, Instruction *Inst) { + assert(Ty->isIntegerTy() && "getIntImmCost can only estimate cost of materialising integers"); + if (Imm == 0) { + return TTI::TCC_Free; + } + bool Takes12BitImm = false; + unsigned ImmArgIdx = ~0U; + switch (Opcode) { + case Instruction::GetElementPtr: + return TTI::TCC_Free; + case Instruction::Add: + case Instruction::And: + case Instruction::Or: + case Instruction::Xor: + case Instruction::Mul: + Takes12BitImm = true; + break; + case Instruction::Sub: + case Instruction::Shl: + case Instruction::LShr: + case Instruction::AShr: + Takes12BitImm = true; + ImmArgIdx = 1; + break; + default: + break; + } + if (Takes12BitImm) { + if (Instruction::isCommutative(Opcode) || Idx == ImmArgIdx) { + if (Imm.getMinSignedBits() <= 64 && getTLI()->isLegalAddImmediate(Imm.getSExtValue())) { + return TTI::TCC_Free; + } + } + return getIntImmCost(Imm, Ty, CostKind); + } + return TTI::TCC_Free; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff244e23aa7c352fb557907d1c8528e63c9cf942 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp @@ -0,0 +1,3 @@ +int RISCVTTIImpl::getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) { + return TTI::TCC_Free; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3085911b846be9fe97364305924fd1e72c52af7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp @@ -0,0 +1,3 @@ +const RISCVSubtarget *getST() const { + return ST; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e8723265e898db24c643b890ede218d98cd5b62 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp @@ -0,0 +1,3 @@ +const RISCVTargetLowering *getTLI() const { + return TLI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/CallLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/CallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..44322d52c70e92f7e669a7c814a0825858d8a83d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/CallLowering.cpp @@ -0,0 +1,2 @@ +RISCVCallLowering::RISCVCallLowering(const RISCVTargetLowering &TLI) : CallLowering(&TLI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc8637b1f0ea4b69b232a8c00e5c54df10bb470a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerCall.cpp @@ -0,0 +1,3 @@ +bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const { + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8344a5c36b8b7f909b3f5bfff96e829687e6d80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp @@ -0,0 +1,6 @@ +bool RISCVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef> VRegs, FunctionLoweringInfo &FLI) const { + if (F.arg_empty()) { + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a0a34ed59d315e93fb2eb0040afebfc1ef94e7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/CallLowering/lowerReturn.cpp @@ -0,0 +1,8 @@ +bool RISCVCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef VRegs, FunctionLoweringInfo &FLI) const { + MachineInstrBuilder Ret = MIRBuilder.buildInstrNoInsert(RISCV::PseudoRET); + if (Val != nullptr) { + return false; + } + MIRBuilder.insertInstr(Ret); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc75bbabc713bf9ef22e7fb35f9ba8e802457383 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +explicit RISCVFrameLowering(const RISCVSubtarget &STI) : TargetFrameLowering(StackGrowsDown, Align(16), 0), STI(STI) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/adjustReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/adjustReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7dae994073558b0f037aa2e910c54258b035e8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/adjustReg.cpp @@ -0,0 +1,21 @@ +void RISCVFrameLowering::adjustReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register DestReg, Register SrcReg, int64_t Val, MachineInstr::MIFlag Flag) const { + MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (DestReg == SrcReg && Val == 0) { + return ; + } + if (isInt<12>(Val)) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), DestReg).addReg(SrcReg).addImm(Val).setMIFlag(Flag); + } + else { + unsigned Opc = RISCV::ADD; + bool isSub = Val < 0; + if (isSub) { + Val = -Val; + Opc = RISCV::SUB; + } + Register ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + TII->movImm(MBB, MBBI, DL, ScratchReg, Val, Flag); + BuildMI(MBB, MBBI, DL, TII->get(Opc), DestReg).addReg(SrcReg).addReg(ScratchReg, RegState::Kill).setMIFlag(Flag); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc50f8ce2fe6c77b83a82dd1c51e99b053cfcf64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp @@ -0,0 +1,16 @@ +bool RISCVFrameLowering::canUseAsEpilogue(const MachineBasicBlock &MBB) const { + const MachineFunction *MF = MBB.getParent(); + MachineBasicBlock *TmpMBB = const_cast(&MBB); + const auto *RVFI = MF->getInfo(); + if (!RVFI->useSaveRestoreLibCalls(*MF)) { + return true; + } + if (MBB.succ_size() > 1) { + return false; + } + MachineBasicBlock *SuccMBB = MBB.succ_empty() ? TmpMBB->getFallThrough() : *MBB.succ_begin(); + if (!SuccMBB) { + return true; + } + return SuccMBB->isReturnBlock() && SuccMBB->size() == 1; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..14ca7440ae53421c255bd958604dfcb5a32e346e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp @@ -0,0 +1,11 @@ +bool RISCVFrameLowering::canUseAsPrologue(const MachineBasicBlock &MBB) const { + MachineBasicBlock *TmpMBB = const_cast(&MBB); + const MachineFunction *MF = MBB.getParent(); + const auto *RVFI = MF->getInfo(); + if (!RVFI->useSaveRestoreLibCalls(*MF)) { + return true; + } + RegScavenger RS; + RS.enterBasicBlock(*TmpMBB); + return !RS.isRegUsed(RISCV::X5); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc90cf82ab0d07d668daf8218552e032d84faba6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp @@ -0,0 +1,25 @@ +void RISCVFrameLowering::determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const { + TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS); + if (hasFP(MF)) { + SavedRegs.set(RISCV::X1); + SavedRegs.set(RISCV::X8); + } + if (hasBP(MF)) { + SavedRegs.set(RISCVABI::getBPReg()); + } + MachineFrameInfo &MFI = MF.getFrameInfo(); + if (MF.getFunction().hasFnAttribute("interrupt") && MFI.hasCalls()) { + static const MCPhysReg CSRegs[] = { RISCV::X1, RISCV::X5, RISCV::X6, RISCV::X7, RISCV::X10, RISCV::X11, RISCV::X12, RISCV::X13, RISCV::X14, RISCV::X15, RISCV::X16, RISCV::X17, RISCV::X28, RISCV::X29, RISCV::X30, RISCV::X31, 0}; + for (unsigned i = 0; CSRegs[i]; ++i) { + SavedRegs.set(CSRegs[i]); + } + if (MF.getSubtarget().hasStdExtF()) { + const MCPhysReg * Regs = MF.getRegInfo().getCalleeSavedRegs(); + for (unsigned i = 0; Regs[i]; ++i) { + if (RISCV::FPR16RegClass.contains(Regs[i]) || RISCV::FPR32RegClass.contains(Regs[i]) || RISCV::FPR64RegClass.contains(Regs[i])) { + SavedRegs.set(Regs[i]); + } + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fa9f9d14dc9c6fc09c3c01a88db76d2312e69df --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,15 @@ +MachineBasicBlock::iterator RISCVFrameLowering::eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const { + Register SPReg = RISCV::X2; + DebugLoc DL = MI->getDebugLoc(); + if (!hasReservedCallFrame(MF)) { + int64_t Amount = MI->getOperand(0).getImm(); + if (Amount != 0) { + Amount = alignSPAdjust(Amount); + if (MI->getOpcode() == RISCV::ADJCALLSTACKDOWN) { + Amount = -Amount; + } + adjustReg(MBB, MI, DL, SPReg, SPReg, Amount, MachineInstr::NoFlags); + } + } + return MBB.erase(MI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e2061f54290ae445a02f9c65b6d8720cb59e141 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,88 @@ +void RISCVFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { + const RISCVRegisterInfo *RI = STI.getRegisterInfo(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + auto *RVFI = MF.getInfo(); + Register FPReg = RISCV::X8; + Register SPReg = RISCV::X2; + if (MF.getFunction().getCallingConv() == CallingConv::GHC) { + return; + } + MachineBasicBlock::iterator MBBI = MBB.end(); + DebugLoc DL; + if (!MBB.empty()) { + MBBI = MBB.getFirstTerminator(); + if (MBBI == MBB.end()) { + MBBI = MBB.getLastNonDebugInstr(); + } + DL = MBBI->getDebugLoc(); + if (!MBBI->isTerminator()) { + MBBI = std::next(MBBI); + } + while (MBBI != MBB.begin() && std::prev(MBBI)->getFlag(MachineInstr::FrameDestroy)) { + --MBBI; + } + } + SmallVector NonLibcallCSI; + for (auto &CS : MFI.getCalleeSavedInfo()) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI.push_back(CS); + } + } + const auto &CSI = NonLibcallCSI; + auto LastFrameDestroy = MBBI; + if (!CSI.empty()) { + LastFrameDestroy = std::prev(MBBI, CSI.size()); + } + uint64_t StackSize = MFI.getStackSize(); + uint64_t RealStackSize = StackSize + RVFI->getLibCallStackSize(); + uint64_t FPOffset = RealStackSize - RVFI->getVarArgsSaveSize(); + if (RI->needsStackRealignment(MF) || MFI.hasVarSizedObjects()) { + assert(hasFP(MF) && "frame pointer should not have been eliminated"); + adjustReg(MBB, LastFrameDestroy, DL, SPReg, FPReg, -FPOffset, MachineInstr::FrameDestroy); + } + uint64_t FirstSPAdjustAmount = 0; + const auto *RVFI = MF.getInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + uint64_t StackSize = MFI.getStackSize(); + if (RVFI->getLibCallStackSize()) { + FirstSPAdjustAmount = 0; + } + if (!isInt<12>(StackSize) && (CSI.size() > 0)) { + FirstSPAdjustAmount = 2048 - getStackAlign().value(); + } + if (FirstSPAdjustAmount) { + uint64_t SecondSPAdjustAmount = MFI.getStackSize() - FirstSPAdjustAmount; + assert(SecondSPAdjustAmount > 0 && "SecondSPAdjustAmount should be greater than zero"); + adjustReg(MBB, LastFrameDestroy, DL, SPReg, SPReg, SecondSPAdjustAmount, MachineInstr::FrameDestroy); + } + if (FirstSPAdjustAmount) { + StackSize = FirstSPAdjustAmount; + } + adjustReg(MBB, MBBI, DL, SPReg, SPReg, StackSize, MachineInstr::FrameDestroy); + if (!MF.getFunction().hasFnAttribute(Attribute::ShadowCallStack)) { + return; + } + const auto &STI = MF.getSubtarget(); + Register RAReg = STI.getRegisterInfo()->getRARegister();. + std::vector &CSI = MF.getFrameInfo().getCalleeSavedInfo(); + if (std::none_of(CSI.begin(), CSI.end(), [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) { + return; + } + Register SCSPReg = RISCVABI::getSCSPReg(); + auto &Ctx = MF.getFunction().getContext(); + if (!STI.isRegisterReservedByUser(SCSPReg)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "x18 not reserved by user for Shadow Call Stack."}); + return; + } + const auto *RVFI = MF.getInfo(); + if (RVFI->useSaveRestoreLibCalls(MF)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Shadow Call Stack cannot be combined with Save/Restore LibCalls."}); + return; + } + const RISCVInstrInfo *TII = STI.getInstrInfo(); + bool IsRV64 = STI.hasFeature(RISCV::Feature64Bit); + int64_t SlotSize = STI.getXLen() / 8; + BuildMI(MBB, MI, DL, TII->get(IsRV64 ? RISCV::LD : RISCV::LW)).addReg(RAReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); + BuildMI(MBB, MI, DL, TII->get(RISCV::ADDI)).addReg(SCSPReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8048950b0f019688715749d1f0850f32087a97ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,130 @@ +void RISCVFrameLowering::emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineFrameInfo &MFI = MF.getFrameInfo(); + auto *RVFI = MF.getInfo(); + const RISCVRegisterInfo *RI = STI.getRegisterInfo(); + const RISCVInstrInfo *TII = STI.getInstrInfo(); + MachineBasicBlock::iterator MBBI = MBB.begin(); + Register FPReg = RISCV::X8; + Register SPReg = RISCV::X2; + Register BPReg = RISCVABI::getBPReg(); + DebugLoc DL; + if (MF.getFunction().getCallingConv() == CallingConv::GHC) { + return ; + } + if (!MF.getFunction().hasFnAttribute(Attribute::ShadowCallStack)) { + return; + } + const auto &STI = MF.getSubtarget(); + Register RAReg = STI.getRegisterInfo()->getRARegister();. + std::vector &CSI = MF.getFrameInfo().getCalleeSavedInfo(); + if (std::none_of(CSI.begin(), CSI.end(), [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) { + return; + } + Register SCSPReg = RISCVABI::getSCSPReg(); + auto &Ctx = MF.getFunction().getContext(); + if (!STI.isRegisterReservedByUser(SCSPReg)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "x18 not reserved by user for Shadow Call Stack."}); + return; + } + const auto *RVFI = MF.getInfo(); + if (RVFI->useSaveRestoreLibCalls(MF)) { + Ctx.diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Shadow Call Stack cannot be combined with Save/Restore LibCalls."}); + return; + } + const RISCVInstrInfo *TII = STI.getInstrInfo(); + bool IsRV64 = STI.hasFeature(RISCV::Feature64Bit); + int64_t SlotSize = STI.getXLen() / 8; + BuildMI(MBB, MI, DL, TII->get(IsRV64 ? RISCV::LD : RISCV::LW)).addReg(RAReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); + BuildMI(MBB, MI, DL, TII->get(RISCV::ADDI)).addReg(SCSPReg, RegState::Define).addReg(SCSPReg).addImm(-SlotSize); + while (MBBI != MBB.end() && MBBI->getFlag(MachineInstr::FrameSetup)) { + ++MBBI; + } + MachineFrameInfo &MFI = MF.getFrameInfo(); + uint64_t FrameSize = MFI.getStackSize(); + Align StackAlign = getStackAlign(); + uint64_t MaxCallSize = alignTo(MFI.getMaxCallFrameSize(), StackAlign); + MFI.setMaxCallFrameSize(MaxCallSize); + FrameSize = alignTo(FrameSize, StackAlign); + MFI.setStackSize(FrameSize); + if (int LibCallRegs = getLibCallID(MF, MFI.getCalleeSavedInfo()) + 1) { + unsigned LibCallFrameSize = alignTo((STI.getXLen() / 8) * LibCallRegs, 16); + RVFI->setLibCallStackSize(LibCallFrameSize); + } + uint64_t StackSize = MFI.getStackSize(); + uint64_t RealStackSize = StackSize + RVFI->getLibCallStackSize(); + if (RealStackSize == 0 && !MFI.adjustsStack()) { + return ; + } + if (STI.isRegisterReservedByUser(SPReg)) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Stack pointer required, but has been reserved."}); + } + uint64_t FirstSPAdjustAmount = 0; + const auto *RVFI = MF.getInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + uint64_t StackSize = MFI.getStackSize(); + if (RVFI->getLibCallStackSize()) { + FirstSPAdjustAmount = 0; + } + if (!isInt<12>(StackSize) && (CSI.size() > 0)) { + FirstSPAdjustAmount = 2048 - getStackAlign().value(); + } + if (FirstSPAdjustAmount) { + StackSize = FirstSPAdjustAmount; + RealStackSize = FirstSPAdjustAmount; + } + adjustReg(MBB, MBBI, DL, SPReg, SPReg, -StackSize, MachineInstr::FrameSetup); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, RealStackSize)); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + const auto &CSI = MFI.getCalleeSavedInfo(); + std::advance(MBBI, getNonLibcallCSI(CSI).size()); + for (const auto &Entry : CSI) { + int FrameIdx = Entry.getFrameIdx(); + int64_t Offset; + if (FrameIdx < 0) { + Offset = FrameIdx * (int64_t) STI.getXLen() / 8; + } + else { + Offset = MFI.getObjectOffset(Entry.getFrameIdx()) - RVFI->getLibCallStackSize(); + } + Register Reg = Entry.getReg(); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(nullptr, RI->getDwarfRegNum(Reg, true), Offset)); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + if (hasFP(MF)) { + if (STI.isRegisterReservedByUser(FPReg)) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Frame pointer required, but has been reserved."}); + } + adjustReg(MBB, MBBI, DL, FPReg, SPReg, RealStackSize - RVFI->getVarArgsSaveSize(), MachineInstr::FrameSetup); + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfa(nullptr, RI->getDwarfRegNum(FPReg, true), RVFI->getVarArgsSaveSize())); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + if (FirstSPAdjustAmount) { + uint64_t SecondSPAdjustAmount = MFI.getStackSize() - FirstSPAdjustAmount; + assert(SecondSPAdjustAmount > 0 && "SecondSPAdjustAmount should be greater than zero"); + adjustReg(MBB, MBBI, DL, SPReg, SPReg, -SecondSPAdjustAmount, MachineInstr::FrameSetup); + if (!hasFP(MF)) { + unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, MFI.getStackSize())); + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)).addCFIIndex(CFIIndex); + } + } + if (hasFP(MF)) { + const RISCVRegisterInfo *RI = STI.getRegisterInfo(); + if (RI->needsStackRealignment(MF)) { + Align MaxAlignment = MFI.getMaxAlign(); + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (isInt<12>(-(int)MaxAlignment.value())) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ANDI), SPReg).addReg(SPReg).addImm(-(int)MaxAlignment.value()); + } + else { + unsigned ShiftAmount = Log2(MaxAlignment); + Register VR = MF.getRegInfo().createVirtualRegister(&RISCV::GPRRegClass); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SRLI), VR).addReg(SPReg).addImm(ShiftAmount); + BuildMI(MBB, MBBI, DL, TII->get(RISCV::SLLI), SPReg).addReg(VR).addImm(ShiftAmount); + } + if (hasBP(MF)) { + BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), BPReg).addReg(SPReg).addImm(0); + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08c62666cb52c52383f1b96f43d706c6bca38eb7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp @@ -0,0 +1,67 @@ +StackOffset RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); + const auto *RVFI = MF.getInfo(); + SmallVector NonLibcallCSI; + for (auto &CS : MFI.getCalleeSavedInfo()) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI.push_back(CS); + } + } + const auto &CSI = NonLibcallCSI; + int MinCSFI = 0; + int MaxCSFI = -1; + int Offset = MFI.getObjectOffset(FI) - getOffsetOfLocalArea() + MFI.getOffsetAdjustment(); + uint64_t FirstSPAdjustAmount = 0; + const auto *RVFI = MF.getInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const std::vector &CSI = MFI.getCalleeSavedInfo(); + uint64_t StackSize = MFI.getStackSize(); + if (RVFI->getLibCallStackSize()) { + FirstSPAdjustAmount = 0; + } + if (!isInt<12>(StackSize) && (CSI.size() > 0)) { + FirstSPAdjustAmount = 2048 - getStackAlign().value(); + } + if (CSI.size()) { + MinCSFI = CSI[0].getFrameIdx(); + MaxCSFI = CSI[CSI.size() - 1].getFrameIdx(); + } + if (FI >= MinCSFI && FI <= MaxCSFI) { + FrameReg = RISCV::X2; + if (FirstSPAdjustAmount) { + Offset += FirstSPAdjustAmount; + } + else { + Offset += MFI.getStackSize(); + } + } + else if (RI->needsStackRealignment(MF) && !MFI.isFixedObjectIndex(FI)) { + if (hasBP(MF)) { + FrameReg = RISCVABI::getBPReg(); + } + else { + FrameReg = RISCV::X2; + } + Offset += MFI.getStackSize(); + if (FI < 0) { + Offset += RVFI->getLibCallStackSize(); + } + } + else { + FrameReg = RI->getFrameRegister(MF); + if (hasFP(MF)) { + Offset += RVFI->getVarArgsSaveSize(); + if (FI >= 0) { + Offset -= RVFI->getLibCallStackSize(); + } + } + else { + Offset += MFI.getStackSize(); + if (FI < 0) { + Offset += RVFI->getLibCallStackSize(); + } + } + } + return StackOffset::getFixed(Offset); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasBP.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasBP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5574f49a88f76684df7f258066e46968b3ca683e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasBP.cpp @@ -0,0 +1,5 @@ +bool RISCVFrameLowering::hasBP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); + return MFI.hasVarSizedObjects() && TRI->needsStackRealignment(MF); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52beb3a078d6d11924752420b10316994936a37a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,5 @@ +bool RISCVFrameLowering::hasFP(const MachineFunction &MF) const { + const MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo(); + return MF.getTarget().Options.DisableFramePointerElim(MF) || RegInfo->needsStackRealignment(MF) || MFI.hasVarSizedObjects() || MFI.isFrameAddressTaken(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..33c01431709078493a443b5c20651203bcfb781a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp @@ -0,0 +1,3 @@ +bool RISCVFrameLowering::hasReservedCallFrame(const MachineFunction &MF) const { + return !MF.getFrameInfo().hasVarSizedObjects(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4fd3e4fc864c8feda05e9898c4e705651542721e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,9 @@ +void RISCVFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS) const { + const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + const TargetRegisterClass *RC = &RISCV::GPRRegClass; + if (!isInt<11>(MFI.estimateStackSize(MF))) { + int RegScavFI = MFI.CreateStackObject(RegInfo->getSpillSize(*RC), RegInfo->getSpillAlign(*RC), false); + RS->addScavengingFrameIndex(RegScavFI); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5aad41ddb0dbd296fef38f4f37bb326d9717d4fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,70 @@ +bool RISCVFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef CSI, const TargetRegisterInfo *TRI) const { + if (CSI.empty()) { + return true; + } + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo(); + DebugLoc DL; + if (MI != MBB.end() && !MI->isDebugInstr()) { + DL = MI->getDebugLoc(); + } + SmallVector NonLibcallCSI2; + for (auto &CS : CSI) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI2.push_back(CS); + } + } + const auto &NonLibcallCSI = NonLibcallCSI2; + for (auto &CS : reverse(NonLibcallCSI)) { + Register Reg = CS.getReg(); + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.loadRegFromStackSlot(MBB, MI, Reg, CS.getFrameIdx(), RC, TRI); + assert(MI != MBB.begin() && "loadRegFromStackSlot didn't insert any code!"); + } + const char *RestoreLibCall; + static const char *const RestoreLibCalls[] = {"__riscv_restore_0", "__riscv_restore_1", "__riscv_restore_2", "__riscv_restore_3", "__riscv_restore_4", "__riscv_restore_5", "__riscv_restore_6", "__riscv_restore_7", "__riscv_restore_8", "__riscv_restore_9", "__riscv_restore_10", "__riscv_restore_11", "__riscv_restore_12"}; + int LibCallID; + const auto *RVFI = MF.getInfo(); + if (CSI.empty() || !RVFI->useSaveRestoreLibCalls(MF)) { + LibCallID = -1; + } + Register MaxReg = RISCV::NoRegister; + for (auto &CS : CSI) { + if (CS.getFrameIdx() < 0) { + MaxReg = std::max(MaxReg.id(), CS.getReg().id()); + } + } + if (MaxReg == RISCV::NoRegister) { + LibCallID = -1; + } + switch (MaxReg) { + default: + llvm_unreachable("Something has gone wrong!"); + case RISCV::X27: LibCallID = 12; + case RISCV::X26: LibCallID = 11; + case RISCV::X25: LibCallID = 10; + case RISCV::X24: LibCallID = 9; + case RISCV::X23: LibCallID = 8; + case RISCV::X22: LibCallID = 7; + case RISCV::X21: LibCallID = 6; + case RISCV::X20: LibCallID = 5; + case RISCV::X19: LibCallID = 4; + case RISCV::X18: LibCallID = 3; + case RISCV::X9: LibCallID = 2; + case RISCV::X8: LibCallID = 1; + case RISCV::X1: LibCallID = 0; + } + if (LibCallID == -1) { + RestoreLibCall = nullptr; + } + RestoreLibCall = RestoreLibCalls[LibCallID]; + const char *RestoreLibCall = getRestoreLibCallName(*MF, CSI); + if (RestoreLibCall) { + MachineBasicBlock::iterator NewMI = BuildMI(MBB, MI, DL, TII.get(RISCV::PseudoTAIL)).addExternalSymbol(RestoreLibCall, RISCVII::MO_CALL).setMIFlag(MachineInstr::FrameDestroy); + if (MI != MBB.end() && MI->getOpcode() == RISCV::PseudoRET) { + NewMI->copyImplicitOps(*MF, *MI); + MI->eraseFromParent(); + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7344391a22670e42b028c4323e619b6fe220c4cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,67 @@ +bool RISCVFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef CSI, const TargetRegisterInfo *TRI) const { + if (CSI.empty()) { + return true; + } + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo(); + DebugLoc DL; + if (MI != MBB.end() && !MI->isDebugInstr()) { + DL = MI->getDebugLoc(); + } + const char *SpillLibCall; + static const char *const SpillLibCalls[] = {"__riscv_save_0", "__riscv_save_1", "__riscv_save_2", "__riscv_save_3", "__riscv_save_4", "__riscv_save_5", "__riscv_save_6", "__riscv_save_7", "__riscv_save_8", "__riscv_save_9", "__riscv_save_10", "__riscv_save_11", "__riscv_save_12"}; + int LibCallID; + const auto *RVFI = MF.getInfo(); + if (CSI.empty() || !RVFI->useSaveRestoreLibCalls(MF)) { + LibCallID = -1; + } + Register MaxReg = RISCV::NoRegister; + for (auto &CS : CSI) { + if (CS.getFrameIdx() < 0) { + MaxReg = std::max(MaxReg.id(), CS.getReg().id()); + } + } + if (MaxReg == RISCV::NoRegister) { + LibCallID = -1; + } + switch (MaxReg) { + default: + llvm_unreachable("Something has gone wrong!"); + case RISCV::X27: LibCallID = 12; + case RISCV::X26: LibCallID = 11; + case RISCV::X25: LibCallID = 10; + case RISCV::X24: LibCallID = 9; + case RISCV::X23: LibCallID = 8; + case RISCV::X22: LibCallID = 7; + case RISCV::X21: LibCallID = 6; + case RISCV::X20: LibCallID = 5; + case RISCV::X19: LibCallID = 4; + case RISCV::X18: LibCallID = 3; + case RISCV::X9: LibCallID = 2; + case RISCV::X8: LibCallID = 1; + case RISCV::X1: LibCallID = 0; + } + if (LibCallID == -1) { + SpillLibCall = nullptr; + } + SpillLibCall = SpillLibCalls[LibCallID]; + if (SpillLibCall) { + BuildMI(MBB, MI, DL, TII.get(RISCV::PseudoCALLReg), RISCV::X5).addExternalSymbol(SpillLibCall, RISCVII::MO_CALL).setMIFlag(MachineInstr::FrameSetup); + for (auto &CS : CSI) { + MBB.addLiveIn(CS.getReg()); + } + } + SmallVector NonLibcallCSI2; + for (auto &CS : CSI) { + if (CS.getFrameIdx() >= 0) { + NonLibcallCSI2.push_back(CS); + } + } + const auto &NonLibcallCSI = NonLibcallCSI2; + for (auto &CS : NonLibcallCSI) { + Register Reg = CS.getReg(); + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.storeRegToStackSlot(MBB, MI, Reg, true, CS.getFrameIdx(), RC, TRI); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71b402e1f73281139075f655ca142ba3f6cd7f6c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +explicit RISCVDAGToDAGISel(RISCVTargetMachine &TargetMachine) : SelectionDAGISel(TargetMachine) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9823b1da0db069cc49a64e482ac6c5d70e2b57fe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp @@ -0,0 +1,14 @@ +bool RISCVDAGToDAGISel::MatchSLLIUW(SDNode *N) const { + assert(N->getOpcode() == ISD::AND); + assert(N->getOperand(0).getOpcode() == ISD::SHL); + assert(isa(N->getOperand(1))); + assert(isa(N->getOperand(0).getOperand(1))); + if (!Subtarget->is64Bit()) { + return false; + } + SDValue Shl = N->getOperand(0); + uint64_t VC1 = N->getConstantOperandVal(1); + uint64_t VC2 = Shl.getConstantOperandVal(1); + assert(VC2 < 32 && "Unexpected immediate"); + return (VC1 >> VC2) == UINT64_C(0xFFFFFFFF); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4097aa333f59f157602a32e2c6261d1d073f1398 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp @@ -0,0 +1,13 @@ +bool RISCVDAGToDAGISel::MatchSRLIUW(SDNode *N) const { + assert(N->getOpcode() == ISD::SRL); + assert(N->getOperand(0).getOpcode() == ISD::AND); + assert(isa(N->getOperand(1))); + assert(isa(N->getOperand(0).getOperand(1))); + if (!Subtarget->is64Bit()) { + return false; + } + SDValue And = N->getOperand(0); + uint64_t ShAmt = N->getConstantOperandVal(1); + uint64_t Mask = And.getConstantOperandVal(1); + return (Mask | maskTrailingOnes(ShAmt)) == 0xffffffff; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6328e8bc19e4b307aa8cec3d75d5573277b5e72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp @@ -0,0 +1,83 @@ +void RISCVDAGToDAGISel::PostprocessISelDAG() { + SelectionDAG::allnodes_iterator Position(CurDAG->getRoot().getNode()); + ++Position; + while (Position != CurDAG->allnodes_begin()) { + SDNode *N = &*--Position; + if (N->use_empty() || !N->isMachineOpcode()) + continue; + int OffsetOpIdx; + int BaseOpIdx; + switch (N->getMachineOpcode()) { + default: + continue; + case RISCV::LB: + case RISCV::LH: + case RISCV::LW: + case RISCV::LBU: + case RISCV::LHU: + case RISCV::LWU: + case RISCV::LD: + case RISCV::FLH: + case RISCV::FLW: + case RISCV::FLD: + BaseOpIdx = 0; + OffsetOpIdx = 1; + break; + case RISCV::SB: + case RISCV::SH: + case RISCV::SW: + case RISCV::SD: + case RISCV::FSH: + case RISCV::FSW: + case RISCV::FSD: + BaseOpIdx = 1; + OffsetOpIdx = 2; + break; + } + if (!isa(N->getOperand(OffsetOpIdx))) + continue; + SDValue Base = N->getOperand(BaseOpIdx); + if (!Base.isMachineOpcode() || Base.getMachineOpcode() != RISCV::ADDI) + continue; + SDValue ImmOperand = Base.getOperand(1); + uint64_t Offset2 = N->getConstantOperandVal(OffsetOpIdx); + if (auto Const = dyn_cast(ImmOperand)) { + int64_t Offset1 = Const->getSExtValue(); + int64_t CombinedOffset = Offset1 + Offset2; + if (!isInt<12>(CombinedOffset)) + continue; + ImmOperand = CurDAG->getTargetConstant(CombinedOffset, SDLoc(ImmOperand), ImmOperand.getValueType()); + } + else if (auto GA = dyn_cast(ImmOperand)) { + const DataLayout &DL = CurDAG->getDataLayout(); + Align Alignment = GA->getGlobal()->getPointerAlignment(DL); + if (Offset2 != 0 && Alignment <= Offset2) + continue; + int64_t Offset1 = GA->getOffset(); + int64_t CombinedOffset = Offset1 + Offset2; + ImmOperand = CurDAG->getTargetGlobalAddress(GA->getGlobal(), SDLoc(ImmOperand), ImmOperand.getValueType(), CombinedOffset, GA->getTargetFlags()); + } + else if (auto CP = dyn_cast(ImmOperand)) { + Align Alignment = CP->getAlign(); + if (Offset2 != 0 && Alignment <= Offset2) + continue; + int64_t Offset1 = CP->getOffset(); + int64_t CombinedOffset = Offset1 + Offset2; + ImmOperand = CurDAG->getTargetConstantPool(CP->getConstVal(), ImmOperand.getValueType(), CP->getAlign(), CombinedOffset, CP->getTargetFlags()); + } + else { + continue; + } + LLVM_DEBUG(dbgs() << "Folding add-immediate into mem-op:\nBase: "); + LLVM_DEBUG(Base->dump(CurDAG)); + LLVM_DEBUG(dbgs() << "\nN: "); + LLVM_DEBUG(N->dump(CurDAG)); + LLVM_DEBUG(dbgs() << "\n"); + if (BaseOpIdx == 0) + CurDAG->UpdateNodeOperands(N, Base.getOperand(0), ImmOperand, N->getOperand(2)); + else + CurDAG->UpdateNodeOperands(N, N->getOperand(0), Base.getOperand(0), ImmOperand, N->getOperand(3)); + if (Base.getNode()->use_empty()) + CurDAG->RemoveDeadNode(Base.getNode()); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a7775f229ef2daf901972a36677bc646ce468e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1,689 @@ +void RISCVDAGToDAGISel::Select(SDNode *Node) { + if (Node->isMachineOpcode()) { + LLVM_DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << "\n"); + Node->setNodeId(-1); + return; + } + unsigned Opcode = Node->getOpcode(); + MVT XLenVT = Subtarget->getXLenVT(); + SDLoc DL(Node); + EVT VT = Node->getValueType(0); + switch (Opcode) { + case ISD::ADD: { + if (auto *ConstOp = dyn_cast(Node->getOperand(1))) { + if (!(ConstOp->hasOneUse())) { + break; + } + int64_t Imm = ConstOp->getSExtValue(); + if (!(-4096 <= Imm && Imm <= -2049) && !(2048 <= Imm && Imm <= 4094)) { + break; + } + EVT VT = Node->getValueType(0); + const SDValue ImmOp0 = CurDAG->getTargetConstant(Imm - Imm / 2, DL, VT); + const SDValue ImmOp1 = CurDAG->getTargetConstant(Imm / 2, DL, VT); + auto *NodeAddi0 = CurDAG->getMachineNode(RISCV::ADDI, DL, VT, + Node->getOperand(0), ImmOp0); + auto *NodeAddi1 = CurDAG->getMachineNode(RISCV::ADDI, DL, VT, + SDValue(NodeAddi0, 0), ImmOp1); + ReplaceNode(Node, NodeAddi1); + return; + } + break; + } + case ISD::Constant: { + auto ConstNode = cast(Node); + if (VT == XLenVT && ConstNode->isNullValue()) { + SDValue New = CurDAG->getCopyFromReg(CurDAG->getEntryNode(), DL, RISCV::X0, XLenVT); + ReplaceNode(Node, New.getNode()); + return; + } + int64_t Imm = ConstNode->getSExtValue(); + if (XLenVT == MVT::i64) { + ReplaceNode(Node, selectImm(CurDAG, DL, Imm, XLenVT)); + return; + } + break; + } + case ISD::FrameIndex: { + SDValue Imm = CurDAG->getTargetConstant(0, DL, XLenVT); + int FI = cast(Node)->getIndex(); + SDValue TFI = CurDAG->getTargetFrameIndex(FI, VT); + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::ADDI, DL, VT, TFI, Imm)); + return; + } + case ISD::INTRINSIC_W_CHAIN: { + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + switch (IntNo) { + default: + break; + case Intrinsic::riscv_vsetvli: { + if (!Subtarget->hasStdExtV()) { + break; + } + assert(Node->getNumOperands() == 5); + RISCVVSEW VSEW = static_cast(Node->getConstantOperandVal(3) & 0x7); + RISCVVLMUL VLMul = static_cast(Node->getConstantOperandVal(4) & 0x7); + unsigned VTypeI = RISCVVType::encodeVTYPE(VLMul, VSEW, true, false); + SDValue VTypeIOp = CurDAG->getTargetConstant(VTypeI, DL, XLenVT); + SDValue VLOperand = Node->getOperand(2); + if (auto *C = dyn_cast(VLOperand)) { + uint64_t AVL = C->getZExtValue(); + if (isUInt<5>(AVL)) { + SDValue VLImm = CurDAG->getTargetConstant(AVL, DL, XLenVT); + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETIVLI, DL, XLenVT, MVT::Other, VLImm, VTypeIOp, Node->getOperand(0))); + return; + } + } + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETVLI, DL, XLenVT, MVT::Other, VLOperand, VTypeIOp, Node->getOperand(0))); + return; + } + case Intrinsic::riscv_vsetvlimax: { + if (!Subtarget->hasStdExtV()) { + break; + } + assert(Node->getNumOperands() == 4); + RISCVVSEW VSEW = static_cast(Node->getConstantOperandVal(2) & 0x7); + RISCVVLMUL VLMul = static_cast(Node->getConstantOperandVal(3) & 0x7); + unsigned VTypeI = RISCVVType::encodeVTYPE(VLMul, VSEW, true, false); + SDValue VTypeIOp = CurDAG->getTargetConstant(VTypeI, DL, XLenVT); + SDValue VLOperand = CurDAG->getRegister(RISCV::X0, XLenVT); + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETVLI, DL, XLenVT, MVT::Other, VLOperand, VTypeIOp, Node->getOperand(0))); + return; + } + case Intrinsic::riscv_vlseg2: + case Intrinsic::riscv_vlseg3: + case Intrinsic::riscv_vlseg4: + case Intrinsic::riscv_vlseg5: + case Intrinsic::riscv_vlseg6: + case Intrinsic::riscv_vlseg7: + case Intrinsic::riscv_vlseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Operands; + Operands.push_back(Node->getOperand(2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3)); + Operands.push_back(Node->getOperand(4)); + } + else { + Operands.push_back(Node->getOperand(3)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vlseg2_mask: + case Intrinsic::riscv_vlseg3_mask: + case Intrinsic::riscv_vlseg4_mask: + case Intrinsic::riscv_vlseg5_mask: + case Intrinsic::riscv_vlseg6_mask: + case Intrinsic::riscv_vlseg7_mask: + case Intrinsic::riscv_vlseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(MaskedOff); + Operands.push_back(Node->getOperand(NF + 2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + Operands.push_back(Node->getOperand(NF + 5)); + } else { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vlsseg2: + case Intrinsic::riscv_vlsseg3: + case Intrinsic::riscv_vlsseg4: + case Intrinsic::riscv_vlsseg5: + case Intrinsic::riscv_vlsseg6: + case Intrinsic::riscv_vlsseg7: + case Intrinsic::riscv_vlsseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Operands; + Operands.push_back(Node->getOperand(2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3)); + Operands.push_back(Node->getOperand(4)); + } + else { + Operands.push_back(Node->getOperand(3)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vlsseg2_mask: + case Intrinsic::riscv_vlsseg3_mask: + case Intrinsic::riscv_vlsseg4_mask: + case Intrinsic::riscv_vlsseg5_mask: + case Intrinsic::riscv_vlsseg6_mask: + case Intrinsic::riscv_vlsseg7_mask: + case Intrinsic::riscv_vlsseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(MaskedOff); + Operands.push_back(Node->getOperand(NF + 2)); + if (IsStrided) { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + Operands.push_back(Node->getOperand(NF + 5)); + } + else { + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vloxseg2: + case Intrinsic::riscv_vloxseg3: + case Intrinsic::riscv_vloxseg4: + case Intrinsic::riscv_vloxseg5: + case Intrinsic::riscv_vloxseg6: + case Intrinsic::riscv_vloxseg7: + case Intrinsic::riscv_vloxseg8: + case Intrinsic::riscv_vluxseg2: + case Intrinsic::riscv_vluxseg3: + case Intrinsic::riscv_vluxseg4: + case Intrinsic::riscv_vluxseg5: + case Intrinsic::riscv_vluxseg6: + case Intrinsic::riscv_vluxseg7: + case Intrinsic::riscv_vluxseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SDValue Operands[] = { + Node->getOperand(2), + Node->getOperand(3), + Node->getOperand(4), + SEW, Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(3)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL,VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + case Intrinsic::riscv_vloxseg2_mask: + case Intrinsic::riscv_vloxseg3_mask: + case Intrinsic::riscv_vloxseg4_mask: + case Intrinsic::riscv_vloxseg5_mask: + case Intrinsic::riscv_vloxseg6_mask: + case Intrinsic::riscv_vloxseg7_mask: + case Intrinsic::riscv_vloxseg8_mask: + case Intrinsic::riscv_vluxseg2_mask: + case Intrinsic::riscv_vluxseg3_mask: + case Intrinsic::riscv_vluxseg4_mask: + case Intrinsic::riscv_vluxseg5_mask: + case Intrinsic::riscv_vluxseg6_mask: + case Intrinsic::riscv_vluxseg7_mask: + case Intrinsic::riscv_vluxseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumValues() - 1; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SDValue Operands[] = { + MaskedOff, + Node->getOperand(NF + 2), + Node->getOperand(NF + 3), + Node->getOperand(NF + 4), + Node->getOperand(NF + 5), + SEW, + Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(NF + 3)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + CurDAG->RemoveDeadNode(Node); + return; + } + } + break; + } + case ISD::INTRINSIC_VOID: { + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + switch (IntNo) { + case Intrinsic::riscv_vsseg2: + case Intrinsic::riscv_vsseg3: + case Intrinsic::riscv_vsseg4: + case Intrinsic::riscv_vsseg5: + case Intrinsic::riscv_vsseg6: + case Intrinsic::riscv_vsseg7: + case Intrinsic::riscv_vsseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 4; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vsseg2_mask: + case Intrinsic::riscv_vsseg3_mask: + case Intrinsic::riscv_vsseg4_mask: + case Intrinsic::riscv_vsseg5_mask: + case Intrinsic::riscv_vsseg6_mask: + case Intrinsic::riscv_vsseg7_mask: + case Intrinsic::riscv_vsseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 5; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + Operands.push_back(Node->getOperand(5 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vssseg2: + case Intrinsic::riscv_vssseg3: + case Intrinsic::riscv_vssseg4: + case Intrinsic::riscv_vssseg5: + case Intrinsic::riscv_vssseg6: + case Intrinsic::riscv_vssseg7: + case Intrinsic::riscv_vssseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 4; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vssseg2_mask: + case Intrinsic::riscv_vssseg3_mask: + case Intrinsic::riscv_vssseg4_mask: + case Intrinsic::riscv_vssseg5_mask: + case Intrinsic::riscv_vssseg6_mask: + case Intrinsic::riscv_vssseg7_mask: + case Intrinsic::riscv_vssseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 5; + if (IsStrided) + NF--; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(StoreVal); + Operands.push_back(Node->getOperand(2 + NF)); + if (IsStrided) { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + Operands.push_back(Node->getOperand(5 + NF)); + } + else { + Operands.push_back(Node->getOperand(3 + NF)); + Operands.push_back(Node->getOperand(4 + NF)); + } + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vsoxseg2: + case Intrinsic::riscv_vsoxseg3: + case Intrinsic::riscv_vsoxseg4: + case Intrinsic::riscv_vsoxseg5: + case Intrinsic::riscv_vsoxseg6: + case Intrinsic::riscv_vsoxseg7: + case Intrinsic::riscv_vsoxseg8: + case Intrinsic::riscv_vsuxseg2: + case Intrinsic::riscv_vsuxseg3: + case Intrinsic::riscv_vsuxseg4: + case Intrinsic::riscv_vsuxseg5: + case Intrinsic::riscv_vsuxseg6: + case Intrinsic::riscv_vsuxseg7: + case Intrinsic::riscv_vsuxseg8: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 5; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SDValue Operands[] = { + StoreVal, + Node->getOperand(2 + NF), + Node->getOperand(3 + NF), + Node->getOperand(4 + NF), + SEW, + Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(3 + NF)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + case Intrinsic::riscv_vsoxseg2_mask: + case Intrinsic::riscv_vsoxseg3_mask: + case Intrinsic::riscv_vsoxseg4_mask: + case Intrinsic::riscv_vsoxseg5_mask: + case Intrinsic::riscv_vsoxseg6_mask: + case Intrinsic::riscv_vsoxseg7_mask: + case Intrinsic::riscv_vsoxseg8_mask: + case Intrinsic::riscv_vsuxseg2_mask: + case Intrinsic::riscv_vsuxseg3_mask: + case Intrinsic::riscv_vsuxseg4_mask: + case Intrinsic::riscv_vsuxseg5_mask: + case Intrinsic::riscv_vsuxseg6_mask: + case Intrinsic::riscv_vsuxseg7_mask: + case Intrinsic::riscv_vsuxseg8_mask: { + SDLoc DL(Node); + unsigned NF = Node->getNumOperands() - 6; + EVT VT = Node->getOperand(2)->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue StoreVal = createTuple(*CurDAG, Regs, NF, LMUL); + SDValue Operands[] = { + StoreVal, + Node->getOperand(2 + NF), + Node->getOperand(3 + NF), + Node->getOperand(4 + NF), + Node->getOperand(5 + NF), + SEW, + Node->getOperand(0) + }; + EVT IndexVT = Node->getOperand(3 + NF)->getValueType(0); + RISCVVLMUL IndexLMUL = getLMUL(IndexVT); + unsigned IndexScalarSize = IndexVT.getScalarSizeInBits(); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, IndexScalarSize, static_cast(LMUL), static_cast(IndexLMUL)); + SDNode *Store = CurDAG->getMachineNode(P->Pseudo, DL, Node->getValueType(0), Operands); + ReplaceNode(Node, Store); + return; + } + } + break; + } + case RISCVISD::VLSEGFF: { + SDLoc DL(Node); + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + unsigned NF = Node->getNumValues() - 2; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Operands; + Operands.push_back(Node->getOperand(2)); + Operands.push_back(Node->getOperand(3)); + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, MVT::Glue, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); + ReplaceUses(SDValue(Node, NF + 1), SDValue(Load, 2)); + CurDAG->RemoveDeadNode(Node); + return; + } + case RISCVISD::VLSEGFF_MASK: { + SDLoc DL(Node); + unsigned IntNo = cast(Node->getOperand(1))->getZExtValue(); + unsigned NF = Node->getNumValues() - 2; + EVT VT = Node->getValueType(0); + unsigned ScalarSize = VT.getScalarSizeInBits(); + MVT XLenVT = Subtarget->getXLenVT(); + RISCVVLMUL LMUL = getLMUL(VT); + SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT); + SmallVector Regs(Node->op_begin() + 2, Node->op_begin() + 2 + NF); + SDValue MaskedOff = createTuple(*CurDAG, Regs, NF, LMUL); + SmallVector Operands; + Operands.push_back(MaskedOff); + Operands.push_back(Node->getOperand(NF + 2)); + Operands.push_back(Node->getOperand(NF + 3)); + Operands.push_back(Node->getOperand(NF + 4)); + Operands.push_back(SEW); + Operands.push_back(Node->getOperand(0)); + const RISCVZvlssegTable::RISCVZvlsseg *P = RISCVZvlssegTable::getPseudo(IntNo, ScalarSize, static_cast(LMUL), static_cast(RISCVVLMUL::LMUL_1)); + SDNode *Load = CurDAG->getMachineNode(P->Pseudo, DL, MVT::Untyped, MVT::Other, MVT::Glue, Operands); + SDValue SuperReg = SDValue(Load, 0); + for (unsigned I = 0; I < NF; ++I) + ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(getSubregIndexByEVT(VT, I), DL, VT, SuperReg)); + ReplaceUses(SDValue(Node, NF), SDValue(Load, 1)); // Chain. + ReplaceUses(SDValue(Node, NF + 1), SDValue(Load, 2)); // Glue. + CurDAG->RemoveDeadNode(Node); + return; + } + case ISD::LOAD: { + LoadSDNode *Load = cast(Node); + if (Load->getAddressingMode() == ISD::UNINDEXED) + break; + SDValue Chain = Node->getOperand(0); + SDValue Base = Node->getOperand(1); + SDValue Offset = Node->getOperand(2); + bool simm12 = false; + bool signExtend = Load->getExtensionType() == ISD::SEXTLOAD; + if(auto ConstantOffset = dyn_cast(Offset)) { + int ConstantVal = ConstantOffset->getSExtValue(); + simm12 = isInt<12>(ConstantVal); + if (simm12) + Offset = CurDAG->getTargetConstant(ConstantVal, DL, Offset.getValueType()); + } + unsigned Opcode = 0; + switch (Load->getMemoryVT().getSimpleVT().SimpleTy) { + case MVT::i8: + if ( simm12 && signExtend) Opcode = RISCV::P_LB_ri_PostIncrement; + else if ( simm12 && !signExtend) Opcode = RISCV::P_LBU_ri_PostIncrement; + else if (!simm12 && signExtend) Opcode = RISCV::P_LB_rr_PostIncrement; + else Opcode = RISCV::P_LBU_rr_PostIncrement; + break; + case MVT::i16: + if ( simm12 && signExtend) Opcode = RISCV::P_LH_ri_PostIncrement; + else if ( simm12 && !signExtend) Opcode = RISCV::P_LHU_ri_PostIncrement; + else if (!simm12 && signExtend) Opcode = RISCV::P_LH_rr_PostIncrement; + else Opcode = RISCV::P_LHU_rr_PostIncrement; + break; + case MVT::i32: + if (simm12) Opcode = RISCV::P_LW_ri_PostIncrement; + else Opcode = RISCV::P_LW_rr_PostIncrement; + default: break; + } + if (!Opcode) break; + ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, MVT::i32, MVT::i32, Chain.getSimpleValueType(), Base, Offset, Chain)); + return; + } + case ISD::VECTOR_SHUFFLE: { + ShuffleVectorSDNode *Shuffle = cast(Node); + SDValue Vec0 = Shuffle->getOperand(0); + SDValue Vec1 = Shuffle->getOperand(1); + unsigned Opcode; + int imm; + if (Vec1->getOpcode() == ISD::UNDEF) { + if (VT == MVT::v2i16) { + Opcode = RISCV::PV_SHUFFLE_SCI_H; + imm = (Shuffle->getMaskElt(1) & 1) << 1; + imm |= Shuffle->getMaskElt(0) & 1; + } + else { + switch (Shuffle->getMaskElt(3)) { + default: + case 0: Opcode = RISCV::PV_SHUFFLEI0_SCI_B; break; + case 1: Opcode = RISCV::PV_SHUFFLEI1_SCI_B; break; + case 2: Opcode = RISCV::PV_SHUFFLEI2_SCI_B; break; + case 3: Opcode = RISCV::PV_SHUFFLEI3_SCI_B; break; + } + imm = (Shuffle->getMaskElt(2) & 3) << 4; + imm |= (Shuffle->getMaskElt(1) & 3) << 2; + imm |= Shuffle->getMaskElt(0) & 3; + } + SDValue Imm = CurDAG->getTargetConstant(imm, SDLoc(Node), MVT::i32); + ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, VT, Vec0, Imm)); + return; + } + if (VT == MVT::v2i16) { + Opcode = RISCV::PV_SHUFFLE2_H; + imm = (Shuffle->getMaskElt(1) & 1) << 16; + imm |= Shuffle->getMaskElt(0) & 1; + } + else { + Opcode = RISCV::PV_SHUFFLE2_B; + imm = (Shuffle->getMaskElt(3) & 3) << 24; + imm |= (Shuffle->getMaskElt(2) & 3) << 16; + imm |= (Shuffle->getMaskElt(1) & 3) << 8; + imm |= Shuffle->getMaskElt(0) & 3; + } + SDValue Imm = SDValue(selectImm(CurDAG, DL, imm, MVT::i32), 0); + ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, VT, Vec0, Vec1, Imm)); + return; + } + } + SelectCode(Node); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9379dd240442854fd152c1a8fed8a2b885473a0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp @@ -0,0 +1,7 @@ +bool RISCVDAGToDAGISel::SelectAddrFI(SDValue Addr, SDValue &Base) { + if (auto FIN = dyn_cast(Addr)) { + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), Subtarget->getXLenVT()); + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..165beb5cae4ca44de1b3b5882179fb69421c957b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,13 @@ +bool RISCVDAGToDAGISel::SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, std::vector &OutOps) { + switch (ConstraintID) { + case InlineAsm::Constraint_m: + OutOps.push_back(Op); + return false; + case InlineAsm::Constraint_A: + OutOps.push_back(Op); + return false; + default: + break; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6275786f621741ef641c1c9653dfc8c1c5fb094 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createRISCVISelDag(RISCVTargetMachine &TM) { + return new RISCVDAGToDAGISel(TM); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b96cb682522bb4d42ce3557a54892030e1538f48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName() const override { + return "RISCV DAG->DAG Pattern Instruction Selection"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5777ae33b7d6e056d8705bec6b95c6237351d2ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp @@ -0,0 +1,4 @@ +bool runOnMachineFunction(MachineFunction &MF) override { + Subtarget = &MF.getSubtarget(); + return SelectionDAGISel::runOnMachineFunction(MF); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..02f2a0b029e45085011587a91e97581811fcfce9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp @@ -0,0 +1,22 @@ +bool RISCVDAGToDAGISel::selectVLOp(SDValue N, SDValue &VL) { + auto *C = dyn_cast(N); + if (C && C->isNullValue()) { + RISCVMatInt::InstSeq Seq; + RISCVMatInt::generateInstSeq(Imm, XLenVT == MVT::i64, Seq); + SDNode *Result = nullptr; + SDValue SrcReg = CurDAG->getRegister(RISCV::X0, XLenVT); + for (RISCVMatInt::Inst &Inst : Seq) { + SDValue SDImm = CurDAG->getTargetConstant(Inst.Imm, DL, XLenVT); + if (Inst.Opc == RISCV::LUI) + Result = CurDAG->getMachineNode(RISCV::LUI, DL, XLenVT, SDImm); + else + Result = CurDAG->getMachineNode(Inst.Opc, DL, XLenVT, SrcReg, SDImm); + SrcReg = SDValue(Result, 0); + } + VL = SDValue(selectImm(CurDAG, SDLoc(N), 0, Subtarget->getXLenVT()), 0); + } + else { + VL = N; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..500365156eb27b9ec53e3c54d7bd31402e02bb80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp @@ -0,0 +1,7 @@ +bool RISCVDAGToDAGISel::selectVSplat(SDValue N, SDValue &SplatVal) { + if (N.getOpcode() != ISD::SPLAT_VECTOR && N.getOpcode() != RISCVISD::SPLAT_VECTOR_I64) { + return false; + } + SplatVal = N.getOperand(0); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f19416c4249c3fa0ba66fedcff7a3e7eb734fdb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp @@ -0,0 +1,17 @@ +bool RISCVDAGToDAGISel::selectVSplatSimm5(SDValue N, SDValue &SplatVal) { + if ((N.getOpcode() != ISD::SPLAT_VECTOR && N.getOpcode() != RISCVISD::SPLAT_VECTOR_I64) || !isa(N.getOperand(0))) { + return false; + } + int64_t SplatImm = cast(N.getOperand(0))->getSExtValue(); + auto XLenVT = Subtarget->getXLenVT(); + assert(XLenVT == N.getOperand(0).getSimpleValueType() && "Unexpected splat operand type"); + auto EltVT = N.getValueType().getVectorElementType(); + if (EltVT.bitsLT(XLenVT)) { + SplatImm = SignExtend64(SplatImm, EltVT.getSizeInBits()); + } + if (!isInt<5>(SplatImm)) { + return false; + } + SplatVal = CurDAG->getTargetConstant(SplatImm, SDLoc(N), XLenVT); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdff0c6f5dc1586897ad9c7787e6a82ee582e996 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp @@ -0,0 +1,11 @@ +bool RISCVDAGToDAGISel::selectVSplatUimm5(SDValue N, SDValue &SplatVal) { + if ((N.getOpcode() != ISD::SPLAT_VECTOR && N.getOpcode() != RISCVISD::SPLAT_VECTOR_I64) || !isa(N.getOperand(0))) { + return false; + } + int64_t SplatImm = cast(N.getOperand(0))->getSExtValue(); + if (!isUInt<5>(SplatImm)) { + return false; + } + SplatVal = CurDAG->getTargetConstant(SplatImm, SDLoc(N), Subtarget->getXLenVT()); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..313f69ae69dddca02aef0b43936b47304afc7ae2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,171 @@ +bool RISCVTargetLowering::CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg, const SmallVectorImpl &Outs, LLVMContext &Context) const { + SmallVector RVLocs; + CCState CCInfo(CallConv, IsVarArg, MF, RVLocs, Context); + Optional FirstMaskArgument; + if (Subtarget.hasStdExtV()) { + for (const auto &ArgIdx : enumerate(Args)) { + MVT ArgVT = ArgIdx.value().VT; + if (ArgVT.isScalableVector() && ArgVT.getVectorElementType().SimpleTy == MVT::i1) + return ArgIdx.index(); + } + return None; + } + for (unsigned i = 0, e = Outs.size(); i != e; ++i) { + MVT VT = Outs[i].VT; + ISD::ArgFlagsTy ArgFlags = Outs[i].Flags; + RISCVABI::ABI ABI = MF.getSubtarget().getTargetABI(); + unsigned XLen = DL.getLargestLegalIntTypeSizeInBits(); + assert(XLen == 32 || XLen == 64); + MVT XLenVT = XLen == 32 ? MVT::i32 : MVT::i64; + if (IsRet && ValNo > 1) + return true; + bool UseGPRForF16_F32 = true; + bool UseGPRForF64 = true; + switch (ABI) { + default: + llvm_unreachable("Unexpected ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + break; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + UseGPRForF16_F32 = !IsFixed; + break; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + UseGPRForF16_F32 = !IsFixed; + UseGPRForF64 = !IsFixed; + break; + } + if (State.getFirstUnallocated(ArgFPR32s) == array_lengthof(ArgFPR32s)) { + UseGPRForF16_F32 = true; + UseGPRForF64 = true; + } + if (UseGPRForF16_F32 && (ValVT == MVT::f16 || ValVT == MVT::f32)) { + LocVT = XLenVT; + LocInfo = CCValAssign::BCvt; + } + else if (UseGPRForF64 && XLen == 64 && ValVT == MVT::f64) { + LocVT = MVT::i64; + LocInfo = CCValAssign::BCvt; + } + unsigned TwoXLenInBytes = (2 * XLen) / 8; + if (!IsFixed && ArgFlags.getNonZeroOrigAlign() == TwoXLenInBytes && DL.getTypeAllocSize(OrigTy) == TwoXLenInBytes) { + unsigned RegIdx = State.getFirstUnallocated(ArgGPRs); + if (RegIdx != array_lengthof(ArgGPRs) && RegIdx % 2 == 1) + State.AllocateReg(ArgGPRs); + } + SmallVectorImpl &PendingLocs = State.getPendingLocs(); + SmallVectorImpl &PendingArgFlags = State.getPendingArgFlags(); + assert(PendingLocs.size() == PendingArgFlags.size() && "PendingLocs and PendingArgFlags out of sync"); + if (UseGPRForF64 && XLen == 32 && ValVT == MVT::f64) { + assert(!ArgFlags.isSplit() && PendingLocs.empty() && "Can't lower f64 if it is split"); + Register Reg = State.AllocateReg(ArgGPRs); + LocVT = MVT::i32; + if (!Reg) { + unsigned StackOffset = State.AllocateStack(8, Align(8)); + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + if (!State.AllocateReg(ArgGPRs)) + State.AllocateStack(4, Align(4)); + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ArgFlags.isSplit() || !PendingLocs.empty()) { + LocVT = XLenVT; + LocInfo = CCValAssign::Indirect; + PendingLocs.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); + PendingArgFlags.push_back(ArgFlags); + if (!ArgFlags.isSplitEnd()) { + return false; + } + } + if (ArgFlags.isSplitEnd() && PendingLocs.size() <= 2) { + assert(PendingLocs.size() == 2 && "Unexpected PendingLocs.size()"); + CCValAssign VA = PendingLocs[0]; + ISD::ArgFlagsTy AF = PendingArgFlags[0]; + PendingLocs.clear(); + PendingArgFlags.clear(); + unsigned XLenInBytes = XLen / 8; + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(VA1.getValNo(), VA1.getValVT(), Reg, VA1.getLocVT(), CCValAssign::Full)); + } else { + Align StackAlign = std::max(Align(XLenInBytes), ArgFlags1.getNonZeroOrigAlign()); + State.addLoc(CCValAssign::getMem(VA1.getValNo(), VA1.getValVT(), State.AllocateStack(XLenInBytes, StackAlign), VA1.getLocVT(), CCValAssign::Full)); + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + return false; + } + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(ValNo2, ValVT2, Reg, LocVT2, CCValAssign::Full)); + } + else { + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + } + return false; + } + Register Reg; + if (ValVT == MVT::f16 && !UseGPRForF16_F32) + Reg = State.AllocateReg(ArgFPR16s); + else if (ValVT == MVT::f32 && !UseGPRForF16_F32) + Reg = State.AllocateReg(ArgFPR32s); + else if (ValVT == MVT::f64 && !UseGPRForF64) + Reg = State.AllocateReg(ArgFPR64s); + else if (ValVT.isScalableVector()) { + const TargetRegisterClass *RC = TLI.getRegClassFor(ValVT); + if (RC == &RISCV::VRRegClass) { + if (FirstMaskArgument.hasValue() && ValNo == FirstMaskArgument.getValue()) { + Reg = State.AllocateReg(RISCV::V0); + } + else { + Reg = State.AllocateReg(ArgVRs); + } + } + else if (RC == &RISCV::VRM2RegClass) { + Reg = State.AllocateReg(ArgVRM2s); + } + else if (RC == &RISCV::VRM4RegClass) { + Reg = State.AllocateReg(ArgVRM4s); + } + else if (RC == &RISCV::VRM8RegClass) { + Reg = State.AllocateReg(ArgVRM8s); + } + else { + llvm_unreachable("Unhandled class register for ValueType"); + } + if (!Reg) { + LocInfo = CCValAssign::Indirect; + Reg = State.AllocateReg(ArgGPRs); + LocVT = XLenVT; + } + } else + Reg = State.AllocateReg(ArgGPRs); + unsigned StackOffset = Reg ? 0 : State.AllocateStack(XLen / 8, Align(XLen / 8)); + if (!PendingLocs.empty()) { + assert(ArgFlags.isSplitEnd() && "Expected ArgFlags.isSplitEnd()"); + assert(PendingLocs.size() > 2 && "Unexpected PendingLocs.size()"); + for (auto &It : PendingLocs) { + if (Reg) + It.convertToReg(Reg); + else + It.convertToMem(StackOffset); + State.addLoc(It); + } + PendingLocs.clear(); + PendingArgFlags.clear(); + return false; + } + assert((!UseGPRForF16_F32 || !UseGPRForF64 || LocVT == XLenVT || (TLI.getSubtarget().hasStdExtV() && ValVT.isScalableVector())) && "Expected an XLenVT or scalable vector types at this stage"); + if (Reg) { + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ValVT.isFloatingPoint()) { + LocVT = ValVT; + LocInfo = CCValAssign::Full; + } + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63f9dcd4bfa99711bec59e8db8683e30194ac2a1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp @@ -0,0 +1,45 @@ +unsigned RISCVTargetLowering::ComputeNumSignBitsForTargetNode(SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth) const { + if (Op.getOpcode() == RISCVISD::SLLW) { + return Op.getScalarValueSizeInBits(); + } + if (Op.getOpcode() == RISCVISD::SRAW) { + return Op.getScalarValueSizeInBits(); + } + if (Op.getOpcode() == RISCVISD::SRLW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::DIVW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::DIVUW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::REMUW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::ROLW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::RORW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::GREVIW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::GORCIW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::FSLW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::FSRW) { + return 33; + } + if (Op.getOpcode() == RISCVISD::VMV_X_S) { + if (Op.getOperand(0).getScalarValueSizeInBits() > Subtarget.getXLen()) { + return 1; + } + return Subtarget.getXLen() - Op.getOperand(0).getScalarValueSizeInBits() + 1; + } + return 1; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..78f8c6ed2abbddd3aa2e311bcd887beaf74bc0ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,165 @@ +MachineBasicBlock *RISCVTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *BB) const { + uint64_t TSFlags = MI.getDesc().TSFlags; + if (TSFlags & RISCVII::HasSEWOpMask) { + unsigned NumOperands = MI.getNumExplicitOperands(); + int VLIndex = (TSFlags & RISCVII::HasVLOpMask) ? NumOperands - 2 : -1; + unsigned SEWIndex = NumOperands - 1; + bool WritesElement0 = TSFlags & RISCVII::WritesElement0Mask; + RISCVVLMUL VLMul = static_cast((TSFlags & RISCVII::VLMulMask) >> RISCVII::VLMulShift); + MachineFunction &MF = *BB->getParent(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); + unsigned SEW = MI.getOperand(SEWIndex).getImm(); + assert(RISCVVType::isValidSEW(SEW) && "Unexpected SEW"); + RISCVVSEW ElementWidth = static_cast(Log2_32(SEW / 8)); + MachineRegisterInfo &MRI = MF.getRegInfo(); + MachineInstrBuilder MIB = BuildMI(*BB, MI, DL, TII.get(RISCV::PseudoVSETVLI)); + if (VLIndex >= 0) { + Register DestReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); + MIB.addReg(DestReg, RegState::Define | RegState::Dead).addReg(MI.getOperand(VLIndex).getReg()); + } + else + MIB.addReg(RISCV::X0, RegState::Define | RegState::Dead).addReg(RISCV::X0, RegState::Kill); + bool TailAgnostic = true; + unsigned UseOpIdx; + if (MI.isRegTiedToUseOperand(0, &UseOpIdx) && !WritesElement0) { + TailAgnostic = false; + const MachineOperand &UseMO = MI.getOperand(UseOpIdx); + MachineInstr *UseMI = MRI.getVRegDef(UseMO.getReg()); + if (UseMI && UseMI->isImplicitDef()) + TailAgnostic = true; + } + unsigned VLMULBits = static_cast(VLMUL); + unsigned VSEWBits = static_cast(VSEW); + unsigned VTypeI = (VSEWBits << 3) | (VLMULBits & 0x7); + if (TailAgnostic) + VTypeI |= 0x40; + if (MaskAgnostic) + VTypeI |= 0x80; + MIB.addImm(RISCVVType::encodeVTYPE(VLMul, ElementWidth, TailAgnostic, false)); + MI.getOperand(SEWIndex).setImm(-1); + if (VLIndex >= 0) { + MI.getOperand(VLIndex).setReg(RISCV::NoRegister); + MI.getOperand(VLIndex).setIsKill(false); + } + } + switch (MI.getOpcode()) { + default: + llvm_unreachable("Unexpected instr type to insert"); + case RISCV::ReadCycleWide: + assert(!Subtarget.is64Bit() && "ReadCycleWrite is only to be used on riscv32"); + assert(MI.getOpcode() == RISCV::ReadCycleWide && "Unexpected instruction"); + MachineFunction &MF = *BB->getParent(); + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + MachineFunction::iterator It = ++BB->getIterator(); + MachineBasicBlock *LoopMBB = MF.CreateMachineBasicBlock(LLVM_BB); + MF.insert(It, LoopMBB); + MachineBasicBlock *DoneMBB = MF.CreateMachineBasicBlock(LLVM_BB); + MF.insert(It, DoneMBB); + DoneMBB->splice(DoneMBB->begin(), BB, std::next(MachineBasicBlock::iterator(MI)), BB->end()); + DoneMBB->transferSuccessorsAndUpdatePHIs(BB); + BB->addSuccessor(LoopMBB); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + Register ReadAgainReg = RegInfo.createVirtualRegister(&RISCV::GPRRegClass); + Register LoReg = MI.getOperand(0).getReg(); + Register HiReg = MI.getOperand(1).getReg(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo(); + BuildMI(LoopMBB, DL, TII->get(RISCV::CSRRS), HiReg).addImm(RISCVSysReg::lookupSysRegByName("CYCLEH")->Encoding).addReg(RISCV::X0); + BuildMI(LoopMBB, DL, TII->get(RISCV::CSRRS), LoReg).addImm(RISCVSysReg::lookupSysRegByName("CYCLE")->Encoding).addReg(RISCV::X0); + BuildMI(LoopMBB, DL, TII->get(RISCV::CSRRS), ReadAgainReg).addImm(RISCVSysReg::lookupSysRegByName("CYCLEH")->Encoding).addReg(RISCV::X0); + BuildMI(LoopMBB, DL, TII->get(RISCV::BNE)).addReg(HiReg).addReg(ReadAgainReg).addMBB(LoopMBB); + LoopMBB->addSuccessor(LoopMBB); + LoopMBB->addSuccessor(DoneMBB); + MI.eraseFromParent(); + return DoneMBB; + case RISCV::Select_GPR_Using_CC_GPR: + case RISCV::Select_FPR16_Using_CC_GPR: + case RISCV::Select_FPR32_Using_CC_GPR: + case RISCV::Select_FPR64_Using_CC_GPR: + and(2).getReg() != RHS || SequenceMBBI->getOperand(3).getImm() != CC || SelectDests.count(SequenceMBBI->getOperand(4).getReg()) || SelectDests.count(SequenceMBBI->getOperand(5).getReg())) + break; + LastSelectPseudo = &*SequenceMBBI; + SequenceMBBI->collectDebugValues(SelectDebugValues); + SelectDests.insert(SequenceMBBI->getOperand(0).getReg()); + else { + if (SequenceMBBI->hasUnmodeledSideEffects() || SequenceMBBI->mayLoadOrStore()) + break; + if (llvm::any_of(SequenceMBBI->operands(), [&](MachineOperand &MO) { + return MO.isReg() && MO.isUse() && SelectDests.count(MO.getReg()); + })) + break; + } + const TargetInstrInfo &TII = *BB->getParent()->getSubtarget().getInstrInfo(); + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + DebugLoc DL = MI.getDebugLoc(); + MachineFunction::iterator I = ++BB->getIterator(); + MachineBasicBlock *HeadMBB = BB; + MachineFunction *F = BB->getParent(); + MachineBasicBlock *TailMBB = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *IfFalseMBB = F->CreateMachineBasicBlock(LLVM_BB); + F->insert(I, IfFalseMBB); + F->insert(I, TailMBB); + for (MachineInstr *DebugInstr : SelectDebugValues) { + TailMBB->push_back(DebugInstr->removeFromParent()); + } + TailMBB->splice(TailMBB->end(), HeadMBB, std::next(LastSelectPseudo->getIterator()), HeadMBB->end()); + TailMBB->transferSuccessorsAndUpdatePHIs(HeadMBB); + HeadMBB->addSuccessor(IfFalseMBB); + HeadMBB->addSuccessor(TailMBB); + unsigned Opcode = getBranchOpcodeForIntCondCode(CC); + BuildMI(HeadMBB, DL, TII.get(Opcode)).addReg(LHS).addReg(RHS).addMBB(TailMBB); + IfFalseMBB->addSuccessor(TailMBB); + auto SelectMBBI = MI.getIterator(); + auto SelectEnd = std::next(LastSelectPseudo->getIterator()); + auto InsertionPoint = TailMBB->begin(); + while (SelectMBBI != SelectEnd) { + auto Next = std::next(SelectMBBI); + if (isSelectPseudo(*SelectMBBI)) { + BuildMI(*TailMBB, InsertionPoint, SelectMBBI->getDebugLoc(), TII.get(RISCV::PHI), SelectMBBI->getOperand(0).getReg()).addReg(SelectMBBI->getOperand(4).getReg()).addMBB(HeadMBB).addReg(SelectMBBI->getOperand(5).getReg()).addMBB(IfFalseMBB); + SelectMBBI->eraseFromParent(); + } + SelectMBBI = Next; + } + F->getProperties().reset(MachineFunctionProperties::Property::NoPHIs); + return TailMBB; + case RISCV::BuildPairF64Pseudo: + assert(MI.getOpcode() == RISCV::BuildPairF64Pseudo && "Unexpected instruction"); + MachineFunction &MF = *BB->getParent(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); + const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); + Register DstReg = MI.getOperand(0).getReg(); + Register LoReg = MI.getOperand(1).getReg(); + Register HiReg = MI.getOperand(2).getReg(); + const TargetRegisterClass *DstRC = &RISCV::FPR64RegClass; + int FI = MF.getInfo()->getMoveF64FrameIndex(MF); + MachinePointerInfo MPI = MachinePointerInfo::getFixedStack(MF, FI); + MachineMemOperand *MMOLo = MF.getMachineMemOperand(MPI, MachineMemOperand::MOStore, 4, Align(8)); + MachineMemOperand *MMOHi = MF.getMachineMemOperand(MPI.getWithOffset(4), MachineMemOperand::MOStore, 4, Align(8)); + BuildMI(*BB, MI, DL, TII.get(RISCV::SW)).addReg(LoReg, getKillRegState(MI.getOperand(1).isKill())).addFrameIndex(FI).addImm(0).addMemOperand(MMOLo); + BuildMI(*BB, MI, DL, TII.get(RISCV::SW)).addReg(HiReg, getKillRegState(MI.getOperand(2).isKill())).addFrameIndex(FI).addImm(4).addMemOperand(MMOHi); + TII.loadRegFromStackSlot(*BB, MI, DstReg, FI, DstRC, RI); + MI.eraseFromParent(); + return BB; + case RISCV::SplitF64Pseudo: + assert(MI.getOpcode() == RISCV::SplitF64Pseudo && "Unexpected instruction");= + MachineFunction &MF = *BB->getParent(); + DebugLoc DL = MI.getDebugLoc(); + const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); + const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); + Register LoReg = MI.getOperand(0).getReg(); + Register HiReg = MI.getOperand(1).getReg(); + Register SrcReg = MI.getOperand(2).getReg(); + const TargetRegisterClass *SrcRC = &RISCV::FPR64RegClass; + int FI = MF.getInfo()->getMoveF64FrameIndex(MF); + TII.storeRegToStackSlot(*BB, MI, SrcReg, MI.getOperand(2).isKill(), FI, SrcRC, RI); + MachinePointerInfo MPI = MachinePointerInfo::getFixedStack(MF, FI); + MachineMemOperand *MMOLo = MF.getMachineMemOperand(MPI, MachineMemOperand::MOLoad, 4, Align(8)); + MachineMemOperand *MMOHi = MF.getMachineMemOperand( PI.getWithOffset(4), MachineMemOperand::MOLoad, 4, Align(8)); + BuildMI(*BB, MI, DL, TII.get(RISCV::LW), LoReg).addFrameIndex(FI).addImm(0).addMemOperand(MMOLo); + BuildMI(*BB, MI, DL, TII.get(RISCV::LW), HiReg).addFrameIndex(FI).addImm(4).addMemOperand(MMOHi); + MI.eraseFromParent(); + return BB; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3120cdc9e0247fc2f5bbeaa81b831c974641b9fe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp @@ -0,0 +1,34 @@ +void RISCVTargetLowering::LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector &Ops, SelectionDAG &DAG) const { + SDLoc DL(Op); + MVT XLenVT = Subtarget.getXLenVT(); + if (Constraint.length() == 1) { + if (Constraint[0] == 'I') { + if (auto *C = dyn_cast(Op)) { + uint64_t Val = C->getSExtValue(); + if (isInt<12>(Val)) { + Ops.push_back(DAG.getTargetConstant(Val, DL, XLenVT)); + } + } + return ; + } + if (Constraint[0] == 'J') { + if (auto *C = dyn_cast(Op)) { + uint64_t Val = C->getSExtValue(); + if (Val == 0) { + Ops.push_back(DAG.getTargetConstant(0, DL, XLenVT)); + } + } + return ; + } + if (Constraint[0] == 'K') { + if (auto *C = dyn_cast(Op)) { + uint64_t Val = C->getSExtValue(); + if (isUInt<5>(Val)) { + Ops.push_back(DAG.getTargetConstant(Val, DL, XLenVT)); + } + } + return ; + } + } + TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97d4a427e101d5f49d5240064ece9c020a72ab75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering::lowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { + BlockAddressSDNode *N = cast(Op); + return getAddr(N, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7af74735e1d7dc1c5b685944c4694f244897d869 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,197 @@ +SDValue RISCVTargetLowering::LowerCall(CallLoweringInfo &CLI, SmallVectorImpl &InVals) const { + SelectionDAG &DAG = CLI.DAG; + SDLoc &DL = CLI.DL; + SmallVectorImpl &Outs = CLI.Outs; + SmallVectorImpl &OutVals = CLI.OutVals; + SmallVectorImpl &Ins = CLI.Ins; + SDValue Chain = CLI.Chain; + SDValue Callee = CLI.Callee; + bool &IsTailCall = CLI.IsTailCall; + CallingConv::ID CallConv = CLI.CallConv; + bool IsVarArg = CLI.IsVarArg; + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + MVT XLenVT = Subtarget.getXLenVT(); + MachineFunction &MF = DAG.getMachineFunction(); + SmallVector ArgLocs; + CCState ArgCCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext()); + if (CallConv == CallingConv::Fast) + ArgCCInfo.AnalyzeCallOperands(Outs, CC_RISCV_FastCC); + else if (CallConv == CallingConv::GHC) + ArgCCInfo.AnalyzeCallOperands(Outs, CC_RISCV_GHC); + else + analyzeOutputArgs(MF, ArgCCInfo, Outs, false, &CLI); + if (IsTailCall) + IsTailCall = isEligibleForTailCallOptimization(ArgCCInfo, CLI, MF, ArgLocs); + if (IsTailCall) + ++NumTailCalls; + else if (CLI.CB && CLI.CB->isMustTailCall()) + report_fatal_error("failed to perform tail call elimination on a call site marked musttail"); + unsigned NumBytes = ArgCCInfo.getNextStackOffset(); + SmallVector ByValArgs; + for (unsigned i = 0, e = Outs.size(); i != e; ++i) { + ISD::ArgFlagsTy Flags = Outs[i].Flags; + if (!Flags.isByVal()) + continue; + SDValue Arg = OutVals[i]; + unsigned Size = Flags.getByValSize(); + Align Alignment = Flags.getNonZeroByValAlign(); + int FI = MF.getFrameInfo().CreateStackObject(Size, Alignment, false); + SDValue FIPtr = DAG.getFrameIndex(FI, getPointerTy(DAG.getDataLayout())); + SDValue SizeNode = DAG.getConstant(Size, DL, XLenVT); + Chain = DAG.getMemcpy(Chain, DL, FIPtr, Arg, SizeNode, Alignment, false, false, IsTailCall, MachinePointerInfo(), MachinePointerInfo()); + ByValArgs.push_back(FIPtr); + } + if (!IsTailCall) + Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, CLI.DL); + SmallVector, 8> RegsToPass; + SmallVector MemOpChains; + SDValue StackPtr; + for (unsigned i = 0, j = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + SDValue ArgValue = OutVals[i]; + ISD::ArgFlagsTy Flags = Outs[i].Flags; + bool IsF64OnRV32DSoftABI = VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64; + if (IsF64OnRV32DSoftABI && VA.isRegLoc()) { + SDValue SplitF64 = DAG.getNode(RISCVISD::SplitF64, DL, DAG.getVTList(MVT::i32, MVT::i32), ArgValue); + SDValue Lo = SplitF64.getValue(0); + SDValue Hi = SplitF64.getValue(1); + Register RegLo = VA.getLocReg(); + RegsToPass.push_back(std::make_pair(RegLo, Lo)); + if (RegLo == RISCV::X17) { + if (!StackPtr.getNode()) + StackPtr = DAG.getCopyFromReg(Chain, DL, RISCV::X2, PtrVT); + MemOpChains.push_back(DAG.getStore(Chain, DL, Hi, StackPtr, MachinePointerInfo())); + } + else { + assert(RegLo < RISCV::X31 && "Invalid register pair"); + Register RegHigh = RegLo + 1; + RegsToPass.push_back(std::make_pair(RegHigh, Hi)); + } + continue; + } + if (VA.getLocInfo() == CCValAssign::Indirect) { + SDValue SpillSlot = DAG.CreateStackTemporary(Outs[i].ArgVT); + int FI = cast(SpillSlot)->getIndex(); + MemOpChains.push_back(DAG.getStore(Chain, DL, ArgValue, SpillSlot, MachinePointerInfo::getFixedStack(MF, FI))); + unsigned ArgIndex = Outs[i].OrigArgIndex; + assert(Outs[i].PartOffset == 0); + while (i + 1 != e && Outs[i + 1].OrigArgIndex == ArgIndex) { + SDValue PartValue = OutVals[i + 1]; + unsigned PartOffset = Outs[i + 1].PartOffset; + SDValue Address = DAG.getNode(ISD::ADD, DL, PtrVT, SpillSlot, DAG.getIntPtrConstant(PartOffset, DL)); + MemOpChains.push_back(DAG.getStore(Chain, DL, PartValue, Address, MachinePointerInfo::getFixedStack(MF, FI))); + ++i; + } + ArgValue = SpillSlot; + } + else { + EVT LocVT = VA.getLocVT(); + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTH, DL, VA.getLocVT(), Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, LocVT, Val); + break; + } + ArgValue = Val; + } + if (Flags.isByVal()) + ArgValue = ByValArgs[j++]; + if (VA.isRegLoc()) { + RegsToPass.push_back(std::make_pair(VA.getLocReg(), ArgValue)); + } + else { + assert(VA.isMemLoc() && "Argument not register or memory"); + assert(!IsTailCall && "Tail call not allowed if stack is used for passing parameters"); + if (!StackPtr.getNode()) + StackPtr = DAG.getCopyFromReg(Chain, DL, RISCV::X2, PtrVT); + SDValue Address = DAG.getNode(ISD::ADD, DL, PtrVT, StackPtr, DAG.getIntPtrConstant(VA.getLocMemOffset(), DL)); + MemOpChains.push_back(DAG.getStore(Chain, DL, ArgValue, Address, MachinePointerInfo())); + } + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, MemOpChains); + SDValue Glue; + for (auto &Reg : RegsToPass) { + Chain = DAG.getCopyToReg(Chain, DL, Reg.first, Reg.second, Glue); + Glue = Chain.getValue(1); + } + validateCCReservedRegs(RegsToPass, MF); + if (!IsTailCall && MF.getSubtarget().isRegisterReservedByUser(RISCV::X1)) + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Return address register required, but has been reserved."}); + if (GlobalAddressSDNode *S = dyn_cast(Callee)) { + const GlobalValue *GV = S->getGlobal(); + unsigned OpFlags = RISCVII::MO_CALL; + if (!getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV)) + OpFlags = RISCVII::MO_PLT; + Callee = DAG.getTargetGlobalAddress(GV, DL, PtrVT, 0, OpFlags); + } + else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { + unsigned OpFlags = RISCVII::MO_CALL; + if (!getTargetMachine().shouldAssumeDSOLocal(*MF.getFunction().getParent(), nullptr)) + OpFlags = RISCVII::MO_PLT; + Callee = DAG.getTargetExternalSymbol(S->getSymbol(), PtrVT, OpFlags); + } + SmallVector Ops; + Ops.push_back(Chain); + Ops.push_back(Callee); + for (auto &Reg : RegsToPass) + Ops.push_back(DAG.getRegister(Reg.first, Reg.second.getValueType())); + if (!IsTailCall) { + const TargetRegisterInfo *TRI = Subtarget.getRegisterInfo(); + const uint32_t *Mask = TRI->getCallPreservedMask(MF, CallConv); + assert(Mask && "Missing call preserved mask for calling convention"); + Ops.push_back(DAG.getRegisterMask(Mask)); + } + if (Glue.getNode()) + Ops.push_back(Glue); + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); + if (IsTailCall) { + MF.getFrameInfo().setHasTailCall(); + return DAG.getNode(RISCVISD::TAIL, DL, NodeTys, Ops); + } + Chain = DAG.getNode(RISCVISD::CALL, DL, NodeTys, Ops); + DAG.addNoMergeSiteInfo(Chain.getNode(), CLI.NoMerge); + Glue = Chain.getValue(1); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, DL, PtrVT, true), DAG.getConstant(0, DL, PtrVT, true), Glue, DL); + Glue = Chain.getValue(1); + SmallVector RVLocs; + CCState RetCCInfo(CallConv, IsVarArg, MF, RVLocs, *DAG.getContext()); + analyzeInputArgs(MF, RetCCInfo, Ins, true); + for (auto &VA : RVLocs) { + SDValue RetValue = DAG.getCopyFromReg(Chain, DL, VA.getLocReg(), VA.getLocVT(), Glue); + Chain = RetValue.getValue(1); + Glue = RetValue.getValue(2); + if (VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64) { + assert(VA.getLocReg() == ArgGPRs[0] && "Unexpected reg assignment"); + SDValue RetValue2 = DAG.getCopyFromReg(Chain, DL, ArgGPRs[1], MVT::i32, Glue); + Chain = RetValue2.getValue(1); + Glue = RetValue2.getValue(2); + RetValue = DAG.getNode(RISCVISD::BuildPairF64, DL, MVT::f64, RetValue, RetValue2); + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, VA.getValVT(), Val); + break; + } + RetValue = Val; + InVals.push_back(RetValue); + } + return Chain; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c2111e520eec0abbd9dce63ea31d3df135efd14 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering::lowerConstantPool(SDValue Op, SelectionDAG &DAG) const { + ConstantPoolSDNode *N = cast(Op); + return getAddr(N, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e10d42b15911726b9b98aaadba7f5bbd1bc60fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,18 @@ +SDValue RISCVTargetLowering::lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { + const RISCVRegisterInfo &RI = *Subtarget.getRegisterInfo(); + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MFI.setFrameAddressIsTaken(true); + Register FrameReg = RI.getFrameRegister(MF); + int XLenInBytes = Subtarget.getXLen() / 8; + EVT VT = Op.getValueType(); + SDLoc DL(Op); + SDValue FrameAddr = DAG.getCopyFromReg(DAG.getEntryNode(), DL, FrameReg, VT); + unsigned Depth = cast(Op.getOperand(0))->getZExtValue(); + while (Depth--) { + int Offset = -(XLenInBytes * 2); + SDValue Ptr = DAG.getNode(ISD::ADD, DL, VT, FrameAddr, DAG.getIntPtrConstant(Offset, DL)); + FrameAddr = DAG.getLoad(VT, DL, DAG.getEntryNode(), Ptr, MachinePointerInfo()); + } + return FrameAddr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7469ac29c8818f7827888c7dc5619a3b1397882e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,173 @@ +SDValue RISCVTargetLowering::LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Ins, const SDLoc &DL, SelectionDAG &DAG, SmallVectorImpl &InVals) const { + MachineFunction &MF = DAG.getMachineFunction(); + switch (CallConv) { + default: + report_fatal_error("Unsupported calling convention"); + case CallingConv::C: + case CallingConv::Fast: + break; + case CallingConv::GHC: + if (!MF.getSubtarget().getFeatureBits()[RISCV::FeatureStdExtF] || !MF.getSubtarget().getFeatureBits()[RISCV::FeatureStdExtD]) + report_fatal_error("GHC calling convention requires the F and D instruction set extensions"); + } + const Function &Func = MF.getFunction(); + if (Func.hasFnAttribute("interrupt")) { + if (!Func.arg_empty()) + report_fatal_error("Functions with the interrupt attribute cannot have arguments!"); + StringRef Kind = MF.getFunction().getFnAttribute("interrupt").getValueAsString(); + if (!(Kind == "user" || Kind == "supervisor" || Kind == "machine")) + report_fatal_error("Function interrupt attribute argument not supported!"); + } + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + MVT XLenVT = Subtarget.getXLenVT(); + unsigned XLenInBytes = Subtarget.getXLen() / 8; + std::vector OutChains; + SmallVector ArgLocs; + CCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext()); + if (CallConv == CallingConv::Fast) + CCInfo.AnalyzeFormalArguments(Ins, CC_RISCV_FastCC); + else if (CallConv == CallingConv::GHC) + CCInfo.AnalyzeFormalArguments(Ins, CC_RISCV_GHC); + else + analyzeInputArgs(MF, CCInfo, Ins, false); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + SDValue ArgValue; + if (VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64) { + assert(VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64 && "Unexpected VA"); + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + if (VA.isMemLoc()) { + int FI = MFI.CreateFixedObject(8, VA.getLocMemOffset(), true); + SDValue FIN = DAG.getFrameIndex(FI, MVT::i32); + ArgValue = DAG.getLoad(MVT::f64, DL, Chain, FIN, MachinePointerInfo::getFixedStack(MF, FI)); + } + assert(VA.isRegLoc() && "Expected register VA assignment"); + Register LoVReg = RegInfo.createVirtualRegister(&RISCV::GPRRegClass); + RegInfo.addLiveIn(VA.getLocReg(), LoVReg); + SDValue Lo = DAG.getCopyFromReg(Chain, DL, LoVReg, MVT::i32); + SDValue Hi; + if (VA.getLocReg() == RISCV::X17) { + int FI = MFI.CreateFixedObject(4, 0, true); + SDValue FIN = DAG.getFrameIndex(FI, MVT::i32); + Hi = DAG.getLoad(MVT::i32, DL, Chain, FIN, MachinePointerInfo::getFixedStack(MF, FI)); + } + else { + Register HiVReg = RegInfo.createVirtualRegister(&RISCV::GPRRegClass); + RegInfo.addLiveIn(VA.getLocReg() + 1, HiVReg); + Hi = DAG.getCopyFromReg(Chain, DL, HiVReg, MVT::i32); + } + ArgValue = DAG.getNode(RISCVISD::BuildPairF64, DL, MVT::f64, Lo, Hi); + } + else if (VA.isRegLoc()) { + MachineFunction &MF = DAG.getMachineFunction(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + EVT LocVT = VA.getLocVT(); + SDValue Val; + const TargetRegisterClass *RC = TLI.getRegClassFor(LocVT.getSimpleVT()); + Register VReg = RegInfo.createVirtualRegister(RC); + RegInfo.addLiveIn(VA.getLocReg(), VReg); + Val = DAG.getCopyFromReg(Chain, DL, VReg, LocVT); + if (VA.getLocInfo() == CCValAssign::Indirect) { + return Val; + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, VA.getValVT(), Val); + break; + } + ArgValue = Val; + } + else { + MachineFunction &MF = DAG.getMachineFunction(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + EVT LocVT = VA.getLocVT(); + SDValue Val; + const TargetRegisterClass *RC = TLI.getRegClassFor(LocVT.getSimpleVT()); + Register VReg = RegInfo.createVirtualRegister(RC); + RegInfo.addLiveIn(VA.getLocReg(), VReg); + Val = DAG.getCopyFromReg(Chain, DL, VReg, LocVT); + if (VA.getLocInfo() == CCValAssign::Indirect) { + return Val; + } + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, VA.getValVT(), Val); + break; + } + ArgValue = Val; + } + if (VA.getLocInfo() == CCValAssign::Indirect) { + InVals.push_back(DAG.getLoad(VA.getValVT(), DL, Chain, ArgValue, MachinePointerInfo())); + unsigned ArgIndex = Ins[i].OrigArgIndex; + assert(Ins[i].PartOffset == 0); + while (i + 1 != e && Ins[i + 1].OrigArgIndex == ArgIndex) { + CCValAssign &PartVA = ArgLocs[i + 1]; + unsigned PartOffset = Ins[i + 1].PartOffset; + SDValue Address = DAG.getNode(ISD::ADD, DL, PtrVT, ArgValue, DAG.getIntPtrConstant(PartOffset, DL)); + InVals.push_back(DAG.getLoad(PartVA.getValVT(), DL, Chain, Address, MachinePointerInfo())); + ++i; + } + continue; + } + InVals.push_back(ArgValue); + } + if (IsVarArg) { + ArrayRef ArgRegs = makeArrayRef(ArgGPRs); + unsigned Idx = CCInfo.getFirstUnallocated(ArgRegs); + const TargetRegisterClass *RC = &RISCV::GPRRegClass; + MachineFrameInfo &MFI = MF.getFrameInfo(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + RISCVMachineFunctionInfo *RVFI = MF.getInfo(); + int VaArgOffset, VarArgsSaveSize; + if (ArgRegs.size() == Idx) { + VaArgOffset = CCInfo.getNextStackOffset(); + VarArgsSaveSize = 0; + } + else { + VarArgsSaveSize = XLenInBytes * (ArgRegs.size() - Idx); + VaArgOffset = -VarArgsSaveSize; + } + int FI = MFI.CreateFixedObject(XLenInBytes, VaArgOffset, true); + RVFI->setVarArgsFrameIndex(FI); + if (Idx % 2) { + MFI.CreateFixedObject(XLenInBytes, VaArgOffset - (int)XLenInBytes, true); + VarArgsSaveSize += XLenInBytes; + } + for (unsigned I = Idx; I < ArgRegs.size(); ++I, VaArgOffset += XLenInBytes) { + const Register Reg = RegInfo.createVirtualRegister(RC); + RegInfo.addLiveIn(ArgRegs[I], Reg); + SDValue ArgValue = DAG.getCopyFromReg(Chain, DL, Reg, XLenVT); + FI = MFI.CreateFixedObject(XLenInBytes, VaArgOffset, true); + SDValue PtrOff = DAG.getFrameIndex(FI, getPointerTy(DAG.getDataLayout())); + SDValue Store = DAG.getStore(Chain, DL, ArgValue, PtrOff, MachinePointerInfo::getFixedStack(MF, FI)); + cast(Store.getNode())->getMemOperand()->setValue((Value *)nullptr); + OutChains.push_back(Store); + } + RVFI->setVarArgsSaveSize(VarArgsSaveSize); + } + if (!OutChains.empty()) { + OutChains.push_back(Chain); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, OutChains); + } + return Chain; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c25fe7ba981ac3b403417bdc8e02f9bd6b4c8c15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,14 @@ +SDValue RISCVTargetLowering::lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT Ty = Op.getValueType(); + GlobalAddressSDNode *N = cast(Op); + int64_t Offset = N->getOffset(); + MVT XLenVT = Subtarget.getXLenVT(); + const GlobalValue *GV = N->getGlobal(); + bool IsLocal = getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV); + SDValue Addr = getAddr(N, DAG, IsLocal); + if (Offset != 0) { + return DAG.getNode(ISD::ADD, DL, Ty, Addr, DAG.getConstant(Offset, DL, XLenVT)); + } + return Addr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d4b3eab18404fd36209d8bc0fe8ec8025c6bad1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,28 @@ +SDValue RISCVTargetLowering::lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT Ty = Op.getValueType(); + GlobalAddressSDNode *N = cast(Op); + int64_t Offset = N->getOffset(); + MVT XLenVT = Subtarget.getXLenVT(); + TLSModel::Model Model = getTargetMachine().getTLSModel(N->getGlobal()); + if (DAG.getMachineFunction().getFunction().getCallingConv() == CallingConv::GHC) { + report_fatal_error("In GHC calling convention TLS is not supported"); + } + SDValue Addr; + switch (Model) { + case TLSModel::LocalExec: + Addr = getStaticTLSAddr(N, DAG, false); + break; + case TLSModel::InitialExec: + Addr = getStaticTLSAddr(N, DAG, true); + break; + case TLSModel::LocalDynamic: + case TLSModel::GeneralDynamic: + Addr = getDynamicTLSAddr(N, DAG); + break; + } + if (Offset != 0) { + return DAG.getNode(ISD::ADD, DL, Ty, Addr, DAG.getConstant(Offset, DL, XLenVT)); + } + return Addr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d271e260065b73f42c25f03d51b9b440bdc038bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,30 @@ +SDValue RISCVTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const { + unsigned IntNo = cast(Op.getOperand(0))->getZExtValue(); + SDLoc DL(Op); + if (Subtarget.hasStdExtV()) { + if (const RISCVVIntrinsicsTable::RISCVVIntrinsicInfo *II = RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(IntNo)) { + if (II->ExtendedOperand) { + assert(II->ExtendedOperand < Op.getNumOperands()); + SmallVector Operands(Op->op_begin(), Op->op_end()); + SDValue &ScalarOp = Operands[II->ExtendedOperand]; + EVT OpVT = ScalarOp.getValueType(); + if (OpVT == MVT::i8 || OpVT == MVT::i16 || (OpVT == MVT::i32 && Subtarget.is64Bit())) { + unsigned ExtOpc = isa(ScalarOp) ? ISD::SIGN_EXTEND : ISD::ANY_EXTEND; + ScalarOp = DAG.getNode(ExtOpc, DL, Subtarget.getXLenVT(), ScalarOp); + return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, Op.getValueType(), Operands); + } + } + } + } + switch (IntNo) { + default: + return SDValue(); + case Intrinsic::thread_pointer: { + EVT PtrVT = getPointerTy(DAG.getDataLayout()); + return DAG.getRegister(RISCV::X4, PtrVT); + } + case Intrinsic::riscv_vmv_x_s: + assert(Op.getValueType() == Subtarget.getXLenVT() && "Unexpected VT!"); + return DAG.getNode(RISCVISD::VMV_X_S, DL, Op.getValueType(), Op.getOperand(1)); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75222c60f17cae9305bbe5868ddff56b5bd22751 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp @@ -0,0 +1,122 @@ +SDValue RISCVTargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const { + unsigned IntNo = cast(Op.getOperand(1))->getZExtValue(); + SDLoc DL(Op); + if (Subtarget.hasStdExtV()) { + if (const RISCVVIntrinsicsTable::RISCVVIntrinsicInfo *II = RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(IntNo)) { + if (II->ExtendedOperand) { + unsigned ExtendOp = II->ExtendedOperand + 1; + assert(ExtendOp < Op.getNumOperands()); + SmallVector Operands(Op->op_begin(), Op->op_end()); + SDValue &ScalarOp = Operands[ExtendOp]; + EVT OpVT = ScalarOp.getValueType(); + if (OpVT == MVT::i8 || OpVT == MVT::i16 || (OpVT == MVT::i32 && Subtarget.is64Bit())) { + unsigned ExtOpc = isa(ScalarOp) ? ISD::SIGN_EXTEND : ISD::ANY_EXTEND; + ScalarOp = DAG.getNode(ExtOpc, DL, Subtarget.getXLenVT(), ScalarOp); + return DAG.getNode(ISD::INTRINSIC_W_CHAIN, DL, Op->getVTList(), Operands); + } + } + } + } + unsigned NF = 1; + switch (IntNo) { + default: + return SDValue(); + case Intrinsic::riscv_vleff: { + SDLoc DL(Op); + SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Other, MVT::Glue); + SDValue Load = DAG.getNode(RISCVISD::VLEFF, DL, VTs, Op.getOperand(0), Op.getOperand(2), Op.getOperand(3)); + VTs = DAG.getVTList(Op->getValueType(1), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(2)); + return DAG.getMergeValues({Load, ReadVL, Load.getValue(1)}, DL); + } + case Intrinsic::riscv_vleff_mask: { + SDLoc DL(Op); + SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Other, MVT::Glue); + SDValue Load = DAG.getNode(RISCVISD::VLEFF_MASK, DL, VTs, Op.getOperand(0), Op.getOperand(2), Op.getOperand(3), Op.getOperand(4), Op.getOperand(5)); + VTs = DAG.getVTList(Op->getValueType(1), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(2)); + return DAG.getMergeValues({Load, ReadVL, Load.getValue(1)}, DL); + } + case Intrinsic::riscv_vlseg8ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg7ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg6ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg5ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg4ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg3ff: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg2ff: { + NF++; + SDLoc DL(Op); + SmallVector EVTs(NF, Op.getValueType()); + EVTs.push_back(MVT::Other); + EVTs.push_back(MVT::Glue); + SDVTList VTs = DAG.getVTList(EVTs); + SDValue Load = DAG.getNode(RISCVISD::VLSEGFF, DL, VTs, Op.getOperand(0), Op.getOperand(1), Op.getOperand(2), Op.getOperand(3)); + VTs = DAG.getVTList(Op->getValueType(NF), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(NF + 1)); + SmallVector Results; + for (unsigned i = 0; i < NF; ++i) { + Results.push_back(Load.getValue(i)); + } + Results.push_back(ReadVL); + Results.push_back(Load.getValue(NF)); + return DAG.getMergeValues(Results, DL); + } + case Intrinsic::riscv_vlseg8ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg7ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg6ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg5ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg4ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg3ff_mask: + NF++; + LLVM_FALLTHROUGH; + case Intrinsic::riscv_vlseg2ff_mask: { + NF++; + SDLoc DL(Op); + SmallVector EVTs(NF, Op.getValueType()); + EVTs.push_back(MVT::Other); + EVTs.push_back(MVT::Glue); + SDVTList VTs = DAG.getVTList(EVTs); + SmallVector LoadOps; + LoadOps.push_back(Op.getOperand(0)); + LoadOps.push_back(Op.getOperand(1)); + for (unsigned i = 0; i < NF; ++i) { + LoadOps.push_back(Op.getOperand(2 + i)); + } + LoadOps.push_back(Op.getOperand(2 + NF)); + LoadOps.push_back(Op.getOperand(3 + NF)); + LoadOps.push_back(Op.getOperand(4 + NF)); + SDValue Load = DAG.getNode(RISCVISD::VLSEGFF_MASK, DL, VTs, LoadOps); + VTs = DAG.getVTList(Op->getValueType(NF), MVT::Other); + SDValue ReadVL = DAG.getNode(RISCVISD::READ_VL, DL, VTs, Load.getValue(NF + 1)); + SmallVector Results; + for (unsigned i = 0; i < NF; ++i) { + Results.push_back(Load.getValue(i)); + } + Results.push_back(ReadVL); + Results.push_back(Load.getValue(NF)); + return DAG.getMergeValues(Results, DL); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..68048321fc1a4520cf96294b8748c120bfbe8b55 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering::lowerJumpTable(SDValue Op, SelectionDAG &DAG) const { + JumpTableSDNode *N = cast(Op); + return getAddr(N, DAG); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65190eb29c998ae548a8d652898fe5771b4c5e37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,133 @@ +SDValue RISCVTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { + if (Op.getOpcode() == ISD::GlobalAddress) { + return lowerGlobalAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::BlockAddress) { + return lowerBlockAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::ConstantPool) { + return lowerConstantPool(Op, DAG); + } + if (Op.getOpcode() == ISD::BlockAddress) { + return lowerBlockAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::JumpTable) { + return lowerJumpTable(Op, DAG); + } + if (Op.getOpcode() == ISD::GlobalTLSAddress) { + return lowerGlobalTLSAddress(Op, DAG); + } + if (Op.getOpcode() == ISD::SELECT) { + return lowerSELECT(Op, DAG); + } + if (Op.getOpcode() == ISD::VASTART) { + return lowerVASTART(Op, DAG); + } + if (Op.getOpcode() == ISD::RETURNADDR) { + return lowerRETURNADDR(Op, DAG); + } + if (Op.getOpcode() == ISD::FRAMEADDR) { + return lowerFRAMEADDR(Op, DAG); + } + if (Op.getOpcode() == ISD::SHL_PARTS) { + return lowerShiftLeftParts(Op, DAG); + } + if (Op.getOpcode() == ISD::SRA_PARTS) { + return lowerShiftRightParts(Op, DAG, true); + } + if (Op.getOpcode() == ISD::SRL_PARTS) { + return lowerShiftRightParts(Op, DAG, false); + } + if (Op.getOpcode() == ISD::INTRINSIC_WO_CHAIN) { + return LowerINTRINSIC_WO_CHAIN(Op, DAG); + } + if (Op.getOpcode() == ISD::INTRINSIC_W_CHAIN) { + return LowerINTRINSIC_W_CHAIN(Op, DAG); + } + if (Op.getOpcode() == ISD::ANY_EXTEND) { + return lowerVectorMaskExt(Op, DAG, 1); + } + if (Op.getOpcode() == ISD::ZERO_EXTEND) { + return lowerVectorMaskExt(Op, DAG, 1); + } + if (Op.getOpcode() == ISD::SIGN_EXTEND) { + return lowerVectorMaskExt(Op, DAG, -1); + } + if (Op.getOpcode() == ISD::SPLAT_VECTOR) { + return lowerSPLATVECTOR(Op, DAG); + } + if (Op.getOpcode() == ISD::INSERT_VECTOR_ELT) { + return lowerINSERT_VECTOR_ELT(Op, DAG); + } + if (Op.getOpcode() == ISD::EXTRACT_VECTOR_ELT) { + return lowerEXTRACT_VECTOR_ELT(Op, DAG); + } + if (Op.getOpcode() == ISD::BITCAST) { + assert(((Subtarget.is64Bit() && Subtarget.hasStdExtF()) || Subtarget.hasStdExtZfh()) && "Unexpected custom legalisation"); + SDLoc DL(Op); + SDValue Op0 = Op.getOperand(0); + if (Op.getValueType() == MVT::f16 && Subtarget.hasStdExtZfh()) { + if (Op0.getValueType() != MVT::i16) + return SDValue(); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, Subtarget.getXLenVT(), Op0); + SDValue FPConv = DAG.getNode(RISCVISD::FMV_H_X, DL, MVT::f16, NewOp0); + return FPConv; + } + else if (Op.getValueType() == MVT::f32 && Subtarget.is64Bit() && Subtarget.hasStdExtF()) { + if (Op0.getValueType() != MVT::i32) + return SDValue(); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, Op0); + SDValue FPConv = DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, NewOp0); + return FPConv; + } + return SDValue(); + } + if (Op.getOpcode() == ISD::BSWAP) { + assert(Subtarget.hasStdExtZbp() && "Unexpected custom legalisation"); + MVT VT = Op.getSimpleValueType(); + SDLoc DL(Op); + unsigned Imm = VT.getSizeInBits() - 1; + if (Op.getOpcode() == ISD::BSWAP) + Imm &= ~0x7U; + return DAG.getNode(RISCVISD::GREVI, DL, VT, Op.getOperand(0), DAG.getTargetConstant(Imm, DL, Subtarget.getXLenVT())); + } + if (Op.getOpcode() == ISD::BITREVERSE) { + assert(Subtarget.hasStdExtZbp() && "Unexpected custom legalisation"); + MVT VT = Op.getSimpleValueType(); + SDLoc DL(Op); + unsigned Imm = VT.getSizeInBits() - 1; + if (Op.getOpcode() == ISD::BSWAP) + Imm &= ~0x7U; + return DAG.getNode(RISCVISD::GREVI, DL, VT, Op.getOperand(0), DAG.getTargetConstant(Imm, DL, Subtarget.getXLenVT())); + } + if (Op.getOpcode() == ISD::TRUNCATE) { + SDLoc DL(Op); + EVT VT = Op.getValueType(); + if (!VT.isVector()) + return Op; + if (VT.getVectorElementType() == MVT::i1) + return lowerVectorMaskTrunc(Op, DAG); + EVT DstEltVT = VT.getVectorElementType(); + SDValue Src = Op.getOperand(0); + EVT SrcVT = Src.getValueType(); + EVT SrcEltVT = SrcVT.getVectorElementType(); + assert(DstEltVT.bitsLT(SrcEltVT) && isPowerOf2_64(DstEltVT.getSizeInBits()) && isPowerOf2_64(SrcEltVT.getSizeInBits()) && "Unexpected vector truncate lowering"); + SDValue Result = Src; + LLVMContext &Context = *DAG.getContext(); + const ElementCount Count = SrcVT.getVectorElementCount(); + do { + SrcEltVT = EVT::getIntegerVT(Context, SrcEltVT.getSizeInBits() / 2); + EVT ResultVT = EVT::getVectorVT(Context, SrcEltVT, Count); + Result = DAG.getNode(RISCVISD::TRUNCATE_VECTOR, DL, ResultVT, Result); + } while (SrcEltVT != DstEltVT); + return Result; + } + if (Op.getOpcode() == ISD::VSCALE) { + MVT VT = Op.getSimpleValueType(); + SDLoc DL(Op); + SDValue VLENB = DAG.getNode(RISCVISD::READ_VLENB, DL, VT); + SDValue VScale = DAG.getNode(ISD::SRL, DL, VT, VLENB, DAG.getConstant(3, DL, VT)); + return DAG.getNode(ISD::MUL, DL, VT, VScale, Op.getOperand(0)); + } + report_fatal_error("unimplemented operand"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cedd67999ef313543cc50253a91f0d00bc57396a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,22 @@ +SDValue RISCVTargetLowering::lowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const { + const RISCVRegisterInfo &RI = *Subtarget.getRegisterInfo(); + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MFI.setReturnAddressIsTaken(true); + MVT XLenVT = Subtarget.getXLenVT(); + int XLenInBytes = Subtarget.getXLen() / 8; + if (verifyReturnAddressArgumentIsConstant(Op, DAG)) { + return SDValue(); + } + EVT VT = Op.getValueType(); + SDLoc DL(Op); + unsigned Depth = cast(Op.getOperand(0))->getZExtValue(); + if (Depth) { + int Off = -XLenInBytes; + SDValue FrameAddr = lowerFRAMEADDR(Op, DAG); + SDValue Offset = DAG.getConstant(Off, DL, VT); + return DAG.getLoad(VT, DL, DAG.getEntryNode(), DAG.getNode(ISD::ADD, DL, VT, FrameAddr, Offset), MachinePointerInfo()); + } + Register Reg = MF.addLiveIn(RI.getRARegister(), getRegClassFor(XLenVT)); + return DAG.getCopyFromReg(DAG.getEntryNode(), DL, Reg, XLenVT); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fe9a45c04e3607a7410233c686e1945b9b64220 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,82 @@ +SDValue RISCVTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, const SDLoc &DL, SelectionDAG &DAG) const { + const MachineFunction &MF = DAG.getMachineFunction(); + const RISCVSubtarget &STI = MF.getSubtarget(); + SmallVector RVLocs; + CCState CCInfo(CallConv, IsVarArg, DAG.getMachineFunction(), RVLocs, *DAG.getContext()); + analyzeOutputArgs(DAG.getMachineFunction(), CCInfo, Outs, true, nullptr); + if (CallConv == CallingConv::GHC && !RVLocs.empty()) { + report_fatal_error("GHC functions return void only"); + } + SDValue Glue; + SmallVector RetOps(1, Chain); + for (unsigned i = 0, e = RVLocs.size(); i < e; ++i) { + SDValue Val = OutVals[i]; + CCValAssign &VA = RVLocs[i]; + assert(VA.isRegLoc() && "Can only return in registers!"); + if (VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f64) { + assert(VA.isRegLoc() && "Expected return via registers"); + SDValue SplitF64 = DAG.getNode(RISCVISD::SplitF64, DL, DAG.getVTList(MVT::i32, MVT::i32), Val); + SDValue Lo = SplitF64.getValue(0); + SDValue Hi = SplitF64.getValue(1); + Register RegLo = VA.getLocReg(); + assert(RegLo < RISCV::X31 && "Invalid register pair"); + Register RegHi = RegLo + 1; + if (STI.isRegisterReservedByUser(RegLo) || STI.isRegisterReservedByUser(RegHi)) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Return value register required, but has been reserved."}); + } + Chain = DAG.getCopyToReg(Chain, DL, RegLo, Lo, Glue); + Glue = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(RegLo, MVT::i32)); + Chain = DAG.getCopyToReg(Chain, DL, RegHi, Hi, Glue); + Glue = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(RegHi, MVT::i32)); + } + else { + EVT LocVT = VA.getLocVT(); + switch (VA.getLocInfo()) { + default: + llvm_unreachable("Unexpected CCValAssign::LocInfo"); + case CCValAssign::Full: + break; + case CCValAssign::BCvt: + if (VA.getLocVT().isInteger() && VA.getValVT() == MVT::f16) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTH, DL, VA.getLocVT(), Val); + else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32) + Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Val); + else + Val = DAG.getNode(ISD::BITCAST, DL, LocVT, Val); + break; + } + Chain = DAG.getCopyToReg(Chain, DL, VA.getLocReg(), Val, Glue); + if (STI.isRegisterReservedByUser(VA.getLocReg())) { + MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{MF.getFunction(), "Return value register required, but has been reserved."}); + } + Glue = Chain.getValue(1); + RetOps.push_back(DAG.getRegister(VA.getLocReg(), VA.getLocVT())); + } + } + RetOps[0] = Chain; + if (Glue.getNode()) { + RetOps.push_back(Glue); + } + const Function &Func = DAG.getMachineFunction().getFunction(); + if (Func.hasFnAttribute("interrupt")) { + if (!Func.getReturnType()->isVoidTy()) { + report_fatal_error("Functions with the interrupt attribute must have void return type!"); + } + MachineFunction &MF = DAG.getMachineFunction(); + StringRef Kind = MF.getFunction().getFnAttribute("interrupt").getValueAsString(); + unsigned RetOpc; + if (Kind == "user") { + RetOpc = RISCVISD::URET_FLAG; + } + else if (Kind == "supervisor") { + RetOpc = RISCVISD::SRET_FLAG; + } + else { + RetOpc = RISCVISD::MRET_FLAG; + } + return DAG.getNode(RetOpc, DL, MVT::Other, RetOps); + } + return DAG.getNode(RISCVISD::RET_FLAG, DL, MVT::Other, RetOps); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2a8b1538a1e45039697e8f264bcdc901c75ab5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,8 @@ +SDValue RISCVTargetLowering::lowerVASTART(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachineFunction(); + RISCVMachineFunctionInfo *FuncInfo = MF.getInfo(); + SDLoc DL(Op); + SDValue FI = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), getPointerTy(MF.getDataLayout())); + const Value *SV = cast(Op.getOperand(2))->getValue(); + return DAG.getStore(Op.getOperand(0), DL, FI, Op.getOperand(1), MachinePointerInfo(SV)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b667b731b88f74eb2e0a2d08828d7fb845c2a26 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,43 @@ +enum NodeType : unsigned { +FIRST_NUMBER = ISD::BUILTIN_OP_END, +RET_FLAG, +URET_FLAG, +SRET_FLAG, +MRET_FLAG, +CALL, +SELECT_CC, +BuildPairF64, +SplitF64, +TAIL, +SLLW, +SRAW, +SRLW, +DIVW, +DIVUW, +REMUW, +ROLW, +RORW, +FSRW, +FSLW, +FMV_H_X, +FMV_X_ANYEXTH, +FMV_W_X_RV64, +FMV_X_ANYEXTW_RV64, +READ_CYCLE_WIDE, +GREVI, +GREVIW, +GORCI, +GORCIW, +VMV_X_S, +SPLAT_VECTOR_I64, +READ_VLENB, +TRUNCATE_VECTOR, +VLEFF, +VLEFF_MASK, +VLSEGFF, +VLSEGFF_MASK, +READ_VL, +VSLIDEUP, +VSLIDEDOWN, +VID, +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5d7b0da4ad63e0b6d0d5a2618796ca7bacb4ee0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,348 @@ +SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { + SelectionDAG &DAG = DCI.DAG; + switch (N->getOpcode()) { + default: + break; + case RISCVISD::SplitF64: { + SDValue Op0 = N->getOperand(0); + if (Op0->getOpcode() == RISCVISD::BuildPairF64) + return DCI.CombineTo(N, Op0.getOperand(0), Op0.getOperand(1)); + SDLoc DL(N); + if (ConstantFPSDNode *C = dyn_cast(Op0)) { + APInt V = C->getValueAPF().bitcastToAPInt(); + SDValue Lo = DAG.getConstant(V.trunc(32), DL, MVT::i32); + SDValue Hi = DAG.getConstant(V.lshr(32).trunc(32), DL, MVT::i32); + return DCI.CombineTo(N, Lo, Hi); + } + if (!(Op0.getOpcode() == ISD::FNEG || Op0.getOpcode() == ISD::FABS) || !Op0.getNode()->hasOneUse()) + break; + SDValue NewSplitF64 = DAG.getNode(RISCVISD::SplitF64, DL, DAG.getVTList(MVT::i32, MVT::i32), Op0.getOperand(0)); + SDValue Lo = NewSplitF64.getValue(0); + SDValue Hi = NewSplitF64.getValue(1); + APInt SignBit = APInt::getSignMask(32); + if (Op0.getOpcode() == ISD::FNEG) { + SDValue NewHi = DAG.getNode(ISD::XOR, DL, MVT::i32, Hi, DAG.getConstant(SignBit, DL, MVT::i32)); + return DCI.CombineTo(N, Lo, NewHi); + } + assert(Op0.getOpcode() == ISD::FABS); + SDValue NewHi = DAG.getNode(ISD::AND, DL, MVT::i32, Hi, DAG.getConstant(~SignBit, DL, MVT::i32)); + return DCI.CombineTo(N, Lo, NewHi); + } + case RISCVISD::SLLW: + case RISCVISD::SRAW: + case RISCVISD::SRLW: + case RISCVISD::ROLW: + case RISCVISD::RORW: { + SDValue LHS = N->getOperand(0); + SDValue RHS = N->getOperand(1); + APInt LHSMask = APInt::getLowBitsSet(LHS.getValueSizeInBits(), 32); + APInt RHSMask = APInt::getLowBitsSet(RHS.getValueSizeInBits(), 5); + if (SimplifyDemandedBits(N->getOperand(0), LHSMask, DCI) || SimplifyDemandedBits(N->getOperand(1), RHSMask, DCI)) { + if (N->getOpcode() != ISD::DELETED_NODE) + DCI.AddToWorklist(N); + return SDValue(N, 0); + } + break; + } + case RISCVISD::FSLW: + case RISCVISD::FSRW: { + SDValue Op0 = N->getOperand(0); + SDValue Op1 = N->getOperand(1); + SDValue ShAmt = N->getOperand(2); + APInt OpMask = APInt::getLowBitsSet(Op0.getValueSizeInBits(), 32); + APInt ShAmtMask = APInt::getLowBitsSet(ShAmt.getValueSizeInBits(), 6); + if (SimplifyDemandedBits(Op0, OpMask, DCI) || SimplifyDemandedBits(Op1, OpMask, DCI) || SimplifyDemandedBits(ShAmt, ShAmtMask, DCI)) { + if (N->getOpcode() != ISD::DELETED_NODE) + DCI.AddToWorklist(N); + return SDValue(N, 0); + } + break; + } + case RISCVISD::GREVIW: + case RISCVISD::GORCIW: { + SDValue Op0 = N->getOperand(0); + APInt Mask = APInt::getLowBitsSet(Op0.getValueSizeInBits(), 32); + if (SimplifyDemandedBits(Op0, Mask, DCI)) { + if (N->getOpcode() != ISD::DELETED_NODE) DCI.AddToWorklist(N); + return SDValue(N, 0); + } + unsigned ShAmt1 = N->getConstantOperandVal(1); + SDValue Src = N->getOperand(0); + if (Src.getOpcode() != N->getOpcode()) + return SDValue(); + unsigned ShAmt2 = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + unsigned CombinedShAmt; + if (N->getOpcode() == RISCVISD::GORCI || N->getOpcode() == RISCVISD::GORCIW) + CombinedShAmt = ShAmt1 | ShAmt2; + else + CombinedShAmt = ShAmt1 ^ ShAmt2; + if (CombinedShAmt == 0) + return Src; + SDLoc DL(N); + return DAG.getNode(N->getOpcode(), DL, N->getValueType(0), Src, DAG.getTargetConstant(CombinedShAmt, DL, N->getOperand(1).getValueType())); + } + case RISCVISD::FMV_X_ANYEXTW_RV64: { + SDLoc DL(N); + SDValue Op0 = N->getOperand(0); + if (Op0->getOpcode() == RISCVISD::FMV_W_X_RV64) { + assert(Op0.getOperand(0).getValueType() == MVT::i64 && "Unexpected value type!"); + return Op0.getOperand(0); + } + if (!(Op0.getOpcode() == ISD::FNEG || Op0.getOpcode() == ISD::FABS) || !Op0.getNode()->hasOneUse()) + break; + SDValue NewFMV = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Op0.getOperand(0)); + APInt SignBit = APInt::getSignMask(32).sext(64); + if (Op0.getOpcode() == ISD::FNEG) + return DAG.getNode(ISD::XOR, DL, MVT::i64, NewFMV, DAG.getConstant(SignBit, DL, MVT::i64)); + assert(Op0.getOpcode() == ISD::FABS); + return DAG.getNode(ISD::AND, DL, MVT::i64, NewFMV, DAG.getConstant(~SignBit, DL, MVT::i64)); + } + case RISCVISD::GREVI: + case RISCVISD::GORCI: + unsigned ShAmt1 = N->getConstantOperandVal(1); + SDValue Src = N->getOperand(0); + if (Src.getOpcode() != N->getOpcode()) + return SDValue(); + unsigned ShAmt2 = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + unsigned CombinedShAmt; + if (N->getOpcode() == RISCVISD::GORCI || N->getOpcode() == RISCVISD::GORCIW) + CombinedShAmt = ShAmt1 | ShAmt2; + else + CombinedShAmt = ShAmt1 ^ ShAmt2; + if (CombinedShAmt == 0) + return Src; + SDLoc DL(N); + return DAG.getNode(N->getOpcode(), DL, N->getValueType(0), Src, DAG.getTargetConstant(CombinedShAmt, DL, N->getOperand(1).getValueType())); + case ISD::OR: + EVT VT = Op.getValueType(); + if (VT == Subtarget.getXLenVT() || (Subtarget.is64Bit() && VT == MVT::i32)) { + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + LHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + RHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + if (LHS && RHS && LHS->formsPairWith(*RHS)) { + SDLoc DL(Op); + return DAG.getNode(RISCVISD::GREVI, DL, VT, LHS->Op, DAG.getTargetConstant(LHS->ShAmt, DL, Subtarget.getXLenVT())); + } + } + auto GORC = SDValue(); + EVT VT = Op.getValueType(); + if (VT == Subtarget.getXLenVT() || (Subtarget.is64Bit() && VT == MVT::i32)) { + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + LHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + Optional Mask; + if (Op.getOpcode() == ISD::AND && isa(Op.getOperand(1))) { + Mask = Op.getConstantOperandVal(1); + Op = Op.getOperand(0); + } + if (Op.getOpcode() != ISD::SHL && Op.getOpcode() != ISD::SRL) + return None; + bool IsSHL = Op.getOpcode() == ISD::SHL; + if (!isa(Op.getOperand(1))) + return None; + auto ShAmt = Op.getConstantOperandVal(1); + if (!isPowerOf2_64(ShAmt)) + return None; + static const uint64_t BitmanipMasks[] = { + 0x5555555555555555ULL, 0x3333333333333333ULL, 0x0F0F0F0F0F0F0F0FULL, + 0x00FF00FF00FF00FFULL, 0x0000FFFF0000FFFFULL, 0x00000000FFFFFFFFULL, + }; + unsigned MaskIdx = Log2_64(ShAmt); + if (MaskIdx >= array_lengthof(BitmanipMasks)) + return None; + auto Src = Op.getOperand(0); + unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32; + auto ExpMask = BitmanipMasks[MaskIdx] & maskTrailingOnes(Width); + bool SHLExpMask = IsSHL; + if (!Mask) { + if (Src.getOpcode() == ISD::AND && isa(Src.getOperand(1))) { + Mask = Src.getConstantOperandVal(1); + Src = Src.getOperand(0); + SHLExpMask = !SHLExpMask; + } + else { + Mask = maskTrailingOnes(Width); + *Mask &= (IsSHL ? *Mask << ShAmt : *Mask >> ShAmt); + } + } + if (SHLExpMask) + ExpMask <<= ShAmt; + if (Mask != ExpMask) + return None; + RHS = RISCVBitmanipPat{Src, (unsigned)ShAmt, IsSHL}; + if (LHS && RHS && LHS->formsPairWith(*RHS)) { + SDLoc DL(Op); + return DAG.getNode(RISCVISD::GREVI, DL, VT, LHS->Op, DAG.getTargetConstant(LHS->ShAmt, DL, Subtarget.getXLenVT())); + } + } + auto GORC = SDValue(); + if (GORC) + return GORC; + break; + case RISCVISD::SELECT_CC: { + SDValue LHS = N->getOperand(0); + SDValue RHS = N->getOperand(1); + auto CCVal = static_cast(N->getConstantOperandVal(2)); + APInt Mask = APInt::getBitsSetFrom(LHS.getValueSizeInBits(), 1); + if (ISD::isIntEqualitySetCC(CCVal) && isNullConstant(RHS) && LHS.getOpcode() == ISD::XOR && isOneConstant(LHS.getOperand(1)) && DAG.MaskedValueIsZero(LHS.getOperand(0), Mask)) { + SDLoc DL(N); + CCVal = ISD::getSetCCInverse(CCVal, LHS.getValueType()); + SDValue TargetCC = DAG.getConstant(CCVal, DL, Subtarget.getXLenVT()); + return DAG.getNode(RISCVISD::SELECT_CC, DL, N->getValueType(0), {LHS.getOperand(0), RHS, TargetCC, N->getOperand(3), N->getOperand(4)}); + } + break; + } + case ISD::SETCC: { + SDValue LHS = N->getOperand(0); + SDValue RHS = N->getOperand(1); + if (LHS.getValueType().isScalableVector()) + break; + auto CC = cast(N->getOperand(2))->get(); + APInt Mask = APInt::getBitsSetFrom(LHS.getValueSizeInBits(), 1); + if (isOneConstant(RHS) && ISD::isIntEqualitySetCC(CC) && DAG.MaskedValueIsZero(LHS, Mask)) { + SDLoc DL(N); + SDValue Zero = DAG.getConstant(0, DL, LHS.getValueType()); + CC = ISD::getSetCCInverse(CC, LHS.getValueType()); + return DAG.getSetCC(DL, N->getValueType(0), LHS, Zero, CC); + } + break; + } + case ISD::BR: { + SDValue BrCond = N->getOperand(0); + if (BrCond->getOpcode() != ISD::BRCOND) + break; + SDValue Xor = BrCond->getOperand(1); + if (Xor->getOpcode() != ISD::XOR) + break; + if (auto True = dyn_cast(Xor->getOperand(1))){ + if (True->getSExtValue() != -1) break; + } + else break; + SDValue LoopDecrement = Xor->getOperand(0); + if (LoopDecrement->getOpcode() != ISD::INTRINSIC_W_CHAIN || LoopDecrement->getConstantOperandVal(1) != Intrinsic::loop_decrement) + break; + SDValue BB1 = N->getOperand(1); + SDValue LoopBranch = DAG.getNode(ISD::BRCOND, SDLoc(BrCond), MVT::Other, BrCond->getOperand(0), LoopDecrement, BB1); + SDValue BB2 = BrCond->getOperand(2); + SDValue ElseBranch = DAG.getNode(ISD::BR, SDLoc(N), MVT::Other, LoopBranch, BB2); + return DCI.CombineTo(N, ElseBranch); + } + } + return SDValue(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcb7e257a67ab4aabcfa12a0a4d5afa2da879f4c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,178 @@ +void RISCVTargetLowering::ReplaceNodeResults(SDNode *N, SmallVectorImpl &Results, SelectionDAG &DAG) const { + SDLoc DL(N); + switch (N->getOpcode()) { + default: + llvm_unreachable("Don't know how to custom type legalize this operation!"); + case ISD::STRICT_FP_TO_SINT: + case ISD::STRICT_FP_TO_UINT: + case ISD::FP_TO_SINT: + case ISD::FP_TO_UINT: { + bool IsStrict = N->isStrictFPOpcode(); + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + SDValue Op0 = IsStrict ? N->getOperand(1) : N->getOperand(0); + if (getTypeAction(*DAG.getContext(), Op0.getValueType()) != TargetLowering::TypeSoftenFloat) + return; + RTLIB::Libcall LC; + if (N->getOpcode() == ISD::FP_TO_SINT || N->getOpcode() == ISD::STRICT_FP_TO_SINT) + LC = RTLIB::getFPTOSINT(Op0.getValueType(), N->getValueType(0)); + else + LC = RTLIB::getFPTOUINT(Op0.getValueType(), N->getValueType(0)); + MakeLibCallOptions CallOptions; + EVT OpVT = Op0.getValueType(); + CallOptions.setTypeListBeforeSoften(OpVT, N->getValueType(0), true); + SDValue Chain = IsStrict ? N->getOperand(0) : SDValue(); + SDValue Result; + std::tie(Result, Chain) = makeLibCall(DAG, LC, N->getValueType(0), Op0, CallOptions, DL, Chain); + Results.push_back(Result); + if (IsStrict) + Results.push_back(Chain); + break; + } + case ISD::READCYCLECOUNTER: { + assert(!Subtarget.is64Bit() && "READCYCLECOUNTER only has custom type legalization on riscv32"); + SDVTList VTs = DAG.getVTList(MVT::i32, MVT::i32, MVT::Other); + SDValue RCW = DAG.getNode(RISCVISD::READ_CYCLE_WIDE, DL, VTs, N->getOperand(0)); + Results.push_back( DAG.getNode(ISD::BUILD_PAIR, DL, MVT::i64, RCW, RCW.getValue(1))); + Results.push_back(RCW.getValue(2)); + break; + } + case ISD::ADD: + case ISD::SUB: + case ISD::MUL: + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + if (N->getOperand(1).getOpcode() == ISD::Constant) + return; + Results.push_back(customLegalizeToWOpWithSExt(N, DAG)); + SDLoc DL(N); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(1)); + SDValue NewWOp = DAG.getNode(N->getOpcode(), DL, MVT::i64, NewOp0, NewOp1); + SDValue NewRes = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, MVT::i64, NewWOp, DAG.getValueType(MVT::i32)); + return DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, NewRes); + break; + case ISD::SHL: + case ISD::SRA: + case ISD::SRL: + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + if (N->getOperand(1).getOpcode() == ISD::Constant) + return; + Results.push_back(customLegalizeToWOp(N, DAG)); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(1)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, NewOp1); + return DAG.getNode(ISD::TRUNCATE, DL, N->getValueType(0), NewRes); + break; + case ISD::ROTL: + case ISD::ROTR: + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + Results.push_back(customLegalizeToWOp(N, DAG)); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(1)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, NewOp1); + return DAG.getNode(ISD::TRUNCATE, DL, N->getValueType(0), NewRes); + break; + case ISD::SDIV: + case ISD::UDIV: + case ISD::UREM: { + MVT VT = N->getSimpleValueType(0); + assert((VT == MVT::i8 || VT == MVT::i16 || VT == MVT::i32) && Subtarget.is64Bit() && Subtarget.hasStdExtM() && "Unexpected custom legalisation"); + if (N->getOperand(0).getOpcode() == ISD::Constant || N->getOperand(1).getOpcode() == ISD::Constant) + return; + unsigned ExtOpc = ISD::ANY_EXTEND; + if (VT != MVT::i32) + ExtOpc = N->getOpcode() == ISD::SDIV ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND; + Results.push_back(customLegalizeToWOp(N, DAG, ExtOpc)); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ExtOpc, DL, MVT::i64, N->getOperand(1)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, NewOp1); + return DAG.getNode(ISD::TRUNCATE, DL, N->getValueType(0), NewRes); + break; + } + case ISD::BITCAST: { + assert(((N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtF()) || (N->getValueType(0) == MVT::i16 && Subtarget.hasStdExtZfh())) && "Unexpected custom legalisation"); + SDValue Op0 = N->getOperand(0); + if (N->getValueType(0) == MVT::i16 && Subtarget.hasStdExtZfh()) { + if (Op0.getValueType() != MVT::f16) + return; + SDValue FPConv = DAG.getNode(RISCVISD::FMV_X_ANYEXTH, DL, Subtarget.getXLenVT(), Op0); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i16, FPConv)); + } + else if (N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtF()) { + if (Op0.getValueType() != MVT::f32) + return; + SDValue FPConv = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Op0); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, FPConv)); + } + break; + } + case RISCVISD::GREVI: + case RISCVISD::GORCI: { + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && "Unexpected custom legalisation"); + SDLoc DL(N); + RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode()); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + SDValue NewRes = DAG.getNode(WOpcode, DL, MVT::i64, NewOp0, N->getOperand(1)); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, NewRes)); + break; + } + case ISD::BSWAP: + case ISD::BITREVERSE: { + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtZbp() && "Unexpected custom legalisation"); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + unsigned Imm = N->getOpcode() == ISD::BITREVERSE ? 31 : 24; + SDValue GREVIW = DAG.getNode(RISCVISD::GREVIW, DL, MVT::i64, NewOp0, DAG.getTargetConstant(Imm, DL, Subtarget.getXLenVT())); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, GREVIW)); + break; + } + case ISD::FSHL: + case ISD::FSHR: { + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && Subtarget.hasStdExtZbt() && "Unexpected custom legalisation"); + SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0)); + SDValue NewOp1 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(1)); + SDValue NewOp2 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(2)); + NewOp2 = DAG.getNode(ISD::AND, DL, MVT::i64, NewOp2, DAG.getConstant(0x1f, DL, MVT::i64)); + unsigned Opc = N->getOpcode() == ISD::FSHL ? RISCVISD::FSLW : RISCVISD::FSRW; + SDValue NewOp = DAG.getNode(Opc, DL, MVT::i64, NewOp0, NewOp1, NewOp2); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, NewOp)); + break; + } + case ISD::EXTRACT_VECTOR_ELT: { + SDLoc DL(N); + SDValue Vec = N->getOperand(0); + SDValue Idx = N->getOperand(1); + EVT VecVT = Vec.getValueType(); + assert(!Subtarget.is64Bit() && N->getValueType(0) == MVT::i64 && VecVT.getVectorElementType() == MVT::i64 && "Unexpected EXTRACT_VECTOR_ELT legalization"); + SDValue Slidedown = Vec; + if (!isNullConstant(Idx)) + Slidedown = DAG.getNode(RISCVISD::VSLIDEDOWN, DL, VecVT, DAG.getUNDEF(VecVT), Vec, Idx); + MVT XLenVT = Subtarget.getXLenVT(); + SDValue EltLo = DAG.getNode(RISCVISD::VMV_X_S, DL, XLenVT, Slidedown, Idx); + SDValue ThirtyTwoV = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, DAG.getConstant(32, DL, Subtarget.getXLenVT())); + SDValue LShr32 = DAG.getNode(ISD::SRL, DL, VecVT, Slidedown, ThirtyTwoV); + SDValue EltHi = DAG.getNode(RISCVISD::VMV_X_S, DL, XLenVT, LShr32, Idx); + Results.push_back(DAG.getNode(ISD::BUILD_PAIR, DL, MVT::i64, EltLo, EltHi)); + break; + } + case ISD::INTRINSIC_WO_CHAIN: { + unsigned IntNo = cast(N->getOperand(0))->getZExtValue(); + switch (IntNo) { + default: + llvm_unreachable("Don't know how to custom type legalize this intrinsic!"); + case Intrinsic::riscv_vmv_x_s: { + EVT VT = N->getValueType(0); + assert((VT == MVT::i8 || VT == MVT::i16 || (Subtarget.is64Bit() && VT == MVT::i32)) && "Unexpected custom legalisation!"); + SDValue Extract = DAG.getNode(RISCVISD::VMV_X_S, DL, Subtarget.getXLenVT(), N->getOperand(1)); + Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, VT, Extract)); + break; + } + } + break; + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f36b91ccdbca211f36db98d0815a3bc0c3067159 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,375 @@ +RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM, const RISCVSubtarget &STI) : TargetLowering(TM), Subtarget(STI) { + if (Subtarget.isRV32E()) + report_fatal_error("Codegen not yet implemented for RV32E"); + RISCVABI::ABI ABI = Subtarget.getTargetABI(); + assert(ABI != RISCVABI::ABI_Unknown && "Improperly initialised target ABI"); + if ((ABI == RISCVABI::ABI_ILP32F || ABI == RISCVABI::ABI_LP64F) && !Subtarget.hasStdExtF()) { + errs() << "Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension (ignoring target-abi)\n"; + ABI = Subtarget.is64Bit() ? RISCVABI::ABI_LP64 : RISCVABI::ABI_ILP32; + } + else if ((ABI == RISCVABI::ABI_ILP32D || ABI == RISCVABI::ABI_LP64D) && !Subtarget.hasStdExtD()) { + errs() << "Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)\n"; + ABI = Subtarget.is64Bit() ? RISCVABI::ABI_LP64 : RISCVABI::ABI_ILP32; + } + switch (ABI) { + default: + report_fatal_error("Don't know how to lower this ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64: + case RISCVABI::ABI_LP64F: + case RISCVABI::ABI_LP64D: + break; + } + MVT XLenVT = Subtarget.getXLenVT(); + addRegisterClass(XLenVT, &RISCV::GPRRegClass); + if (Subtarget.hasStdExtZfh()) + addRegisterClass(MVT::f16, &RISCV::FPR16RegClass); + if (Subtarget.hasStdExtF()) + addRegisterClass(MVT::f32, &RISCV::FPR32RegClass); + if (Subtarget.hasStdExtD()) + addRegisterClass(MVT::f64, &RISCV::FPR64RegClass); + if (Subtarget.hasStdExtV()) { + addRegisterClass(RISCVVMVTs::vbool64_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool32_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool16_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool8_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vbool1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8mf8_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8mf4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint8m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint8m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint8m8_t, &RISCV::VRM8RegClass); + addRegisterClass(RISCVVMVTs::vint16mf4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint16mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint16m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint16m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint16m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint16m8_t, &RISCV::VRM8RegClass); + addRegisterClass(RISCVVMVTs::vint32mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint32m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint32m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint32m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint32m8_t, &RISCV::VRM8RegClass); + addRegisterClass(RISCVVMVTs::vint64m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vint64m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vint64m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vint64m8_t, &RISCV::VRM8RegClass); + if (Subtarget.hasStdExtZfh()) { + addRegisterClass(RISCVVMVTs::vfloat16mf4_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat16mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat16m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat16m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vfloat16m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vfloat16m8_t, &RISCV::VRM8RegClass); + } + if (Subtarget.hasStdExtF()) { + addRegisterClass(RISCVVMVTs::vfloat32mf2_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat32m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat32m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vfloat32m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vfloat32m8_t, &RISCV::VRM8RegClass); + } + if (Subtarget.hasStdExtD()) { + addRegisterClass(RISCVVMVTs::vfloat64m1_t, &RISCV::VRRegClass); + addRegisterClass(RISCVVMVTs::vfloat64m2_t, &RISCV::VRM2RegClass); + addRegisterClass(RISCVVMVTs::vfloat64m4_t, &RISCV::VRM4RegClass); + addRegisterClass(RISCVVMVTs::vfloat64m8_t, &RISCV::VRM8RegClass); + } + } + computeRegisterProperties(STI.getRegisterInfo()); + setStackPointerRegisterToSaveRestore(RISCV::X2); + for (auto N : {ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD}) + setLoadExtAction(N, XLenVT, MVT::i1, Promote); + setOperationAction(ISD::DYNAMIC_STACKALLOC, XLenVT, Expand); + setOperationAction(ISD::BR_JT, MVT::Other, Expand); + setOperationAction(ISD::BR_CC, XLenVT, Expand); + setOperationAction(ISD::SELECT_CC, XLenVT, Expand); + setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); + setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); + setOperationAction(ISD::VASTART, MVT::Other, Custom); + setOperationAction(ISD::VAARG, MVT::Other, Expand); + setOperationAction(ISD::VACOPY, MVT::Other, Expand); + setOperationAction(ISD::VAEND, MVT::Other, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand); + if (!Subtarget.hasStdExtZbb()) { + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand); + } + if (Subtarget.is64Bit()) { + setOperationAction(ISD::ADD, MVT::i32, Custom); + setOperationAction(ISD::SUB, MVT::i32, Custom); + setOperationAction(ISD::SHL, MVT::i32, Custom); + setOperationAction(ISD::SRA, MVT::i32, Custom); + setOperationAction(ISD::SRL, MVT::i32, Custom); + } + if (!Subtarget.hasStdExtM()) { + setOperationAction(ISD::MUL, XLenVT, Expand); + setOperationAction(ISD::MULHS, XLenVT, Expand); + setOperationAction(ISD::MULHU, XLenVT, Expand); + setOperationAction(ISD::SDIV, XLenVT, Expand); + setOperationAction(ISD::UDIV, XLenVT, Expand); + setOperationAction(ISD::SREM, XLenVT, Expand); + setOperationAction(ISD::UREM, XLenVT, Expand); + } + if (Subtarget.is64Bit() && Subtarget.hasStdExtM()) { + setOperationAction(ISD::MUL, MVT::i32, Custom); + setOperationAction(ISD::SDIV, MVT::i8, Custom); + setOperationAction(ISD::UDIV, MVT::i8, Custom); + setOperationAction(ISD::UREM, MVT::i8, Custom); + setOperationAction(ISD::SDIV, MVT::i16, Custom); + setOperationAction(ISD::UDIV, MVT::i16, Custom); + setOperationAction(ISD::UREM, MVT::i16, Custom); + setOperationAction(ISD::SDIV, MVT::i32, Custom); + setOperationAction(ISD::UDIV, MVT::i32, Custom); + setOperationAction(ISD::UREM, MVT::i32, Custom); + } + setOperationAction(ISD::SDIVREM, XLenVT, Expand); + setOperationAction(ISD::UDIVREM, XLenVT, Expand); + setOperationAction(ISD::SMUL_LOHI, XLenVT, Expand); + setOperationAction(ISD::UMUL_LOHI, XLenVT, Expand); + setOperationAction(ISD::SHL_PARTS, XLenVT, Custom); + setOperationAction(ISD::SRL_PARTS, XLenVT, Custom); + setOperationAction(ISD::SRA_PARTS, XLenVT, Custom); + if (Subtarget.hasStdExtZbb() || Subtarget.hasStdExtZbp()) { + if (Subtarget.is64Bit()) { + setOperationAction(ISD::ROTL, MVT::i32, Custom); + setOperationAction(ISD::ROTR, MVT::i32, Custom); + } + } + else { + setOperationAction(ISD::ROTL, XLenVT, Expand); + setOperationAction(ISD::ROTR, XLenVT, Expand); + } + if (Subtarget.hasStdExtZbp()) { + setOperationAction(ISD::BITREVERSE, XLenVT, Custom); + setOperationAction(ISD::BSWAP, XLenVT, Custom); + if (Subtarget.is64Bit()) { + setOperationAction(ISD::BITREVERSE, MVT::i32, Custom); + setOperationAction(ISD::BSWAP, MVT::i32, Custom); + } + } + else { + setOperationAction(ISD::BSWAP, XLenVT, Subtarget.hasStdExtZbb() ? Legal : Expand); + } + if (Subtarget.hasStdExtZbb()) { + setOperationAction(ISD::SMIN, XLenVT, Legal); + setOperationAction(ISD::SMAX, XLenVT, Legal); + setOperationAction(ISD::UMIN, XLenVT, Legal); + setOperationAction(ISD::UMAX, XLenVT, Legal); + } + else { + setOperationAction(ISD::CTTZ, XLenVT, Expand); + setOperationAction(ISD::CTLZ, XLenVT, Expand); + setOperationAction(ISD::CTPOP, XLenVT, Expand); + } + if (Subtarget.hasStdExtZbt()) { + setOperationAction(ISD::FSHL, XLenVT, Legal); + setOperationAction(ISD::FSHR, XLenVT, Legal); + setOperationAction(ISD::SELECT, XLenVT, Legal); + if (Subtarget.is64Bit()) { + setOperationAction(ISD::FSHL, MVT::i32, Custom); + setOperationAction(ISD::FSHR, MVT::i32, Custom); + } + } + else { + setOperationAction(ISD::SELECT, XLenVT, Custom); + } + ISD::CondCode FPCCToExpand[] = {ISD::SETOGT, ISD::SETOGE, ISD::SETONE, ISD::SETUEQ, ISD::SETUGT, ISD::SETUGE, ISD::SETULT, ISD::SETULE, ISD::SETUNE, ISD::SETGT, ISD::SETGE, ISD::SETNE, ISD::SETO, ISD::SETUO}; + ISD::NodeType FPOpToExpand[] = {ISD::FSIN, ISD::FCOS, ISD::FSINCOS, ISD::FPOW, ISD::FREM, ISD::FP16_TO_FP, ISD::FP_TO_FP16}; + if (Subtarget.hasStdExtZfh()) + setOperationAction(ISD::BITCAST, MVT::i16, Custom); + if (Subtarget.hasStdExtZfh()) { + setOperationAction(ISD::FMINNUM, MVT::f16, Legal); + setOperationAction(ISD::FMAXNUM, MVT::f16, Legal); + for (auto CC : FPCCToExpand) + setCondCodeAction(CC, MVT::f16, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f16, Expand); + setOperationAction(ISD::SELECT, MVT::f16, Custom); + setOperationAction(ISD::BR_CC, MVT::f16, Expand); + for (auto Op : FPOpToExpand) + setOperationAction(Op, MVT::f16, Expand); + } + if (Subtarget.hasStdExtF()) { + setOperationAction(ISD::FMINNUM, MVT::f32, Legal); + setOperationAction(ISD::FMAXNUM, MVT::f32, Legal); + for (auto CC : FPCCToExpand) + setCondCodeAction(CC, MVT::f32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f32, Expand); + setOperationAction(ISD::SELECT, MVT::f32, Custom); + setOperationAction(ISD::BR_CC, MVT::f32, Expand); + for (auto Op : FPOpToExpand) + setOperationAction(Op, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f32, MVT::f16, Expand); + setTruncStoreAction(MVT::f32, MVT::f16, Expand); + } + if (Subtarget.hasStdExtF() && Subtarget.is64Bit()) + setOperationAction(ISD::BITCAST, MVT::i32, Custom); + if (Subtarget.hasStdExtD()) { + setOperationAction(ISD::FMINNUM, MVT::f64, Legal); + setOperationAction(ISD::FMAXNUM, MVT::f64, Legal); + for (auto CC : FPCCToExpand) + setCondCodeAction(CC, MVT::f64, Expand); + setOperationAction(ISD::SELECT_CC, MVT::f64, Expand); + setOperationAction(ISD::SELECT, MVT::f64, Custom); + setOperationAction(ISD::BR_CC, MVT::f64, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f32, Expand); + setTruncStoreAction(MVT::f64, MVT::f32, Expand); + for (auto Op : FPOpToExpand) + setOperationAction(Op, MVT::f64, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f16, Expand); + setTruncStoreAction(MVT::f64, MVT::f16, Expand); + } + if (Subtarget.is64Bit()) { + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_SINT, MVT::i32, Custom); + } + setOperationAction(ISD::GlobalAddress, XLenVT, Custom); + setOperationAction(ISD::BlockAddress, XLenVT, Custom); + setOperationAction(ISD::ConstantPool, XLenVT, Custom); + setOperationAction(ISD::JumpTable, XLenVT, Custom); + setOperationAction(ISD::GlobalTLSAddress, XLenVT, Custom); + setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, Subtarget.is64Bit() ? Legal : Custom); + setOperationAction(ISD::TRAP, MVT::Other, Legal); + setOperationAction(ISD::DEBUGTRAP, MVT::Other, Legal); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom); + if (Subtarget.hasPULPExtV2()) { + for (auto VT : {XLenVT.SimpleTy, MVT::v2i16, MVT::v4i8}){ + setOperationAction(ISD::ABS, VT, Legal); + setOperationAction(ISD::SMIN, VT, Legal); + setOperationAction(ISD::UMIN, VT, Legal); + setOperationAction(ISD::SMAX, VT, Legal); + setOperationAction(ISD::UMAX, VT, Legal); + } + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Legal); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Legal); + setOperationAction(ISD::CTLZ_ZERO_UNDEF, XLenVT, Legal); + setOperationAction(ISD::CTTZ, XLenVT, Legal); + setOperationAction(ISD::CTPOP, XLenVT, Legal); + setOperationAction(ISD::ROTR, XLenVT, Legal); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i1, Custom); + for (auto VT : {MVT::v2i16, MVT::v4i8}){ + setOperationAction(ISD::SPLAT_VECTOR, VT, Legal); + setOperationAction(ISD::VECREDUCE_ADD, VT, Legal); + setOperationPromotedToType(ISD::LOAD, VT, MVT::i32); + setOperationPromotedToType(ISD::STORE, VT, MVT::i32); + setOperationAction(ISD::VSELECT, VT, Expand); + setOperationAction(ISD::MUL, VT, Expand); + setOperationAction(ISD::SDIV, VT, Expand); + setOperationAction(ISD::UDIV, VT, Expand); + setOperationAction(ISD::SREM, VT, Expand); + setOperationAction(ISD::UREM, VT, Expand); + setOperationAction(ISD::ROTR, VT, Expand); + setOperationAction(ISD::ROTL, VT, Expand); + setOperationAction(ISD::BSWAP, VT, Expand); + setOperationAction(ISD::CTTZ, VT, Expand); + setOperationAction(ISD::CTLZ, VT, Expand); + setOperationAction(ISD::CTPOP, VT, Expand); + setOperationAction(ISD::SDIVREM, VT, Expand); + setOperationAction(ISD::UDIVREM, VT, Expand); + setOperationAction(ISD::SMUL_LOHI, VT, Expand); + setOperationAction(ISD::UMUL_LOHI, VT, Expand); + } + setLoadExtAction(ISD::EXTLOAD, MVT::v2i16, MVT::v2i8, Expand); + setLoadExtAction(ISD::SEXTLOAD, MVT::v2i16, MVT::v2i8, Expand); + setLoadExtAction(ISD::ZEXTLOAD, MVT::v2i16, MVT::v2i8, Expand); + setTruncStoreAction(MVT::v2i16, MVT::v2i8, Expand); + setTargetDAGCombine(ISD::BR); + setBooleanVectorContents(ZeroOrNegativeOneBooleanContent); + } + if (Subtarget.hasStdExtA()) { + setMaxAtomicSizeInBitsSupported(Subtarget.getXLen()); + setMinCmpXchgSizeInBits(32); + } + else { + setMaxAtomicSizeInBitsSupported(0); + } + if (Subtarget.hasPULPExtV2()) { + setIndexedLoadAction(ISD::POST_INC, MVT::i8, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::i16, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::i32, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::v2i16, Legal); + setIndexedLoadAction(ISD::POST_INC, MVT::v4i8, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::i8, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::i16, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::i32, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::v2i16, Legal); + setIndexedStoreAction(ISD::POST_INC, MVT::v4i8, Legal); + } + setBooleanContents(ZeroOrOneBooleanContent); + if (Subtarget.hasStdExtV()) { + setBooleanVectorContents(ZeroOrOneBooleanContent); + setOperationAction(ISD::VSCALE, XLenVT, Custom); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i8, Custom); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i16, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i8, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i16, Custom); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i32, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i32, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::Other, Custom); + if (Subtarget.is64Bit()) { + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i64, Custom); + setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i64, Custom); + } + for (auto VT : MVT::integer_scalable_vector_valuetypes()) { + setOperationAction(ISD::SPLAT_VECTOR, VT, Legal); + setOperationAction(ISD::SMIN, VT, Legal); + setOperationAction(ISD::SMAX, VT, Legal); + setOperationAction(ISD::UMIN, VT, Legal); + setOperationAction(ISD::UMAX, VT, Legal); + setOperationAction(ISD::ROTL, VT, Expand); + setOperationAction(ISD::ROTR, VT, Expand); + if (isTypeLegal(VT)) { + setOperationAction(ISD::ANY_EXTEND, VT, Custom); + setOperationAction(ISD::SIGN_EXTEND, VT, Custom); + setOperationAction(ISD::ZERO_EXTEND, VT, Custom); + setOperationAction(ISD::TRUNCATE, VT, Custom); + setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom); + setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom); + } + } + if (!Subtarget.is64Bit()) { + setOperationAction(ISD::SPLAT_VECTOR, MVT::i64, Custom); + setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::i64, Custom); + setOperationAction(ISD::EXTRACT_VECTOR_ELT, MVT::i64, Custom); + } + ISD::CondCode VFPCCToExpand[] = {ISD::SETO, ISD::SETONE, ISD::SETUEQ, ISD::SETUGT, ISD::SETUGE, ISD::SETULT, ISD::SETULE, ISD::SETUO, ISD::SETGT, ISD::SETOGT, ISD::SETGE, ISD::SETOGE, + }; + const auto SetCommonVFPActions = [&](MVT VT) { + setOperationAction(ISD::SPLAT_VECTOR, VT, Legal); + setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom); + setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom); + for (auto CC : VFPCCToExpand) + setCondCodeAction(CC, VT, Expand); + }; + if (Subtarget.hasStdExtZfh()) { + for (auto VT : {RISCVVMVTs::vfloat16mf4_t, RISCVVMVTs::vfloat16mf2_t, RISCVVMVTs::vfloat16m1_t, RISCVVMVTs::vfloat16m2_t, RISCVVMVTs::vfloat16m4_t, RISCVVMVTs::vfloat16m8_t}) + SetCommonVFPActions(VT); + } + if (Subtarget.hasStdExtF()) { + for (auto VT : {RISCVVMVTs::vfloat32mf2_t, RISCVVMVTs::vfloat32m1_t, RISCVVMVTs::vfloat32m2_t, RISCVVMVTs::vfloat32m4_t, RISCVVMVTs::vfloat32m8_t}) + SetCommonVFPActions(VT); + } + if (Subtarget.hasStdExtD()) { + for (auto VT : {RISCVVMVTs::vfloat64m1_t, RISCVVMVTs::vfloat64m2_t, RISCVVMVTs::vfloat64m4_t, RISCVVMVTs::vfloat64m8_t}) + SetCommonVFPActions(VT); + } + } + const Align FunctionAlignment(Subtarget.hasStdExtC() ? 2 : 4); + setMinFunctionAlignment(FunctionAlignment); + setPrefFunctionAlignment(FunctionAlignment); + setMinimumJumpTableEntries(5); + setJumpIsExpensive(); + setHasMultipleConditionRegisters(); + setTargetDAGCombine(ISD::SETCC); + if (Subtarget.hasStdExtZbp()) { + setTargetDAGCombine(ISD::OR); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48aa3497564c29edb79bfa481025bf26abae26e9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp @@ -0,0 +1,191 @@ +void RISCVTargetLowering::analyzeInputArgs(MachineFunction &MF, CCState &CCInfo, const SmallVectorImpl &Ins, bool IsRet) const { + unsigned NumArgs = Ins.size(); + FunctionType *FType = MF.getFunction().getFunctionType(); + Optional FirstMaskArgument; + if (Subtarget.hasStdExtV()) { + FirstMaskArgument = None; + for (const auto &ArgIdx : enumerate(Args)) { + MVT ArgVT = ArgIdx.value().VT; + if (ArgVT.isScalableVector() && ArgVT.getVectorElementType().SimpleTy == MVT::i1) { + FirstMaskArgument = ArgIdx.index(); + } + } + } + for (unsigned i = 0; i != NumArgs; ++i) { + MVT ArgVT = Ins[i].VT; + ISD::ArgFlagsTy ArgFlags = Ins[i].Flags; + Type *ArgTy = nullptr; + if (IsRet) { + ArgTy = FType->getReturnType(); + } + else if (Ins[i].isOrigArg()) { + ArgTy = FType->getParamType(Ins[i].getOrigArgIndex()); + } + RISCVABI::ABI ABI = MF.getSubtarget().getTargetABI(); + unsigned XLen = DL.getLargestLegalIntTypeSizeInBits(); + assert(XLen == 32 || XLen == 64); + MVT XLenVT = XLen == 32 ? MVT::i32 : MVT::i64; + if (IsRet && ValNo > 1) { + return true; + } + bool UseGPRForF16_F32 = true; + bool UseGPRForF64 = true; + switch (ABI) { + default: + llvm_unreachable("Unexpected ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + break; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + UseGPRForF16_F32 = !IsFixed; + break; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + UseGPRForF16_F32 = !IsFixed; + UseGPRForF64 = !IsFixed; + break; + } + if (State.getFirstUnallocated(ArgFPR32s) == array_lengthof(ArgFPR32s)) { + UseGPRForF16_F32 = true; + UseGPRForF64 = true; + } + if (UseGPRForF16_F32 && (ValVT == MVT::f16 || ValVT == MVT::f32)) { + LocVT = XLenVT; + LocInfo = CCValAssign::BCvt; + } + else if (UseGPRForF64 && XLen == 64 && ValVT == MVT::f64) { + LocVT = MVT::i64; + LocInfo = CCValAssign::BCvt; + } + unsigned TwoXLenInBytes = (2 * XLen) / 8; + if (!IsFixed && ArgFlags.getNonZeroOrigAlign() == TwoXLenInBytes && DL.getTypeAllocSize(OrigTy) == TwoXLenInBytes) { + unsigned RegIdx = State.getFirstUnallocated(ArgGPRs); + if (RegIdx != array_lengthof(ArgGPRs) && RegIdx % 2 == 1) { + State.AllocateReg(ArgGPRs); + } + } + SmallVectorImpl &PendingLocs = State.getPendingLocs(); + SmallVectorImpl &PendingArgFlags = State.getPendingArgFlags(); + assert(PendingLocs.size() == PendingArgFlags.size() && "PendingLocs and PendingArgFlags out of sync"); + if (UseGPRForF64 && XLen == 32 && ValVT == MVT::f64) { + assert(!ArgFlags.isSplit() && PendingLocs.empty() && "Can't lower f64 if it is split"); + Register Reg = State.AllocateReg(ArgGPRs); + LocVT = MVT::i32; + if (!Reg) { + unsigned StackOffset = State.AllocateStack(8, Align(8)); + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + if (!State.AllocateReg(ArgGPRs)) { + State.AllocateStack(4, Align(4)); + } + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ArgFlags.isSplit() || !PendingLocs.empty()) { + LocVT = XLenVT; + LocInfo = CCValAssign::Indirect; + PendingLocs.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); + PendingArgFlags.push_back(ArgFlags); + if (!ArgFlags.isSplitEnd()) { + return false; + } + } + if (ArgFlags.isSplitEnd() && PendingLocs.size() <= 2) { + assert(PendingLocs.size() == 2 && "Unexpected PendingLocs.size()"); + CCValAssign VA = PendingLocs[0]; + ISD::ArgFlagsTy AF = PendingArgFlags[0]; + PendingLocs.clear(); + PendingArgFlags.clear(); + unsigned XLenInBytes = XLen / 8; + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(VA1.getValNo(), VA1.getValVT(), Reg, VA1.getLocVT(), CCValAssign::Full)); + } + else { + Align StackAlign = std::max(Align(XLenInBytes), ArgFlags1.getNonZeroOrigAlign()); + State.addLoc(CCValAssign::getMem(VA1.getValNo(), VA1.getValVT(), State.AllocateStack(XLenInBytes, StackAlign), VA1.getLocVT(), CCValAssign::Full)); + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + return false; + } + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(ValNo2, ValVT2, Reg, LocVT2, CCValAssign::Full)); + } + else { + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + } + return false; + } + Register Reg; + if (ValVT == MVT::f16 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR16s); + } + else if (ValVT == MVT::f32 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR32s); + } + else if (ValVT == MVT::f64 && !UseGPRForF64) { + Reg = State.AllocateReg(ArgFPR64s); + } + else if (ValVT.isScalableVector()) { + const TargetRegisterClass *RC = TLI.getRegClassFor(ValVT); + if (RC == &RISCV::VRRegClass) { + if (FirstMaskArgument.hasValue() && ValNo == FirstMaskArgument.getValue()) { + Reg = State.AllocateReg(RISCV::V0); + } + else { + Reg = State.AllocateReg(ArgVRs); + } + } + else if (RC == &RISCV::VRM2RegClass) { + Reg = State.AllocateReg(ArgVRM2s); + } + else if (RC == &RISCV::VRM4RegClass) { + Reg = State.AllocateReg(ArgVRM4s); + } + else if (RC == &RISCV::VRM8RegClass) { + Reg = State.AllocateReg(ArgVRM8s); + } + else { + llvm_unreachable("Unhandled class register for ValueType"); + } + if (!Reg) { + LocInfo = CCValAssign::Indirect; + Reg = State.AllocateReg(ArgGPRs); + LocVT = XLenVT; + } + } + else { + Reg = State.AllocateReg(ArgGPRs); + } + unsigned StackOffset = Reg ? 0 : State.AllocateStack(XLen / 8, Align(XLen / 8)); + if (!PendingLocs.empty()) { + assert(ArgFlags.isSplitEnd() && "Expected ArgFlags.isSplitEnd()"); + assert(PendingLocs.size() > 2 && "Unexpected PendingLocs.size()"); + for (auto &It : PendingLocs) { + if (Reg) + It.convertToReg(Reg); + else + It.convertToMem(StackOffset); + State.addLoc(It); + } + PendingLocs.clear(); + PendingArgFlags.clear(); + return false; + } + assert((!UseGPRForF16_F32 || !UseGPRForF64 || LocVT == XLenVT || (TLI.getSubtarget().hasStdExtV() && ValVT.isScalableVector())) && "Expected an XLenVT or scalable vector types at this stage"); + if (Reg) { + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ValVT.isFloatingPoint()) { + LocVT = ValVT; + LocInfo = CCValAssign::Full; + } + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + if (CC_RISCV(MF.getDataLayout(), ABI, i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, CCInfo, true, IsRet, ArgTy, *this, FirstMaskArgument)) { + LLVM_DEBUG(dbgs() << "InputArg #" << i << " has unhandled type " << EVT(ArgVT).getEVTString() << '\n'); + llvm_unreachable(nullptr); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2c9f60ce6caff0ffd02b84657be3bcebbdb39e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp @@ -0,0 +1,184 @@ +void RISCVTargetLowering::analyzeOutputArgs(MachineFunction &MF, CCState &CCInfo, const SmallVectorImpl &Outs, bool IsRet, CallLoweringInfo *CLI) const { + unsigned NumArgs = Outs.size(); + Optional FirstMaskArgument; + if (Subtarget.hasStdExtV()) { + FirstMaskArgument = None; + for (const auto &ArgIdx : enumerate(Args)) { + MVT ArgVT = ArgIdx.value().VT; + if (ArgVT.isScalableVector() && ArgVT.getVectorElementType().SimpleTy == MVT::i1) { + FirstMaskArgument = ArgIdx.index(); + } + } + } + for (unsigned i = 0; i != NumArgs; i++) { + MVT ArgVT = Outs[i].VT; + ISD::ArgFlagsTy ArgFlags = Outs[i].Flags; + Type *OrigTy = CLI ? CLI->getArgs()[Outs[i].OrigArgIndex].Ty : nullptr; + RISCVABI::ABI ABI = MF.getSubtarget().getTargetABI(); + unsigned XLen = DL.getLargestLegalIntTypeSizeInBits(); + assert(XLen == 32 || XLen == 64); + MVT XLenVT = XLen == 32 ? MVT::i32 : MVT::i64; + if (IsRet && ValNo > 1) { + return true; + } + bool UseGPRForF16_F32 = true; + bool UseGPRForF64 = true; + switch (ABI) { + default: + llvm_unreachable("Unexpected ABI"); + case RISCVABI::ABI_ILP32: + case RISCVABI::ABI_LP64: + break; + case RISCVABI::ABI_ILP32F: + case RISCVABI::ABI_LP64F: + UseGPRForF16_F32 = !IsFixed; + break; + case RISCVABI::ABI_ILP32D: + case RISCVABI::ABI_LP64D: + UseGPRForF16_F32 = !IsFixed; + UseGPRForF64 = !IsFixed; + break; + } + if (State.getFirstUnallocated(ArgFPR32s) == array_lengthof(ArgFPR32s)) { + UseGPRForF16_F32 = true; + UseGPRForF64 = true; + } + if (UseGPRForF16_F32 && (ValVT == MVT::f16 || ValVT == MVT::f32)) { + LocVT = XLenVT; + LocInfo = CCValAssign::BCvt; + } + else if (UseGPRForF64 && XLen == 64 && ValVT == MVT::f64) { + LocVT = MVT::i64; + LocInfo = CCValAssign::BCvt; + } + unsigned TwoXLenInBytes = (2 * XLen) / 8; + if (!IsFixed && ArgFlags.getNonZeroOrigAlign() == TwoXLenInBytes && DL.getTypeAllocSize(OrigTy) == TwoXLenInBytes) { + unsigned RegIdx = State.getFirstUnallocated(ArgGPRs); + if (RegIdx != array_lengthof(ArgGPRs) && RegIdx % 2 == 1) { + State.AllocateReg(ArgGPRs); + } + } + SmallVectorImpl &PendingLocs = State.getPendingLocs(); + SmallVectorImpl &PendingArgFlags = State.getPendingArgFlags(); + assert(PendingLocs.size() == PendingArgFlags.size() && "PendingLocs and PendingArgFlags out of sync"); + if (UseGPRForF64 && XLen == 32 && ValVT == MVT::f64) { + assert(!ArgFlags.isSplit() && PendingLocs.empty() && "Can't lower f64 if it is split"); + Register Reg = State.AllocateReg(ArgGPRs); + LocVT = MVT::i32; + if (!Reg) { + unsigned StackOffset = State.AllocateStack(8, Align(8)); + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + } + if (!State.AllocateReg(ArgGPRs)) { + State.AllocateStack(4, Align(4)); + } + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ArgFlags.isSplit() || !PendingLocs.empty()) { + LocVT = XLenVT; + LocInfo = CCValAssign::Indirect; + PendingLocs.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); + PendingArgFlags.push_back(ArgFlags); + if (!ArgFlags.isSplitEnd()) { + return false; + } + } + if (ArgFlags.isSplitEnd() && PendingLocs.size() <= 2) { + assert(PendingLocs.size() == 2 && "Unexpected PendingLocs.size()"); + CCValAssign VA = PendingLocs[0]; + ISD::ArgFlagsTy AF = PendingArgFlags[0]; + PendingLocs.clear(); + PendingArgFlags.clear(); + unsigned XLenInBytes = XLen / 8; + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(VA1.getValNo(), VA1.getValVT(), Reg, VA1.getLocVT(), CCValAssign::Full)); + } + else { + Align StackAlign = std::max(Align(XLenInBytes), ArgFlags1.getNonZeroOrigAlign()); + State.addLoc(CCValAssign::getMem(VA1.getValNo(), VA1.getValVT(), State.AllocateStack(XLenInBytes, StackAlign), VA1.getLocVT(), CCValAssign::Full)); + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + return false; + } + if (Register Reg = State.AllocateReg(ArgGPRs)) { + State.addLoc(CCValAssign::getReg(ValNo2, ValVT2, Reg, LocVT2, CCValAssign::Full)); + } + else { + State.addLoc(CCValAssign::getMem(ValNo2, ValVT2, State.AllocateStack(XLenInBytes, Align(XLenInBytes)), LocVT2, CCValAssign::Full)); + } + return false; + } + Register Reg; + if (ValVT == MVT::f16 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR16s); + } + else if (ValVT == MVT::f32 && !UseGPRForF16_F32) { + Reg = State.AllocateReg(ArgFPR32s); + } + else if (ValVT == MVT::f64 && !UseGPRForF64) { + Reg = State.AllocateReg(ArgFPR64s); + } + else if (ValVT.isScalableVector()) { + const TargetRegisterClass *RC = TLI.getRegClassFor(ValVT); + if (RC == &RISCV::VRRegClass) { + if (FirstMaskArgument.hasValue() && ValNo == FirstMaskArgument.getValue()) { + Reg = State.AllocateReg(RISCV::V0); + } + else { + Reg = State.AllocateReg(ArgVRs); + } + } + else if (RC == &RISCV::VRM2RegClass) { + Reg = State.AllocateReg(ArgVRM2s); + } + else if (RC == &RISCV::VRM4RegClass) { + Reg = State.AllocateReg(ArgVRM4s); + } + else if (RC == &RISCV::VRM8RegClass) { + Reg = State.AllocateReg(ArgVRM8s); + } + else { + llvm_unreachable("Unhandled class register for ValueType"); + } + if (!Reg) { + LocInfo = CCValAssign::Indirect; + Reg = State.AllocateReg(ArgGPRs); + LocVT = XLenVT; + } + } + else { + Reg = State.AllocateReg(ArgGPRs); + } + unsigned StackOffset = Reg ? 0 : State.AllocateStack(XLen / 8, Align(XLen / 8)); + if (!PendingLocs.empty()) { + assert(ArgFlags.isSplitEnd() && "Expected ArgFlags.isSplitEnd()"); + assert(PendingLocs.size() > 2 && "Unexpected PendingLocs.size()"); + for (auto &It : PendingLocs) { + if (Reg) + It.convertToReg(Reg); + else + It.convertToMem(StackOffset); + State.addLoc(It); + } + PendingLocs.clear(); + PendingArgFlags.clear(); + return false; + } + assert((!UseGPRForF16_F32 || !UseGPRForF64 || LocVT == XLenVT || (TLI.getSubtarget().hasStdExtV() && ValVT.isScalableVector())) && "Expected an XLenVT or scalable vector types at this stage"); + if (Reg) { + State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo)); + return false; + } + if (ValVT.isFloatingPoint()) { + LocVT = ValVT; + LocInfo = CCValAssign::Full; + } + State.addLoc(CCValAssign::getMem(ValNo, ValVT, StackOffset, LocVT, LocInfo)); + return false; + if (CC_RISCV(MF.getDataLayout(), ABI, i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, CCInfo, Outs[i].IsFixed, IsRet, OrigTy, *this, FirstMaskArgument)) { + LLVM_DEBUG(dbgs() << "OutputArg #" << i << " has unhandled type " << EVT(ArgVT).getEVTString() << "\n"); + llvm_unreachable(nullptr); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb60f440f2c3d49c6bd08e043910840c8c738be3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp @@ -0,0 +1,27 @@ +void RISCVTargetLowering::computeKnownBitsForTargetNode(const SDValue Op, KnownBits &Known, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth) const { + KnownZero = KnownOne = APInt(KnownOne.getBitWidth(), 0); + APInt KnownZero2; + APInt KnownOne2; + unsigned BitWidth = Known.getBitWidth(); + unsigned Opc = Op.getOpcode(); + EVT VT = Op.getValueType(); + assert((Opc >= ISD::BUILTIN_OP_END || Opc == ISD::INTRINSIC_WO_CHAIN || Opc == ISD::INTRINSIC_W_CHAIN || Opc == ISD::INTRINSIC_VOID) && "Should use MaskedValueIsZero if you don't know whether Op is a target node!"); + Known.resetAll(); + if (Op.getOpcode() == RISCVISD::REMUW) { + KnownBits Known2; + Known = DAG.computeKnownBits(Op.getOperand(0), DemandedElts, Depth + 1); + Known2 = DAG.computeKnownBits(Op.getOperand(1), DemandedElts, Depth + 1); + Known = KnownBits::urem(Known.trunc(32), Known2.trunc(32)); + Known = Known.sext(BitWidth); + } + if (Op.getOpcode() == RISCVISD::DIVUW) { + KnownBits Known2; + Known = DAG.computeKnownBits(Op.getOperand(0), DemandedElts, Depth + 1); + Known2 = DAG.computeKnownBits(Op.getOperand(1), DemandedElts, Depth + 1); + Known = KnownBits::udiv(Known.trunc(32), Known2.trunc(32)); + Known = Known.sext(BitWidth); + } + if (Op.getOpcode() == RISCVISD::READ_VLENB) { + Known.Zero.setLowBits(3); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1bfd4ff9c0142d140fa2d0204586a61289d84a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp @@ -0,0 +1,3 @@ +bool convertSelectOfConstantsToMath(EVT VT) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3721be5b16c34bcd975aeae2f4dce484d080226 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp @@ -0,0 +1,3 @@ +bool convertSetCCLogicToBitwiseLogic(EVT VT) const override { + return VT.isScalarInteger(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a5c7fcf9043b0cab2a9beb5f9f97e9405099052 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp @@ -0,0 +1,24 @@ +bool RISCVTargetLowering::decomposeMulByConstant(LLVMContext &Context, EVT VT, SDValue C) const { + if (!VT.isScalarInteger()) { + return false; + } + if (Subtarget.hasStdExtM() && VT.getSizeInBits() > Subtarget.getXLen()) { + return false; + } + if (auto *ConstNode = dyn_cast(C.getNode())) { + const APInt &Imm = ConstNode->getAPIntValue(); + if ((Imm + 1).isPowerOf2() || (Imm - 1).isPowerOf2() || (1 - Imm).isPowerOf2() || (-1 - Imm).isPowerOf2()) { + return true; + } + if (Subtarget.hasStdExtM() && VT.getSizeInBits() >= Subtarget.getXLen()) { + return false; + } + if (!Imm.isSignedIntN(12) && Imm.countTrailingZeros() < 12) { + APInt ImmS = Imm.ashr(Imm.countTrailingZeros()); + if ((ImmS + 1).isPowerOf2() || (ImmS - 1).isPowerOf2() || (1 - ImmS).isPowerOf2()) { + return true; + } + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..509c7a0e3f0b5b7d1c9ddc616ed049a5f0648f15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp @@ -0,0 +1,9 @@ +Instruction *RISCVTargetLowering::emitLeadingFence(IRBuilder<> &Builder, Instruction *Inst, AtomicOrdering Ord) const { + if (isa(Inst) && Ord == AtomicOrdering::SequentiallyConsistent) { + return Builder.CreateFence(Ord); + } + if (isa(Inst) && isReleaseOrStronger(Ord)) { + return Builder.CreateFence(AtomicOrdering::Release); + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..abfa250a03dc885e387fa3aca22d89acdc995376 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp @@ -0,0 +1,18 @@ +Value *RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(IRBuilder<> &Builder, AtomicCmpXchgInst *CI, Value *AlignedAddr, Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const { + unsigned XLen = Subtarget.getXLen(); + Value *Ordering = Builder.getIntN(XLen, static_cast(Ord)); + Intrinsic::ID CmpXchgIntrID = Intrinsic::riscv_masked_cmpxchg_i32; + if (XLen == 64) { + CmpVal = Builder.CreateSExt(CmpVal, Builder.getInt64Ty()); + NewVal = Builder.CreateSExt(NewVal, Builder.getInt64Ty()); + Mask = Builder.CreateSExt(Mask, Builder.getInt64Ty()); + CmpXchgIntrID = Intrinsic::riscv_masked_cmpxchg_i64; + } + Type *Tys[] = {AlignedAddr->getType()}; + Function *MaskedCmpXchg = Intrinsic::getDeclaration(CI->getModule(), CmpXchgIntrID, Tys); + Value *Result = Builder.CreateCall(MaskedCmpXchg, {AlignedAddr, CmpVal, NewVal, Mask, Ordering}); + if (XLen == 64) { + Result = Builder.CreateTrunc(Result, Builder.getInt32Ty()); + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3ee2d975b835746f82a0da490b18a4385d0a50f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp @@ -0,0 +1,70 @@ +Value *RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(IRBuilder<> &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr, Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const { + unsigned XLen = Subtarget.getXLen(); + Value *Ordering = Builder.getIntN(XLen, static_cast(AI->getOrdering())); + Type *Tys[] = {AlignedAddr->getType()}; + Function *LrwOpScwLoop = Intrinsic::getDeclaration(AI->getModule(), getIntrinsicForMaskedAtomicRMWBinOp(XLen, AI->getOperation()), Tys); + if (XLen == 32) { + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + return Intrinsic::riscv_masked_atomicrmw_xchg_i32; + case AtomicRMWInst::Add: + return Intrinsic::riscv_masked_atomicrmw_add_i32; + case AtomicRMWInst::Sub: + return Intrinsic::riscv_masked_atomicrmw_sub_i32; + case AtomicRMWInst::Nand: + return Intrinsic::riscv_masked_atomicrmw_nand_i32; + case AtomicRMWInst::Max: + return Intrinsic::riscv_masked_atomicrmw_max_i32; + case AtomicRMWInst::Min: + return Intrinsic::riscv_masked_atomicrmw_min_i32; + case AtomicRMWInst::UMax: + return Intrinsic::riscv_masked_atomicrmw_umax_i32; + case AtomicRMWInst::UMin: + return Intrinsic::riscv_masked_atomicrmw_umin_i32; + } + } + if (XLen == 64) { + switch (BinOp) { + default: + llvm_unreachable("Unexpected AtomicRMW BinOp"); + case AtomicRMWInst::Xchg: + return Intrinsic::riscv_masked_atomicrmw_xchg_i64; + case AtomicRMWInst::Add: + return Intrinsic::riscv_masked_atomicrmw_add_i64; + case AtomicRMWInst::Sub: + return Intrinsic::riscv_masked_atomicrmw_sub_i64; + case AtomicRMWInst::Nand: + return Intrinsic::riscv_masked_atomicrmw_nand_i64; + case AtomicRMWInst::Max: + return Intrinsic::riscv_masked_atomicrmw_max_i64; + case AtomicRMWInst::Min: + return Intrinsic::riscv_masked_atomicrmw_min_i64; + case AtomicRMWInst::UMax: + return Intrinsic::riscv_masked_atomicrmw_umax_i64; + case AtomicRMWInst::UMin: + return Intrinsic::riscv_masked_atomicrmw_umin_i64; + } + } + llvm_unreachable("Unexpected XLen\n"); + if (XLen == 64) { + Incr = Builder.CreateSExt(Incr, Builder.getInt64Ty()); + Mask = Builder.CreateSExt(Mask, Builder.getInt64Ty()); + ShiftAmt = Builder.CreateSExt(ShiftAmt, Builder.getInt64Ty()); + } + Value *Result; + if (AI->getOperation() == AtomicRMWInst::Min || AI->getOperation() == AtomicRMWInst::Max) { + const DataLayout &DL = AI->getModule()->getDataLayout(); + unsigned ValWidth = DL.getTypeStoreSizeInBits(AI->getValOperand()->getType()); + Value *SextShamt = Builder.CreateSub(Builder.getIntN(XLen, XLen - ValWidth), ShiftAmt); + Result = Builder.CreateCall(LrwOpScwLoop, {AlignedAddr, Incr, Mask, SextShamt, Ordering}); + } + else { + Result = Builder.CreateCall(LrwOpScwLoop, {AlignedAddr, Incr, Mask, Ordering}); + } + if (XLen == 64) { + Result = Builder.CreateTrunc(Result, Builder.getInt32Ty()); + } + return Result; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..787eeb8fc972fa00907f61c8d38b99dc41fd1fb5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp @@ -0,0 +1,8 @@ +Instruction *RISCVTargetLowering::emitTrailingFence(IRBuilder<> &Builder, Instruction *Inst, AtomicOrdering Ord) const { + if (isAcquireOrStronger(Ord)) { + if (isa(Inst)) { + return Builder.CreateFence(AtomicOrdering::Acquire); + } + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getAddr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..45b896e36009000a6701f992a091e5a60a139227 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getAddr.cpp @@ -0,0 +1,25 @@ +template SDValue RISCVTargetLowering::getAddr(NodeTy *N, SelectionDAG &DAG, bool IsLocal) const { + SDLoc DL(N); + EVT Ty = getPointerTy(DAG.getDataLayout()); + if (isPositionIndependent()) { + SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0); + if (IsLocal) { + return SDValue(DAG.getMachineNode(RISCV::PseudoLLA, DL, Ty, Addr), 0); + } + return SDValue(DAG.getMachineNode(RISCV::PseudoLA, DL, Ty, Addr), 0); + } + switch (getTargetMachine().getCodeModel()) { + default: + report_fatal_error("Unsupported code model for lowering"); + case CodeModel::Small: { + SDValue AddrHi = getTargetNode(N, DL, Ty, DAG, RISCVII::MO_HI); + SDValue AddrLo = getTargetNode(N, DL, Ty, DAG, RISCVII::MO_LO); + SDValue MNHi = SDValue(DAG.getMachineNode(RISCV::LUI, DL, Ty, AddrHi), 0); + return SDValue(DAG.getMachineNode(RISCV::ADDI, DL, Ty, MNHi, AddrLo), 0); + } + case CodeModel::Medium: { + SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0); + return SDValue(DAG.getMachineNode(RISCV::PseudoLLA, DL, Ty, Addr), 0); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..915131641ca5dd4cc6c2356db00e6fd67b5b82b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp @@ -0,0 +1,17 @@ +RISCVTargetLowering::ConstraintType RISCVTargetLowering::getConstraintType(StringRef Constraint) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default: + break; + case 'f': + return C_RegisterClass; + case 'I': + case 'J': + case 'K': + return C_Immediate; + case 'A': + return C_Memory; + } + } + return TargetLowering::getConstraintType(Constraint); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46ed5ac12e9f62e6e019a25294f0fc96f25d8f4d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp @@ -0,0 +1,16 @@ +SDValue RISCVTargetLowering::getDynamicTLSAddr(GlobalAddressSDNode *N, SelectionDAG &DAG) const { + SDLoc DL(N); + EVT Ty = getPointerTy(DAG.getDataLayout()); + IntegerType *CallTy = Type::getIntNTy(*DAG.getContext(), Ty.getSizeInBits()); + const GlobalValue *GV = N->getGlobal(); + SDValue Addr = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, 0); + SDValue Load = SDValue(DAG.getMachineNode(RISCV::PseudoLA_TLS_GD, DL, Ty, Addr), 0); + ArgListTy Args; + ArgListEntry Entry; + Entry.Node = Load; + Entry.Ty = CallTy; + Args.push_back(Entry); + TargetLowering::CallLoweringInfo CLI(DAG); + CLI.setDebugLoc(DL).setChain(DAG.getEntryNode()).setLibCallee(CallingConv::C, CallTy, DAG.getExternalSymbol("__tls_get_addr", Ty), std::move(Args)); + return LowerCallTo(CLI).first; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eb02e54d876a19eac0a9f798a894bdb8ad094aa6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp @@ -0,0 +1,3 @@ +Register RISCVTargetLowering::getExceptionPointerRegister(const Constant *PersonalityFn) const { + return RISCV::X10; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d21248ae6b5a38fab11aef82cb88fdc8ad6f6150 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp @@ -0,0 +1,3 @@ +Register RISCVTargetLowering::getExceptionSelectorRegister(const Constant *PersonalityFn) const { + return RISCV::X11; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4fbe6c054b9796da3f9e9476976964f562a3e55a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp @@ -0,0 +1,3 @@ +ISD::NodeType getExtendForAtomicCmpSwapArg() const override { + return ISD::SIGN_EXTEND; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8115491be720522f593d5b6c220ecf0659c42759 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp @@ -0,0 +1,3 @@ +ISD::NodeType getExtendForAtomicOps() const override { + return ISD::SIGN_EXTEND; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b639b42ebb4b943ce1428b84bd6d6574cc675104 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp @@ -0,0 +1,11 @@ +unsigned RISCVTargetLowering::getInlineAsmMemConstraint(StringRef ConstraintCode) const { + if (ConstraintCode.size() == 1) { + switch (ConstraintCode[0]) { + case 'A': + return InlineAsm::Constraint_A; + default: + break; + } + } + return TargetLowering::getInlineAsmMemConstraint(ConstraintCode); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..700e248e4992dd8745c5e6bbf6198c37e1d39e67 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,349 @@ +std::pair RISCVTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const { + if (Constraint.size() == 1) { + if (Constraint[0] == 'r') { + return std::make_pair(0U, &RISCV::GPRRegClass); + } + if (Constraint[0] == 'f') { + if (Subtarget.hasStdExtF()) { + if (VT == MVT::f32) { + return std::make_pair(0U, &RISCV::FPR32RegClass); + } + } + if (Subtarget.hasStdExtD()) { + if (VT == MVT::f64) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + } + if (Subtarget.hasStdExtZfh()) { + if (VT == MVT::f16) { + return std::make_pair(0U, &RISCV::FPR16RegClass); + } + } + if (Subtarget.hasStdExtXSmallfloat()) { + if (VT == MVT::v2f32) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v4f16) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v4bf16) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v4i16) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + if (VT == MVT::v8i8) { + return std::make_pair(0U, &RISCV::FPR64RegClass); + } + } + } + } + unsigned XRegFromAlias = RISCV::NoRegister; + if (Constraint.lower() == "{zero}") { + XRegFromAlias = RISCV::X0; + } + if (Constraint.lower() == "{ra}") { + XRegFromAlias = RISCV::X1; + } + if (Constraint.lower() == "{sp}") { + XRegFromAlias = RISCV::X2; + } + if (Constraint.lower() == "{gp}") { + XRegFromAlias = RISCV::X3; + } + if (Constraint.lower() == "{tp}") { + XRegFromAlias = RISCV::X4; + } + if (Constraint.lower() == "{t0}") { + XRegFromAlias = RISCV::X5; + } + if (Constraint.lower() == "{t1}") { + XRegFromAlias = RISCV::X6; + } + if (Constraint.lower() == "{t2}") { + XRegFromAlias = RISCV::X7; + } + if (Constraint.lower() == "{s0}") { + XRegFromAlias = RISCV::X8; + } + if (Constraint.lower() == "{fp}") { + XRegFromAlias = RISCV::X8; + } + if (Constraint.lower() == "{s1}") { + XRegFromAlias = RISCV::X9; + } + if (Constraint.lower() == "{a0}") { + XRegFromAlias = RISCV::X10; + } + if (Constraint.lower() == "{a1}") { + XRegFromAlias = RISCV::X11; + } + if (Constraint.lower() == "{a2}") { + XRegFromAlias = RISCV::X12; + } + if (Constraint.lower() == "{a3}") { + XRegFromAlias = RISCV::X13; + } + if (Constraint.lower() == "{a4}") { + XRegFromAlias = RISCV::X14; + } + if (Constraint.lower() == "{a5}") { + XRegFromAlias = RISCV::X15; + } + if (Constraint.lower() == "{a6}") { + XRegFromAlias = RISCV::X16; + } + if (Constraint.lower() == "{a7}") { + XRegFromAlias = RISCV::X17; + } + if (Constraint.lower() == "{s2}") { + XRegFromAlias = RISCV::X18; + } + if (Constraint.lower() == "{s3}") { + XRegFromAlias = RISCV::X19; + } + if (Constraint.lower() == "{s4}") { + XRegFromAlias = RISCV::X20; + } + if (Constraint.lower() == "{s5}") { + XRegFromAlias = RISCV::X21; + } + if (Constraint.lower() == "{s6}") { + XRegFromAlias = RISCV::X22; + } + if (Constraint.lower() == "{s7}") { + XRegFromAlias = RISCV::X23; + } + if (Constraint.lower() == "{s8}") { + XRegFromAlias = RISCV::X24; + } + if (Constraint.lower() == "{s9}") { + XRegFromAlias = RISCV::X25; + } + if (Constraint.lower() == "{s10}") { + XRegFromAlias = RISCV::X26; + } + if (Constraint.lower() == "{s11}") { + XRegFromAlias = RISCV::X27; + } + if (Constraint.lower() == "{t3}") { + XRegFromAlias = RISCV::X28; + } + if (Constraint.lower() == "{t4}") { + XRegFromAlias = RISCV::X29; + } + if (Constraint.lower() == "{t5}") { + XRegFromAlias = RISCV::X30; + } + if (Constraint.lower() == "{t6}") { + XRegFromAlias = RISCV::X31; + } + if (XRegFromAlias != RISCV::NoRegister) { + return std::make_pair(XRegFromAlias, &RISCV::GPRRegClass); + } + if (Subtarget.hasStdExtF()) { + unsigned FReg = RISCV::NoRegister; + if (Constraint.lower() == "{f0}") { + FReg = RISCV::F0_F; + } + if (Constraint.lower() == "{ft0}") { + FReg = RISCV::F0_F; + } + if (Constraint.lower() == "{f1}") { + FReg = RISCV::F1_F; + } + if (Constraint.lower() == "{ft1}") { + FReg = RISCV::F1_F; + } + if (Constraint.lower() == "{f2}") { + FReg = RISCV::F2_F; + } + if (Constraint.lower() == "{ft2}") { + FReg = RISCV::F2_F; + } + if (Constraint.lower() == "{f3}") { + FReg = RISCV::F3_F; + } + if (Constraint.lower() == "{ft3}") { + FReg = RISCV::F3_F; + } + if (Constraint.lower() == "{f4}") { + FReg = RISCV::F4_F; + } + if (Constraint.lower() == "{ft4}") { + FReg = RISCV::F4_F; + } + if (Constraint.lower() == "{f5}") { + FReg = RISCV::F5_F; + } + if (Constraint.lower() == "{ft5}") { + FReg = RISCV::F5_F; + } + if (Constraint.lower() == "{f6}") { + FReg = RISCV::F6_F; + } + if (Constraint.lower() == "{ft6}") { + FReg = RISCV::F6_F; + } + if (Constraint.lower() == "{f7}") { + FReg = RISCV::F7_F; + } + if (Constraint.lower() == "{ft7}") { + FReg = RISCV::F7_F; + } + if (Constraint.lower() == "{f8}") { + FReg = RISCV::F8_F; + } + if (Constraint.lower() == "{ft8}") { + FReg = RISCV::F8_F; + } + if (Constraint.lower() == "{f9}") { + FReg = RISCV::F9_F; + } + if (Constraint.lower() == "{ft9}") { + FReg = RISCV::F9_F; + } + if (Constraint.lower() == "{f10}") { + FReg = RISCV::F10_F; + } + if (Constraint.lower() == "{ft10}") { + FReg = RISCV::F10_F; + } + if (Constraint.lower() == "{f11}") { + FReg = RISCV::F11_F; + } + if (Constraint.lower() == "{ft11}") { + FReg = RISCV::F11_F; + } + if (Constraint.lower() == "{f12}") { + FReg = RISCV::F12_F; + } + if (Constraint.lower() == "{ft12}") { + FReg = RISCV::F12_F; + } + if (Constraint.lower() == "{f13}") { + FReg = RISCV::F13_F; + } + if (Constraint.lower() == "{ft13}") { + FReg = RISCV::F13_F; + } + if (Constraint.lower() == "{f14}") { + FReg = RISCV::F14_F; + } + if (Constraint.lower() == "{ft14}") { + FReg = RISCV::F14_F; + } + if (Constraint.lower() == "{f15}") { + FReg = RISCV::F15_F; + } + if (Constraint.lower() == "{ft15}") { + FReg = RISCV::F15_F; + } + if (Constraint.lower() == "{f16}") { + FReg = RISCV::F16_F; + } + if (Constraint.lower() == "{ft16}") { + FReg = RISCV::F16_F; + } + if (Constraint.lower() == "{f17}") { + FReg = RISCV::F17_F; + } + if (Constraint.lower() == "{ft17}") { + FReg = RISCV::F17_F; + } + if (Constraint.lower() == "{f18}") { + FReg = RISCV::F18_F; + } + if (Constraint.lower() == "{ft18}") { + FReg = RISCV::F18_F; + } + if (Constraint.lower() == "{f19}") { + FReg = RISCV::F19_F; + } + if (Constraint.lower() == "{ft19}") { + FReg = RISCV::F19_F; + } + if (Constraint.lower() == "{f20}") { + FReg = RISCV::F20_F; + } + if (Constraint.lower() == "{ft20}") { + FReg = RISCV::F20_F; + } + if (Constraint.lower() == "{f21}") { + FReg = RISCV::F21_F; + } + if (Constraint.lower() == "{ft21}") { + FReg = RISCV::F21_F; + } + if (Constraint.lower() == "{f22}") { + FReg = RISCV::F22_F; + } + if (Constraint.lower() == "{ft22}") { + FReg = RISCV::F22_F; + } + if (Constraint.lower() == "{f23}") { + FReg = RISCV::F23_F; + } + if (Constraint.lower() == "{ft23}") { + FReg = RISCV::F23_F; + } + if (Constraint.lower() == "{f24}") { + FReg = RISCV::F24_F; + } + if (Constraint.lower() == "{ft24}") { + FReg = RISCV::F24_F; + } + if (Constraint.lower() == "{f25}") { + FReg = RISCV::F25_F; + } + if (Constraint.lower() == "{ft25}") { + FReg = RISCV::F25_F; + } + if (Constraint.lower() == "{f26}") { + FReg = RISCV::F26_F; + } + if (Constraint.lower() == "{ft26}") { + FReg = RISCV::F26_F; + } + if (Constraint.lower() == "{f27}") { + FReg = RISCV::F27_F; + } + if (Constraint.lower() == "{ft27}") { + FReg = RISCV::F27_F; + } + if (Constraint.lower() == "{f28}") { + FReg = RISCV::F28_F; + } + if (Constraint.lower() == "{ft28}") { + FReg = RISCV::F28_F; + } + if (Constraint.lower() == "{f29}") { + FReg = RISCV::F29_F; + } + if (Constraint.lower() == "{ft29}") { + FReg = RISCV::F29_F; + } + if (Constraint.lower() == "{f30}") { + FReg = RISCV::F30_F; + } + if (Constraint.lower() == "{ft30}") { + FReg = RISCV::F30_F; + } + if (Constraint.lower() == "{f31}") { + FReg = RISCV::F31_F; + } + if (Constraint.lower() == "{ft31}") { + FReg = RISCV::F31_F; + } + if (FReg != RISCV::NoRegister) { + assert(RISCV::F0_32 <= FReg && FReg <= RISCV::F31_32 && "Unknown fp-reg"); + if (Subtarget.hasStdExtD()) { + unsigned RegNo = FReg - RISCV::F0_F; + unsigned DReg = RISCV::F0_D + RegNo; + return std::make_pair(DReg, &RISCV::FPR64RegClass); + } + return std::make_pair(FReg, &RISCV::FPR32RegClass); + } + } + return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26ad342c7f779b295cd18cd28b9b3f8724c1896c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp @@ -0,0 +1,14 @@ +Register RISCVTargetLowering::getRegisterByName(const char *RegName, LLT VT, const MachineFunction &MF) const { + Register Reg = MatchRegisterAltName(RegName); + if (Reg == RISCV::NoRegister) { + Reg = MatchRegisterName(RegName); + } + if (Reg == RISCV::NoRegister) { + report_fatal_error(Twine("Invalid register name \"" + StringRef(RegName) + "\".")); + } + BitVector ReservedRegs = Subtarget.getRegisterInfo()->getReservedRegs(MF); + if (!ReservedRegs.test(Reg) && !Subtarget.isRegisterReservedByUser(Reg)) { + report_fatal_error(Twine("Trying to obtain non-reserved register \"" + StringRef(RegName) + "\".")); + } + return Reg; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca330ad9133ea7d3b3682e5e651961f59d6709eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp @@ -0,0 +1,9 @@ +EVT RISCVTargetLowering::getSetCCResultType(const DataLayout &DL, LLVMContext &, EVT VT) const { + if (!VT.isVector()) { + return getPointerTy(DL); + } + if (Subtarget.hasStdExtV()) { + return MVT::getVectorVT(MVT::i1, VT.getVectorElementCount()); + } + return VT.changeVectorElementTypeToInteger(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f231109058dae006fecd5590954e0a119396b49 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp @@ -0,0 +1,19 @@ +SDValue RISCVTargetLowering::getStaticTLSAddr(GlobalAddressSDNode *N, SelectionDAG &DAG, bool UseGOT) const { + SDLoc DL(N); + EVT Ty = getPointerTy(DAG.getDataLayout()); + const GlobalValue *GV = N->getGlobal(); + MVT XLenVT = Subtarget.getXLenVT(); + if (UseGOT) { + SDValue Addr = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, 0); + SDValue Load = SDValue(DAG.getMachineNode(RISCV::PseudoLA_TLS_IE, DL, Ty, Addr), 0); + SDValue TPReg = DAG.getRegister(RISCV::X4, XLenVT); + return DAG.getNode(ISD::ADD, DL, Ty, Load, TPReg); + } + SDValue AddrHi = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, RISCVII::MO_TPREL_HI); + SDValue AddrAdd = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, RISCVII::MO_TPREL_ADD); + SDValue AddrLo = DAG.getTargetGlobalAddress(GV, DL, Ty, 0, RISCVII::MO_TPREL_LO); + SDValue MNHi = SDValue(DAG.getMachineNode(RISCV::LUI, DL, Ty, AddrHi), 0); + SDValue TPReg = DAG.getRegister(RISCV::X4, XLenVT); + SDValue MNAdd = SDValue(DAG.getMachineNode(RISCV::PseudoAddTPRel, DL, Ty, MNHi, TPReg, AddrAdd), 0); + return SDValue(DAG.getMachineNode(RISCV::ADDI, DL, Ty, MNAdd, AddrLo), 0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d7571dffca9b46bd58d715c218cba477a279eed --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp @@ -0,0 +1,3 @@ +const RISCVSubtarget &getSubtarget() const { + return Subtarget; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2af7ef3833346212519e245d5021adcd5b7b5c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,123 @@ +const char *RISCVTargetLowering::getTargetNodeName(unsigned Opcode) const { + if ((RISCVISD::NodeType)Opcode == RISCVISD::RET_FLAG) { + return "RISCVISD::RET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::URET_FLAG) { + return "RISCVISD::URET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SRET_FLAG) { + return "RISCVISD::SRET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::MRET_FLAG) { + return "RISCVISD::MRET_FLAG"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::CALL) { + return "RISCVISD::CALL"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SELECT_CC) { + return "RISCVISD::SELECT_CC"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::BuildPairF64) { + return "RISCVISD::BuildPairF64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SplitF64) { + return "RISCVISD::SplitF64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::TAIL) { + return "RISCVISD::TAIL"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_X_ANYEXTH) { + return "RISCVISD::FMV_X_ANYEXTH"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_W_X_RV64) { + return "RISCVISD::FMV_W_X_RV64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_X_ANYEXTW_RV64) { + return "RISCVISD::FMV_X_ANYEXTW_RV64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::READ_CYCLE_WIDE) { + return "RISCVISD::READ_CYCLE_WIDE"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GREVI) { + return "RISCVISD::GREVI"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GREVIW) { + return "RISCVISD::GREVIW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GORCI) { + return "RISCVISD::GORCI"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::GORCIW) { + return "RISCVISD::GORCIW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VMV_X_S) { + return "RISCVISD::VMV_X_S"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SPLAT_VECTOR_I64) { + return "RISCVISD::SPLAT_VECTOR_I64"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::READ_VLENB) { + return "RISCVISD::READ_VLENB"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::TRUNCATE_VECTOR) { + return "RISCVISD::TRUNCATE_VECTOR"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLEFF) { + return "RISCVISD::VLEFF"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLEFF_MASK) { + return "RISCVISD::VLEFF_MASK"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLSEGFF) { + return "RISCVISD::VLSEGFF"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VLSEGFF_MASK) { + return "RISCVISD::VLSEGFF_MASK"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::READ_VL) { + return "RISCVISD::READ_VL"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VSLIDEUP) { + return "RISCVISD::VSLIDEUP"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VSLIDEDOWN) { + return "RISCVISD::VSLIDEDOWN"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::VID) { + return "RISCVISD::VID"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FMV_H_X) { + return "RISCVISD::FMV_H_X"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FSRW) { + return "RISCVISD::FSRW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::FSLW) { + return "RISCVISD::FSLW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::RORW) { + return "RISCVISD::RORW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::ROLW) { + return "RISCVISD::ROLW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::REMUW) { + return "RISCVISD::REMUW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::DIVUW) { + return "RISCVISD::DIVUW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::DIVW) { + return "RISCVISD::DIVW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SRLW) { + return "RISCVISD::SRLW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SRAW) { + return "RISCVISD::SRAW"; + } + if ((RISCVISD::NodeType)Opcode == RISCVISD::SLLW) { + return "RISCVISD::SLLW"; + } + return nullptr; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d8deda7d83d9f59a857e66fddd44324aa0de609 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp @@ -0,0 +1,93 @@ +bool RISCVTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, MachineFunction &MF, unsigned Intrinsic) const { + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_xchg_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_add_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_sub_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_nand_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_max_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_min_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_umax_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_atomicrmw_umin_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + if (Intrinsic == Intrinsic::riscv_masked_cmpxchg_i32) { + PointerType *PtrTy = cast(I.getArgOperand(0)->getType()); + Info.opc = ISD::INTRINSIC_W_CHAIN; + Info.memVT = MVT::getVT(PtrTy->getElementType()); + Info.ptrVal = I.getArgOperand(0); + Info.offset = 0; + Info.align = Align(4); + Info.flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore | MachineMemOperand::MOVolatile; + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1c41f213e055244de1922cb5a036fe323993663 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::hasBitPreservingFPLogic(EVT VT) const { + return (VT == MVT::f16 && Subtarget.hasStdExtZfh()) || (VT == MVT::f32 && Subtarget.hasStdExtF()) || (VT == MVT::f64 && Subtarget.hasStdExtD()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d9f871f13e0b61779ec7b7ac0e64443ee06b43f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isCheapToSpeculateCtlz() const { + return Subtarget.hasStdExtZbb(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9a2e056622fab5c51755ed36e67138289278601 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isCheapToSpeculateCttz() const { + return Subtarget.hasStdExtZbb(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..972b11ab3501171966e3bfd4b96ec82355cbbcaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp @@ -0,0 +1,24 @@ +bool RISCVTargetLowering::isDesirableToCommuteWithShift(const SDNode *N, CombineLevel Level) const { + SDValue N0 = N->getOperand(0); + EVT Ty = N0.getValueType(); + if (Ty.isScalarInteger() && (N0.getOpcode() == ISD::ADD || N0.getOpcode() == ISD::OR)) { + auto *C1 = dyn_cast(N0->getOperand(1)); + auto *C2 = dyn_cast(N->getOperand(1)); + if (C1 && C2) { + const APInt &C1Int = C1->getAPIntValue(); + APInt ShiftedC1Int = C1Int << C2->getAPIntValue(); + if (ShiftedC1Int.getMinSignedBits() <= 64 && isLegalAddImmediate(ShiftedC1Int.getSExtValue())) { + return true; + } + if (C1Int.getMinSignedBits() <= 64 && isLegalAddImmediate(C1Int.getSExtValue())) { + return false; + } + int C1Cost = RISCVMatInt::getIntMatCost(C1Int, Ty.getSizeInBits(), Subtarget.is64Bit()); + int ShiftedC1Cost = RISCVMatInt::getIntMatCost(ShiftedC1Int, Ty.getSizeInBits(), Subtarget.is64Bit()); + if (C1Cost < ShiftedC1Cost) { + return false; + } + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ade96d77d668102258fdfb941e8165d21a19205 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp @@ -0,0 +1,44 @@ + +bool RISCVTargetLowering::isEligibleForTailCallOptimization(CCState &CCInfo, CallLoweringInfo &CLI, MachineFunction &MF, const SmallVector &ArgLocs) const { + auto &Callee = CLI.Callee; + auto CalleeCC = CLI.CallConv; + auto &Outs = CLI.Outs; + auto &Caller = MF.getFunction(); + auto CallerCC = Caller.getCallingConv(); + if (Caller.hasFnAttribute("interrupt")) { + return false; + } + if (CCInfo.getNextStackOffset() != 0) { + return false; + } + for (auto &VA : ArgLocs) { + if (VA.getLocInfo() == CCValAssign::Indirect) { + return false; + } + } + auto IsCallerStructRet = Caller.hasStructRetAttr(); + auto IsCalleeStructRet = Outs.empty() ? false : Outs[0].Flags.isSRet(); + if (IsCallerStructRet || IsCalleeStructRet) { + return false; + } + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + const GlobalValue *GV = G->getGlobal(); + if (GV->hasExternalWeakLinkage()) { + return false; + } + } + const RISCVRegisterInfo *TRI = Subtarget.getRegisterInfo(); + const uint32_t *CallerPreserved = TRI->getCallPreservedMask(MF, CallerCC); + if (CalleeCC != CallerCC) { + const uint32_t *CalleePreserved = TRI->getCallPreservedMask(MF, CalleeCC); + if (!TRI->regmaskSubsetEqual(CallerPreserved, CalleePreserved)) { + return false; + } + } + for (auto &Arg : Outs) { + if (Arg.Flags.isByVal()) { + return false; + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2056d0ac4e9581359873184d0cedfb79ae3e2723 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp @@ -0,0 +1,17 @@ +bool RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(const MachineFunction &MF, EVT VT) const { + VT = VT.getScalarType(); + if (!VT.isSimple()) { + return false; + } + switch (VT.getSimpleVT().SimpleTy) { + case MVT::f16: + return Subtarget.hasStdExtZfh(); + case MVT::f32: + return Subtarget.hasStdExtF(); + case MVT::f64: + return Subtarget.hasStdExtD(); + default: + break; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36936d70cb866640bf90c1d991e6af92243eec59 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp @@ -0,0 +1,21 @@ +bool RISCVTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT, bool ForCodeSize) const { + if (VT == MVT::f16) { + if (!Subtarget.hasStdExtZfh()) { + return false; + } + } + if (VT == MVT::f32) { + if (!Subtarget.hasStdExtF()) { + return false; + } + } + if (VT == MVT::f64) { + if (!Subtarget.hasStdExtD()) { + return false; + } + } + if (Imm.isNegZero()) { + return false; + } + return Imm.isZero(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27342f01a75e9602e8823826937d056a8c10605f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isLegalAddImmediate(int64_t Imm) const { + return isInt<12>(Imm); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3fc00237148c4d20cfe2aea80e3a44e2f1aaad8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,20 @@ +bool RISCVTargetLowering::isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I) const { + if (AM.BaseGV) { + return false; + } + if (!isInt<12>(AM.BaseOffs)) { + return false; + } + switch (AM.Scale) { + case 0: + break; + case 1: + if (!AM.HasBaseReg) { + break; + } + return false; + default: + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..50a187b1c95b0177261e158b1676e2eef2e5b294 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isLegalICmpImmediate(int64_t Imm) const { + return isInt<12>(Imm); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e8f8585225e31860fa294413e0d386f6e3ca4b51 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::isSExtCheaperThanZExt(EVT SrcVT, EVT DstVT) const { + return Subtarget.is64Bit() && SrcVT == MVT::i32 && DstVT == MVT::i64; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d27755e3ae3c64b204a428d561db12e21d89e8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp @@ -0,0 +1,8 @@ +bool RISCVTargetLowering::isTruncateFree(Type *SrcTy, Type *DstTy) const { + if (Subtarget.is64Bit() || !SrcTy->isIntegerTy() || !DstTy->isIntegerTy()) { + return false; + } + unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); + unsigned DestBits = DstTy->getPrimitiveSizeInBits(); + return (SrcBits == 64 && DestBits == 32); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0d212b5aaadd33f2042e323c9e69be7f2022ece5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp @@ -0,0 +1,8 @@ +bool RISCVTargetLowering::isTruncateFree(EVT SrcVT, EVT DstVT) const { + if (Subtarget.is64Bit() || SrcVT.isVector() || DstVT.isVector() || !SrcVT.isInteger() || !DstVT.isInteger()) { + return false; + } + unsigned SrcBits = SrcVT.getSizeInBits(); + unsigned DestBits = DstVT.getSizeInBits(); + return (SrcBits == 64 && DestBits == 32); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75d97387f9027fe3ec4fac559ed7892b3b769ecd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp @@ -0,0 +1,9 @@ +bool RISCVTargetLowering::isZExtFree(SDValue Val, EVT VT2) const { + if (auto *LD = dyn_cast(Val)) { + EVT MemVT = LD->getMemoryVT(); + if ((MemVT == MVT::i8 || MemVT == MVT::i16 || (Subtarget.is64Bit() && MemVT == MVT::i32)) && (LD->getExtensionType() == ISD::NON_EXTLOAD || LD->getExtensionType() == ISD::ZEXTLOAD)) { + return true; + } + } + return TargetLowering::isZExtFree(Val, VT2); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..050e83980f6a8e966d61e932a1c240c89fefcc43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp @@ -0,0 +1,12 @@ +SDValue RISCVTargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + SDValue Idx = Op.getOperand(1); + if (isNullConstant(Idx)) { + return Op; + } + SDValue Vec = Op.getOperand(0); + EVT EltVT = Op.getValueType(); + EVT VecVT = Vec.getValueType(); + SDValue Slidedown = DAG.getNode(RISCVISD::VSLIDEDOWN, DL, VecVT, DAG.getUNDEF(VecVT), Vec, Idx); + return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Slidedown, DAG.getConstant(0, DL, Subtarget.getXLenVT())); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41468edf3120b3af736ffa9f92aa9d239535b7a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp @@ -0,0 +1,21 @@ + +SDValue RISCVTargetLowering::lowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT VecVT = Op.getValueType(); + SDValue Vec = Op.getOperand(0); + SDValue Val = Op.getOperand(1); + SDValue Idx = Op.getOperand(2); + if (Subtarget.is64Bit() || VecVT.getVectorElementType() != MVT::i64) { + if (isNullConstant(Idx)) + return Op; + SDValue Slidedown = DAG.getNode(RISCVISD::VSLIDEDOWN, DL, VecVT, DAG.getUNDEF(VecVT), Vec, Idx); + SDValue InsertElt0 = DAG.getNode(ISD::INSERT_VECTOR_ELT, DL, VecVT, Slidedown, Val, DAG.getConstant(0, DL, Subtarget.getXLenVT())); + return DAG.getNode(RISCVISD::VSLIDEUP, DL, VecVT, Vec, InsertElt0, Idx); + } + SDValue SplattedVal = DAG.getSplatVector(VecVT, DL, Val); + SDValue SplattedIdx = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, Idx); + SDValue VID = DAG.getNode(RISCVISD::VID, DL, VecVT); + auto SetCCVT = getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VecVT); + SDValue Mask = DAG.getSetCC(DL, SetCCVT, VID, SplattedIdx, ISD::SETEQ); + return DAG.getNode(ISD::VSELECT, DL, VecVT, Mask, SplattedVal, Vec); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d178b704135564eb306892895a477348039fefb8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp @@ -0,0 +1,21 @@ +SDValue RISCVTargetLowering::lowerSELECT(SDValue Op, SelectionDAG &DAG) const { + SDValue CondV = Op.getOperand(0); + SDValue TrueV = Op.getOperand(1); + SDValue FalseV = Op.getOperand(2); + SDLoc DL(Op); + MVT XLenVT = Subtarget.getXLenVT(); + if (Op.getSimpleValueType() == XLenVT && CondV.getOpcode() == ISD::SETCC && CondV.getOperand(0).getSimpleValueType() == XLenVT) { + SDValue LHS = CondV.getOperand(0); + SDValue RHS = CondV.getOperand(1); + auto CC = cast(CondV.getOperand(2)); + ISD::CondCode CCVal = CC->get(); + normaliseSetCC(LHS, RHS, CCVal); + SDValue TargetCC = DAG.getConstant(CCVal, DL, XLenVT); + SDValue Ops[] = {LHS, RHS, TargetCC, TrueV, FalseV}; + return DAG.getNode(RISCVISD::SELECT_CC, DL, Op.getValueType(), Ops); + } + SDValue Zero = DAG.getConstant(0, DL, XLenVT); + SDValue SetNE = DAG.getConstant(ISD::SETNE, DL, XLenVT); + SDValue Ops[] = {CondV, Zero, SetNE, TrueV, FalseV}; + return DAG.getNode(RISCVISD::SELECT_CC, DL, Op.getValueType(), Ops); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a9078247c7a9a4149ed654f10dd7d4f9d2f34abd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp @@ -0,0 +1,26 @@ +SDValue RISCVTargetLowering::lowerSPLATVECTOR(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT VecVT = Op.getValueType(); + assert(!Subtarget.is64Bit() && VecVT.getVectorElementType() == MVT::i64 && "Unexpected SPLAT_VECTOR lowering"); + SDValue SplatVal = Op.getOperand(0); + if (auto *CVal = dyn_cast(SplatVal)) { + if (isInt<32>(CVal->getSExtValue())) + return DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, DAG.getConstant(CVal->getSExtValue(), DL, MVT::i32)); + } + if (SplatVal.getOpcode() == ISD::SIGN_EXTEND && SplatVal.getOperand(0).getValueType() == MVT::i32) { + return DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatVal.getOperand(0)); + } + SDValue One = DAG.getConstant(1, DL, MVT::i32); + SDValue Zero = DAG.getConstant(0, DL, MVT::i32); + SDValue ThirtyTwoV = DAG.getConstant(32, DL, VecVT); + SDValue Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, DL, MVT::i32, SplatVal, Zero); + SDValue Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, DL, MVT::i32, SplatVal, One); + Lo = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, Lo); + Lo = DAG.getNode(ISD::SHL, DL, VecVT, Lo, ThirtyTwoV); + Lo = DAG.getNode(ISD::SRL, DL, VecVT, Lo, ThirtyTwoV); + if (isNullConstant(Hi)) + return Lo; + Hi = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, Hi); + Hi = DAG.getNode(ISD::SHL, DL, VecVT, Hi, ThirtyTwoV); + return DAG.getNode(ISD::OR, DL, VecVT, Lo, Hi); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a781b0834469a4688ad73e9a4725749eac3b6f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp @@ -0,0 +1,24 @@ +SDValue RISCVTargetLowering::lowerShiftLeftParts(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + SDValue Lo = Op.getOperand(0); + SDValue Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + SDValue Zero = DAG.getConstant(0, DL, VT); + SDValue One = DAG.getConstant(1, DL, VT); + EVT VT = Lo.getValueType(); + SDValue MinusXLen = DAG.getConstant(-(int)Subtarget.getXLen(), DL, VT); + SDValue XLenMinus1 = DAG.getConstant(Subtarget.getXLen() - 1, DL, VT); + SDValue ShamtMinusXLen = DAG.getNode(ISD::ADD, DL, VT, Shamt, MinusXLen); + SDValue XLenMinus1Shamt = DAG.getNode(ISD::SUB, DL, VT, XLenMinus1, Shamt); + SDValue LoTrue = DAG.getNode(ISD::SHL, DL, VT, Lo, Shamt); + SDValue ShiftRight1Lo = DAG.getNode(ISD::SRL, DL, VT, Lo, One); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, ShiftRight1Lo, XLenMinus1Shamt); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, Hi, Shamt); + SDValue HiTrue = DAG.getNode(ISD::OR, DL, VT, ShiftLeftHi, ShiftRightLo); + SDValue HiFalse = DAG.getNode(ISD::SHL, DL, VT, Lo, ShamtMinusXLen); + SDValue CC = DAG.getSetCC(DL, VT, ShamtMinusXLen, Zero, ISD::SETLT); + Lo = DAG.getNode(ISD::SELECT, DL, VT, CC, LoTrue, Zero); + Hi = DAG.getNode(ISD::SELECT, DL, VT, CC, HiTrue, HiFalse); + SDValue Parts[2] = {Lo, Hi}; + return DAG.getMergeValues(Parts, DL); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a763204f45299f1efa455b96f65930c2e3e267ef --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp @@ -0,0 +1,26 @@ +SDValue RISCVTargetLowering::lowerShiftRightParts(SDValue Op, SelectionDAG &DAG, bool IsSRA) const { + SDLoc DL(Op); + SDValue Lo = Op.getOperand(0); + SDValue Hi = Op.getOperand(1); + SDValue Shamt = Op.getOperand(2); + EVT VT = Lo.getValueType(); + unsigned ShiftRightOp = IsSRA ? ISD::SRA : ISD::SRL; + SDValue Zero = DAG.getConstant(0, DL, VT); + SDValue One = DAG.getConstant(1, DL, VT); + SDValue MinusXLen = DAG.getConstant(-(int)Subtarget.getXLen(), DL, VT); + SDValue XLenMinus1 = DAG.getConstant(Subtarget.getXLen() - 1, DL, VT); + SDValue ShamtMinusXLen = DAG.getNode(ISD::ADD, DL, VT, Shamt, MinusXLen); + SDValue XLenMinus1Shamt = DAG.getNode(ISD::SUB, DL, VT, XLenMinus1, Shamt); + SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, VT, Lo, Shamt); + SDValue ShiftLeftHi1 = DAG.getNode(ISD::SHL, DL, VT, Hi, One); + SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, VT, ShiftLeftHi1, XLenMinus1Shamt); + SDValue LoTrue = DAG.getNode(ISD::OR, DL, VT, ShiftRightLo, ShiftLeftHi); + SDValue HiTrue = DAG.getNode(ShiftRightOp, DL, VT, Hi, Shamt); + SDValue LoFalse = DAG.getNode(ShiftRightOp, DL, VT, Hi, ShamtMinusXLen); + SDValue HiFalse = IsSRA ? DAG.getNode(ISD::SRA, DL, VT, Hi, XLenMinus1) : Zero; + SDValue CC = DAG.getSetCC(DL, VT, ShamtMinusXLen, Zero, ISD::SETLT); + Lo = DAG.getNode(ISD::SELECT, DL, VT, CC, LoTrue, LoFalse); + Hi = DAG.getNode(ISD::SELECT, DL, VT, CC, HiTrue, HiFalse); + SDValue Parts[2] = {Lo, Hi}; + return DAG.getMergeValues(Parts, DL); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9c860632f70220e7401fd9e8e3d7240d21e74964 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp @@ -0,0 +1,20 @@ +SDValue RISCVTargetLowering::lowerVectorMaskExt(SDValue Op, SelectionDAG &DAG, int64_t ExtTrueVal) const { + SDLoc DL(Op); + EVT VecVT = Op.getValueType(); + SDValue Src = Op.getOperand(0); + if (!Src.getValueType().isVector() || Src.getValueType().getVectorElementType() != MVT::i1) { + return Op; + } + bool IsRV32E64 = !Subtarget.is64Bit() && VecVT.getVectorElementType() == MVT::i64; + SDValue SplatZero = DAG.getConstant(0, DL, Subtarget.getXLenVT()); + SDValue SplatTrueVal = DAG.getConstant(ExtTrueVal, DL, Subtarget.getXLenVT()); + if (!IsRV32E64) { + SplatZero = DAG.getSplatVector(VecVT, DL, SplatZero); + SplatTrueVal = DAG.getSplatVector(VecVT, DL, SplatTrueVal); + } + else { + SplatZero = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatZero); + SplatTrueVal = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatTrueVal); + } + return DAG.getNode(ISD::VSELECT, DL, VecVT, Src, SplatTrueVal, SplatZero); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c98f553f2d44e030d17fe05f422ae1fb199ece6f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp @@ -0,0 +1,20 @@ +SDValue RISCVTargetLowering::lowerVectorMaskTrunc(SDValue Op, SelectionDAG &DAG) const { + SDLoc DL(Op); + EVT MaskVT = Op.getValueType(); + assert(MaskVT.isVector() && MaskVT.getVectorElementType() == MVT::i1 && "Unexpected type for vector mask lowering"); + SDValue Src = Op.getOperand(0); + EVT VecVT = Src.getValueType(); + bool IsRV32E64 = !Subtarget.is64Bit() && VecVT.getVectorElementType() == MVT::i64; + SDValue SplatOne = DAG.getConstant(1, DL, Subtarget.getXLenVT()); + SDValue SplatZero = DAG.getConstant(0, DL, Subtarget.getXLenVT()); + if (!IsRV32E64) { + SplatOne = DAG.getSplatVector(VecVT, DL, SplatOne); + SplatZero = DAG.getSplatVector(VecVT, DL, SplatZero); + } + else { + SplatOne = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatOne); + SplatZero = DAG.getNode(RISCVISD::SPLAT_VECTOR_I64, DL, VecVT, SplatZero); + } + SDValue Trunc = DAG.getNode(ISD::AND, DL, VecVT, Src, SplatOne); + return DAG.getSetCC(DL, MaskVT, Trunc, SplatZero, ISD::SETNE); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ede8c5227cba93dac852a1d065fa68b425858673 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering::mayBeEmittedAsTailCall(const CallInst *CI) const { + return CI->isTailCall(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..81761d63f787d7ededa1a742cd4605cddb2a4530 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp @@ -0,0 +1,13 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { + switch (CC) { + default: + break; + case ISD::SETGT: + case ISD::SETLE: + case ISD::SETUGT: + case ISD::SETULE: + CC = ISD::getSetCCSwappedOperands(CC); + std::swap(LHS, RHS); + break; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f68f25a787d6d9d179404a12f57ee6bc55abf05a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp @@ -0,0 +1,2 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6227315c51762f79d2968256df1156d834e76e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp @@ -0,0 +1,3 @@ +bool shouldConsiderGEPOffsetSplit() const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf5f534d508b97390d1ee1ae00b5cc79a7861324 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp @@ -0,0 +1,3 @@ +bool shouldConvertConstantLoadToIntImm(const APInt &Imm, Type *Ty) const override { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ac3aae03b6673555878d5192537d50cc530ff736 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp @@ -0,0 +1,7 @@ +TargetLowering::AtomicExpansionKind RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *CI) const { + unsigned Size = CI->getCompareOperand()->getType()->getPrimitiveSizeInBits(); + if (Size == 8 || Size == 16) { + return AtomicExpansionKind::MaskedIntrinsic; + } + return AtomicExpansionKind::None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4625774d344f7f29a1166ef8ecbca7823323f687 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp @@ -0,0 +1,10 @@ +TargetLowering::AtomicExpansionKind RISCVTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const { + if (AI->isFloatingPointOperation()) { + return AtomicExpansionKind::CmpXChg; + } + unsigned Size = AI->getType()->getPrimitiveSizeInBits(); + if (Size == 8 || Size == 16) { + return AtomicExpansionKind::MaskedIntrinsic; + } + return AtomicExpansionKind::None; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6604d98ac52fd4c5047c923e074351eea490f8f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp @@ -0,0 +1,6 @@ +bool shouldExpandShift(SelectionDAG &DAG, SDNode *N) const override { + if (DAG.getMachineFunction().getFunction().hasMinSize()) { + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d32e64209e6b08e4763994b4f801e4c206f38c74 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp @@ -0,0 +1,7 @@ +bool RISCVTargetLowering::shouldExtendTypeInLibCall(EVT Type) const { + RISCVABI::ABI ABI = Subtarget.getTargetABI(); + if (ABI == RISCVABI::ABI_LP64 && (Type == MVT::f32)) { + return false; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e56fe49efb7aebf69d2c959f42c622a45c409323 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp @@ -0,0 +1,3 @@ +bool shouldInsertFencesForAtomic(const Instruction *I) const override { + return isa(I) || isa(I); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..260ccec9da37823ed051c89f36e5a92ee1f5e02c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp @@ -0,0 +1,6 @@ +bool RISCVTargetLowering::shouldSignExtendTypeInLibCall(EVT Type, bool IsSigned) const { + if (Subtarget.is64Bit() && Type == MVT::i32) { + return true; + } + return IsSigned; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4d16ec95b820e45afaa94d482643662493978f4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp @@ -0,0 +1,44 @@ +bool RISCVTargetLowering::targetShrinkDemandedConstant(SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, TargetLoweringOpt &TLO) const { + if (!TLO.LegalOps) { + return false; + } + EVT VT = Op.getValueType(); + if (VT.isVector()) { + return false; + } + if (Op.getOpcode() != ISD::AND) { + return false; + } + ConstantSDNode *C = dyn_cast(Op.getOperand(1)); + if (!C) { + return false; + } + const APInt &Mask = C->getAPIntValue(); + APInt ShrunkMask = Mask & DemandedBits; + if (ShrunkMask.isSignedIntN(12)) { + return false; + } + APInt ExpandedMask = Mask | ~DemandedBits; + if (!ExpandedMask.isNegative()) { + return false; + } + unsigned MinSignedBits = ExpandedMask.getMinSignedBits(); + APInt NewMask = ShrunkMask; + if (MinSignedBits <= 12) { + NewMask.setBitsFrom(11); + } + else if (MinSignedBits <= 32 && !ShrunkMask.isSignedIntN(32)) { + NewMask.setBitsFrom(31); + } + else { + return false; + } + assert(NewMask.isSubsetOf(ExpandedMask)); + if (NewMask == Mask) { + return true; + } + SDLoc DL(Op); + SDValue NewC = TLO.DAG.getConstant(NewMask, DL, VT); + SDValue NewOp = TLO.DAG.getNode(ISD::AND, DL, VT, Op.getOperand(0), NewC); + return TLO.CombineTo(Op, NewOp); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18092d2a41f8aacf563ddf86d379df202fe8c4e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp @@ -0,0 +1,8 @@ +void RISCVTargetLowering::validateCCReservedRegs(const SmallVectorImpl> &Regs, MachineFunction &MF) const { + const Function &F = MF.getFunction(); + const RISCVSubtarget &STI = MF.getSubtarget(); + if (llvm::any_of(Regs, [&STI](auto Reg) { + return STI.isRegisterReservedByUser(Reg.first); + })) + F.getContext().diagnose(DiagnosticInfoUnsupported{F, "Argument register required, but has been reserved."}); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53cc2835a41ac58f713da3322777b6baeda2bb12 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp @@ -0,0 +1,9 @@ +RISCVInstructionSelector::RISCVInstructionSelector(const RISCVTargetMachine &TM, const RISCVSubtarget &STI,const RISCVRegisterBankInfo &RBI) : InstructionSelector(), STI(STI), TII(*STI.getInstrInfo()), TRI(*STI.getRegisterInfo()), RBI(RBI), +#define GET_GLOBALISEL_PREDICATES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_PREDICATES_INIT +#define GET_GLOBALISEL_TEMPORARIES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_TEMPORARIES_INIT +{ +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..db262f141398799e83acb55cc3b48da452774550 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &TM, RISCVSubtarget &Subtarget, RISCVRegisterBankInfo &RBI) { + return new RISCVInstructionSelector(TM, Subtarget, RBI); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/getName.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/getName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3070f67f8b2d72c6473a6bf2cc4639c82757caaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/getName.cpp @@ -0,0 +1,3 @@ +static const char *getName() { + return DEBUG_TYPE; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/select.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..333a38c3ab713a75f6667c26f37dfadbd1ac8adf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/InstructionSelector/select.cpp @@ -0,0 +1,8 @@ +bool RISCVInstructionSelector::select(MachineInstr &I) { + if (!isPreISelGenericOpcode(I.getOpcode())) { + } + if (selectImpl(I, *CoverageInfo)) { + return true; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58f919e738fbe34244db0d85687060525c38698e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp @@ -0,0 +1,3 @@ +RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) { + computeTables(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b5ff6b81c894f20f1d1f66973d1c9c51cf5dec5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp @@ -0,0 +1,78 @@ +void llvm::LowerRISCVMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, const AsmPrinter &AP) { + const RISCVVPseudosTable::PseudoInfo *RVV = RISCVVPseudosTable::getPseudoInfo(MI->getOpcode()); + if (!RVV) { + return false; + } + OutMI.setOpcode(RVV->BaseInstr); + const MachineBasicBlock *MBB = MI->getParent(); + assert(MBB && "MI expected to be in a basic block"); + const MachineFunction *MF = MBB->getParent(); + assert(MF && "MBB expected to be in a machine function"); + const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo(); + assert(TRI && "TargetRegisterInfo expected"); + uint64_t TSFlags = MI->getDesc().TSFlags; + int NumOps = MI->getNumExplicitOperands(); + for (const MachineOperand &MO : MI->explicit_operands()) { + int OpNo = (int)MI->getOperandNo(&MO); + assert(OpNo >= 0 && "Operand number doesn't fit in an 'int' type"); + if ((TSFlags & RISCVII::HasVLOpMask) && OpNo == (NumOps - 2)) { + continue; + } + if ((TSFlags & RISCVII::HasSEWOpMask) && OpNo == (NumOps - 1)) { + continue; + } + if ((TSFlags & RISCVII::HasMergeOpMask) && OpNo == 1) { + assert(MI->getNumExplicitDefs() == 1); + continue; + } + MCOperand MCOp; + switch (MO.getType()) { + default: + llvm_unreachable("Unknown operand type"); + case MachineOperand::MO_Register: { + unsigned Reg = MO.getReg(); + if (RISCV::VRM2RegClass.contains(Reg) || RISCV::VRM4RegClass.contains(Reg) || RISCV::VRM8RegClass.contains(Reg)) { + Reg = TRI->getSubReg(Reg, RISCV::sub_vrm1_0); + assert(Reg && "Subregister does not exist"); + } + else if (RISCV::FPR16RegClass.contains(Reg)) { + Reg = TRI->getMatchingSuperReg(Reg, RISCV::sub_16, &RISCV::FPR32RegClass); + assert(Reg && "Subregister does not exist"); + } + else if (RISCV::FPR64RegClass.contains(Reg)) { + Reg = TRI->getSubReg(Reg, RISCV::sub_32); + assert(Reg && "Superregister does not exist"); + } + MCOp = MCOperand::createReg(Reg); + break; + } + case MachineOperand::MO_Immediate: + MCOp = MCOperand::createImm(MO.getImm()); + break; + } + OutMI.addOperand(MCOp); + } + if (TSFlags & RISCVII::HasDummyMaskOpMask) { + OutMI.addOperand(MCOperand::createReg(RISCV::NoRegister)); + } + return true; + OutMI.setOpcode(MI->getOpcode()); + for (const MachineOperand &MO : MI->operands()) { + MCOperand MCOp; + if (LowerRISCVMachineOperandToMCOperand(MO, MCOp, AP)) { + OutMI.addOperand(MCOp); + } + } + if (OutMI.getOpcode() == RISCV::PseudoReadVLENB) { + OutMI.setOpcode(RISCV::CSRRS); + OutMI.addOperand(MCOperand::createImm(RISCVSysReg::lookupSysRegByName("VLENB")->Encoding)); + OutMI.addOperand(MCOperand::createReg(RISCV::X0)); + return; + } + if (OutMI.getOpcode() == RISCV::PseudoReadVL) { + OutMI.setOpcode(RISCV::CSRRS); + OutMI.addOperand(MCOperand::createImm(RISCVSysReg::lookupSysRegByName("VL")->Encoding)); + OutMI.addOperand(MCOperand::createReg(RISCV::X0)); + return; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3449796f21b6124dd5bde5e2cc45d1b32c568cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp @@ -0,0 +1,37 @@ +bool llvm::LowerRISCVMachineOperandToMCOperand(const MachineOperand &MO, MCOperand &MCOp, const AsmPrinter &AP) { + switch (MO.getType()) { + case MachineOperand::MO_Register: + if (MO.isImplicit()) + return false; + MCOp = MCOperand::createReg(MO.getReg()); + break; + case MachineOperand::MO_RegisterMask: + return false; + case MachineOperand::MO_Immediate: + MCOp = MCOperand::createImm(MO.getImm()); + break; + case MachineOperand::MO_MachineBasicBlock: + MCOp = lowerSymbolOperand(MO, MO.getMBB()->getSymbol(), AP); + break; + case MachineOperand::MO_GlobalAddress: + MCOp = lowerSymbolOperand(MO, AP.getSymbol(MO.getGlobal()), AP); + break; + case MachineOperand::MO_BlockAddress: + MCOp = lowerSymbolOperand( + MO, AP.GetBlockAddressSymbol(MO.getBlockAddress()), AP); + break; + case MachineOperand::MO_ExternalSymbol: + MCOp = lowerSymbolOperand( + MO, AP.GetExternalSymbolSymbol(MO.getSymbolName()), AP); + break; + case MachineOperand::MO_ConstantPoolIndex: + MCOp = lowerSymbolOperand(MO, AP.GetCPISymbol(MO.getIndex()), AP); + break; + case MachineOperand::MO_JumpTableIndex: + MCOp = lowerSymbolOperand(MO, AP.GetJTISymbol(MO.getIndex()), AP); + break; + default: + report_fatal_error("LowerRISCVMachineInstrToMCInst: unknown operand type"); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8107e367a395520aca9a0bde41ed05df30ad152a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp @@ -0,0 +1,55 @@ +static MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym, const AsmPrinter &AP) { + MCContext &Ctx = AP.OutContext; + RISCVMCExpr::VariantKind Kind; + switch (MO.getTargetFlags()) { + default: + llvm_unreachable("Unknown target flag on GV operand"); + case RISCVII::MO_None: + Kind = RISCVMCExpr::VK_RISCV_None; + break; + case RISCVII::MO_CALL: + Kind = RISCVMCExpr::VK_RISCV_CALL; + break; + case RISCVII::MO_PLT: + Kind = RISCVMCExpr::VK_RISCV_CALL_PLT; + break; + case RISCVII::MO_LO: + Kind = RISCVMCExpr::VK_RISCV_LO; + break; + case RISCVII::MO_HI: + Kind = RISCVMCExpr::VK_RISCV_HI; + break; + case RISCVII::MO_PCREL_LO: + Kind = RISCVMCExpr::VK_RISCV_PCREL_LO; + break; + case RISCVII::MO_PCREL_HI: + Kind = RISCVMCExpr::VK_RISCV_PCREL_HI; + break; + case RISCVII::MO_GOT_HI: + Kind = RISCVMCExpr::VK_RISCV_GOT_HI; + break; + case RISCVII::MO_TPREL_LO: + Kind = RISCVMCExpr::VK_RISCV_TPREL_LO; + break; + case RISCVII::MO_TPREL_HI: + Kind = RISCVMCExpr::VK_RISCV_TPREL_HI; + break; + case RISCVII::MO_TPREL_ADD: + Kind = RISCVMCExpr::VK_RISCV_TPREL_ADD; + break; + case RISCVII::MO_TLS_GOT_HI: + Kind = RISCVMCExpr::VK_RISCV_TLS_GOT_HI; + break; + case RISCVII::MO_TLS_GD_HI: + Kind = RISCVMCExpr::VK_RISCV_TLS_GD_HI; + break; + } + const MCExpr *ME = MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, Ctx); + if (!MO.isJTI() && !MO.isMBB() && MO.getOffset()) { + ME = MCBinaryExpr::createAdd(ME, MCConstantExpr::create(MO.getOffset(), Ctx), Ctx); + } + if (Kind != RISCVMCExpr::VK_RISCV_None) { + ME = RISCVMCExpr::create(ME, Kind, Ctx); + } + return MCOperand::createExpr(ME); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1fecc2d20536c3dae5be4e142bf11df8ead83b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +XCoreRegisterInfo::XCoreRegisterInfo(const TargetInstrInfo &tii) : XCoreGenRegisterInfo(XCore::LR), TII(tii) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..beefb6fa7ec0a0e779bd878d95065fa651872221 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,123 @@ +void XCoreRegisterInfo::eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { + const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); + if (!TFI->hasReservedCallFrame(MF)) { + MachineInstr *Old = I; + uint64_t Amount = Old->getOperand(0).getImm(); + if (Amount != 0) { + unsigned Align = TFI->getStackAlignment(); + Amount = (Amount+Align-1)/Align*Align; + assert(Amount%4 == 0); + Amount /= 4; + bool isU6 = isImmU6(Amount); + if (!isU6 && !isImmU16(Amount)) { +#ifndef NDEBUG + errs() << "eliminateCallFramePseudoInstr size too big: " << Amount << "\n"; +#endif + llvm_unreachable(0); + } + MachineInstr *New; + if (Old->getOpcode() == XCore::ADJCALLSTACKDOWN) { + New=BuildMI(MF, Old->getDebugLoc(), TII.get(XCore::STACKUP)); + MBB.insert(I, New); + XCoreFunctionInfo *XFI = MF.getInfo(); + unsigned XCoreFunctionInfo::addStackExpression(const SDValue &Size) { + StackNode *words; + if (Val.getOpcode() != ISD::SHL) + return false; + if (const ConstantSDNode *CSDN = dyn_cast(Val.getOperand(1))) { + return CSDN->getConstantIntValue()->getZExtValue() == amount; + } + if ((Size, 2)) { + words = (Size.getNode()->getOperand(0).getNode()); + switch (N->getOpcode()) { + case ISD::ADD: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpADD); + case ISD::SUB: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpSUB); + case ISD::Constant: + if (const ConstantSDNode *CSDN = dyn_cast(N)) { + return new STInt(CSDN->getConstantIntValue()->getZExtValue()); + } + break; + case ISD::TargetExternalSymbol: + if (const ExternalSymbolSDNode *ES = + dyn_cast(N)) { + return new STString(ES->getSymbol()); + } + break; + case ISD::SHL: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpSHL); + case ISD::OR: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpOR); + case ISD::MUL: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpMUL); + case ISD::AND: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpAND); + case XCoreISD::ABS16Wrapper: + return makeExpression(N->getOperand(0).getNode()); + } + return new STUDef(); + } + else { + StackNode *bytes = (Size.getNode()); + switch (N->getOpcode()) { + case ISD::ADD: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpADD); + case ISD::SUB: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpSUB); + case ISD::Constant: + if (const ConstantSDNode *CSDN = dyn_cast(N)) { + return new STInt(CSDN->getConstantIntValue()->getZExtValue()); + } + break; + case ISD::TargetExternalSymbol: + if (const ExternalSymbolSDNode *ES = + dyn_cast(N)) { + return new STString(ES->getSymbol()); + } + break; + case ISD::SHL: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpSHL); + case ISD::OR: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpOR); + case ISD::MUL: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpMUL); + case ISD::AND: + return new STBinOp(makeExpression(N->getOperand(0).getNode()), + makeExpression(N->getOperand(1).getNode()), STBinOp::STBinOpAND); + case XCoreISD::ABS16Wrapper: + return makeExpression(N->getOperand(0).getNode()); + } + return new STUDef(); + words = new STBinOp(bytes, new STInt(2), STBinOp::STBinOpSHR); + } + AllocaExpressions.push_back(words); + i = AllocaExpressions.size() - 1; + New=BuildMI(MF, Old->getDebugLoc(), TII.get(XCore::ALLOCA)).addImm(i); + MBB.insert(I, New); + int Opcode = isU6 ? XCore::EXTSP_u6 : XCore::EXTSP_lu6; + New=BuildMI(MF, Old->getDebugLoc(), TII.get(Opcode)).addImm(Amount); + } + else { + assert(Old->getOpcode() == XCore::ADJCALLSTACKUP); + int Opcode = isU6 ? XCore::LDAWSP_ru6_RRegs : XCore::LDAWSP_lru6_RRegs; + New=BuildMI(MF, Old->getDebugLoc(), TII.get(Opcode), XCore::SP).addImm(Amount); + MBB.insert(I, New); + New=BuildMI(MF, Old->getDebugLoc(), TII.get(XCore::STACKDOWN)); + } + MBB.insert(I, New); + } + } + MBB.erase(I); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe7af47b9159a50bd28eefbf11bb92c631e33c0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,109 @@ +void XCoreRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, RegScavenger *RS) const { + assert(SPAdj == 0 && "Unexpected"); + MachineInstr &MI = *II; + DebugLoc dl = MI.getDebugLoc(); + unsigned i = 0; + while (!MI.getOperand(i).isFI()) { + ++i; + assert(i < MI.getNumOperands() && "Instr doesn't have FrameIndex operand!"); + } + MachineOperand &FrameOp = MI.getOperand(i); + int FrameIndex = FrameOp.getIndex(); + MachineFunction &MF = *MI.getParent()->getParent(); + const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); + int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex); + int StackSize = MF.getFrameInfo()->getStackSize(); + #ifndef NDEBUG + DEBUG(errs() << "\nFunction : " << MF.getFunction()->getName() << "\n"); + DEBUG(errs() << "<--------->\n"); + DEBUG(MI.print(errs())); + DEBUG(errs() << "FrameIndex : " << FrameIndex << "\n"); + DEBUG(errs() << "FrameOffset : " << Offset << "\n"); + DEBUG(errs() << "StackSize : " << StackSize << "\n"); + #endif + Offset += StackSize; + unsigned FrameReg = getFrameRegister(MF); + if (MI.isDebugValue()) { + MI.getOperand(i).ChangeToRegister(FrameReg, false); + MI.getOperand(i+1).ChangeToImmediate(Offset); + return; + } + Offset += MI.getOperand(i + 1).getImm(); + MI.getOperand(i + 1).ChangeToImmediate(0); + assert(Offset%4 == 0 && "Misaligned stack offset"); + DEBUG(errs() << "Offset : " << Offset << "\n" << "<--------->\n"); + Offset/=4; + bool FP = TFI->hasFP(MF); + unsigned Reg = MI.getOperand(0).getReg(); + bool isKill = MI.getOpcode() == XCore::STWFI && MI.getOperand(0).isKill(); + assert(XCore::GRRegsRegisterClass->contains(Reg) && "Unexpected register operand"); + MachineBasicBlock &MBB = *MI.getParent(); + if (FP) { + bool isUs = isImmUs(Offset); + if (!isUs) { + if (!RS) + report_fatal_error("eliminateFrameIndex Frame size too big: " + Twine(Offset)); + assert(RS && "Register scavenging must be on"); + unsigned Reg = RS->FindUnusedReg(RC); + if (Reg == 0) + Reg = RS->scavengeRegister(RC, II, SPAdj); + unsigned ScratchReg = Reg; + if (!isImmU16(Value)) { + report_fatal_error("loadConstant value too big " + Twine(Value)); + } + int Opcode = isImmU6(Value) ? XCore::LDC_ru6 : XCore::LDC_lru6; + BuildMI(MBB, I, dl, TII.get(Opcode), DstReg).addImm(Value); + switch (MI.getOpcode()) { + case XCore::LDWFI: + BuildMI(MBB, II, dl, TII.get(XCore::LDW_3r), Reg).addReg(FrameReg).addReg(ScratchReg, RegState::Kill); + break; + case XCore::STWFI: + BuildMI(MBB, II, dl, TII.get(XCore::STW_l3r)).addReg(Reg, getKillRegState(isKill)).addReg(FrameReg).addReg(ScratchReg, RegState::Kill); + break; + case XCore::LDAWFI: + BuildMI(MBB, II, dl, TII.get(XCore::LDAWF_l3r), Reg).addReg(FrameReg).addReg(ScratchReg, RegState::Kill); + break; + default: + llvm_unreachable("Unexpected Opcode"); + } + } + else { + switch (MI.getOpcode()) { + case XCore::LDWFI: + BuildMI(MBB, II, dl, TII.get(XCore::LDW_2rus), Reg).addReg(FrameReg).addImm(Offset); + break; + case XCore::STWFI: + BuildMI(MBB, II, dl, TII.get(XCore::STW_2rus)).addReg(Reg, getKillRegState(isKill)).addReg(FrameReg).addImm(Offset); + break; + case XCore::LDAWFI: + BuildMI(MBB, II, dl, TII.get(XCore::LDAWF_l2rus), Reg).addReg(FrameReg).addImm(Offset); + break; + default: + llvm_unreachable("Unexpected Opcode"); + } + } + } + else { + bool isU6 = isImmU6(Offset); + if (!isU6 && !isImmU16(Offset)) + report_fatal_error("eliminateFrameIndex Frame size too big: " + Twine(Offset)); + switch (MI.getOpcode()) { + int NewOpcode; + case XCore::LDWFI: + NewOpcode = (isU6) ? XCore::LDWSP_ru6 : XCore::LDWSP_lru6; + BuildMI(MBB, II, dl, TII.get(NewOpcode), Reg).addImm(Offset); + break; + case XCore::STWFI: + NewOpcode = (isU6) ? XCore::STWSP_ru6 : XCore::STWSP_lru6; + BuildMI(MBB, II, dl, TII.get(NewOpcode)).addReg(Reg, getKillRegState(isKill)).addImm(Offset); + break; + case XCore::LDAWFI: + NewOpcode = (isU6) ? XCore::LDAWSP_ru6 : XCore::LDAWSP_lru6; + BuildMI(MBB, II, dl, TII.get(NewOpcode), Reg).addImm(Offset); + break; + default: + llvm_unreachable("Unexpected Opcode"); + } + } + MBB.erase(II); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd2da3ecadfcde45a0b19c27fbed158ce7788d37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp @@ -0,0 +1,3 @@ +const unsigned * XCoreRegisterInfo::getArgRegs(const MachineFunction *MF) { + return XCore_ArgRegs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7be2eba241c9c89dce26398f6f73df693f03c906 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,13 @@ +const unsigned* XCoreRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + bool callsEHReturn = false; + if (MF) { + callsEHReturn = MF->getMMI().callsEHReturn(); + } + static const unsigned CalleeSavedRegs[] = { + XCore::R4, XCore::R5, XCore::R6, XCore::R7, XCore::R8, XCore::R9, XCore::R10, XCore::LR, 0 + }; + static const unsigned CalleeSavedRegsEHRet[] = { + XCore::R0, XCore::R1, XCore::R4, XCore::R5, XCore::R6, XCore::R7, XCore::R8, XCore::R9, XCore::R10, XCore::LR, 0 + }; + return callsEHReturn ? CalleeSavedRegsEHRet : CalleeSavedRegs; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b312e1f78d40b38ae95e510414363cb177cafdbf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,4 @@ +unsigned XCoreRegisterInfo::getFrameRegister(const MachineFunction &MF) const { + const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); + return TFI->hasFP(MF) ? XCore::R10 : XCore::SP; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..177f4cec251f21e8cf8c999bcb80ba83b4c1207d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp @@ -0,0 +1,3 @@ +unsigned XCoreRegisterInfo::getNumArgRegs(const MachineFunction *MF) { + return array_lengthof(XCore_ArgRegs); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0cf02377dda3af3ebfd8f92f46d8cdbc99d5c05 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,12 @@ +BitVector XCoreRegisterInfo::getReservedRegs(const MachineFunction &MF) const { + BitVector Reserved(getNumRegs()); + const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); + Reserved.set(XCore::CP); + Reserved.set(XCore::DP); + Reserved.set(XCore::SP); + Reserved.set(XCore::LR); + if (TFI->hasFP(MF)) { + Reserved.set(XCore::R10); + } + return Reserved; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6770ef7307bcca2808611b1bc34ed8cb898bd427 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp @@ -0,0 +1,3 @@ +bool XCoreRegisterInfo::needsFrameMoves(const MachineFunction &MF) { + return MF.getMMI().hasDebugInfo() || !MF.getFunction()->doesNotThrow(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..444a05f1b97eada860699df7a40184073d04d064 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,2 @@ +void XCoreRegisterInfo::processFunctionBeforeFrameFinalized(MachineFunction &MF) const { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6f9252a5fd0031a96e24ebb87cbdc0bc1480a4d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,4 @@ +bool XCoreRegisterInfo::requiresRegisterScavenging(const MachineFunction &MF) const { + const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); + return TFI->hasFP(MF); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64ca571c936d039e9021bbfdbfffa7fad53b94d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp @@ -0,0 +1,3 @@ +bool XCoreRegisterInfo::useFPForScavengingIndex(const MachineFunction &MF) const { + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..614ec59329d9523a9136dafa94481eb9c215eeab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit XCoreAsmPrinter(TargetMachine &TM, MCStreamer &Streamer) : AsmPrinter(TM, Streamer), XTAPrinter(OutStreamer, OutContext, this), RUW(Streamer, this), Subtarget(TM.getSubtarget()) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f92dd4593d9f96d1032a6950fba0458ec177e96 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp @@ -0,0 +1,14 @@ +void XCoreAsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB) { + AsmPrinter::EmitBasicBlockStart(MBB); + if(DisableXtaInfo) + return; + CFMDNode *cfmd = MBB->getCFMetadata(); + if (!cfmd) + return; + MDNode *md = cfmd->getMetadata(); + if (!md) + return; + MCSymbol *SetLabel = asmPrinter->GetTempSymbol("xtalabel", LabelCounter++); + OutStreamer.EmitLabel(SetLabel); + xtaAsm_XtaLabels.push_back(std::make_pair(SetLabel, md)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a2f476452106d8caefd30bd77be3bb50aa2633e7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp @@ -0,0 +1,32 @@ +void XCoreAsmPrinter::EmitConstantPool() { + const MachineConstantPool *MCP = MF->getConstantPool(); + const std::vector &CP = MCP->getConstants(); + if (CP.empty()) + return; + for (unsigned i = 0, e = CP.size(); i != e; ++i) { + const MachineConstantPoolEntry &CPE = CP[i]; + unsigned Align = CPE.getAlignment(); + SectionKind Kind; + switch (TM.getTargetData()->getTypeAllocSize(CPE.getType())) { + case 4: Kind = SectionKind::getMergeableConst4(); + break; + case 8: Kind = SectionKind::getMergeableConst8(); + break; + case 16: Kind = SectionKind::getMergeableConst16(); + break; + default: Kind = SectionKind::getMergeableConst(); + break; + } + const MCSection *S = getObjFileLowering().getSectionForConstant(Kind); + MCSymbol *Sym = GetCPISymbol(i); + OutStreamer.SwitchSection(S); + OutStreamer.EmitRawText("\t.cc_top " + Twine(Sym->getName()) + ".data"); + EmitAlignment(Log2_32(Align)); + OutStreamer.EmitLabel(Sym); + if (CPE.isMachineConstantPoolEntry()) + EmitMachineConstantPoolValue(CPE.Val.MachineCPVal); + else + EmitGlobalConstant(CPE.Val.ConstVal); + OutStreamer.EmitRawText("\t.cc_bottom " + Twine(Sym->getName()) + ".data"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ad2dfc0dad8ec4de360e69f3500fff19994aca5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp @@ -0,0 +1,7 @@ +void XCoreAsmPrinter::EmitFunctionEntryLabel() { + td::set::const_iterator iter = XtaTaskStart.find(&F); + if (iter == XtaTaskStart.end()) { + OutStreamer.EmitRawText(StringRef("\t.xtataskstart")); + } + OutStreamer.EmitLabel(CurrentFnSym); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05ee45deb6957993ce98c0f4421aa68aa29cb9da --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp @@ -0,0 +1,51 @@ +void XCoreAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { + if (!GV->hasInitializer() || EmitSpecialXCoreGlobal(GV) || + EmitSpecialLLVMGlobal(GV)) + return; + const TargetData *TD = TM.getTargetData(); + OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GV, Mang,TM)); + MCSymbol *GVSym = Mang->getSymbol(GV); + const Constant *C = GV->getInitializer(); + unsigned Align = (unsigned)TD->getPreferredTypeAlignmentShift(C->getType()); + OutStreamer.EmitRawText("\t.cc_top " + Twine(GVSym->getName()) + ".data"); + switch (GV->getLinkage()) { + case GlobalValue::AppendingLinkage: + report_fatal_error("AppendingLinkage is not supported by this target!"); + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + case GlobalValue::ExternalLinkage: + emitArrayBound(GVSym, GV); + OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global); + if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()) + OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Weak); + case GlobalValue::InternalLinkage: + case GlobalValue::PrivateLinkage: + break; + case GlobalValue::DLLImportLinkage: + llvm_unreachable("DLLImport linkage is not supported by this target!"); + case GlobalValue::DLLExportLinkage: + llvm_unreachable("DLLExport linkage is not supported by this target!"); + default: + llvm_unreachable("Unknown linkage type!"); + } + EmitAlignment(Align > 2 ? Align : 2, GV); + unsigned Size = TD->getTypeAllocSize(C->getType()); + if (GV->isThreadLocal()) { + Size *= MaxCores; + } + if (MAI->hasDotTypeDotSizeDirective()) { + OutStreamer.EmitSymbolAttribute(GVSym, MCSA_ELF_TypeObject); + OutStreamer.EmitRawText("\t.size " + Twine(GVSym->getName()) + "," + Twine(Size)); + } + OutStreamer.EmitLabel(GVSym); + EmitGlobalConstant(C); + if (GV->isThreadLocal()) { + for (unsigned i = 1; i < MaxCores; ++i) + EmitGlobalConstant(C); + } + if (Size < 4) + OutStreamer.EmitZeros(4 - Size, 0); + OutStreamer.EmitRawText("\t.cc_bottom " + Twine(GVSym->getName()) + ".data"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d75867435e9b65cda890b3fad8d01691670e61e9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp @@ -0,0 +1,68 @@ +void XCoreAsmPrinter::EmitInstruction(const MachineInstr *MI) { + SmallString<128> Str; + raw_svector_ostream O(Str); + if(!DisableXtaInfo) { + DebugLoc DL = MI->getDebugLoc(); + MDNode *xtaCall = DL.getXtaCall(); + if (xtaCall && isValidCallInstruction(MI)) { + MCSymbol *SetLabel = asmPrinter->GetTempSymbol("xta.call_labels", CallCounter++); + OutStreamer.EmitLabel(SetLabel); + xtaAsm_CallLabels.push_back(std::make_pair(SetLabel, xtaCall)); + } + MDNode *xtaEndpoint = DL.getXtaEndpoint(); + if (xtaEndpoint && isValidEndpointInstruction(MI)) { + MCSymbol *SetLabel = asmPrinter->GetTempSymbol("xta.endpoint_labels", EPCounter++); + OutStreamer.EmitLabel(SetLabel); + xtaAsm_EndpointLabels.push_back(std::make_pair(SetLabel, xtaEndpoint)); + } + const XCoreFunctionInfo *XFI = MI->getParent()->getParent()->getInfo(); + if (MI->getOpcode() == XCore::LOOPMARKER) { + unsigned index = MI->getOperand(0).getImm(); + unsigned type = 0; + MDNode *xtaMD=0; + XFI->getLoopMetadata(index, &xtaMD, type); + unsigned loopLabelKind = MI->getParent()->getParent()->getFunction()->getParent()->getMDKindID("xta.loop_labels"); + unsigned loopKind = MI->getParent()->getParent()->getFunction()->getParent()->getMDKindID("xta.loop"); + if(type == loopLabelKind){ + MCSymbol *SetLabel = asmPrinter->GetTempSymbol("xta.loop_labels", LoopCounter++); + OutStreamer.EmitLabel(SetLabel); + xtaAsm_LoopLabels.push_back(std::make_pair(SetLabel, xtaMD)); + } else if(type == loopKind){ + ConstantInt *iterations = dyn_cast(xtaMD->getOperand(0)); + if (!iterations) + report_fatal_error("Incorrectly formatted XTA loop metadata"); + OutStreamer.EmitRawText(".xtaloop " + Twine(iterations->getZExtValue())); + } + } + } + switch (MI->getOpcode()) { + case XCore::DBG_VALUE: { + if (isVerbose() && OutStreamer.hasRawTextSupport()) { + SmallString<128> TmpStr; + raw_svector_ostream OS(TmpStr); + unsigned NOps = MI->getNumOperands(); + assert(NOps == 4); + OS << '\t' << MAI->getCommentString() << "DEBUG_VALUE: "; + DIVariable V(const_cast(MI->getOperand(NOps-1).getMetadata())); + OS << V.getName(); + OS << " <- "; + assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm()); + OS << '['; printOperand(MI, 0, OS); OS << '+'; printOperand(MI, 1, OS); + OS << ']'; + OS << "+"; + printOperand(MI, NOps-2, OS); + OutStreamer.EmitRawText(StringRef(OS.str())); + } + return; + } + case XCore::ADD_2rus: + if (MI->getOperand(2).getImm() == 0) { + O << "\tmov " << getRegisterName(MI->getOperand(0).getReg()) << ", " << getRegisterName(MI->getOperand(1).getReg()); + OutStreamer.EmitRawText(O.str()); + return; + } + break; + } + printInstruction(MI, O); + OutStreamer.EmitRawText(O.str()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03364ca397dcf00e6539c69b81c8e23af7075c63 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,3 @@ +extern "C" void LLVMInitializeXCoreAsmPrinter() { + RegisterAsmPrinter X(TheXCoreTarget); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eddc670de9198a1c0e6dd410b6cbd81ab192f00b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,10 @@ +bool XCoreAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O) { + if (ExtraCode && ExtraCode[0]) { + return true; + } + printOperand(MI, OpNo, O); + O << '['; + printMemOperand(MI, OpNo + 1, O); + O << ']'; + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c48fa026e377f2b055e6f2cb0d15c7ce3afa56a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,4 @@ +bool XCoreAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo unsigned AsmVariant,const char *ExtraCode, raw_ostream &O) { + printOperand(MI, OpNo, O); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32f3f9af9873e2792df3467f1dab342cd6065f82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp @@ -0,0 +1,44 @@ +void XCoreAsmPrinter::PrintSpecial(const MachineInstr *MI, raw_ostream &OS, const char *Code) const { + if (strcmp(Code, "xtabranch") == 0) { + if (DisableXtaInfo) + return; + static unsigned Counter = 0; + unsigned EntrySize; + if (MI->getOpcode() == XCore::WAITEU_0R) { + const MachineBasicBlock *MBB = MI->getParent(); + OS << "\n\t.xtabranch"; + for (MachineBasicBlock::const_succ_iterator MBBiter = MBB->succ_begin(), E = MBB->succ_end(); MBBiter != E; ++MBBiter) { + if (MBBiter != MBB->succ_begin()) + OS << ","; + OS << " "; (*MBBiter)->getSymbol()->print(OS); + } + OS << "\n"; + return; + } + if (MI->getOpcode() == XCore::BR_JT) { + EntrySize = 2; + } + else { + assert(MI->getOpcode() == XCore::BR_JT32); + EntrySize = 4; + } + OS << "\n\t.xtabranch "; + unsigned JTI = MI->getOperand(0).getIndex(); + const MachineFunction *MF = MI->getParent()->getParent(); + const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); + const std::vector &JT = MJTI->getJumpTables(); + unsigned NumEntries = JT[JTI].MBBs.size(); + unsigned Offset = 2; + for (unsigned i = 0; i < NumEntries; i++) { + if (i != 0) + OS << ","; + OS << ".Ljumptable" << Counter << "+" << Offset; + Offset += EntrySize; + } + OS << "\n.Ljumptable" << Counter << ":\n\t\t"; + Counter++; + } + else { + AsmPrinter::PrintSpecial(MI, OS, Code); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..190920cbac038be92e3328237eb036d0ebacc938 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,648 @@ +void XCoreAsmPrinter::EmitEndOfAsmFile(Module &M) { + SmallString<32> NameBuf; + SmallSetVector WeakReferences; + for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) { + if (I->hasName() && !I->isIntrinsic()) { + std::map::const_iterator iter = + TypeStrings.find(&GV); + if (iter == TypeStrings.end()) { + return 0; + } + const std::string *TypeString = &iter->second; + if (TypeString) { + NameBuf.clear(); + Mang->getNameWithPrefix(NameBuf, I, false); + OutStreamer.EmitRawText("\t.typestring " + Twine(NameBuf) + ", \"" + Twine(*TypeString) + "\""); + } + std::map::const_iterator iter = OverlayInfo.find(&GV); + if (iter == OverlayInfo.end()) { + return 0; + } + const std::string *OverlayName = &iter->second; + if (OverlayName) { + NameBuf.clear(); + Mang->getNameWithPrefix(NameBuf, I, false); + if (OverlayName->empty()) { + OutStreamer.EmitRawText("\t.overlay_root " + Twine(NameBuf)); + } + else { + OutStreamer.EmitRawText("\t.overlay_root " + Twine(NameBuf) + "," + *OverlayName); + WeakReferences.insert(GetExternalSymbolSymbol(*OverlayName)); + } + } + std::map >::const_iterator iter = OverlayReferenceInfo.find(&GV); + if (iter == OverlayReferenceInfo.end()) { + return 0; + } + const std::vector *OverlayRefs = &iter->second; + if (OverlayRefs) { + for (std::vector::const_iterator R = OverlayRefs->begin(); R != OverlayRefs->end(); ++R) { + const std::string RefName = *R; + NameBuf.clear(); + Mang->getNameWithPrefix(NameBuf, I, false); + OutStreamer.EmitRawText("\t.overlay_reference " + Twine(NameBuf) + "," + RefName); + } + } + } + + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++ I) { + if (I->hasName()) { + std::map::const_iterator iter = OverlayInfo.find(&GV); + if (iter == OverlayInfo.end()) { + return 0; + } + const std::string *TypeString = &iter->second; + if (TypeString) { + NameBuf.clear(); + Mang->getNameWithPrefix(NameBuf, I, false); + OutStreamer.EmitRawText("\t.typestring " + Twine(StringRef(&NameBuf[0], NameBuf.size())) + ", \"" + Twine(*TypeString) + "\""); + } + } + } + for (SmallSetVector::const_iterator I = WeakReferences.begin(), E = WeakReferences.end(); I != E; ++I) { + MCSymbol *Sym = *I; + OutStreamer.EmitSymbolAttribute(Sym, MCSA_Global); + OutStreamer.EmitSymbolAttribute(Sym, MCSA_Weak); + } + if (!DisableXtaInfo) { + const static XCoreXTAPrinter::MarkerSectionInfo callSectionInfo = { + ".xtacall", + ".xtacalltable", + "xta.call_labels", + false + }; + const static XCoreXTAPrinter::MarkerSectionInfo endpointSectionInfo = { + ".xtaendpoint", + ".xtaendpointtable", + "xta.endpoint_labels", + false + }; + const static XCoreXTAPrinter::MarkerSectionInfo labelSectionInfo = { + ".xtalabel", + ".xtalabeltable", + "xta.xta_labels", + true + }; + const static XCoreXTAPrinter::MarkerSectionInfo loopSectionInfo = { + ".xtalooplabel", + ".xtalooplabeltable", + "xta.loop_labels", + true + }; + std::vector lines; + std::vector labels; + std::vector ranges; + for (std::vector >::iterator it = nodes.begin(), e = nodes.end(); it != e; ++it) { + ConstantInt *type = dyn_cast(node->getOperand(0)); + if (!type) + report_fatal_error("Incorrectly formatted XTA label metadata"); + switch (type->getZExtValue()) { + case CFMDNode::CFMD_INLINE: + { + MDNode *child = dyn_cast(node->getOperand(1)); + MDString *s = dyn_cast(node->getOperand(2)); + SmallString<128> lblString; + raw_svector_ostream lbl(lblString); + for (unsigned i = 3, e = node->getNumOperands(); i < e; ++i) { + MDNode *n = dyn_cast(node->getOperand(i)); + MDString *lblName = dyn_cast(n->getOperand(1)); + if (!lbl.str().empty()) + lbl << ","; + lbl << lblName->getString(); + } + SmallString<128> Str; + raw_svector_ostream O(Str); + O << inlineInfo << s->getString(); + if (!lbl.str().empty()){ + O << "(" << lbl.str() << ")"; + } + O << ","; + (child, sym, O.str(), lines, labels, ranges); + break; + } + case CFMDNode::CFMD_AND: + report_fatal_error("Unsupported XTA label metadata type CFMD_AND"); + break; + case CFMDNode::CFMD_OR: + { + for (unsigned i = 1, e = node->getNumOperands(); i != e; ++i) { + MDNode *child = dyn_cast(node->getOperand(i)); + if (!child) + report_fatal_error("Incorrectly formatted XTA label metadata"); + (child, sym, inlineInfo, lines, labels, ranges); + } + break; + } + case CFMDNode::CFMD_LINE: + lines.push_back(XCoreXTAPrinter::LeafInfo(node, sym)); + break; + case CFMDNode::CFMD_LABEL: + labels.push_back(XCoreXTAPrinter::LeafInfo(node, sym, inlineInfo)); + break; + case CFMDNode::CFMD_LINE_RANGE: + ranges.push_back(XCoreXTAPrinter::LeafInfo(node, sym)); + break; + } + } + if (NamedMDNode *namedMarkers = M.getNamedMetadata(sectionInfo.anchorName)) { + for (unsigned i = 0, e = namedMarkers->getNumOperands(); i != e; ++i) { + MDNode *label = namedMarkers->getOperand(i); + markers.push_back(LeafInfo(label, 0)); + } + } + if (markers.empty()) + return; + std::sort(markers.begin(), markers.end(), labelInfoIsLess); + for (std::vector::iterator it = markers.begin(), e = markers.end(); it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && XTAMetadataLabelNode(it->leaf).getCompDir() == XTAMetadataLabelNode(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.nameSection, XTA_MARKER_VERSION); + OutStreamer.EmitBytes(XTAMetadataLabelNode(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin; it != end;) { + std::vector::iterator last = it; + ++last; + while (last != end && it->leaf == last->leaf) + ++last; + assert(labelMDNode); + XTAMetadataLabelNode label(labelMDNode); + if (!label.isValid()) + report_fatal_error("Unexpected XTA metadata format"); + OutStreamer.EmitBytes(label.getName(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitBytes(label.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(label.getLineNum(), 4); + if (leafInfoRangeHasSymbol(begin, end)) { + MCSymbol *AddrStartLabel = asmPrinter->GetTempSymbol("addr_start", asmCounter++); + MCSymbol *AddrEndLabel = asmPrinter->GetTempSymbol("addr_end", asmCounter++); + const MCExpr *AddressesSize = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(AddrEndLabel, OutContext), MCSymbolRefExpr::Create(AddrStartLabel, OutContext), OutContext); + OutStreamer.EmitValue(AddressesSize, 4); + OutStreamer.EmitLabel(AddrStartLabel); + for (std::vector::iterator it = begin; it != end; ++it) { + MCSymbol *sym = it->sym; + if (!sym) + continue; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitBytes(it->inlineInfo, 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(AddrEndLabel); + } + else { + OutStreamer.EmitIntValue(0, 4); + } + it = last; + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + if (sectionInfo.emitLineRanges) { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + } + else { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + } + std::vector::iterator last = it; + ++last; + while (last != e && XTAMetadataLabelNode(it->leaf).getCompDir() == XTAMetadataLabelNode(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.nameSection, XTA_MARKER_VERSION); + OutStreamer.EmitBytes(XTAMetadataLabelNode(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin; it != end;) { + std::vector::iterator last = it; + ++last; + while (last != end && it->leaf == last->leaf) + ++last; + assert(labelMDNode); + XTAMetadataLabelNode label(labelMDNode); + if (!label.isValid()) + report_fatal_error("Unexpected XTA metadata format"); + OutStreamer.EmitBytes(label.getName(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitBytes(label.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(label.getLineNum(), 4); + if (leafInfoRangeHasSymbol(begin, end)) { + MCSymbol *AddrStartLabel = asmPrinter->GetTempSymbol("addr_start", asmCounter++); + MCSymbol *AddrEndLabel = asmPrinter->GetTempSymbol("addr_end", asmCounter++); + const MCExpr *AddressesSize = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(AddrEndLabel, OutContext), MCSymbolRefExpr::Create(AddrStartLabel, OutContext), OutContext); + OutStreamer.EmitValue(AddressesSize, 4); + OutStreamer.EmitLabel(AddrStartLabel); + for (std::vector::iterator it = begin; it != end; ++it) { + MCSymbol *sym = it->sym; + if (!sym) + continue; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitBytes(it->inlineInfo, 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(AddrEndLabel); + } + else { + OutStreamer.EmitIntValue(0, 4); + } + it = last; + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + if (sectionInfo.emitLineRanges) { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + } + else { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + }std::vector::iterator last = it; + ++last; + while (last != e && XTAMetadataLabelNode(it->leaf).getCompDir() == XTAMetadataLabelNode(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.nameSection, XTA_MARKER_VERSION); + OutStreamer.EmitBytes(XTAMetadataLabelNode(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin; it != end;) { + std::vector::iterator last = it; + ++last; + while (last != end && it->leaf == last->leaf) + ++last; + assert(labelMDNode); + XTAMetadataLabelNode label(labelMDNode); + if (!label.isValid()) + report_fatal_error("Unexpected XTA metadata format"); + OutStreamer.EmitBytes(label.getName(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitBytes(label.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(label.getLineNum(), 4); + if (leafInfoRangeHasSymbol(begin, end)) { + MCSymbol *AddrStartLabel = asmPrinter->GetTempSymbol("addr_start", asmCounter++); + MCSymbol *AddrEndLabel = asmPrinter->GetTempSymbol("addr_end", asmCounter++); + const MCExpr *AddressesSize = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(AddrEndLabel, OutContext), MCSymbolRefExpr::Create(AddrStartLabel, OutContext), OutContext); + OutStreamer.EmitValue(AddressesSize, 4); + OutStreamer.EmitLabel(AddrStartLabel); + for (std::vector::iterator it = begin; it != end; ++it) { + MCSymbol *sym = it->sym; + if (!sym) + continue; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitBytes(it->inlineInfo, 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(AddrEndLabel); + } + else { + OutStreamer.EmitIntValue(0, 4); + } + it = last; + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + if (sectionInfo.emitLineRanges) { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + } + else { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + }std::vector::iterator last = it; + ++last; + while (last != e && XTAMetadataLabelNode(it->leaf).getCompDir() == XTAMetadataLabelNode(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.nameSection, XTA_MARKER_VERSION); + OutStreamer.EmitBytes(XTAMetadataLabelNode(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin; it != end;) { + std::vector::iterator last = it; + ++last; + while (last != end && it->leaf == last->leaf) + ++last; + assert(labelMDNode); + XTAMetadataLabelNode label(labelMDNode); + if (!label.isValid()) + report_fatal_error("Unexpected XTA metadata format"); + OutStreamer.EmitBytes(label.getName(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitBytes(label.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(label.getLineNum(), 4); + if (leafInfoRangeHasSymbol(begin, end)) { + MCSymbol *AddrStartLabel = asmPrinter->GetTempSymbol("addr_start", asmCounter++); + MCSymbol *AddrEndLabel = asmPrinter->GetTempSymbol("addr_end", asmCounter++); + const MCExpr *AddressesSize = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(AddrEndLabel, OutContext), MCSymbolRefExpr::Create(AddrStartLabel, OutContext), OutContext); + OutStreamer.EmitValue(AddressesSize, 4); + OutStreamer.EmitLabel(AddrStartLabel); + for (std::vector::iterator it = begin; it != end; ++it) { + MCSymbol *sym = it->sym; + if (!sym) + continue; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitBytes(it->inlineInfo, 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(AddrEndLabel); + } + else { + OutStreamer.EmitIntValue(0, 4); + } + it = last; + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + if (sectionInfo.emitLineRanges) { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + } + else { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + }std::vector::iterator last = it; + ++last; + while (last != e && XTAMetadataLabelNode(it->leaf).getCompDir() == XTAMetadataLabelNode(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.nameSection, XTA_MARKER_VERSION); + OutStreamer.EmitBytes(XTAMetadataLabelNode(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin; it != end;) { + std::vector::iterator last = it; + ++last; + while (last != end && it->leaf == last->leaf) + ++last; + assert(labelMDNode); + XTAMetadataLabelNode label(labelMDNode); + if (!label.isValid()) + report_fatal_error("Unexpected XTA metadata format"); + OutStreamer.EmitBytes(label.getName(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitBytes(label.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(label.getLineNum(), 4); + if (leafInfoRangeHasSymbol(begin, end)) { + MCSymbol *AddrStartLabel = asmPrinter->GetTempSymbol("addr_start", asmCounter++); + MCSymbol *AddrEndLabel = asmPrinter->GetTempSymbol("addr_end", asmCounter++); + const MCExpr *AddressesSize = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(AddrEndLabel, OutContext), MCSymbolRefExpr::Create(AddrStartLabel, OutContext), OutContext); + OutStreamer.EmitValue(AddressesSize, 4); + OutStreamer.EmitLabel(AddrStartLabel); + for (std::vector::iterator it = begin; it != end; ++it) { + MCSymbol *sym = it->sym; + if (!sym) + continue; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitBytes(it->inlineInfo, 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(AddrEndLabel); + } + else { + OutStreamer.EmitIntValue(0, 4); + } + it = last; + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + if (sectionInfo.emitLineRanges) { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + } + else { + if (lines.empty()) + return; + std::sort(lines.begin(), lines.end(), lineInfoCompDirIsLess); + for (std::vector::iterator it = lines.begin(), e = lines.end(); + it != e;) { + std::vector::iterator last = it; + ++last; + while (last != e && T(it->leaf).getCompDir() == T(last->leaf).getCompDir()) + ++last; + MCSymbol *StopLabel = emitSectionHeader(sectionInfo.srcSection, XTA_MARKER_TABLE_VERSION); + OutStreamer.EmitBytes(T(begin->leaf).getCompDir(), 0); // comp_dir. + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + for (std::vector::iterator it = begin, e = end; it != e; ++it) { + MCSymbol *sym = lineInfo.sym; + OutStreamer.EmitRawText(".cc_top cc_" + Twine(ccCounter) + Twine(",") + sym->getName()); + OutStreamer.EmitBytes(line.getFile(), 0); + OutStreamer.EmitBytes(StringRef("\0", 1), 0); + OutStreamer.EmitIntValue(line.getLineNum(), 4); + OutStreamer.EmitValue(MCSymbolRefExpr::Create(sym, OutContext), 4); + OutStreamer.EmitRawText(".cc_bottom cc_" + Twine(ccCounter++)); + } + OutStreamer.EmitLabel(StopLabel); + it = last; + } + } + RUW.EndModule(M); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a21905edf906991b4e47ad670d0f50c77c63d762 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,91 @@ +void XCoreAsmPrinter::EmitStartOfAsmFile(Module &M) { + Meta = getAnalysisIfAvailable(); + assert(Meta && "XCoreAsmPrinter didn't require XCoreMetadata?"); + NamedMDNode *NMD = M.getNamedMetadata("xcore.typestrings"); + if (!NMD) + return; + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { + MDNode *N = cast_or_null(NMD->getOperand(i)); + if (!N) + continue; + if (N->getNumOperands() != 2) + continue; + GlobalValue *GV = cast_or_null(N->getOperand(0)); + MDString *S = cast_or_null(N->getOperand(1)); + if (!GV || !S) + continue; + TypeStrings.insert(std::make_pair(GV, S->getString())); + } + NamedMDNode *NMD = M.getNamedMetadata("xcore.overlay"); + if (!NMD) + return; + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { + MDNode *N = cast_or_null(NMD->getOperand(i)); + if (!N) + continue; + if (N->getNumOperands() < 1 || N->getNumOperands() > 2) + continue; + GlobalValue *GV = cast_or_null(N->getOperand(0)); + if (!GV) + continue; + std::string str; + if (N->getNumOperands() == 2) { + MDString *S = cast_or_null(N->getOperand(1)); + if (!S) + continue; + str = S->getString(); + } + OverlayInfo.insert(std::make_pair(GV, str)); + } + NamedMDNode *NMD = M.getNamedMetadata("xcore.overlay.reference"); + if (!NMD) + return; + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { + MDNode *N = cast_or_null(NMD->getOperand(i)); + if (!N) + continue; + if (N->getNumOperands() < 2) + continue; + GlobalValue *GV = cast_or_null(N->getOperand(0)); + if (!GV) + continue; + std::vector refs; + for (unsigned j = 1, e = N->getNumOperands(); j != e; ++j) { + MDString *S = cast_or_null(N->getOperand(j)); + if (!S) + continue; + refs.push_back(S->getString()); + } + OverlayReferenceInfo.insert(std::make_pair(GV, refs)); + } + NamedMDNode *NMD = M.getNamedMetadata("xcore.stack"); + if (!NMD) + return; + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { + MDNode *N = cast_or_null(NMD->getOperand(i)); + if (!N) + continue; + if (N->getNumOperands() != 2) + continue; + Function *F = cast_or_null(N->getOperand(0)); + ConstantInt *CI = cast_or_null(N->getOperand(1)); + if (!F || !CI) + continue; + StackAttributes.insert(std::make_pair(F, CI->getZExtValue())); + } + NamedMDNode *NMD = M.getNamedMetadata("xcore.xtataskstart"); + if (!NMD) + return; + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { + MDNode *N = cast_or_null(NMD->getOperand(i)); + if (!N) + continue; + if (N->getNumOperands() != 1) + continue; + Function *F = cast_or_null(N->getOperand(0)); + if (!F) + continue; + XtaTaskStart.insert(F); + } + Meta = M; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..656af2d7030d2b7f23236a4df7be09a85568795c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp @@ -0,0 +1,5 @@ +void getAnalysisUsage(AnalysisUsage &AU) const { + AsmPrinter::getAnalysisUsage(AU); + AU.setPreservesAll(); + AU.addRequired(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b52d2337b7bd8a56dd2cb8cc6fd3f6a79e7fc1c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp @@ -0,0 +1,5 @@ +MachineLocation XCoreAsmPrinter::getDebugValueLocation(const MachineInstr *MI) const { + assert(MI->getNumOperands() == 4 && "Invalid no. of machine operands!"); + assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm() && "Unexpected MachineOperand types"); + return MachineLocation(MI->getOperand(0).getReg() MI->getOperand(1).getImm()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a9c75d959bc23c855ea600ab93a27f7c7ce7239a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char *getPassName() const { + return "XCore Assembly Printer"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9534675771a3b46a89bf466409a674138f3b2e86 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp @@ -0,0 +1,14 @@ +void XCoreAsmPrinter::printInlineJT(const MachineInstr *MI, int opNum, raw_ostream &O, const std::string &directive) { + unsigned JTI = MI->getOperand(opNum).getIndex(); + const MachineFunction *MF = MI->getParent()->getParent(); + const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); + const std::vector &JT = MJTI->getJumpTables(); + const std::vector &JTBBs = JT[JTI].MBBs; + O << "\t" << directive << " "; + for (unsigned i = 0, e = JTBBs.size(); i != e; ++i) { + MachineBasicBlock *MBB = JTBBs[i]; + if (i > 0) + O << ","; + O << *MBB->getSymbol(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..357cdd2774a36b1693463b545ef78022c5632bba --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp @@ -0,0 +1,14 @@ +void XCoreAsmPrinter::printInlineJT32(const MachineInstr *MI, int opNum, raw_ostream &O, const std::string &directive) { + unsigned JTI = MI->getOperand(opNum).getIndex(); + const MachineFunction *MF = MI->getParent()->getParent(); + const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); + const std::vector &JT = MJTI->getJumpTables(); + const std::vector &JTBBs = JT[JTI].MBBs; + O << "\t" << directive << " "; + for (unsigned i = 0, e = JTBBs.size(); i != e; ++i) { + MachineBasicBlock *MBB = JTBBs[i]; + if (i > 0) + O << ","; + O << *MBB->getSymbol(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..17c61d25c6cbf07c419cb3d80f6528a6f228bf84 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp @@ -0,0 +1,7 @@ +void XCoreAsmPrinter::printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &O) { + printOperand(MI, opNum, O); + if (MI->getOperand(opNum+1).isImm() && MI->getOperand(opNum+1).getImm() == 0) + return; + O << "+"; + printOperand(MI, opNum+1, O); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4745fe309aac0d12cebafd265ca0698989f8cfb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/printOperand.cpp @@ -0,0 +1,33 @@ +void XCoreAsmPrinter::printOperand(const MachineInstr *MI, int opNum, raw_ostream &O) { + const MachineOperand &MO = MI->getOperand(opNum); + switch (MO.getType()) { + case MachineOperand::MO_Register: + O << getRegisterName(MO.getReg()); + break; + case MachineOperand::MO_Immediate: + O << MO.getImm(); + break; + case MachineOperand::MO_MachineBasicBlock: + O << *MO.getMBB()->getSymbol(); + break; + case MachineOperand::MO_GlobalAddress: + O << *Mang->getSymbol(MO.getGlobal()); + break; + case MachineOperand::MO_ExternalSymbol: + O << MO.getSymbolName(); + break; + case MachineOperand::MO_ConstantPoolIndex: + O << MAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() + << '_' << MO.getIndex(); + break; + case MachineOperand::MO_JumpTableIndex: + O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() + << '_' << MO.getIndex(); + break; + case MachineOperand::MO_BlockAddress: + O << *GetBlockAddressSymbol(MO.getBlockAddress()); + break; + default: + llvm_unreachable("not implemented"); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b3ec7b4088890ccde7150025701b0c5d602b0cae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,544 @@ +bool XCoreAsmPrinter::runOnMachineFunction(MachineFunction &MF) { + SetupMachineFunction(MF); + const Function *F = MF.getFunction(); + OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM)); + OutStreamer.EmitRawText("\t.cc_top " + Twine(CurrentFnSym->getName()) + ".function"); + EmitFunctionHeader(); + EmitFunctionBody(); + unsigned Alignment = MF.getAlignment(); + if (Alignment == 2) + EmitAlignment(MF.getAlignment(), MF.getFunction()); + OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM)); + OutStreamer.EmitRawText("\t.cc_bottom " + Twine(CurrentFnSym->getName()) + ".function"); + CurrentFn = MF.getFunction(); + Buf.clear(); + raw_svector_ostream O(Buf); + XCoreResourceMDExtractor res(MF.getFunction()); + switch (Type) { + case PragmaStackWords: + { + uint64_t Value; + if (!Meta || !Meta->GetStackAttribute(*MF.getFunction(), Value)) + return false; + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << Value; + break; + } + case StackWords: + { + const XCoreFunctionInfo *XFI = MF.getInfo(); + StackNode *exp = XFI->getNStackWords(); + if (exp->getID() == STUDefID) { + uint64_t Dummy; + if (Meta && Meta->GetStackAttribute(*MF.getFunction(), Dummy)) { + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + break; + } + return false; + } + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + exp->toString(O); + break; + } + case MaxTimers: + { + StringRef s = res.getTimerResourceUsage(); + if (!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxChanends: + { + StringRef s = res.getChanendResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxCores: + { + StringRef s = res.getThreadResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + } + O.flush(); + OutStreamer.EmitRawText(Buf.str()); + switch (MF.getFunction()->getLinkage()) { + default: assert(0 && "Unknown linkage type!"); + case Function::InternalLinkage: + case Function::PrivateLinkage: + break; + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + case GlobalValue::ExternalLinkage: + Buf.clear(); + Asm->Mang->getNameWithPrefix(Buf, MF.getFunction(), false); + Buf += getSuffix(Type); + MCSymbol *ResSym = Asm->GetExternalSymbolSymbol(Buf.str()); + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Global); + if (MF.getFunction()->getLinkage() != GlobalValue::ExternalLinkage) + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Weak); + break; + } + CurrentFn = MF.getFunction(); + Buf.clear(); + raw_svector_ostream O(Buf); + XCoreResourceMDExtractor res(MF.getFunction()); + switch (Type) { + case PragmaStackWords: + { + uint64_t Value; + if (!Meta || !Meta->GetStackAttribute(*MF.getFunction(), Value)) + return false; + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << Value; + break; + } + case StackWords: + { + const XCoreFunctionInfo *XFI = MF.getInfo(); + StackNode *exp = XFI->getNStackWords(); + if (exp->getID() == STUDefID) { + uint64_t Dummy; + if (Meta && Meta->GetStackAttribute(*MF.getFunction(), Dummy)) { + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + break; + } + return false; + } + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + exp->toString(O); + break; + } + case MaxTimers: + { + StringRef s = res.getTimerResourceUsage(); + if (!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxChanends: + { + StringRef s = res.getChanendResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxCores: + { + StringRef s = res.getThreadResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + } + O.flush(); + OutStreamer.EmitRawText(Buf.str()); + switch (MF.getFunction()->getLinkage()) { + default: assert(0 && "Unknown linkage type!"); + case Function::InternalLinkage: + case Function::PrivateLinkage: + break; + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + case GlobalValue::ExternalLinkage: + Buf.clear(); + Asm->Mang->getNameWithPrefix(Buf, MF.getFunction(), false); + Buf += getSuffix(Type); + MCSymbol *ResSym = Asm->GetExternalSymbolSymbol(Buf.str()); + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Global); + if (MF.getFunction()->getLinkage() != GlobalValue::ExternalLinkage) + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Weak); + break; + } + CurrentFn = MF.getFunction(); + Buf.clear(); + raw_svector_ostream O(Buf); + XCoreResourceMDExtractor res(MF.getFunction()); + switch (Type) { + case PragmaStackWords: + { + uint64_t Value; + if (!Meta || !Meta->GetStackAttribute(*MF.getFunction(), Value)) + return false; + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << Value; + break; + } + case StackWords: + { + const XCoreFunctionInfo *XFI = MF.getInfo(); + StackNode *exp = XFI->getNStackWords(); + if (exp->getID() == STUDefID) { + uint64_t Dummy; + if (Meta && Meta->GetStackAttribute(*MF.getFunction(), Dummy)) { + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + break; + } + return false; + } + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + exp->toString(O); + break; + } + case MaxTimers: + { + StringRef s = res.getTimerResourceUsage(); + if (!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxChanends: + { + StringRef s = res.getChanendResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxCores: + { + StringRef s = res.getThreadResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + } + O.flush(); + OutStreamer.EmitRawText(Buf.str()); + switch (MF.getFunction()->getLinkage()) { + default: assert(0 && "Unknown linkage type!"); + case Function::InternalLinkage: + case Function::PrivateLinkage: + break; + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + case GlobalValue::ExternalLinkage: + Buf.clear(); + Asm->Mang->getNameWithPrefix(Buf, MF.getFunction(), false); + Buf += getSuffix(Type); + MCSymbol *ResSym = Asm->GetExternalSymbolSymbol(Buf.str()); + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Global); + if (MF.getFunction()->getLinkage() != GlobalValue::ExternalLinkage) + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Weak); + break; + } + CurrentFn = MF.getFunction(); + Buf.clear(); + raw_svector_ostream O(Buf); + XCoreResourceMDExtractor res(MF.getFunction()); + switch (Type) { + case PragmaStackWords: + { + uint64_t Value; + if (!Meta || !Meta->GetStackAttribute(*MF.getFunction(), Value)) + return false; + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << Value; + break; + } + case StackWords: + { + const XCoreFunctionInfo *XFI = MF.getInfo(); + StackNode *exp = XFI->getNStackWords(); + if (exp->getID() == STUDefID) { + uint64_t Dummy; + if (Meta && Meta->GetStackAttribute(*MF.getFunction(), Dummy)) { + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + break; + } + return false; + } + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + exp->toString(O); + break; + } + case MaxTimers: + { + StringRef s = res.getTimerResourceUsage(); + if (!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxChanends: + { + StringRef s = res.getChanendResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxCores: + { + StringRef s = res.getThreadResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + } + O.flush(); + OutStreamer.EmitRawText(Buf.str()); + switch (MF.getFunction()->getLinkage()) { + default: assert(0 && "Unknown linkage type!"); + case Function::InternalLinkage: + case Function::PrivateLinkage: + break; + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + case GlobalValue::ExternalLinkage: + Buf.clear(); + Asm->Mang->getNameWithPrefix(Buf, MF.getFunction(), false); + Buf += getSuffix(Type); + MCSymbol *ResSym = Asm->GetExternalSymbolSymbol(Buf.str()); + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Global); + if (MF.getFunction()->getLinkage() != GlobalValue::ExternalLinkage) + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Weak); + break; + } + CurrentFn = MF.getFunction(); + Buf.clear(); + raw_svector_ostream O(Buf); + XCoreResourceMDExtractor res(MF.getFunction()); + switch (Type) { + case PragmaStackWords: + { + uint64_t Value; + if (!Meta || !Meta->GetStackAttribute(*MF.getFunction(), Value)) + return false; + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << Value; + break; + } + case StackWords: + { + const XCoreFunctionInfo *XFI = MF.getInfo(); + StackNode *exp = XFI->getNStackWords(); + if (exp->getID() == STUDefID) { + uint64_t Dummy; + if (Meta && Meta->GetStackAttribute(*MF.getFunction(), Dummy)) { + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + break; + } + return false; + } + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + exp->toString(O); + break; + } + case MaxTimers: + { + StringRef s = res.getTimerResourceUsage(); + if (!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxChanends: + { + StringRef s = res.getChanendResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + case MaxCores: + { + StringRef s = res.getThreadResourceUsage(); + if(!s.empty()){ + O << "\t.set\t"; + SmallString<32> NameBuf; + Asm->Mang->getNameWithPrefix(NameBuf, F, false); + O << NameBuf << getSuffix(Type); + O << ","; + O << s; + } + break; + } + } + O.flush(); + OutStreamer.EmitRawText(Buf.str()); + switch (MF.getFunction()->getLinkage()) { + default: assert(0 && "Unknown linkage type!"); + case Function::InternalLinkage: + case Function::PrivateLinkage: + break; + case GlobalValue::LinkOnceAnyLinkage: + case GlobalValue::LinkOnceODRLinkage: + case GlobalValue::WeakAnyLinkage: + case GlobalValue::WeakODRLinkage: + case GlobalValue::ExternalLinkage: + Buf.clear(); + Asm->Mang->getNameWithPrefix(Buf, MF.getFunction(), false); + Buf += getSuffix(Type); + MCSymbol *ResSym = Asm->GetExternalSymbolSymbol(Buf.str()); + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Global); + if (MF.getFunction()->getLinkage() != GlobalValue::ExternalLinkage) + OutStreamer.EmitSymbolAttribute(ResSym, MCSA_Weak); + break; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a6d9e048a9bd7f969d18b8fdcd81036370e299c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp @@ -0,0 +1,2 @@ +virtual ~XCoreAsmPrinter(){ +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4733a822df2aa0a0f484921d1777017bc16abae1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,13 @@ +XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, StringRef TT) { + SupportsDebugInformation = true; + Data16bitsDirective = "\t.short\t"; + Data32bitsDirective = "\t.long\t"; + Data64bitsDirective = 0; + ZeroDirective = "\t.space\t"; + CommentString = "#"; + PrivateGlobalPrefix = ".L"; + AscizDirective = ".asciiz"; + WeakRefDirective = "\t.weak\t"; + HasLEB128 = true; + ExceptionsType = ExceptionHandling::DwarfCFI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b96e682790667f5b346ff629dda280e5e0801cd1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,7 @@ +extern "C" void LLVMInitializeXCoreTargetMC() { + RegisterMCAsmInfoFn X(TheXCoreTarget, createXCoreMCAsmInfo); + TargetRegistry::RegisterMCCodeGenInfo(TheXCoreTarget, createXCoreMCCodeGenInfo); + TargetRegistry::RegisterMCInstrInfo(TheXCoreTarget, createXCoreMCInstrInfo); + TargetRegistry::RegisterMCRegInfo(TheXCoreTarget, createXCoreMCRegisterInfo); + TargetRegistry::RegisterMCSubtargetInfo(TheXCoreTarget, createXCoreMCSubtargetInfo); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed19128f49910c2d27948bbae9b32790e7ef3dcf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,7 @@ +static MCAsmInfo *createXCoreMCAsmInfo(const Target &T, StringRef TT) { + MCAsmInfo *MAI = new XCoreMCAsmInfo(T, TT); + MachineLocation Dst(MachineLocation::VirtualFP); + MachineLocation Src(XCore::SP, 0); + MAI->addInitialFrameState(0, Dst, Src); + return MAI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c4b20b67ea4e426d3f2d55142424bdf78fea950 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp @@ -0,0 +1,5 @@ +static MCCodeGenInfo *createXCoreMCCodeGenInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM) { + MCCodeGenInfo *X = new MCCodeGenInfo(); + X->InitMCCodeGenInfo(RM, CM); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e75e5c57f4a8670b3a19900854883936a35c76e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,5 @@ +static MCInstrInfo *createXCoreMCInstrInfo() { + MCInstrInfo *X = new MCInstrInfo(); + InitXCoreMCInstrInfo(X); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca4b3f5c5570458299c2e681f5eddf09b8946111 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,5 @@ +static MCRegisterInfo *createXCoreMCRegisterInfo(StringRef TT) { + MCRegisterInfo *X = new MCRegisterInfo(); + InitXCoreMCRegisterInfo(X, XCore::LR); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..30d8d16f0edc5d7d1c93f17dfdf424e8b8c24efe --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,5 @@ +static MCSubtargetInfo *createXCoreMCSubtargetInfo(StringRef TT, StringRef CPU, StringRef FS) { + MCSubtargetInfo *X = new MCSubtargetInfo(); + InitXCoreMCSubtargetInfo(X, TT, CPU, FS); + return X; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp new file mode 100644 index 0000000000000000000000000000000000000000..246aed2bd7e0440bdeb11d57132d657b58c40e08 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp @@ -0,0 +1,2 @@ +XCoreFTAOElim() : FunctionPass(ID) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7a1a1415db832540fb6c850d4cf6ede91113354 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp @@ -0,0 +1,2 @@ +XCoreFTAOElim() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e893e3245ee3dc509be977cc7b1eb1255547fe20 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createXCoreFrameToArgsOffsetEliminationPass() { + return new XCoreFTAOElim(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0bf93850ec6ecb540f8396365e3f5949ef7f6c22 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char *getPassName() const { + return "XCore FRAME_TO_ARGS_OFFSET Elimination"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eb7ca2a958fa44349a149b0010861c1dec6790c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp @@ -0,0 +1,23 @@ +bool XCoreFTAOElim::runOnMachineFunction(MachineFunction &MF) { + const TargetInstrInfo *TII = MF.getTarget().getInstrInfo(); + unsigned StackSize = MF.getFrameInfo()->getStackSize(); + if (!isImmU16(StackSize)) { + errs() << "FrameToArgsOffsetElimination stack size too big: " << StackSize << "\n"; + abort(); + } + unsigned Opc = isImmU6(StackSize) ? XCore::LDC_ru6 : XCore::LDC_lru6; + unsigned Imm = StackSize; + for (MachineFunction::iterator MFI = MF.begin(), E = MF.end(); MFI != E; ++MFI) { + MachineBasicBlock *MBB = MFI; + for (MachineBasicBlock::iterator MBBI = MBB->begin(), EE = MBB->end(); MBBI != EE; ++MBBI) { + if (MBBI->getOpcode() == XCore::FRAME_TO_ARGS_OFFSET) { + MachineInstr *OldInst = MBBI; + DebugLoc dl = OldInst->getDebugLoc(); + unsigned Dest = OldInst->getOperand(0).getReg(); + MBBI = BuildMI(*MBB, MBBI, dl, TII->get(Opc)).addReg(Dest).addImm(Imm); + OldInst->eraseFromParent(); + } + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..953838522ff09e67f0ad79402ddcb1be9866d438 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp @@ -0,0 +1,3 @@ +XCoreLoopMetadataLowering() : FunctionPass(ID) { + initializeXCoreLoopMetadataLoweringPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b0f222770864ea550b4f88f072a2204cdc08137 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createXCoreLoopMetadataLowering() { + return new XCoreLoopMetadataLowering(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ec5bdd161c9d6eef14102c9f0ba289dd4c38162 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp @@ -0,0 +1,3 @@ +virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa2527ee5cb19412db7ea64955f9c6877af6b3d4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp @@ -0,0 +1,23 @@ +bool XCoreLoopMetadataLowering::runOnFunction(Function &F) { + bool madeChange = false; + Module * m = F.getParent(); + unsigned loopKind = m->getMDKindID("xta.loop"); + unsigned xtaLoopLabelKind = m->getMDKindID("xta.loop_labels"); + + for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I){ + Instruction * inst = &*I; + if(MDNode * md = inst->getMetadata(loopKind)){ + IRBuilder<> Builder(inst->getParent(), inst); + Function * Fn = Intrinsic::getDeclaration(m, Intrinsic::xcore_loopmarker); + Builder.CreateCall2(Fn, ConstantInt::get(Type::getInt32Ty(m->getContext()), loopKind, false), md); + madeChange = true; + } + if(MDNode * md = inst->getMetadata(xtaLoopLabelKind)){ + IRBuilder<> Builder(inst->getParent(), inst); + Function * Fn = Intrinsic::getDeclaration(m, Intrinsic::xcore_loopmarker); + Builder.CreateCall2(Fn, ConstantInt::get(Type::getInt32Ty(m->getContext()), xtaLoopLabelKind, false), md); + madeChange = true; + } + } + return madeChange; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..334a46043fe3b9906b82a6db0e92df8bb8bd45d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp @@ -0,0 +1,2 @@ +virtual ~XCoreLoopMetadataLowering() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b56f5e661a14b3fce1648465e707b50625802200 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp @@ -0,0 +1,2 @@ +XCoreSimpleBranchOpt() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38e44dc8ea977c2ac5e5393a3c7160d52fa13906 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createXCoreSimpleBranchOptPass() { + return new XCoreSimpleBranchOpt(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6cb41569b49b33efcd76a81eb0b0391914668029 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char *getPassName() const { + return "XCore branch to trap optimization"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5ed1ab1b7c93f98d50c55ffa5b03dec8940da1f0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp @@ -0,0 +1,9 @@ +bool XCoreSimpleBranchOpt::runOnMachineFunction(MachineFunction &MF) { + const TargetInstrInfo *TII = MF.getTarget().getInstrInfo(); + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; I++) { + MachineBasicBlock *MBB = I, *TBB = 0, *FBB = 0; + SmallVector Cond; + TII->AnalyzeBranch(*MBB, TBB, FBB, Cond, true); + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp new file mode 100644 index 0000000000000000000000000000000000000000..862b2fca603aabf1244b580f72f603faddc8f834 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp @@ -0,0 +1,3 @@ +XCoreStackAnalysisPrepare() : FunctionPass(ID) { + initializeXCoreStackAnalysisPreparePass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f8195dd1360a5a7264e251088fea5e7dbc2d24d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createRISCVMergeBaseOffsetOptPass() { + return new RISCVMergeBaseOffsetOpt(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ec5bdd161c9d6eef14102c9f0ba289dd4c38162 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp @@ -0,0 +1,3 @@ +virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..94f78304b8664a741bc46620f58a2d8b88fdacae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp @@ -0,0 +1,43 @@ +bool XCoreStackAnalysisPrepare::runOnFunction(Function &F) { + bool madeChange = false; + for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { + BasicBlock *B = &*BB; + for (BasicBlock::iterator I = B->begin(), IE = B->end(); I != IE; ++I) { + Instruction *Inst = &*I; + if (AllocaInst *AI = dyn_cast(Inst)) { + BasicBlock * b = I->getParent(); + if (isa (I) || isa (I) || isa (I) ||isa (I) || isa (I) || isa (I) ||isa (I) || isa (I) ||isa (I)) + return true; + if (IntrinsicInst *II = dyn_cast(I)) { + return (II->getIntrinsicID() == Intrinsic::xcore_stackusage); + } + return false; + if (!(I)) { + return false; + } + bool madeChange = false; + if (I->getParent() != B) { + BasicBlock::iterator InsertPt = B->getFirstNonPHI(); + if (I->hasOneUse()) { + I->moveBefore(parent); + } else { + Instruction *clone = I->clone(); + B->getInstList().insert(InsertPt, clone); + if (parent) + parent->replaceUsesOfWith(I, clone); + I = clone; + } + madeChange = true; + } + assert(!b->empty() && "cannot leave a BB empty"); + for (unsigned n = 0; n < I->getNumOperands(); n++) { + if (Instruction *i = dyn_cast(I->getOperand(n))) { + madeChange |= moveOperandsToBB(B, i, I); + } + } + madeChange |= madeChange; + } + } + } + return madeChange; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04c2c39fd51f6d0d6b44d401dad1ca0c5eb96c65 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp @@ -0,0 +1,2 @@ +~XCoreStackAnalysisPrepare() { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/StackUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/StackUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..93090e5fd6422089facd4ba5525665b2bbfdbc5a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/StackUsage.cpp @@ -0,0 +1,2 @@ +XCoreStackUsage() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/createPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..94143def502229a4af9738a503f4d8620ab9acf2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createXCoreStackUsage() { + return new XCoreStackUsage(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..30b5884ebae5ffdb33d795c44dfee8aa7371896d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eef2a2f09a7a36f5fc066077ac16a643340d8ebc --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/getPassName.cpp @@ -0,0 +1,3 @@ +const char *getPassName() const { + return "Calculates XCore stack usage"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..500dde26b4a556a57f3e33632ecff91a3c69bf90 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp @@ -0,0 +1,240 @@ +bool XCoreStackUsage::runOnMachineFunction(MachineFunction &Fn) { + XFI = Fn.getInfo (); + DEBUG(dbgs() << "XCore Stack Usage on function: " << Fn.getFunction()->getNameStr() <<"\n"); + int stackOffset = Fn.getFrameInfo()->getStackSize() / 4; + if(Fn.empty()){ + return true; + } + DEBUG(Fn.dump()); + MachineBasicBlock *MBB = &*Fn.begin(); + MachineInstr * MI = 0; + if(!MBB->empty()){ + MI = &*MBB->begin(); + } + StackContext StackContext(MI, stackOffset); + StackContext * currentStack = stackContext; + bool success = true; + for (MachineBasicBlock::iterator II = MBB->begin(), IE = MBB->end(); II != IE; ++II) { + MachineInstr * MI = &*II; + if (currentStack->seenInstr(MI, true)) { + return true; + } + else { + StackContext * parent = currentStack->getParent(); + while(parent){ + if(parent->seenInstr(MI, false)){ + return false; + } + parent = parent->getParent(); + } + } + if (MI->getOpcode() == XCore::STACKSAVE) { + StackContext * parent = currentStack->getParent(); + while(parent){ + if(parent->getSave() == MI){ + return false; + } + parent = parent->getParent(); + } + StackContext * nestedStack = new StackContext(MI, true); + currentStack->addChildStack(nestedStack); + currentStack = nestedStack; + } + if (MI->getOpcode() == XCore::STACKUP) { + StackContext * parent = currentStack->getParent(); + while(parent){ + if(parent->getSave() == MI){ + return false; + } + parent = parent->getParent(); + } + StackContext * nestedStack = new StackContext(MI, false); + currentStack->addChildStack(nestedStack); + currentStack = nestedStack; + } + if (MI->getDebugLoc().getIndirectCallInfo()) { + currentStack->addIndirectCallInfo(MI); + } + else if (MI->getDebugLoc().getParInfo()) { + currentStack->addParInfo(MI); + } + else if (MI->getOpcode() == XCore::WAITNONLOCAL || MI->getOpcode() == XCore::CHECKNONLOCAL) { + return false; + } + else if (MI->getDesc().isCall()) { + if (!currentStack->addFunction(MI)) + return false; + } + if (MI->getOpcode() == XCore::ALLOCA) { + StackNode * exp = XFI->getStackExpression(MI->getOperand(0).getImm()); + if(exp) + currentStack->addAlloca(exp); + + } + if (MI->getOpcode() == XCore::STACKDOWN) { + currentStack->endChildStack(MI); + currentStack = currentStack->getParent(); + } + if (MI->getOpcode() == XCore::STACKRESTORE) { + currentStack->endChildStack(MI); + while(currentStack->getParent()){ + currentStack = currentStack->getParent(); + if(currentStack->isSave()){ + currentStack = currentStack->getParent(); + break; + } + } + } + } + for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), SE = + MBB->succ_end(); SI != SE; ++SI) { + MachineBasicBlock* SUCC = *SI; + success &= walkFunction(SUCC, currentStack); + } + return success; + if(walkFunction(Fn.begin(), &StackContext)){ + DEBUG(StackContext.dump()); + StackNode * nstackwords = StackContext.getNStackWords(); + XFI->setNStackWords(nstackwords); + DEBUG(nstackwords->toString(dbgs())); + DEBUG(dbgs()<<"\n"); + } + else { + XFI->setNStackWords(new STUDef()); + } + static llvm::Optional getCalledFunctionName(MachineInstr * MI) { + if(MI->getDesc().isIndirectBranch()) { + return llvm::Optional(); + } + for (unsigned i = 0; i < MI->getNumOperands(); ++i) { + if (MI->getOperand(i).isGlobal()) { + const GlobalValue *GV = MI->getOperand(i).getGlobal(); + if (const GlobalAlias *GA = dyn_cast(GV)) { + GV = GA->resolveAliasedGlobal(); + } + if (const Function *F = dyn_cast(GV)) { + return llvm::Optional(getMangledName(F)); + } else { + return llvm::Optional(); + } + } + if (MI->getOperand(i).isSymbol()) { + return llvm::Optional(MI->getOperand(i).getSymbolName()); + } + } + return llvm::Optional(); + assert(MI->getDesc().isCall() && "MI is not a function call."); + llvm::Optional name = getCalledFunctionName(MI); + if (name.hasValue()) { + seqFuncs.push_back(new STString(name.getValue(), true)); + return true; + } + else { + seqFuncs.push_back(new STUDef()); + return false; + } + llvm::Optional override; + if (MI->getDesc().isCall()) { + override = getCalledFunctionName(MI); + } + MDNode *meta = MI->getDebugLoc().getIndirectCallInfo(); + int n = meta->getNumOperands(); + for (int i = 0; i < n; ++i) { + MDString *callName = dyn_cast(meta->getOperand(i)); + if (!callName) + continue; + std::string s = callName->getString().str() + ".nstackwords"; + if (override.hasValue()) { + std::string o = override.getValue() + ".nstackwords"; + s = "($D " + o + " ? " + o + " $: " + s + ")"; + } + seqFuncs.push_back(new STString(s, false)); + } + llvm::Optional override; + MDNode *meta = MI->getDebugLoc().getParInfo(); + int n = meta->getNumOperands(); + std::string s = "(par.extra_stackwords"; + for (int i = 0; i < n; ++i) { + GlobalValue *call= dyn_cast(meta->getOperand(i)); + if (!call) + continue; + s += " + 1 + " + call->getName().str() + ".nstackwords"; + } + s += ")"; + seqFuncs.push_back(new STString(s, false)); + if (nStackWords) { + return nStackWords; + } + std::vector all; + for (std::vector::iterator I = nestedStacks.begin(), E = + nestedStacks.end(); I != E; ++I) { + all.push_back((*I)->getNStackWords()); + } + all.insert(all.end(), seqFuncs.begin(), seqFuncs.end()); + if (fixedStackSize) { + StackNode * l_lhs = new STSum(seqAllocs); + StackNode * l_rhs = new STMax(all); + StackNode * lhs = new STBinOp(l_lhs,l_rhs,STBinOp::STBinOpADD); + StackNode * rhs = new STInt(fixedStackSize); + nStackWords = new STBinOp(lhs, rhs, STBinOp::STBinOpADD); + } + else { + nStackWords = new STBinOp(new STSum(seqAllocs), new STMax(all), STBinOp::STBinOpADD); + } + StackNodeSumMaxCleaner cleaner; + StackNodeZeroEliminator zeroEliminator; + StackNodeMaxDuplicateCleaner maxDuplicateCleaner; + StackNodeUnDefProp unDefProp; + bool modified = true; + while (modified) { + modified = false; + while (maxDuplicateCleaner.run(&nStackWords)) { + modified = true; + } + while (cleaner.run(&nStackWords)) { + modified = true; + } + while (zeroEliminator.run(&nStackWords)) { + modified = true; + } + while (unDefProp.run(&nStackWords)) { + modified = true; + } + + } + return nStackWords; + indent(i); + dbgs() << "Stack begin: " << this <<" " ; + if(stackSaveInst) + stackSaveInst->dump(); + indent(i); + dbgs() << "Allocas:\n"; + for (std::vector::iterator I = seqAllocs.begin(), E = + seqAllocs.end(); I != E; ++I) { + indent(i); + (*I)->dump(); + dbgs() << "\n"; + } + indent(i); + dbgs() << "Functions:\n"; + for (std::vector::iterator I = seqFuncs.begin(), E = + seqFuncs.end(); I != E; ++I) { + indent(i); + (*I)->dump(); + dbgs() << "\n"; + } + indent(i); + dbgs() << "nestedStacks:\n"; + for (std::vector::iterator I = nestedStacks.begin(), E = + nestedStacks.end(); I != E; ++I) { + (*I)->dump(i + 1); + } + if (stackRestoreInst) { + indent(i); + dbgs() << "Stack end: "; + stackRestoreInst->dump(); + } + dbgs() <<"\n"; +} + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8045234dec87e223cc5abc9872f40ea9dccc2c79 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp @@ -0,0 +1,9 @@ +static inline unsigned GetCondBranchFromCond(XCore::CondCode CC) { + switch (CC) { + default: llvm_unreachable("Illegal condition code!"); + case XCore::COND_TRUE : + return XCore::BRFT_lru6; + case XCore::COND_FALSE : + return XCore::BRFF_lru6; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b99ad0ed50c5077b5b3b87b47d214bb2f1bb911a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp @@ -0,0 +1,11 @@ +static XCore::CondCode GetCondFromBranchOpc(unsigned BrOpc) { + if (IsBRT(BrOpc)) { + return XCore::COND_TRUE; + } + else if (IsBRF(BrOpc)) { + return XCore::COND_FALSE; + } + else { + return XCore::COND_INVALID; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fee66a8d59ed802caac67018acbef5f4d4d9133d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp @@ -0,0 +1,28 @@ +unsigned XCoreInstrInfo::GetInstSizeInBytes(const MachineInstr *MI) const { + const MCInstrDesc &TID = MI->getDesc(); + switch(MI->getOpcode()) { + case XCore::INLINEASM: + return 4; + case XCore::BR_JT: + case XCore::BR_JT32: { + const MachineFunction * MF = MI->getParent()->getParent(); + const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); + unsigned EntrySize; + if (MI->getOpcode() == XCore::BR_JT) { + EntrySize = 4; + } + else { + assert(MI->getOpcode() == XCore::BR_JT32); + EntrySize = 4; + } + unsigned JTI = MI->getOperand(0).getIndex(); + const std::vector &JT = MJTI->getJumpTables(); + unsigned NumEntries = JT[JTI].MBBs.size(); + return NumEntries * EntrySize; + } + break; + default: + unsigned TSFlags = TID.TSFlags; + return (TSFlags & XCoreII::XCore_NumBytesMask); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3fdd738bf27cc9d3e9137980791824e2aeb0bae --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp @@ -0,0 +1,9 @@ +static inline XCore::CondCode GetOppositeBranchCondition(XCore::CondCode CC) { + switch (CC) { + default: llvm_unreachable("Illegal condition code!"); + case XCore::COND_TRUE : + return XCore::COND_FALSE; + case XCore::COND_FALSE : + return XCore::COND_TRUE; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0cbdb9b4f5c294950fb070579e6be045758b03e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +XCoreInstrInfo::XCoreInstrInfo() : XCoreGenInstrInfo(XCore::ADJCALLSTACKDOWN, XCore::ADJCALLSTACKUP), RI(*this) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80e3781fc9e0dcf5ef871a6378c6f109699380e7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp @@ -0,0 +1,3 @@ +static inline bool IsBRF(unsigned BrOpc) { + return BrOpc == XCore::BRFF_ru6|| BrOpc == XCore::BRFF_lru6 || BrOpc == XCore::BRBF_ru6 || BrOpc == XCore::BRBF_lru6; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f26d2341a263e1a79b71fc7a52c2e27df285cd1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp @@ -0,0 +1,3 @@ +static inline bool IsBRT(unsigned BrOpc) { + return BrOpc == XCore::BRFT_ru6 || BrOpc == XCore::BRFT_lru6 || BrOpc == XCore::BRBT_ru6 || BrOpc == XCore::BRBT_lru6; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0c66d763af767db111636123563bbd32f4b336a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp @@ -0,0 +1,3 @@ +static inline bool IsBRU(unsigned BrOpc) { + return BrOpc == XCore::BRFU_u6 || BrOpc == XCore::BRFU_lu6 || BrOpc == XCore::BRBU_u6 || BrOpc == XCore::BRBU_lu6; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d508048d910b99edf952fa47de39ad4497b485e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp @@ -0,0 +1,3 @@ +static inline bool IsBR_JT(unsigned BrOpc) { + return BrOpc == XCore::BR_JT || BrOpc == XCore::BR_JT32; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55335fd6d65c002404540e7a59bac4431ed1408b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp @@ -0,0 +1,3 @@ +static inline bool IsCondBranch(unsigned BrOpc) { + return BrOpc == XCore::BRFT_ru6 || BrOpc == XCore::BRFT_lru6 || BrOpc == XCore::BRBT_ru6 || BrOpc == XCore::BRBT_lru6 || BrOpc == XCore::BRFF_ru6|| BrOpc == XCore::BRFF_lru6 || BrOpc == XCore::BRBF_ru6 || BrOpc == XCore::BRBF_lru6; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62bb8956a9d7066d799fb2744edd2235cde2a043 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,68 @@ +bool XCoreInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, bool AllowModify) const { + MachineBasicBlock::iterator I = MBB.end(); + if (I == MBB.begin()) + return false; + --I; + while (I->isDebugValue()) { + if (I == MBB.begin()) + return false; + --I; + } + if (!isUnpredicatedTerminator(I)) + return false; + MachineInstr *LastInst = I; + if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) { + if (IsBRU(LastInst->getOpcode())) { + TBB = LastInst->getOperand(0).getMBB(); + return false; + } + XCore::CondCode BranchCode = GetCondFromBranchOpc(LastInst->getOpcode()); + if (BranchCode == XCore::COND_INVALID) + return true; + if (AllowModify && EliminateCondBranchToTrap(MBB, LastInst, LastInst->getOperand(1).getMBB(), BranchCode)) + return false; + TBB = LastInst->getOperand(1).getMBB(); + Cond.push_back(MachineOperand::CreateImm(BranchCode)); + Cond.push_back(LastInst->getOperand(0)); + return false; + } + MachineInstr *SecondLastInst = I; + if (SecondLastInst && I != MBB.begin() && isUnpredicatedTerminator(--I)) + return true; + unsigned SecondLastOpc = SecondLastInst->getOpcode(); + XCore::CondCode BranchCode = GetCondFromBranchOpc(SecondLastOpc); + if (BranchCode != XCore::COND_INVALID + && IsBRU(LastInst->getOpcode())) { + if (AllowModify && EliminateCondBranchToTrap(MBB, SecondLastInst, SecondLastInst->getOperand(1).getMBB(), BranchCode)) { + TBB = LastInst->getOperand(0).getMBB(); + return false; + } + if (AllowModify && IsTrapBB(*LastInst->getOperand(0).getMBB())) { + TBB = SecondLastInst->getOperand(1).getMBB(); + BuildMI(MBB, SecondLastInst, LastInst->getDebugLoc(), get(GetECallFromCond(GetOppositeBranchCondition(BranchCode)))).addReg(SecondLastInst->getOperand(0).getReg()); + BuildMI(MBB, SecondLastInst, LastInst->getDebugLoc(), get(XCore::BRFU_lu6)).addMBB(TBB); + SecondLastInst->eraseFromParent(); + LastInst->eraseFromParent(); + return false; + } + TBB = SecondLastInst->getOperand(1).getMBB(); + Cond.push_back(MachineOperand::CreateImm(BranchCode)); + Cond.push_back(SecondLastInst->getOperand(0)); + FBB = LastInst->getOperand(0).getMBB(); + return false; + } + if (IsBRU(SecondLastInst->getOpcode()) && IsBRU(LastInst->getOpcode())) { + TBB = SecondLastInst->getOperand(0).getMBB(); + I = LastInst; + if (AllowModify) + I->eraseFromParent(); + return false; + } + if (IsBR_JT(SecondLastInst->getOpcode()) && IsBRU(LastInst->getOpcode())) { + I = LastInst; + if (AllowModify) + I->eraseFromParent(); + return true; + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc5a1e736e77d424593dd4752d4e0f6ae31917ad --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,17 @@ +void XCoreInstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const { + bool GRDest = XCore::GRRegsRegClass.contains(DestReg); + bool GRSrc = XCore::GRRegsRegClass.contains(SrcReg); + if (GRDest && GRSrc) { + BuildMI(MBB, I, DL, get(XCore::ADD_2rus), DestReg).addReg(SrcReg, getKillRegState(KillSrc)).addImm(0); + return; + } + if (GRDest && SrcReg == XCore::SP) { + BuildMI(MBB, I, DL, get(XCore::LDAWSP_ru6), DestReg).addImm(0); + return; + } + if (DestReg == XCore::SP && GRSrc) { + BuildMI(MBB, I, DL, get(XCore::SETSP_1r)).addReg(SrcReg, getKillRegState(KillSrc)); + return; + } + llvm_unreachable("Impossible reg-to-reg copy"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4693db1fcde710a743704634bdb2e46d4c8f82f0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp @@ -0,0 +1,4 @@ +MachineInstr* XCoreInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF, int FrameIx, uint64_t Offset, const MDNode *MDPtr, DebugLoc DL) const { + MachineInstrBuilder MIB = BuildMI(MF, DL, get(XCore::DBG_VALUE)).addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr); + return &*MIB; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da9ddb9ff187eda9a196ac20fb9a734eaaa44e3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp @@ -0,0 +1,5 @@ +enum CondCode { + COND_TRUE, + COND_FALSE, + COND_INVALID +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b93d4da5ba29665781d3577daae3e901243d6b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +virtual const TargetRegisterInfo &getRegisterInfo() const { + return RI; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9c4ce411ab9de4965afa8574044f6230c1d691e2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,19 @@ +unsigned XCoreInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl &Cond, DebugLoc DL)const{ + assert(TBB && "InsertBranch must not be told to insert a fallthrough"); + assert((Cond.size() == 2 || Cond.size() == 0) && "Unexpected number of components!"); + if (FBB == 0) { + if (Cond.empty()) { + BuildMI(&MBB, DL, get(XCore::BRFU_lu6)).addMBB(TBB); + } + else { + unsigned Opc = GetCondBranchFromCond((XCore::CondCode)Cond[0].getImm()); + BuildMI(&MBB, DL, get(Opc)).addReg(Cond[1].getReg()).addMBB(TBB); + } + return 1; + } + assert(Cond.size() == 2 && "Unexpected number of components!"); + unsigned Opc = GetCondBranchFromCond((XCore::CondCode)Cond[0].getImm()); + BuildMI(&MBB, DL, get(Opc)).addReg(Cond[1].getReg()).addMBB(TBB); + BuildMI(&MBB, DL, get(XCore::BRFU_lu6)).addMBB(FBB); + return 2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5991d4866b8624bb1ca8561f5b5a28f85828c2a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,10 @@ +unsigned XCoreInstrInfo::isLoadFromStackSlot(const MachineInstr *MI, int &FrameIndex) const{ + int Opcode = MI->getOpcode(); + if (Opcode == XCore::LDWFI) { + if ((MI->getOperand(1).isFI()) && (MI->getOperand(2).isImm()) && (isZeroImm(MI->getOperand(2)))) { + FrameIndex = MI->getOperand(1).getIndex(); + return MI->getOperand(0).getReg(); + } + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c14bf6bb565c560dbf072204e74412aea519978c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,10 @@ +unsigned XCoreInstrInfo::isStoreToStackSlot(const MachineInstr *MI, int &FrameIndex) const { + int Opcode = MI->getOpcode(); + if (Opcode == XCore::STWFI) { + if ((MI->getOperand(1).isFI()) && (MI->getOperand(2).isImm()) && (isZeroImm(MI->getOperand(2)))) { + FrameIndex = MI->getOperand(1).getIndex(); + return MI->getOperand(0).getReg(); + } + } + return 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dca82641f569cc614ef0dc6cd2fb91c28f894ecd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp @@ -0,0 +1,3 @@ +static bool isZeroImm(const MachineOperand &op) { + return op.isImm() && op.getImm() == 0; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d705f450aff94caf71f0a83dc9b19b4bde58e14d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,6 @@ +void XCoreInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { + DebugLoc DL; + if (I != MBB.end()) + DL = I->getDebugLoc(); + BuildMI(MBB, I, DL, get(XCore::LDWFI), DestReg).addFrameIndex(FrameIndex).addImm(0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19fb98e911cf122195cef93a18ebe4f3a7cc4797 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,22 @@ +unsigned XCoreInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator I = MBB.end(); + if (I == MBB.begin()) + return 0; + --I; + while (I->isDebugValue()) { + if (I == MBB.begin()) + return 0; + --I; + } + if (!IsBRU(I->getOpcode()) && !IsCondBranch(I->getOpcode())) + return 0; + I->eraseFromParent(); + I = MBB.end(); + if (I == MBB.begin()) + return 1; + --I; + if (!IsCondBranch(I->getOpcode())) + return 1; + I->eraseFromParent(); + return 2; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5c6a78b4ecc17db49750d2836a6fa1ec29fabbd4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,5 @@ +bool XCoreInstrInfo::ReverseBranchCondition(SmallVectorImpl &Cond) const { + assert((Cond.size() == 2) && "Invalid XCore branch condition!"); + Cond[0].setImm(GetOppositeBranchCondition((XCore::CondCode)Cond[0].getImm())); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55c1cf1faf52f971d3cbe3458c3d0603c7d3c4b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,8 @@ +void XCoreInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { + DebugLoc DL; + if (I != MBB.end()) + DL = I->getDebugLoc(); + MachineFrameInfo * MFI = MBB.getParent()->getFrameInfo(); + MachineMemOperand *MMO = MBB.getParent()->getMachineMemOperand(MachinePointerInfo::getFixedStack(FrameIndex), MachineMemOperand::MOStore, MFI->getObjectSize(FrameIndex), MFI->getObjectAlignment(FrameIndex)); + BuildMI(MBB, I, DL, get(XCore::STWFI)).addReg(SrcReg, getKillRegState(isKill)).addFrameIndex(FrameIndex).addMemOperand(MMO).addImm(0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a873854d75e7effaf87a21964d121778a32509b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp @@ -0,0 +1,2 @@ +XCoreCall(unsigned T) : Type(T) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9fc91e5f81b57378e02ac9cbf92f7a34a77c2661 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp @@ -0,0 +1,2 @@ +XCoreExternalSymbolCall(const char *S) : XCoreCall(XCoreCall::ExternalSymbolType), Sym(S){ +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0572101f7a7aaeb1204fd2f43acb96bc08d6787 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp @@ -0,0 +1,2 @@ +XCoreFunctionCall(const Function *F) : XCoreCall(XCoreCall::FunctionType), Fn(F) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc1e06f08120f2cbecf8ee233a09968afe128f7b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp @@ -0,0 +1,2 @@ +XCoreFunctionInfo() : LRSpillSlotSet(false), LRSpillSlot(0), FPSpillSlot(0), VarArgsFrameIndex(0), ReturnStackOffsetSet(false), ReturnStackOffset(0), HasIndirectCalls(false), NStackWords(0){ +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1b7c5eb5a79b8ad988072c8f7db2f9f7498aeab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp @@ -0,0 +1,2 @@ +explicit XCoreFunctionInfo(MachineFunction &MF) : LRSpillSlotSet(false), LRSpillSlot(0), FPSpillSlot(0), VarArgsFrameIndex(0), ReturnStackOffsetSet(false), ReturnStackOffset(0), HasIndirectCalls(false), NStackWords(0) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d67b237b26c99f3113f6662255dc8040d9a394d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp @@ -0,0 +1,3 @@ +static inline bool classof(const XCoreCall *) { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..006db3209de2ff39a514628ea92aeb7aecfe2b0b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp @@ -0,0 +1,3 @@ +static inline bool classof(const XCoreFunctionCall *) { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62928f0c20b177d8ff3869ea63180efae444fa78 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp @@ -0,0 +1,3 @@ +static inline bool classof(const XCoreCall *C) { + return C->getType() == XCoreCall::FunctionType; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d67b237b26c99f3113f6662255dc8040d9a394d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp @@ -0,0 +1,3 @@ +static inline bool classof(const XCoreCall *) { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..006db3209de2ff39a514628ea92aeb7aecfe2b0b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp @@ -0,0 +1,3 @@ +static inline bool classof(const XCoreFunctionCall *) { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bfb175ecb391e0791d505ddb515a2560432a07a5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp @@ -0,0 +1,3 @@ +const std::vector &getCalls() const { + return Calls; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1139cffe0aab3f0e3efb65acc6f4d7469a236e57 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp @@ -0,0 +1,3 @@ +const Function *getFunction() { + return Fn; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..681160f10d173e926d85c4b339dcc0fbfb012023 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp @@ -0,0 +1,3 @@ +bool getHasIndirectCalls() const { + return HasIndirectCalls; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c81941c6cd5f95e5b359d4e04e9853c2567e0a81 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp @@ -0,0 +1,3 @@ +const char *getSymbol() { + return Sym; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7baf176b84d7c10036b8ba1b7da0b4f1562f5d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp @@ -0,0 +1,3 @@ +unsigned getType() const { + return Type; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ad7e3a6df3da4abe5143ddf276a5a8dd208c0d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex() const { + return VarArgsFrameIndex; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc77a18f5e94329038670fb719c9966a60a23fd2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp @@ -0,0 +1,3 @@ +void setHasIndirectCalls(bool val) { + HasIndirectCalls = val; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f57e9f48831fa353d584c49669f0413fc095c594 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex(int Index) { + VarArgsFrameIndex = Index; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e64dd97c27d485da7508db96fd01222af9b2648 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp @@ -0,0 +1,32 @@ +XCoreFunctionInfo::~XCoreFunctionInfo() { + for (std::vector::iterator it = Calls.begin(),end = Calls.end(); it != end; ++it) { + delete(*it); + } + for(std::vector ::iterator I = ResourceSymbolNames.begin(), E = ResourceSymbolNames.end(); I!=E; ++I){ + delete (*I); + } + if (sn->isLeaf()) { + delete sn; + return; + } + std::vector *children = sn->getChildren(); + for(unsigned i = 0, e = children->size(); i != e; ++i) { + deleteTree((*children)[i]); + } + children->clear(); + delete sn; + for (unsigned i = 0, e = AllocaExpressions.size(); i != e; ++i){ + if (AllocaExpressions[i]) { + if (sn->isLeaf()) { + delete sn; + return; + } + std::vector *children = sn->getChildren(); + for(unsigned i = 0, e = children->size(); i != e; ++i) { + deleteTree((*children)[i]); + } + children->clear(); + delete sn; + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b70e36db9ee4fb0cd1e5595ba9e01e7196318d4e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,2 @@ +XCoreSubtarget::XCoreSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) : XCoreGenSubtargetInfo(TT, CPU, FS) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d05f6c22bf6a89bc603ad7054161cd248dd73054 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,3 @@ +extern "C" void LLVMInitializeXCoreTargetInfo() { + RegisterTarget X(TheXCoreTarget, "xcore", "XCore"); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c0368df6a5a79d4044bbfc289cebbc8c67349bf4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,3 @@ +extern "C" void LLVMInitializeXCoreTarget() { + RegisterTargetMachine X(TheXCoreTarget); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2dc20e11ca67beea0621309e8d5cd2c7fc3dcbf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,2 @@ +XCoreTargetMachine::XCoreTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS, Reloc::Model RM, CodeModel::Model CM) : LLVMTargetMachine(T, TT, CPU, FS, RM, CM), Subtarget(TT, CPU, FS), DataLayout("e-p:32:32:32-a0:0:32-f32:32:32-f64:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-v64:32:32-v128:32:32-n32"), InstrInfo(), FrameLowering(Subtarget), TLInfo(*this), TSInfo(*this) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2946990d59d37b36bef9afba365587b8658f7e38 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,4 @@ +bool XCoreTargetMachine::addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel) { + PM.add(createXCoreISelDag(*this, OptLevel)); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1bec6b8cd05e4dcd9a0e716ef69d1ecff3054a64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,7 @@ +bool XCoreTargetMachine::addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel) { + if (OptLevel == 0) + PM.add(createXCoreSimpleBranchOptPass()); + PM.add(createXCoreFrameToArgsOffsetEliminationPass()); + PM.add(createXCoreStackUsage()); + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8adef4ad7e0fdbab03f159d42f5353437df9a124 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp @@ -0,0 +1,6 @@ +bool XCoreTargetMachine::addPreISel(PassManagerBase &PM, CodeGenOpt::Level OptLevel) { + PM.add(createXCoreStackAnalysisPrepare()); + PM.add(createXCoreLoopMetadataLowering()); + PM.add(createXCoreLowerTwoStageResourceAllocPass()); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..660b7cc2c49a72f4ad0fb4de75183275609a2c3f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const TargetFrameLowering *getFrameLowering() const override { + return FrameLowering.get(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..60c000dd8827314181cd9800c1596197e1427aee --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp @@ -0,0 +1,3 @@ +virtual const XCoreInstrInfo *getInstrInfo() const { + return &InstrInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dc5612eefd93fd87866dea18ff17cb69e824ef5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +virtual const TargetRegisterInfo *getRegisterInfo() const { + return &InstrInfo.getRegisterInfo(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bd5488660f0be42eacec786e2943a99d7170621a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +virtual const XCoreSelectionDAGInfo* getSelectionDAGInfo() const { + return &TSInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..412be8adc425311bd70ca5a8c4285accdcddc6e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,3 @@ +virtual const XCoreSubtarget *getSubtargetImpl() const { + return &Subtarget; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c037d6ca3ebec3c8f54c7a1ebfc37d2eb5a669e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp @@ -0,0 +1,3 @@ +virtual const TargetData *getTargetData() const { + return &DataLayout; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b42659094823dfea1c2cc4795868c08213f8ea1b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp @@ -0,0 +1,3 @@ +virtual const XCoreTargetLowering *getTargetLowering() const { + return &TLInfo; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41b78e99795c9e32e35213f0799596f1984c7baf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,17 @@ +void XCoreTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){ + TargetLoweringObjectFileELF::Initialize(Ctx, TM); + DataSection = Ctx.getELFSection(".dp.data", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::XCORE_SHF_DP_SECTION, SectionKind::getDataRel()); + BSSSection = Ctx.getELFSection(".dp.bss", ELF::SHT_NOBITS, ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::XCORE_SHF_DP_SECTION, SectionKind::getBSS()); + MergeableConst4Section = 0; + MergeableConst8Section = 0; + MergeableConst16Section = 0; + TLSDataSection = DataSection; + TLSBSSSection = BSSSection; + ReadOnlySection = Ctx.getELFSection(".dp.rodata", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::XCORE_SHF_DP_SECTION, SectionKind::getReadOnlyWithRel()); + CPMergeableConst4Section = Ctx.getELFSection(".cp.rodata.cst4", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_MERGE | ELF::XCORE_SHF_CP_SECTION, SectionKind::getMergeableConst4()); + CPMergeableConst8Section = Ctx.getELFSection(".cp.rodata.cst8", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_MERGE | ELF::XCORE_SHF_CP_SECTION, SectionKind::getMergeableConst8()); + CPMergeableConst16Section = Ctx.getELFSection(".cp.rodata.cst16", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_MERGE | ELF::XCORE_SHF_CP_SECTION, SectionKind::getMergeableConst16()); + CPReadOnlySection = Ctx.getELFSection(".cp.rodata", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::XCORE_SHF_CP_SECTION, SectionKind::getReadOnlyWithRel()); + DataRelSection = DataRelLocalSection = DataSection; + DataRelROSection = DataRelROLocalSection = ReadOnlySection; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dcaf9990c314d17bb0ed154ee8a30a5fa7bccbad --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,14 @@ +const MCSection *XCoreTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const { + bool EmitUniquedSection = Kind.isText() ? TM.getFunctionSections() : TM.getDataSections(); + if ((GV->isWeakForLinker() || EmitUniquedSection) && !Kind.isCommon() && !Kind.isBSS()) { + const char *Prefix = getSectionPrefixForGlobal(Kind); + SmallString<128> Name; + Name.append(Prefix, Prefix+strlen(Prefix)); + Mang->getNameWithPrefix(Name, GV, false); + return getContext().getELFSection(Name.str(), getXCoreSectionType(Kind), getXCoreSectionFlags(Kind, false), Kind); + } + if (Kind.isMergeable1ByteCString() || Kind.isMergeable2ByteCString() || Kind.isMergeable4ByteCString()) { + return ReadOnlySection; + } + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang, TM); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..850f716665cabbd1bf1fbf0d42daab9be185d1b4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp @@ -0,0 +1,24 @@ +const MCSection *XCoreTargetObjectFile::getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const { + const char *SectionName = GV->getSection().c_str(); + if (strncmp(Name, ".cp.", 4) == 0) + Kind = SectionKind::getReadOnly(); + bool IsCPRel = strncmp(SectionName, ".cp.", 4) == 0; + unsigned Flags = 0; + if (!K.isMetadata()) + Flags |= ELF::SHF_ALLOC; + if (K.isText()) + Flags |= ELF::SHF_EXECINSTR; + else if (IsCPRel) + Flags |= ELF::XCORE_SHF_CP_SECTION; + else + Flags |= ELF::XCORE_SHF_DP_SECTION; + if (K.isWriteable()) + Flags |= ELF::SHF_WRITE; + if (K.isMergeableCString() || K.isMergeableConst4() || K.isMergeableConst8() || K.isMergeableConst16()) + Flags |= ELF::SHF_MERGE; + if (K.isMergeableCString()) + Flags |= ELF::SHF_STRINGS; + if (K.isBSS() || K.isThreadBSS()) + return ELF::SHT_NOBITS; + return getContext().getELFSection(SectionName, ELF::SHT_PROGBITS, (Kind, IsCPRel), Kind); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b064f2f755a23e0274200389495bf3163f6537f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,9 @@ +const MCSection *XCoreTargetObjectFile::getSectionForConstant(SectionKind Kind) const { + if (Kind.isMergeableConst4()) + return CPMergeableConst4Section; + if (Kind.isMergeableConst8()) + return CPMergeableConst8Section; + if (Kind.isMergeableConst16()) + return CPMergeableConst16Section; + return CPReadOnlySection; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6aef485d2d1cb243594d8d2dbb9627f8cc0a1b4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +XCoreFrameLowering::XCoreFrameLowering(const XCoreSubtarget &sti) : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0), STI(sti) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc3d23c9ef249e7aa039f4c29c40ffc898570c16 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,63 @@ +void XCoreFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { + MachineFrameInfo *MFI = MF.getFrameInfo(); + MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); + const XCoreInstrInfo &TII = *static_cast(MF.getTarget().getInstrInfo()); + XCoreFunctionInfo *XFI = MF.getInfo(); + unsigned RetOpcode = MBBI->getOpcode(); + DebugLoc dl = MBBI->getDebugLoc(); + switch (RetOpcode) { + case XCore::RETSP_u6: + case XCore::RETSP_lu6: + case XCore::EH_RETURN: + break; + default: + assert(0 && "Can only insert epilog into returning blocks"); + } + bool FP = hasFP(MF); + if (FP) { + unsigned FramePtr = XCore::R10; + BuildMI(MBB, MBBI, dl, TII.get(XCore::SETSP_1r)).addReg(FramePtr); + } + int FrameSize = MFI->getStackSize(); + assert(FrameSize%4 == 0 && "Misaligned frame size"); + FrameSize/=4; + bool isU6 = isImmU6(FrameSize); + if (!isU6 && !isImmU16(FrameSize)) { + report_fatal_error("emitEpilogue Frame size too big: " + Twine(FrameSize)); + } + if (FP) { + int FPSpillOffset = MFI->getObjectOffset(XFI->getFPSpillSlot()); + FPSpillOffset += FrameSize*4; + loadFromStack(MBB, MBBI, XCore::R10, FPSpillOffset, dl, TII); + } + if (RetOpcode == XCore::EH_RETURN) { + unsigned EhStackReg = MBBI->getOperand(0).getReg(); + unsigned EhHandlerReg = MBBI->getOperand(1).getReg(); + BuildMI(MBB, MBBI, dl, TII.get(XCore::SETSP_1r)).addReg(EhStackReg); + BuildMI(MBB, MBBI, dl, TII.get(XCore::BAU_1r)).addReg(EhHandlerReg); + MBB.erase(MBBI); + } + else { + bool restoreLR = XFI->hasLRSpillSlot(); + if (restoreLR && (FrameSize == 0 || MFI->getObjectOffset(XFI->getLRSpillSlot()) != 0)) { + int LRSpillOffset = MFI->getObjectOffset(XFI->getLRSpillSlot()); + LRSpillOffset += FrameSize*4; + loadFromStack(MBB, MBBI, XCore::LR, LRSpillOffset, dl, TII); + restoreLR = false; + } + if (FrameSize) { + XCoreFunctionInfo *XFI = MF.getInfo(); + if (restoreLR) { + assert(MFI->getObjectOffset(XFI->getLRSpillSlot()) == 0); + assert(MBBI->getOpcode() == XCore::RETSP_u6|| MBBI->getOpcode() == XCore::RETSP_lu6); + int Opcode = (isU6) ? XCore::RETSP_u6 : XCore::RETSP_lu6; + BuildMI(MBB, MBBI, dl, TII.get(Opcode)).addImm(FrameSize); + MBB.erase(MBBI); + } + else { + int Opcode = (isU6) ? XCore::LDAWSP_ru6_RRegs : XCore::LDAWSP_lru6_RRegs; + BuildMI(MBB, MBBI, dl, TII.get(Opcode), XCore::SP).addImm(FrameSize); + } + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40dfe657cc4413d62664297c16f6a64194040a5a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,101 @@ +void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const { + MachineBasicBlock &MBB = MF.front(); + MachineBasicBlock::iterator MBBI = MBB.begin(); + MachineFrameInfo *MFI = MF.getFrameInfo(); + MachineModuleInfo *MMI = &MF.getMMI(); + const XCoreRegisterInfo *RegInfo =static_cast(MF.getTarget().getRegisterInfo()); + const XCoreInstrInfo &TII =*static_cast(MF.getTarget().getInstrInfo()); + XCoreFunctionInfo *XFI = MF.getInfo(); + DebugLoc dl; + if (MFI->getMaxAlignment() > getStackAlignment()) + report_fatal_error("emitPrologue unsupported alignment: " +Twine(MFI->getMaxAlignment())); + bool FP = hasFP(MF); + bool Nested = MF.getFunction()-> + getAttributes().hasAttrSomewhere(Attribute::Nest); + + if (Nested) { + loadFromStack(MBB, MBBI, XCore::R11, 0, dl, TII); + } + int FrameSize = MFI->getStackSize(); + assert(FrameSize%4 == 0 && "Misaligned frame size"); + FrameSize/=4; + bool isU6 = isImmU6(FrameSize); + if (!isU6 && !isImmU16(FrameSize)) { + report_fatal_error("emitPrologue Frame size too big: " + Twine(FrameSize)); + } + bool emitFrameMoves = RegInfo->needsFrameMoves(MF); + bool saveLR = XFI->hasLRSpillSlot(); + if (FrameSize) { + bool LRSavedOnEntry = false; + int Opcode; + if (saveLR && (MFI->getObjectOffset(XFI->getLRSpillSlot()) == 0)) { + Opcode = (isU6) ? XCore::ENTSP_u6 : XCore::ENTSP_lu6; + MBB.addLiveIn(XCore::LR); + saveLR = false; + LRSavedOnEntry = true; + } + else { + Opcode = (isU6) ? XCore::EXTSP_u6 : XCore::EXTSP_lu6; + } + BuildMI(MBB, MBBI, dl, TII.get(Opcode)).addImm(FrameSize); + if (emitFrameMoves) { + std::vector &Moves = MMI->getFrameMoves(); + MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol(); + BuildMI(MBB, MBBI, dl, TII.get(XCore::PROLOG_LABEL)).addSym(FrameLabel); + MachineLocation SPDst(MachineLocation::VirtualFP); + MachineLocation SPSrc(MachineLocation::VirtualFP, -FrameSize * 4); + Moves.push_back(MachineMove(FrameLabel, SPDst, SPSrc)); + if (LRSavedOnEntry) { + MachineLocation CSDst(MachineLocation::VirtualFP, 0); + MachineLocation CSSrc(XCore::LR); + Moves.push_back(MachineMove(FrameLabel, CSDst, CSSrc)); + } + } + } + if (saveLR) { + int LRSpillOffset = MFI->getObjectOffset(XFI->getLRSpillSlot()); + storeToStack(MBB, MBBI, XCore::LR, LRSpillOffset + FrameSize*4, dl, TII); + MBB.addLiveIn(XCore::LR); + if (emitFrameMoves) { + MCSymbol *SaveLRLabel = MMI->getContext().CreateTempSymbol(); + BuildMI(MBB, MBBI, dl, TII.get(XCore::PROLOG_LABEL)).addSym(SaveLRLabel); + MachineLocation CSDst(MachineLocation::VirtualFP, LRSpillOffset); + MachineLocation CSSrc(XCore::LR); + MMI->getFrameMoves().push_back(MachineMove(SaveLRLabel, CSDst, CSSrc)); + } + } + if (FP) { + int FPSpillOffset = MFI->getObjectOffset(XFI->getFPSpillSlot()); + storeToStack(MBB, MBBI, XCore::R10, FPSpillOffset + FrameSize*4, dl, TII); + MBB.addLiveIn(XCore::R10); + if (emitFrameMoves) { + MCSymbol *SaveR10Label = MMI->getContext().CreateTempSymbol(); + BuildMI(MBB, MBBI, dl, TII.get(XCore::PROLOG_LABEL)).addSym(SaveR10Label); + MachineLocation CSDst(MachineLocation::VirtualFP, FPSpillOffset); + MachineLocation CSSrc(XCore::R10); + MMI->getFrameMoves().push_back(MachineMove(SaveR10Label, CSDst, CSSrc)); + } + unsigned FramePtr = XCore::R10; + BuildMI(MBB, MBBI, dl, TII.get(XCore::LDAWSP_ru6), FramePtr).addImm(0); + if (emitFrameMoves) { + MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol(); + BuildMI(MBB, MBBI, dl, TII.get(XCore::PROLOG_LABEL)).addSym(FrameLabel); + MachineLocation SPDst(FramePtr); + MachineLocation SPSrc(MachineLocation::VirtualFP); + MMI->getFrameMoves().push_back(MachineMove(FrameLabel, SPDst, SPSrc)); + } + } + if (emitFrameMoves) { + std::vector &Moves = MMI->getFrameMoves(); + std::vector >&SpillLabels = XFI->getSpillLabels(); + for (unsigned I = 0, E = SpillLabels.size(); I != E; ++I) { + MCSymbol *SpillLabel = SpillLabels[I].first; + CalleeSavedInfo &CSI = SpillLabels[I].second; + int Offset = MFI->getObjectOffset(CSI.getFrameIdx()); + unsigned Reg = CSI.getReg(); + MachineLocation CSDst(MachineLocation::VirtualFP, Offset); + MachineLocation CSSrc(Reg); + Moves.push_back(MachineMove(SpillLabel, CSDst, CSSrc)); + } + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47a17358857419ec15b9dbb54fae1413c21313aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,3 @@ +bool XCoreFrameLowering::hasFP(const MachineFunction &MF) const { + return DisableFramePointerElim(MF) || MF.getFrameInfo()->hasVarSizedObjects(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a9b7d5ea121e38506f149e2e37d592c5506391d --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp @@ -0,0 +1,3 @@ +bool XCoreFrameLowering::isShrinkWrappingProfitable() const { + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5cf2ad8dfaa41c81f3eeb3f5278a10b82425a05 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp @@ -0,0 +1,42 @@ +void XCoreFrameLowering::processFunctionBeforeCalleeSavedScan(MachineFunction &MF, RegScavenger *RS) const { + MachineFrameInfo *MFI = MF.getFrameInfo(); + const TargetRegisterInfo *RegInfo = MF.getTarget().getRegisterInfo(); + bool LRUsed = MF.getRegInfo().isPhysRegUsed(XCore::LR); + bool isVarArg = MF.getFunction()->isVarArg(); + const TargetRegisterClass *RC = XCore::GRRegsRegisterClass; + XCoreFunctionInfo *XFI = MF.getInfo(); + for (const unsigned *Reg = RegInfo->getCalleeSavedRegs(); *Reg; ++Reg) { + MF.front().addLiveIn(*Reg); + } + MachineFrameInfo *MFI = MF.getFrameInfo(); + const TargetRegisterInfo *RegInfo = MF.getTarget().getRegisterInfo(); + if (MFI->getNumObjects() > 0) + return true; + for (const unsigned *Reg = RegInfo->getCalleeSavedRegs(); *Reg; ++Reg) { + if (MF.getRegInfo().isPhysRegUsed(*Reg)) + return true; + } + return false; + if (!LRUsed && !isVarArg && (MF)) { + LRUsed = true; + } + if (LRUsed) { + MF.getRegInfo().setPhysRegUnused(XCore::LR); + if (!XFI->hasLRSpillSlot()) { + int FrameIdx; + if (! isVarArg) { + FrameIdx = MFI->CreateFixedObject(RC->getSize(), 0, true); + } + else { + FrameIdx = MFI->CreateStackObject(RC->getSize(), RC->getAlignment(), false); + } + XFI->setLRSpillSlot(FrameIdx); + } + } + if (RegInfo->requiresRegisterScavenging(MF)) { + RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(), RC->getAlignment(), false)); + } + if (hasFP(MF)) { + XFI->setFPSpillSlot(MFI->CreateStackObject(RC->getSize(), RC->getAlignment(), false)); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dfe0caee410efc6371750eeb465adee3233778f9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,2 @@ +void XCoreFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF) const { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d3e3a0199671386e51a6daa14820ca81a8dd5880 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,21 @@ +bool XCoreFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector &CSI, const TargetRegisterInfo *TRI) const{ + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *MF->getTarget().getInstrInfo(); + bool AtStart = MI == MBB.begin(); + MachineBasicBlock::iterator BeforeI = MI; + if (!AtStart) + --BeforeI; + for (std::vector::const_iterator it = CSI.begin(); it != CSI.end(); ++it) { + unsigned Reg = it->getReg(); + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.loadRegFromStackSlot(MBB, MI, it->getReg(), it->getFrameIdx(), RC, TRI); + assert(MI != MBB.begin() && "loadRegFromStackSlot didn't insert any code!"); + if (AtStart) + MI = MBB.begin(); + else { + MI = BeforeI; + ++MI; + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c87c83b04a838611a04a2f638ca93505ac69f7ba --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,23 @@ +bool XCoreFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector &CSI, const TargetRegisterInfo *TRI) const { + if (CSI.empty()) + return true; + MachineFunction *MF = MBB.getParent(); + const TargetInstrInfo &TII = *MF->getTarget().getInstrInfo(); + XCoreFunctionInfo *XFI = MF->getInfo(); + bool emitFrameMoves = XCoreRegisterInfo::needsFrameMoves(*MF); + DebugLoc DL; + if (MI != MBB.end()) + DL = MI->getDebugLoc(); + for (std::vector::const_iterator it = CSI.begin(); it != CSI.end(); ++it) { + MBB.addLiveIn(it->getReg()); + unsigned Reg = it->getReg(); + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + TII.storeRegToStackSlot(MBB, MI, Reg, true, it->getFrameIdx(), RC, TRI); + if (emitFrameMoves) { + MCSymbol *SaveLabel = MF->getContext().CreateTempSymbol(); + BuildMI(MBB, MI, DL, TII.get(XCore::PROLOG_LABEL)).addSym(SaveLabel); + XFI->getSpillLabels().push_back(std::make_pair(SaveLabel, *it)); + } + } + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f3bde47d2e05bb35eefcf52c3a8542b631b6530 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp @@ -0,0 +1,3 @@ +static int stackSlotSize() { + return 4; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6ff5c770b0c31f201ee41350319275f34ed8bbb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +XCoreDAGToDAGISel(XCoreTargetMachine &TM, CodeGenOpt::Level OptLevel) : SelectionDAGISel(TM, OptLevel), Lowering(*TM.getTargetLowering()), Subtarget(*TM.getSubtargetImpl()) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..443ffb549b47d550e5cd1a2d79ef2f091eed8e96 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1,157 @@ +SDNode *XCoreDAGToDAGISel::Select(SDNode *N) { + DebugLoc dl = N->getDebugLoc(); + switch (N->getOpcode()) { + default: break; + case ISD::Constant: { + uint64_t Val = cast(N)->getZExtValue(); + if (immMskBitp(N)) { + SDValue MskSize = getI32Imm(32 - CountLeadingZeros_32(Val)); + return CurDAG->getMachineNode(XCore::MKMSK_rus, dl, MVT::i32, MskSize); + } + else if (!isUInt<16>(Val)) { + SDValue CPIdx = CurDAG->getTargetConstantPool(ConstantInt::get( Type::getInt32Ty(*CurDAG->getContext()), Val), TLI.getPointerTy()); + SDNode *node = CurDAG->getMachineNode(XCore::LDWCP_lru6, dl, MVT::i32, MVT::Other, CPIdx, getI32Imm(0), CurDAG->getEntryNode()); + MachineSDNode::mmo_iterator MemOp = MF->allocateMemRefsArray(1); + MemOp[0] = MF->getMachineMemOperand(MachinePointerInfo::getConstantPool(), MachineMemOperand::MOLoad, 4, 4); + cast(node)->setMemRefs(MemOp, MemOp + 1); + return node; + } + break; + } + case XCoreISD::OUTPW: { + if (immBitp(cast(N->getOperand(3)))){ + return SelectCode(N); + } else { + SDValue SetpscOps[] = { N->getOperand(1), N->getOperand(3), N->getOperand(0)}; + SDNode *setpsc = CurDAG->getMachineNode(XCore::SETPSC_l2r, dl, MVT::Other, SetpscOps,3); + SDValue Ops[] = { N->getOperand(1), N->getOperand(2) ,SDValue(setpsc, 0)}; + return CurDAG->getMachineNode(XCore::OUT_2r, dl, MVT::Other, Ops, 3); + } + } + case XCoreISD::INPW: { + if (immBitp(cast(N->getOperand(2)))){ + return SelectCode(N); + } + else { + SDValue SetpscOps[] = { N->getOperand(1), N->getOperand(2), N->getOperand(0)}; + SDNode *setpsc = CurDAG->getMachineNode(XCore::SETPSC_l2r, dl, MVT::Other, SetpscOps,3); + SDValue Ops[] = { N->getOperand(1),SDValue(setpsc, 0)}; + return CurDAG->getMachineNode( XCore::IN_2r, dl, MVT::i32,MVT::Other, Ops, 2); + } + } + case XCoreISD::LADD: { + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2) }; + return CurDAG->getMachineNode(XCore::LADD_l5r, dl, MVT::i32, MVT::i32,Ops, 3); + } + case XCoreISD::LSUB: { + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2) }; + return CurDAG->getMachineNode(XCore::LSUB_l5r, dl, MVT::i32, MVT::i32,Ops, 3); + } + case XCoreISD::MACCU: { + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2), N->getOperand(3) }; + return CurDAG->getMachineNode(XCore::MACCU_l4r, dl, MVT::i32, MVT::i32,Ops, 4); + } + case XCoreISD::MACCS: { + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2), N->getOperand(3) }; + return CurDAG->getMachineNode(XCore::MACCS_l4r, dl, MVT::i32, MVT::i32, Ops, 4); + } + case XCoreISD::LMUL: { + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2), N->getOperand(3) }; + return CurDAG->getMachineNode(XCore::LMUL_l6r, dl, MVT::i32, MVT::i32,Ops, 4); + } + case ISD::INTRINSIC_WO_CHAIN: { + unsigned IntNo = cast(N->getOperand(0))->getZExtValue(); + switch (IntNo) { + case Intrinsic::xcore_crc8: + SDValue Ops[] = { N->getOperand(1), N->getOperand(2), N->getOperand(3) }; + return CurDAG->getMachineNode(XCore::CRC8_l4r, dl, MVT::i32, MVT::i32, Ops, 3); + } + break; + } + case ISD::INTRINSIC_VOID: { + unsigned IntNo = cast(N->getOperand(1))->getZExtValue(); + switch (IntNo) { + case Intrinsic::xcore_loopmarker: + MachineFunction &MF = CurDAG->getMachineFunction(); + XCoreFunctionInfo *XFI = MF.getInfo(); + MDNode * md = const_cast(cast(N->getOperand(3))->getMD()); + unsigned type = cast(N->getOperand(2))->getZExtValue(); + LoopLables.push_back(std::make_pair(md, type)); + unsigned index = LoopLables.size() -1; + return CurDAG->SelectNodeTo(N, XCore::LOOPMARKER, MVT::Other, CurDAG->getConstant(index, MVT::i32, true), N->getOperand(0)); + } + break; + } + case ISD::BRIND: + SDValue Chain = N->getOperand(0); + SDValue Addr = N->getOperand(1); + DebugLoc dl = Addr->getDebugLoc(); + if (Addr->getOpcode() != ISD::INTRINSIC_W_CHAIN) + return 0; + unsigned IntNo = cast(Addr->getOperand(1))->getZExtValue(); + if (IntNo != Intrinsic::xcore_waitevent && IntNo != Intrinsic::xcore_checkevent &&IntNo != Intrinsic::xcore_waitevent_nonlocal && IntNo != Intrinsic::xcore_checkevent_nonlocal) + return 0; + SDValue EventIntrinsicChainOut(Addr.getNode(), 1); + if (!EventIntrinsicChainOut.use_empty()) { + SDValue EventIntrinsicChainIn = Addr->getOperand(0); + SDValue NewChain = replaceInChain(CurDAG, Chain, EventIntrinsicChainOut, EventIntrinsicChainIn); + if (!NewChain.getNode()) + return 0; + Chain = NewChain; + } + switch (IntNo) { + default: llvm_unreachable("Unexpected intrinsic"); + case Intrinsic::xcore_checkevent:{ + SDValue nextAddr = Addr->getOperand(2); + SDValue constOne = getI32Imm(1); + SDValue Glue = SDValue(CurDAG->getMachineNode(XCore::SETSR_branch_u6, dl, MVT::Glue, constOne, Chain), 0); + Glue = SDValue(CurDAG->getMachineNode(XCore::CLRSR_branch_u6, dl, MVT::Glue, constOne, Glue), 0); + if (nextAddr->getOpcode() == XCoreISD::PCRelativeWrapper && nextAddr->getOperand(0)->getOpcode() == ISD::TargetBlockAddress) { + return CurDAG->SelectNodeTo(N, XCore::BRFU_lu6, MVT::Other, nextAddr->getOperand(0), Glue); + } + return CurDAG->SelectNodeTo(N, XCore::BAU_1r, MVT::Other, nextAddr, Glue); + } + case Intrinsic::xcore_waitevent: + return CurDAG->SelectNodeTo(N, XCore::WAITEU_0R, MVT::Other, Chain); + case Intrinsic::xcore_waitevent_nonlocal: { + SDValue nextAddr = Addr->getOperand(2); + SDValue Glue = SDValue(CurDAG->getMachineNode(XCore::WAITNONLOCAL, dl, MVT::Glue, Chain), 0); + if (nextAddr->getOpcode() == XCoreISD::PCRelativeWrapper && nextAddr->getOperand(0)->getOpcode() == ISD::TargetBlockAddress) { + return CurDAG->SelectNodeTo(N, XCore::BRFU_lu6, MVT::Other, nextAddr->getOperand(0), Glue); + } + return CurDAG->SelectNodeTo(N, XCore::BAU_1r, MVT::Other, nextAddr, Glue); + } + case Intrinsic::xcore_checkevent_nonlocal:{ + SDValue nextAddr = Addr->getOperand(3); + SDValue Glue =SDValue(CurDAG->getMachineNode(XCore::CHECKNONLOCAL, dl, MVT::Glue, Addr->getOperand(2),Chain), 0); + if (nextAddr->getOpcode() == XCoreISD::PCRelativeWrapper && nextAddr->getOperand(0)->getOpcode() == ISD::TargetBlockAddress) { + return CurDAG->SelectNodeTo(N, XCore::BRFU_lu6, MVT::Other, nextAddr->getOperand(0), Glue); + } + return CurDAG->SelectNodeTo(N, XCore::BAU_1r, MVT::Other, nextAddr, Glue); + } + } + if (SDNode *ResNode = (N)) + return ResNode; + break; + } + return SelectCode(N); + if (Chain == Old) + return New; + if (Chain->getOpcode() != ISD::TokenFactor) + return SDValue(); + SmallVector Ops; + bool found = false; + for (unsigned i = 0, e = Chain->getNumOperands(); i != e; ++i) { + if (Chain->getOperand(i) == Old) { + Ops.push_back(New); + found = true; + } + else { + Ops.push_back(Chain->getOperand(i)); + } + } + if (!found) + return SDValue(); + return CurDAG->getNode(ISD::TokenFactor, Chain->getDebugLoc(), MVT::Other, &Ops[0], Ops.size()); +} + diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..068d7f348b53413eede51e03a8c239044a7bb0d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp @@ -0,0 +1,16 @@ +bool XCoreDAGToDAGISel::SelectADDRcpii(SDValue Addr, SDValue &Base, SDValue &Offset) { + if (Addr.getOpcode() == XCoreISD::CPRelativeWrapper) { + Base = Addr.getOperand(0); + Offset = CurDAG->getTargetConstant(0, MVT::i32); + return true; + } + if (Addr.getOpcode() == ISD::ADD) { + ConstantSDNode *CN = 0; + if ((Addr.getOperand(0).getOpcode() == XCoreISD::CPRelativeWrapper) && (CN = dyn_cast(Addr.getOperand(1)))&& (CN->getSExtValue() % 4 == 0 && CN->getSExtValue() >= 0)) { + Base = Addr.getOperand(0).getOperand(0); + Offset = CurDAG->getTargetConstant(CN->getSExtValue(), MVT::i32); + return true; + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f379ac66e0cb5dfe3f1534e702cb84f5b948daf --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp @@ -0,0 +1,16 @@ +bool XCoreDAGToDAGISel::SelectADDRdpii(SDValue Addr, SDValue &Base, SDValue &Offset) { + if (Addr.getOpcode() == XCoreISD::DPRelativeWrapper) { + Base = Addr.getOperand(0); + Offset = CurDAG->getTargetConstant(0, MVT::i32); + return true; + } + if (Addr.getOpcode() == ISD::ADD) { + ConstantSDNode *CN = 0; + if ((Addr.getOperand(0).getOpcode() == XCoreISD::DPRelativeWrapper) && (CN = dyn_cast(Addr.getOperand(1)))&& (CN->getSExtValue() % 4 == 0 && CN->getSExtValue() >= 0)) { + Base = Addr.getOperand(0).getOperand(0); + Offset = CurDAG->getTargetConstant(CN->getSExtValue(), MVT::i32); + return true; + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d1a933df08c8ba9a84b25166e0c9fb8bbed7e8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp @@ -0,0 +1,17 @@ +bool XCoreDAGToDAGISel::SelectADDRspii(SDValue Addr, SDValue &Base, SDValue &Offset) { + FrameIndexSDNode *FIN = 0; + if ((FIN = dyn_cast(Addr))) { + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32); + Offset = CurDAG->getTargetConstant(0, MVT::i32); + return true; + } + if (Addr.getOpcode() == ISD::ADD) { + ConstantSDNode *CN = 0; + if ((FIN = dyn_cast(Addr.getOperand(0))) && (CN = dyn_cast(Addr.getOperand(1))) && (CN->getSExtValue() % 4 == 0 && CN->getSExtValue() >= 0)) { + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32); + Offset = CurDAG->getTargetConstant(CN->getSExtValue(), MVT::i32); + return true; + } + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..95ffddfad0c68d01fb31ed048024910704b6563a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,20 @@ +bool XCoreDAGToDAGISel::SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, std::vector &OutOps) { + SDValue Op0, Op1, Op2; + switch (ConstraintCode) { + default: return true; + case 'm': + if (SelectADDRcpii(Op, Op1, Op2)) { + Op0 = CurDAG->getRegister(XCore::CP, MVT::i32); + break; + } + if (SelectADDRdpii(Op, Op1, Op2)) { + Op0 = CurDAG->getRegister(XCore::DP, MVT::i32); + break; + } + return true; + } + OutOps.push_back(Op0); + OutOps.push_back(Op1); + OutOps.push_back(Op2); + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c65ba55db2256f60cad58168594502eb4f680143 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createXCoreISelDag(XCoreTargetMachine &TM, CodeGenOpt::Level OptLevel) { + return new XCoreDAGToDAGISel(TM, OptLevel); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d51d5122efde046a2ef7c278e421815b53f354c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp @@ -0,0 +1,3 @@ +inline SDValue getI32Imm(unsigned Imm) { + return CurDAG->getTargetConstant(Imm, MVT::i32); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dd6769f852d474c5692772fbd3af20bc99c1d272 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char *getPassName() const { + return "XCore DAG->DAG Pattern Instruction Selection"; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2c09a5aaf2f472f859db0ee4f22e263b4748a45e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp @@ -0,0 +1,7 @@ +inline bool immBitp(SDNode *inN) const { + if(!isa(inN)) + return false; + ConstantSDNode *N = cast(inN); + uint32_t value = (uint32_t)N->getZExtValue(); + return (value >= 1 && value <= 8) || value == 16 || value == 24 || value == 32; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c16460c084c2923709f756af85189e6dac857bf6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp @@ -0,0 +1,9 @@ +inline bool immMskBitp(SDNode *inN) const { + ConstantSDNode *N = cast(inN); + uint32_t value = (uint32_t)N->getZExtValue(); + if (!isMask_32(value)) { + return false; + } + int msksize = 32 - CountLeadingZeros_32(value); + return (msksize >= 1 && msksize <= 8) || msksize == 16 || msksize == 24 || msksize == 32; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1dda74c086f58b6461e22c0e0a3e44393a8be19 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,9 @@ +bool XCoreTargetLowering::CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool isVarArg, const SmallVectorImpl &Outs, LLVMContext &Context) const { + SmallVector RVLocs; + CCState CCInfo(CallConv, isVarArg, MF, getTargetMachine(), RVLocs, Context); + if (!CCInfo.CheckReturn(Outs, RetCC_XCore)) + return false; + if (CCInfo.getNextStackOffset() != 0 && isVarArg) + return false; + return true; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5c0760cc729bff93dab4b46948dd409962a5f4db --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,25 @@ +MachineBasicBlock *XCoreTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *BB) const { + const TargetInstrInfo &TII = *getTargetMachine().getInstrInfo(); + DebugLoc dl = MI->getDebugLoc(); + assert((MI->getOpcode() == XCore::SELECT_CC) && "Unexpected instr type to insert"); + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + MachineFunction::iterator It = BB; + ++It; + MachineBasicBlock *thisMBB = BB; + MachineFunction *F = BB->getParent(); + MachineBasicBlock *copy0MBB = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *sinkMBB = F->CreateMachineBasicBlock(LLVM_BB); + F->insert(It, copy0MBB); + F->insert(It, sinkMBB); + sinkMBB->splice(sinkMBB->begin(), BB, llvm::next(MachineBasicBlock::iterator(MI)), BB->end()); + sinkMBB->transferSuccessorsAndUpdatePHIs(BB); + BB->addSuccessor(copy0MBB); + BB->addSuccessor(sinkMBB); + BuildMI(BB, dl, TII.get(XCore::BRFT_lru6)).addReg(MI->getOperand(1).getReg()).addMBB(sinkMBB); + BB = copy0MBB; + BB->addSuccessor(sinkMBB); + BB = sinkMBB; + BuildMI(*BB, BB->begin(), dl, TII.get(XCore::PHI), MI->getOperand(0).getReg()).addReg(MI->getOperand(3).getReg()).addMBB(copy0MBB).addReg(MI->getOperand(2).getReg()).addMBB(thisMBB); + MI->eraseFromParent(); + return BB; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..df98267ee2b1601286e61658a9d08cea579f3669 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp @@ -0,0 +1,62 @@ +SDValue XCoreTargetLowering::ExpandADDSUB(SDNode *N, SelectionDAG &DAG) const { + assert(N->getValueType(0) == MVT::i64 && (N->getOpcode() == ISD::ADD || N->getOpcode() == ISD::SUB) && "Unknown operand to lower!"); + if (N->getOpcode() == ISD::ADD) { + SDValue XCoreTargetLowering:: + SDValue Mul; + SDValue Other; + if (N->getOperand(0).getOpcode() == ISD::MUL) { + Mul = N->getOperand(0); + Other = N->getOperand(1); + } + else if (N->getOperand(1).getOpcode() == ISD::MUL) { + Mul = N->getOperand(1); + Other = N->getOperand(0); + } + else { + return SDValue(); + } + DebugLoc dl = N->getDebugLoc(); + SDValue LL, RL, AddendL, AddendH; + LL = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Mul.getOperand(0), DAG.getConstant(0, MVT::i32)); + RL = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Mul.getOperand(1), DAG.getConstant(0, MVT::i32)); + AddendL = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Other, DAG.getConstant(0, MVT::i32)); + AddendH = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Other, DAG.getConstant(1, MVT::i32)); + APInt HighMask = APInt::getHighBitsSet(64, 32); + unsigned LHSSB = DAG.ComputeNumSignBits(Mul.getOperand(0)); + unsigned RHSSB = DAG.ComputeNumSignBits(Mul.getOperand(1)); + if (DAG.MaskedValueIsZero(Mul.getOperand(0), HighMask) && DAG.MaskedValueIsZero(Mul.getOperand(1), HighMask)) { + SDValue Hi = DAG.getNode(XCoreISD::MACCU, dl, DAG.getVTList(MVT::i32, MVT::i32), AddendH, AddendL, LL, RL); + SDValue Lo(Hi.getNode(), 1); + return DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, Lo, Hi); + } + if (LHSSB > 32 && RHSSB > 32) { + SDValue Hi = DAG.getNode(XCoreISD::MACCS, dl, DAG.getVTList(MVT::i32, MVT::i32), AddendH, AddendL, LL, RL); + SDValue Lo(Hi.getNode(), 1); + return DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, Lo, Hi); + } + SDValue LH, RH; + LH = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Mul.getOperand(0), DAG.getConstant(1, MVT::i32)); + RH = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Mul.getOperand(1), DAG.getConstant(1, MVT::i32)); + SDValue Hi = DAG.getNode(XCoreISD::MACCU, dl, DAG.getVTList(MVT::i32, MVT::i32), AddendH, AddendL, LL, RL); + SDValue Lo(Hi.getNode(), 1); + RH = DAG.getNode(ISD::MUL, dl, MVT::i32, LL, RH); + LH = DAG.getNode(ISD::MUL, dl, MVT::i32, LH, RL); + Hi = DAG.getNode(ISD::ADD, dl, MVT::i32, Hi, RH); + Hi = DAG.getNode(ISD::ADD, dl, MVT::i32, Hi, LH); + SDValue Result = DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, Lo, Hi); + if (Result.getNode() != 0) + return Result; + } + DebugLoc dl = N->getDebugLoc(); + SDValue LHSL = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, N->getOperand(0), DAG.getConstant(0, MVT::i32)); + SDValue LHSH = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, N->getOperand(0), DAG.getConstant(1, MVT::i32)); + SDValue RHSL = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, N->getOperand(1), DAG.getConstant(0, MVT::i32)); + SDValue RHSH = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, N->getOperand(1), DAG.getConstant(1, MVT::i32)); + unsigned Opcode = (N->getOpcode() == ISD::ADD) ? XCoreISD::LADD : CoreISD::LSUB; + SDValue Zero = DAG.getConstant(0, MVT::i32); + SDValue Carry = DAG.getNode(Opcode, dl, DAG.getVTList(MVT::i32, MVT::i32), LHSL, RHSL, Zero); + SDValue Lo(Carry.getNode(), 1); + SDValue Ignored = DAG.getNode(Opcode, dl, DAG.getVTList(MVT::i32, MVT::i32), LHSH, RHSH, Carry); + SDValue Hi(Ignored.getNode(), 1); + return DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, Lo, Hi); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7e79660297ec1580149891154481ad37f082fad --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp @@ -0,0 +1,3 @@ +SDValue XCoreTargetLowering::LowerADJUST_TRAMPOLINE(SDValue Op, SelectionDAG &DAG) const { + return Op.getOperand(0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ab9cb7cbe15bc311704c1991792b303f0009b70 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp @@ -0,0 +1,4 @@ +SDValue XCoreTargetLowering::LowerATOMIC_FENCE(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + return DAG.getNode(XCoreISD::MEMBARRIER, dl, MVT::Other, Op.getOperand(0)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..419da941fe5671f6c51816d5e22bc07eec63f64a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp @@ -0,0 +1,18 @@ +SDValue XCoreTargetLowering::LowerBR_JT(SDValue Op, SelectionDAG &DAG) const { + SDValue Chain = Op.getOperand(0); + SDValue Table = Op.getOperand(1); + SDValue Index = Op.getOperand(2); + DebugLoc dl = Op.getDebugLoc(); + JumpTableSDNode *JT = cast(Table); + unsigned JTI = JT->getIndex(); + MachineFunction &MF = DAG.getMachineFunction(); + const MachineJumpTableInfo *MJTI = MF.getJumpTableInfo(); + SDValue TargetJT = DAG.getTargetJumpTable(JT->getIndex(), MVT::i32); + unsigned NumEntries = MJTI->getJumpTables()[JTI].MBBs.size(); + if (NumEntries <= 32) { + return DAG.getNode(XCoreISD::BR_JT, dl, MVT::Other, Chain, TargetJT, Index); + } + assert((NumEntries >> 31) == 0); + SDValue ScaledIndex = DAG.getNode(ISD::SHL, dl, MVT::i32, Index, DAG.getConstant(1, MVT::i32)); + return DAG.getNode(XCoreISD::BR_JT32, dl, MVT::Other, Chain, TargetJT, ScaledIndex); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5716b4d9cfe759024a0653bcd24d6fb37c222d98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,6 @@ +SDValue XCoreTargetLowering::LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { + DebugLoc DL = Op.getDebugLoc(); + const BlockAddress *BA = cast(Op)->getBlockAddress(); + SDValue Result = DAG.getBlockAddress(BA, getPointerTy(), true); + return DAG.getNode(XCoreISD::PCRelativeWrapper, DL, getPointerTy(), Result); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a3aae8354c3b215d96516552270e082531cf3a15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,148 @@ +SDValue XCoreTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, const SmallVectorImpl &Ins, DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals) const { + isTailCall = false; + switch (CallConv) { + default: + llvm_unreachable("Unsupported calling convention"); + case CallingConv::Fast: + case CallingConv::C: + MachineFunction &MF = DAG.getMachineFunction(); + XCoreFunctionInfo *XFI = MF.getInfo(); + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { + const GlobalValue *GV = G->getGlobal(); + if (const GlobalAlias *GA = dyn_cast(GV)) { + GV = GA->resolveAliasedGlobal(); + } + if (const Function *F = dyn_cast(G->getGlobal())) { + XFI->addCall(F); + } + else { + XFI->setHasIndirectCalls(true); + } + } + else if (ExternalSymbolSDNode *E = dyn_cast(Callee)) { + XFI->addCall(E->getSymbol()); + } + else { + XFI->setHasIndirectCalls(true); + } + SmallVector ArgLocs; + CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), getTargetMachine(), ArgLocs, *DAG.getContext()); + CCInfo.AllocateStack(4, 4); + CCInfo.AnalyzeCallOperands(Outs, CC_XCore); + SmallVector RVLocs; + CCState RetCCInfo(CallConv, isVarArg, DAG.getMachineFunction(), getTargetMachine(), RVLocs, *DAG.getContext()); + RetCCInfo.AllocateStack(CCInfo.getNextStackOffset(), 4); + RetCCInfo.AnalyzeCallResult(Ins, RetCC_XCore); + bool hasResultReturnedOnStack = RetCCInfo.getNextStackOffset() != CCInfo.getNextStackOffset(); + unsigned NumBytes = RetCCInfo.getNextStackOffset(); + Chain = DAG.getCALLSEQ_START(Chain,DAG.getConstant(NumBytes, getPointerTy(), true)); + SmallVector, 4> RegsToPass; + SmallVector MemOpChains; + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + SDValue Arg = OutVals[i]; + switch (VA.getLocInfo()) { + default: llvm_unreachable("Unknown loc info!"); + case CCValAssign::Full: + break; + case CCValAssign::SExt: + Arg = DAG.getNode(ISD::SIGN_EXTEND, dl, VA.getLocVT(), Arg); + break; + case CCValAssign::ZExt: + Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, VA.getLocVT(), Arg); + break; + case CCValAssign::AExt: + Arg = DAG.getNode(ISD::ANY_EXTEND, dl, VA.getLocVT(), Arg); + break; + } + if (VA.isRegLoc()) { + RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); + } + else { + assert(VA.isMemLoc()); + int Offset = VA.getLocMemOffset(); + MemOpChains.push_back(DAG.getNode(XCoreISD::STWSP, dl, MVT::Other, Chain, Arg, DAG.getConstant(Offset/4, MVT::i32))); + } + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &MemOpChains[0], MemOpChains.size()); + SDValue InFlag; + for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { + Chain = DAG.getCopyToReg(Chain, dl, RegsToPass[i].first, RegsToPass[i].second, InFlag); + InFlag = Chain.getValue(1); + } + if (GlobalAddressSDNode *G = dyn_cast(Callee)) + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), dl, MVT::i32); + else if (ExternalSymbolSDNode *E = dyn_cast(Callee)) + Callee = DAG.getTargetExternalSymbol(E->getSymbol(), MVT::i32); + SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); + SmallVector Ops; + Ops.push_back(Chain); + Ops.push_back(Callee); + for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) + Ops.push_back(DAG.getRegister(RegsToPass[i].first, RegsToPass[i].second.getValueType())); + if (InFlag.getNode()) + Ops.push_back(InFlag); + Chain = DAG.getNode(XCoreISD::BL, dl, NodeTys, &Ops[0], Ops.size()); + InFlag = Chain.getValue(1); + if (hasResultReturnedOnStack) { + SmallVector, 4> ResultMemLocs; + for (unsigned i = 0, e = RVLocs.size(); i != e; ++i) { + const CCValAssign &VA = RVLocs[i]; + if (VA.isRegLoc()) { + Chain = DAG.getCopyFromReg(Chain, dl, VA.getLocReg(), VA.getValVT(), InFlag).getValue(1); + InFlag = Chain.getValue(2); + InVals.push_back(Chain.getValue(0)); + } + else { + assert(VA.isMemLoc()); + ResultMemLocs.push_back(std::make_pair(VA.getLocMemOffset(), InVals.size())); + InVals.push_back(SDValue()); + } + } + SmallVector MemOpChains; + for (unsigned i = 0, e = ResultMemLocs.size(); i != e; ++i) { + int offset = ResultMemLocs[i].first; + unsigned index = ResultMemLocs[i].second; + SDVTList VTs = DAG.getVTList(MVT::i32, MVT::Other); + SDValue Ops[] = { Chain, DAG.getConstant(offset/4, MVT::i32) }; + SDValue load = DAG.getNode(XCoreISD::LDWSP, dl, VTs, Ops, 2); + InVals[index] = load; + MemOpChains.push_back(load.getValue(1)); + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &MemOpChains[0], MemOpChains.size()); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, getPointerTy(), true), DAG.getConstant(0, getPointerTy(), true), SDValue()); + } + else { + Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, getPointerTy(), true), DAG.getConstant(0, getPointerTy(), true), InFlag); + SmallVector, 4> ResultMemLocs; + for (unsigned i = 0, e = RVLocs.size(); i != e; ++i) { + const CCValAssign &VA = RVLocs[i]; + if (VA.isRegLoc()) { + Chain = DAG.getCopyFromReg(Chain, dl, VA.getLocReg(), VA.getValVT(), InFlag).getValue(1); + InFlag = Chain.getValue(2); + InVals.push_back(Chain.getValue(0)); + } + else { + assert(VA.isMemLoc()); + ResultMemLocs.push_back(std::make_pair(VA.getLocMemOffset(), InVals.size())); + InVals.push_back(SDValue()); + } + } + SmallVector MemOpChains; + for (unsigned i = 0, e = ResultMemLocs.size(); i != e; ++i) { + int offset = ResultMemLocs[i].first; + unsigned index = ResultMemLocs[i].second; + SDVTList VTs = DAG.getVTList(MVT::i32, MVT::Other); + SDValue Ops[] = { Chain, DAG.getConstant(offset/4, MVT::i32) }; + SDValue load = DAG.getNode(XCoreISD::LDWSP, dl, VTs, Ops, 2); + InVals[index] = load; + MemOpChains.push_back(load.getValue(1)); + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &MemOpChains[0], MemOpChains.size()); + } + return Chain; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf61dd0ba9834cd0452cfb166ff86416201f40ec --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,13 @@ +SDValue XCoreTargetLowering::LowerConstantPool(SDValue Op, SelectionDAG &DAG) const { + ConstantPoolSDNode *CP = cast(Op); + DebugLoc dl = CP->getDebugLoc(); + EVT PtrVT = Op.getValueType(); + SDValue Res; + if (CP->isMachineConstantPoolEntry()) { + Res = DAG.getTargetConstantPool(CP->getMachineCPVal(), PtrVT, CP->getAlignment()); + } + else { + Res = DAG.getTargetConstantPool(CP->getConstVal(), PtrVT, CP->getAlignment()); + } + return DAG.getNode(XCoreISD::CPRelativeWrapper, dl, MVT::i32, Res); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88d5d526203df641000d44edb3d15bcf4bb6a554 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp @@ -0,0 +1,28 @@ +SDValue XCoreTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG) const { + SDNode *Node = Op.getNode(); + unsigned SPReg = this->getStackPointerRegisterToSaveRestore(); + assert(SPReg && "Target cannot require DYNAMIC_STACKALLOC expansion and not tell us which reg is the stack pointer!"); + DebugLoc dl = Node->getDebugLoc(); + EVT VT = Node->getValueType(0); + SDValue Tmp1 = SDValue(Node, 0); + SDValue Tmp2 = SDValue(Node, 1); + SDValue Tmp3 = Node->getOperand(2); + SDValue Chain = Tmp1.getOperand(0); + MachineFunction &MF = DAG.getMachineFunction(); + XCoreFunctionInfo *XFI = MF.getInfo(); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(0, true)); + SDValue Size = Tmp2.getOperand(1); + SDValue SP = DAG.getCopyFromReg(Chain, dl, SPReg, VT); + Chain = SP.getValue(1); + unsigned Align = cast(Tmp3)->getZExtValue(); + unsigned StackAlign = TM.getFrameLowering()->getStackAlignment(); + if (Align > StackAlign) + SP = DAG.getNode(ISD::AND, dl, VT, SP, DAG.getConstant(-(uint64_t)Align, VT)); + Tmp1 = DAG.getNode(ISD::SUB, dl, VT, SP, Size); + Chain = DAG.getCopyToReg(Chain, dl, SPReg, Tmp1); + unsigned i = XFI->addStackExpression(Size); + Chain = DAG.getNode(XCoreISD::ALLOCA, dl, MVT::Other, Chain, DAG.getConstant(i, MVT::i32)); + Tmp2 = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, true), DAG.getIntPtrConstant(0, true), SDValue()); + SDValue Ops[] = { Tmp1, Tmp2 }; + return DAG.getMergeValues(Ops, 2, dl); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e056b7d246b21d3d053dc7909620ab8d9fe15c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp @@ -0,0 +1,22 @@ +SDValue XCoreTargetLowering::LowerEH_RETURN(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachineFunction(); + SDValue Chain = Op.getOperand(0); + SDValue Offset = Op.getOperand(1); + SDValue Handler = Op.getOperand(2); + DebugLoc dl = Op.getDebugLoc(); + const TargetRegisterInfo *RegInfo = getTargetMachine().getRegisterInfo(); + SDValue Stack = DAG.getCopyFromReg(DAG.getEntryNode(), dl, RegInfo->getFrameRegister(MF), MVT::i32); + SDValue FrameToArgs = DAG.getNode(XCoreISD::FRAME_TO_ARGS_OFFSET, dl, MVT::i32); + Stack = DAG.getNode(ISD::ADD, dl, MVT::i32, Stack, FrameToArgs); + Stack = DAG.getNode(ISD::ADD, dl, MVT::i32, Stack, Offset); + unsigned StackReg = XCore::R2; + unsigned HandlerReg = XCore::R3; + SDValue OutChains[] = { + DAG.getCopyToReg(Chain, dl, StackReg, Stack), + DAG.getCopyToReg(Chain, dl, HandlerReg, Handler) + }; + Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains, 2); + MF.getRegInfo().addLiveOut(StackReg); + MF.getRegInfo().addLiveOut(HandlerReg); + return DAG.getNode(XCoreISD::EH_RETURN, dl, MVT::Other, Chain, DAG.getRegister(StackReg, MVT::i32), DAG.getRegister(HandlerReg, MVT::i32)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fbbfdc8c5a0562bcd31c791e6600d70b4d0659e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,8 @@ +SDValue XCoreTargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + if (cast(Op.getOperand(0))->getZExtValue() > 0) + return SDValue(); + MachineFunction &MF = DAG.getMachineFunction(); + const TargetRegisterInfo *RegInfo = getTargetMachine().getRegisterInfo(); + return DAG.getCopyFromReg(DAG.getEntryNode(), dl, RegInfo->getFrameRegister(MF), MVT::i32); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f27c2ffe8407edfe6c97e4a3d599d600c3ddfdb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp @@ -0,0 +1,4 @@ +SDValue XCoreTargetLowering::LowerFRAME_TO_ARGS_OFFSET(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + return DAG.getNode(XCoreISD::FRAME_TO_ARGS_OFFSET, dl, MVT::i32); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..14fb9c0ef10f4873f3c2e7fda713893d01756ecb --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,77 @@ +SDValue XCoreTargetLowering::LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl &Ins, DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals) const { + switch (CallConv) { + default: + llvm_unreachable("Unsupported calling convention"); + case CallingConv::C: + case CallingConv::Fast: + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo *MFI = MF.getFrameInfo(); + MachineRegisterInfo &RegInfo = MF.getRegInfo(); + XCoreFunctionInfo *XFI = MF.getInfo(); + SmallVector ArgLocs; + CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), getTargetMachine(), ArgLocs, *DAG.getContext()); + CCInfo.AnalyzeFormalArguments(Ins, CC_XCore); + unsigned StackSlotSize = XCoreFrameLowering::stackSlotSize(); + unsigned LRSaveSize = StackSlotSize; + if (!isVarArg) + XFI->setReturnStackOffset(CCInfo.getNextStackOffset() + LRSaveSize); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + if (VA.isRegLoc()) { + EVT RegVT = VA.getLocVT(); + switch (RegVT.getSimpleVT().SimpleTy) { + default: { +#ifndef NDEBUG + errs() << "LowerFormalArguments Unhandled argument type: " << RegVT.getSimpleVT().SimpleTy << "\n"; +#endif + llvm_unreachable(0); + } + case MVT::i32: + unsigned VReg = RegInfo.createVirtualRegister( XCore::GRRegsRegisterClass); + RegInfo.addLiveIn(VA.getLocReg(), VReg); + InVals.push_back(DAG.getCopyFromReg(Chain, dl, VReg, RegVT)); + } + } + else { + assert(VA.isMemLoc()); + unsigned ObjSize = VA.getLocVT().getSizeInBits()/8; + if (ObjSize > StackSlotSize) { + errs() << "LowerFormalArguments Unhandled argument type: " << EVT(VA.getLocVT()).getEVTString() << "\n"; + } + int FI = MFI->CreateFixedObject(ObjSize, LRSaveSize + VA.getLocMemOffset(), true); + SDValue FIN = DAG.getFrameIndex(FI, MVT::i32); + InVals.push_back(DAG.getLoad(VA.getLocVT(), dl, Chain, FIN, MachinePointerInfo::getFixedStack(FI), false, false, 0)); + } + } + if (isVarArg) { + static const unsigned ArgRegs[] = { + XCore::R0, XCore::R1, XCore::R2, XCore::R3 + }; + XCoreFunctionInfo *XFI = MF.getInfo(); + unsigned FirstVAReg = CCInfo.getFirstUnallocated(ArgRegs, array_lengthof(ArgRegs)); + if (FirstVAReg < array_lengthof(ArgRegs)) { + SmallVector MemOps; + int offset = 0; + for (int i = array_lengthof(ArgRegs) - 1; i >= (int)FirstVAReg; --i) { + int FI = MFI->CreateFixedObject(4, offset, true); + if (i == (int)FirstVAReg) { + XFI->setVarArgsFrameIndex(FI); + } + offset -= StackSlotSize; + SDValue FIN = DAG.getFrameIndex(FI, MVT::i32); + unsigned VReg = RegInfo.createVirtualRegister( XCore::GRRegsRegisterClass); + RegInfo.addLiveIn(ArgRegs[i], VReg); + SDValue Val = DAG.getCopyFromReg(Chain, dl, VReg, MVT::i32); + SDValue Store = DAG.getStore(Val.getValue(1), dl, Val, FIN, MachinePointerInfo(), false, false, 0); + MemOps.push_back(Store); + } + if (!MemOps.empty()) + Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &MemOps[0], MemOps.size()); + } + else { + XFI->setVarArgsFrameIndex(MFI->CreateFixedObject(4, LRSaveSize + CCInfo.getNextStackOffset(), true)); + } + } + return Chain; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96d04e6abbdaf6ce41befc01d4314cbadadebaac --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,15 @@ +SDValue XCoreTargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { + const GlobalValue *GV = cast(Op)->getGlobal(); + SDValue GA = DAG.getTargetGlobalAddress(GV, Op.getDebugLoc(), MVT::i32); + DebugLoc dl = GA.getDebugLoc(); + const GlobalValue *UnderlyingGV = GV; + if (const GlobalAlias *GA = dyn_cast(GV)) + UnderlyingGV = GA->resolveAliasedGlobal(); + if (const GlobalVariable *GVar = dyn_cast(UnderlyingGV)) { + if (GVar->hasSection() && GVar->getSection().substr(0, 4) == ".cp.") { + return DAG.getNode(XCoreISD::CPRelativeWrapper, dl, MVT::i32, GA); + } + return DAG.getNode(XCoreISD::DPRelativeWrapper, dl, MVT::i32, GA); + } + return DAG.getNode(XCoreISD::PCRelativeWrapper, dl, MVT::i32, GA); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09a51374af890f0e24e0c4684abb2b8288148119 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,37 @@ +SDValue XCoreTargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + const GlobalValue *GV = cast(Op)->getGlobal(); + SDValue GA = DAG.getTargetGlobalAddress(GV, dl, MVT::i32); + const GlobalVariable *GVar = dyn_cast(GV); + if (!GVar) { + if (const GlobalAlias *GA = dyn_cast(GV)) + GVar = dyn_cast_or_null(GA->resolveAliasedGlobal()); + } + if (! GVar) { + llvm_unreachable("Thread local object not a GlobalVariable?"); + return SDValue(); + } + Type *Ty = cast(GV->getType())->getElementType(); + if (!Ty->isSized() || isZeroLengthArray(Ty)) { +#ifndef NDEBUG + errs() << "Size of thread local object " << GVar->getName() << " is unknown\n"; +#endif + llvm_unreachable(0); + } + SDValue base; + DebugLoc dl = GA.getDebugLoc(); + const GlobalValue *UnderlyingGV = GV; + if (const GlobalAlias *GA = dyn_cast(GV)) + UnderlyingGV = GA->resolveAliasedGlobal(); + if (const GlobalVariable *GVar = dyn_cast(UnderlyingGV)) { + if (GVar->hasSection() && GVar->getSection().substr(0, 4) == ".cp.") { + base = DAG.getNode(XCoreISD::CPRelativeWrapper, dl, MVT::i32, GA); + } + base = DAG.getNode(XCoreISD::DPRelativeWrapper, dl, MVT::i32, GA); + } + base = DAG.getNode(XCoreISD::PCRelativeWrapper, dl, MVT::i32, GA); + const TargetData *TD = TM.getTargetData(); + unsigned Size = TD->getTypeAllocSize(Ty); + SDValue offset = DAG.getNode(ISD::MUL, dl, MVT::i32, BuildGetId(DAG, dl), DAG.getConstant(Size, MVT::i32)); + return DAG.getNode(ISD::ADD, dl, MVT::i32, base, offset); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41459cb37370bb1f4e7cf71cda6a50fdbe2d9d98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp @@ -0,0 +1,20 @@ +SDValue XCoreTargetLowering::LowerINIT_TRAMPOLINE(SDValue Op, SelectionDAG &DAG) const { + SDValue Chain = Op.getOperand(0); + SDValue Trmp = Op.getOperand(1); + SDValue FPtr = Op.getOperand(2); + SDValue Nest = Op.getOperand(3); + const Value *TrmpAddr = cast(Op.getOperand(4))->getValue(); + SDValue OutChains[5]; + SDValue Addr = Trmp; + DebugLoc dl = Op.getDebugLoc(); + OutChains[0] = DAG.getStore(Chain, dl, DAG.getConstant(0x0a3cd805, MVT::i32), Addr, MachinePointerInfo(TrmpAddr), false, false, 0); + Addr = DAG.getNode(ISD::ADD, dl, MVT::i32, Trmp, DAG.getConstant(4, MVT::i32)); + OutChains[1] = DAG.getStore(Chain, dl, DAG.getConstant(0xd80456c0, MVT::i32), Addr, MachinePointerInfo(TrmpAddr, 4), false, false, 0); + Addr = DAG.getNode(ISD::ADD, dl, MVT::i32, Trmp, DAG.getConstant(8, MVT::i32)); + OutChains[2] = DAG.getStore(Chain, dl, DAG.getConstant(0x27fb0a3c, MVT::i32), Addr, MachinePointerInfo(TrmpAddr, 8), false, false, 0); + Addr = DAG.getNode(ISD::ADD, dl, MVT::i32, Trmp, DAG.getConstant(12, MVT::i32)); + OutChains[3] = DAG.getStore(Chain, dl, Nest, Addr, MachinePointerInfo(TrmpAddr, 12), false, false, 0); + Addr = DAG.getNode(ISD::ADD, dl, MVT::i32, Trmp, DAG.getConstant(16, MVT::i32)); + OutChains[4] = DAG.getStore(Chain, dl, FPtr, Addr, MachinePointerInfo(TrmpAddr, 16), false, false, 0); + return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains, 5); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ba5dc4e6f98d9d1265d70a9cbb37cb69d30f648f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,44 @@ +SDValue XCoreTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + unsigned IntNo = cast(Op.getOperand(0))->getZExtValue(); + switch (IntNo) { + case Intrinsic::xcore_stackusage: + case Intrinsic::xcore_arraybound: + case Intrinsic::xcore_savedstateusage: { + if (Op.getOperand(1)->getOpcode() != XCoreISD::PCRelativeWrapper && Op.getOperand(1)->getOpcode() != XCoreISD::DPRelativeWrapper && Op.getOperand(1)->getOpcode() != XCoreISD::CPRelativeWrapper) + break; + GlobalAddressSDNode *G = dyn_cast(Op.getOperand(1).getOperand(0)); + if (!G) + break; + const GlobalValue *GV = G->getGlobal(); + if (const GlobalAlias *GA = dyn_cast(GV)) { + GV = GA->resolveAliasedGlobal(); + } + MachineFunction &MF = DAG.getMachineFunction(); + XCoreFunctionInfo *XFI = MF.getInfo(); + const char *SymName = XFI->getResourceSymbolName(GV, getResourceSymbolSuffix(IntNo)); + SDValue StackUsageSym = DAG.getTargetExternalSymbol(SymName, MVT::i32); + return DAG.getNode(XCoreISD::ABS16Wrapper, dl, MVT::i32, StackUsageSym); + } + case Intrinsic::xcore_maxargsize: { + if (Op.getOperand(1)->getOpcode() != XCoreISD::PCRelativeWrapper && Op.getOperand(1)->getOpcode() != XCoreISD::DPRelativeWrapper && Op.getOperand(1)->getOpcode() != XCoreISD::CPRelativeWrapper) + break; + GlobalAddressSDNode *G = dyn_cast(Op.getOperand(1).getOperand(0)); + unsigned paramArgNum = 2; + ConstantSDNode *C = dyn_cast(Op.getOperand(paramArgNum)); + if (!G || !C) + break; + const GlobalValue *GV = G->getGlobal(); + unsigned paramNum = C->getZExtValue(); + if (const GlobalAlias *GA = dyn_cast(GV)) { + GV = GA->resolveAliasedGlobal(); + } + MachineFunction &MF = DAG.getMachineFunction(); + XCoreFunctionInfo *XFI = MF.getInfo(); + const char *SymName = XFI->getMaxArgName(GV, paramNum); + SDValue StackUsageSym = DAG.getTargetExternalSymbol(SymName, MVT::i32); + return DAG.getNode(XCoreISD::ABS16Wrapper, dl, MVT::i32, StackUsageSym); + } + } + return SDValue(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b31ae7f9a13ec3005d81188dc3e1b8526810d29 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp @@ -0,0 +1,53 @@ +SDValue XCoreTargetLowering::LowerLOAD(SDValue Op, SelectionDAG &DAG) const { + LoadSDNode *LD = cast(Op); + assert(LD->getExtensionType() == ISD::NON_EXTLOAD && "Unexpected extension type"); + assert(LD->getMemoryVT() == MVT::i32 && "Unexpected load EVT"); + if (allowsUnalignedMemoryAccesses(LD->getMemoryVT())) + return SDValue(); + unsigned ABIAlignment = getTargetData()-> getABITypeAlignment(LD->getMemoryVT().getTypeForEVT(*DAG.getContext())); + if (LD->getAlignment() >= ABIAlignment) + return SDValue(); + SDValue Chain = LD->getChain(); + SDValue BasePtr = LD->getBasePtr(); + DebugLoc DL = Op.getDebugLoc(); + SDValue Base; + int64_t Offset; + if (!LD->isVolatile() && IsWordAlignedBasePlusConstantOffset(BasePtr, Base, Offset)) { + if (Offset % 4 == 0) { + return DAG.getLoad(getPointerTy(), DL, Chain, BasePtr, MachinePointerInfo(), false, false, 0); + } + SDValue LowOffset = DAG.getConstant(Offset & ~0x3, MVT::i32); + SDValue HighOffset = DAG.getConstant((Offset & ~0x3) + 4, MVT::i32); + SDValue LowShift = DAG.getConstant((Offset & 0x3) * 8, MVT::i32); + SDValue HighShift = DAG.getConstant(32 - (Offset & 0x3) * 8, MVT::i32); + SDValue LowAddr = DAG.getNode(ISD::ADD, DL, MVT::i32, Base, LowOffset); + SDValue HighAddr = DAG.getNode(ISD::ADD, DL, MVT::i32, Base, HighOffset); + SDValue Low = DAG.getLoad(getPointerTy(), DL, Chain, LowAddr, MachinePointerInfo(), false, false, 0); + SDValue High = DAG.getLoad(getPointerTy(), DL, Chain, HighAddr, MachinePointerInfo(), false, false, 0); + SDValue LowShifted = DAG.getNode(ISD::SRL, DL, MVT::i32, Low, LowShift); + SDValue HighShifted = DAG.getNode(ISD::SHL, DL, MVT::i32, High, HighShift); + SDValue Result = DAG.getNode(ISD::OR, DL, MVT::i32, LowShifted, HighShifted); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Low.getValue(1), High.getValue(1)); + SDValue Ops[] = { Result, Chain }; + return DAG.getMergeValues(Ops, 2, DL); + } + if (LD->getAlignment() == 2) { + SDValue Low = DAG.getExtLoad(ISD::ZEXTLOAD, DL, MVT::i32, Chain, BasePtr, LD->getPointerInfo(), MVT::i16, LD->isVolatile(), LD->isNonTemporal(), 2); + SDValue HighAddr = DAG.getNode(ISD::ADD, DL, MVT::i32, BasePtr, DAG.getConstant(2, MVT::i32)); + SDValue High = DAG.getExtLoad(ISD::EXTLOAD, DL, MVT::i32, Chain, HighAddr, LD->getPointerInfo().getWithOffset(2), MVT::i16, LD->isVolatile(), LD->isNonTemporal(), 2); + SDValue HighShifted = DAG.getNode(ISD::SHL, DL, MVT::i32, High, DAG.getConstant(16, MVT::i32)); + SDValue Result = DAG.getNode(ISD::OR, DL, MVT::i32, Low, HighShifted); + Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Low.getValue(1), High.getValue(1)); + SDValue Ops[] = { Result, Chain }; + return DAG.getMergeValues(Ops, 2, DL); + } + Type *IntPtrTy = getTargetData()->getIntPtrType(*DAG.getContext()); + TargetLowering::ArgListTy Args; + TargetLowering::ArgListEntry Entry; + Entry.Ty = IntPtrTy; + Entry.Node = BasePtr; + Args.push_back(Entry); + std::pair CallResult = LowerCallTo(Chain, IntPtrTy, false, false, false, false, 0, CallingConv::C, false, true, DAG.getExternalSymbol("__misaligned_load", getPointerTy()), Args, DAG, DL); + SDValue Ops[] = { CallResult.first, CallResult.second }; + return DAG.getMergeValues(Ops, 2, DL); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..947877d5d9846378db8161b32060e689837682d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,56 @@ +SDValue XCoreTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { + switch (Op.getOpcode()) { + case ISD::EH_RETURN: + return LowerEH_RETURN(Op, DAG); + case ISD::GlobalAddress: + return LowerGlobalAddress(Op, DAG); + case ISD::GlobalTLSAddress: + return LowerGlobalTLSAddress(Op, DAG); + case ISD::BlockAddress: + return LowerBlockAddress(Op, DAG); + case ISD::ConstantPool: + return LowerConstantPool(Op, DAG); + case ISD::BR_JT: + return LowerBR_JT(Op, DAG); + case ISD::LOAD: + return LowerLOAD(Op, DAG); + case ISD::STORE: + return LowerSTORE(Op, DAG); + case ISD::SELECT_CC: + return LowerSELECT_CC(Op, DAG); + case ISD::VAARG: + return LowerVAARG(Op, DAG); + case ISD::VASTART: + return LowerVASTART(Op, DAG); + case ISD::SMUL_LOHI: + return LowerSMUL_LOHI(Op, DAG); + case ISD::UMUL_LOHI: + return LowerUMUL_LOHI(Op, DAG); + case ISD::ADD: + case ISD::SUB: + return ExpandADDSUB(Op.getNode(), DAG); + case ISD::FRAMEADDR: + return LowerFRAMEADDR(Op, DAG); + case ISD::FRAME_TO_ARGS_OFFSET: + return LowerFRAME_TO_ARGS_OFFSET(Op, DAG); + case ISD::RETURNADDR: + return LowerRETURNADDR(Op, DAG); + case ISD::INIT_TRAMPOLINE: + return LowerINIT_TRAMPOLINE(Op, DAG); + case ISD::ADJUST_TRAMPOLINE: + return LowerADJUST_TRAMPOLINE(Op, DAG); + case ISD::INTRINSIC_WO_CHAIN: + return LowerINTRINSIC_WO_CHAIN(Op, DAG); + case ISD::STACKSAVE: + return LowerSTACKSAVE(Op, DAG); + case ISD::STACKRESTORE: + return LowerSTACKRESTORE(Op, DAG); + case ISD::DYNAMIC_STACKALLOC: + return LowerDYNAMIC_STACKALLOC(Op, DAG); + case ISD::ATOMIC_FENCE: + return LowerATOMIC_FENCE(Op, DAG); + default: + llvm_unreachable("unimplemented operand"); + return SDValue(); + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b75acc632eb5ef77bbf79092f515774eef1a2f43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,26 @@ +SDValue XCoreTargetLowering::LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + if (cast(Op.getOperand(0))->getZExtValue() > 0) + return SDValue(); + MachineFunction &MF = DAG.getMachineFunction(); + MachineFrameInfo *MFI = MF.getFrameInfo(); + XCoreFunctionInfo *XFI = MF.getInfo(); + if (XFI->LRSpillSlotSet) { + assert(LRSpillSlotSet && "LR Spill slot no set"); + return LRSpillSlot; + } + bool isVarArg = MF.getFunction()->isVarArg(); + int FrameIdx; + const TargetRegisterClass *RC = XCore::GRRegsRegisterClass; + if (!isVarArg) { + FrameIdx = MFI->CreateFixedObject(RC->getSize(), 0, true); + } + else { + FrameIdx = MFI->CreateStackObject(RC->getSize(), RC->getAlignment(), true); + } + assert(!LRSpillSlotSet && "LR Spill slot set twice"); + LRSpillSlotSet = true; + LRSpillSlot = FrameIdx; + int FI = FrameIdx; + return DAG.getLoad(getPointerTy(), dl, DAG.getEntryNode(), DAG.getFrameIndex(FI, MVT::i32), MachinePointerInfo::getFixedStack(FI), false, false, 0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d92be893cd8b1fdd7f6eeb36c3a93a59b536dab --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,43 @@ +SDValue XCoreTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, DebugLoc dl, SelectionDAG &DAG) const { + XCoreFunctionInfo *XFI = DAG.getMachineFunction().getInfo(); + MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo(); + SmallVector RVLocs; + CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), getTargetMachine(), RVLocs, *DAG.getContext()); + if (!isVarArg) + CCInfo.AllocateStack(XFI->getReturnStackOffset(), 4); + CCInfo.AnalyzeReturn(Outs, RetCC_XCore); + if (DAG.getMachineFunction().getRegInfo().liveout_empty()) { + for (unsigned i = 0, e = RVLocs.size(); i != e; ++i) + if (RVLocs[i].isRegLoc()) + DAG.getMachineFunction().getRegInfo().addLiveOut(RVLocs[i].getLocReg()); + } + SDValue Flag; + SmallVector MemOpChains; + for (unsigned i = 0, e = RVLocs.size(); i != e; ++i) { + CCValAssign &VA = RVLocs[i]; + if (VA.isRegLoc()) + continue; + assert(VA.isMemLoc()); + if (isVarArg) { + report_fatal_error("Can't return value from vararg function in memory"); + } + int Offset = VA.getLocMemOffset(); + unsigned ObjSize = VA.getLocVT().getSizeInBits()/8; + int FI = MFI->CreateFixedObject(ObjSize, Offset, false); + SDValue FIN = DAG.getFrameIndex(FI, MVT::i32); + MemOpChains.push_back(DAG.getStore(Chain, dl, OutVals[i], FIN, MachinePointerInfo::getFixedStack(FI), false, false, 0)); + } + if (!MemOpChains.empty()) + Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &MemOpChains[0], MemOpChains.size()); + for (unsigned i = 0, e = RVLocs.size(); i != e; ++i) { + CCValAssign &VA = RVLocs[i]; + if (!VA.isRegLoc()) + continue; + Chain = DAG.getCopyToReg(Chain, dl, VA.getLocReg(), OutVals[i], Flag); + Flag = Chain.getValue(1); + } + if (Flag.getNode()) + return DAG.getNode(XCoreISD::RETSP, dl, MVT::Other, Chain, DAG.getConstant(0, MVT::i32), Flag); + else + return DAG.getNode(XCoreISD::RETSP, dl, MVT::Other, Chain, DAG.getConstant(0, MVT::i32)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b71a4128a90404148d2c00b6bf5a284d0abf97c2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp @@ -0,0 +1,5 @@ +SDValue XCoreTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + SDValue Cond = DAG.getNode(ISD::SETCC, dl, MVT::i32, Op.getOperand(2), Op.getOperand(3), Op.getOperand(4)); + return DAG.getNode(ISD::SELECT, dl, MVT::i32, Cond, Op.getOperand(0), Op.getOperand(1)); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56af17795ab02bb27da3d1843f661b518a72112b --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp @@ -0,0 +1,12 @@ + +SDValue XCoreTargetLowering::LowerSMUL_LOHI(SDValue Op, SelectionDAG &DAG) const { + assert(Op.getValueType() == MVT::i32 && Op.getOpcode() == ISD::SMUL_LOHI && "Unexpected operand to lower!"); + DebugLoc dl = Op.getDebugLoc(); + SDValue LHS = Op.getOperand(0); + SDValue RHS = Op.getOperand(1); + SDValue Zero = DAG.getConstant(0, MVT::i32); + SDValue Hi = DAG.getNode(XCoreISD::MACCS, dl, DAG.getVTList(MVT::i32, MVT::i32), Zero, Zero, LHS, RHS); + SDValue Lo(Hi.getNode(), 1); + SDValue Ops[] = { Lo, Hi }; + return DAG.getMergeValues(Ops, 2, dl); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88dd4a14b3d16d388a51aa7779eabe03a9fa83b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp @@ -0,0 +1,10 @@ +SDValue XCoreTargetLowering::LowerSTACKSAVE(SDValue Op, SelectionDAG &DAG) const { + SmallVector Ops, Results; + SDNode *Node = Op.getNode(); + DebugLoc dl = Node->getDebugLoc(); + unsigned SP = this->getStackPointerRegisterToSaveRestore(); + SDValue chain = DAG.getNode(XCoreISD::STACKSAVE, dl, MVT::Other, Node->getOperand(0)); + Results.push_back(DAG.getCopyFromReg(chain, dl, SP, Node->getValueType(0))); + Results.push_back(Results[0].getValue(1)); + return Results[Op.getResNo()]; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec164cdbbee7ea55c820613252567eff822041bd --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp @@ -0,0 +1,34 @@ +SDValue XCoreTargetLowering::LowerSTORE(SDValue Op, SelectionDAG &DAG) const { + StoreSDNode *ST = cast(Op); + assert(!ST->isTruncatingStore() && "Unexpected store type"); + assert(ST->getMemoryVT() == MVT::i32 && "Unexpected store EVT"); + if (allowsUnalignedMemoryAccesses(ST->getMemoryVT())) { + return SDValue(); + } + unsigned ABIAlignment = getTargetData()->getABITypeAlignment(ST->getMemoryVT().getTypeForEVT(*DAG.getContext())); + if (ST->getAlignment() >= ABIAlignment) { + return SDValue(); + } + SDValue Chain = ST->getChain(); + SDValue BasePtr = ST->getBasePtr(); + SDValue Value = ST->getValue(); + DebugLoc dl = Op.getDebugLoc(); + if (ST->getAlignment() == 2) { + SDValue Low = Value; + SDValue High = DAG.getNode(ISD::SRL, dl, MVT::i32, Value, DAG.getConstant(16, MVT::i32)); + SDValue StoreLow = DAG.getTruncStore(Chain, dl, Low, BasePtr, ST->getPointerInfo(), MVT::i16, ST->isVolatile(), ST->isNonTemporal(), 2); + SDValue HighAddr = DAG.getNode(ISD::ADD, dl, MVT::i32, BasePtr, DAG.getConstant(2, MVT::i32)); + SDValue StoreHigh = DAG.getTruncStore(Chain, dl, High, HighAddr, ST->getPointerInfo().getWithOffset(2), MVT::i16, ST->isVolatile(), ST->isNonTemporal(), 2); + return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, StoreLow, StoreHigh); + } + Type *IntPtrTy = getTargetData()->getIntPtrType(*DAG.getContext()); + TargetLowering::ArgListTy Args; + TargetLowering::ArgListEntry Entry; + Entry.Ty = IntPtrTy; + Entry.Node = BasePtr; + Args.push_back(Entry); + Entry.Node = Value; + Args.push_back(Entry); + std::pair CallResult = LowerCallTo(Chain, Type::getVoidTy(*DAG.getContext()), false, false, false, false, 0, CallingConv::C, false, true, DAG.getExternalSymbol("__misaligned_store", getPointerTy()), Args, DAG, dl); + return CallResult.second; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4f8f2c69b172e71f7821741f67893ddcb7cac14f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp @@ -0,0 +1,11 @@ +SDValue XCoreTargetLowering::LowerUMUL_LOHI(SDValue Op, SelectionDAG &DAG) const { + assert(Op.getValueType() == MVT::i32 && Op.getOpcode() == ISD::UMUL_LOHI && "Unexpected operand to lower!"); + DebugLoc dl = Op.getDebugLoc(); + SDValue LHS = Op.getOperand(0); + SDValue RHS = Op.getOperand(1); + SDValue Zero = DAG.getConstant(0, MVT::i32); + SDValue Hi = DAG.getNode(XCoreISD::LMUL, dl, DAG.getVTList(MVT::i32, MVT::i32), LHS, RHS, Zero, Zero); + SDValue Lo(Hi.getNode(), 1); + SDValue Ops[] = { Lo, Hi }; + return DAG.getMergeValues(Ops, 2, dl); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf69a3cc177e9e2bd7ad7da5151ee914fb8af199 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp @@ -0,0 +1,11 @@ +SDValue XCoreTargetLowering::LowerVAARG(SDValue Op, SelectionDAG &DAG) const { + llvm_unreachable("unimplemented"); + SDNode *Node = Op.getNode(); + DebugLoc dl = Node->getDebugLoc(); + const Value *V = cast(Node->getOperand(2))->getValue(); + EVT VT = Node->getValueType(0); + SDValue VAList = DAG.getLoad(getPointerTy(), dl, Node->getOperand(0), Node->getOperand(1), MachinePointerInfo(V), false, false, 0); + SDValue Tmp3 = DAG.getNode(ISD::ADD, dl, getPointerTy(), VAList, DAG.getConstant(VT.getSizeInBits(), getPointerTy())); + Tmp3 = DAG.getStore(VAList.getValue(1), dl, Tmp3, Node->getOperand(1), MachinePointerInfo(V), false, false, 0); + return DAG.getLoad(VT, dl, Tmp3, VAList, MachinePointerInfo(), false, false, 0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6371174ad1f20e37b5ff89375670b2574bb2c250 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,7 @@ +SDValue XCoreTargetLowering::LowerVASTART(SDValue Op, SelectionDAG &DAG) const { + DebugLoc dl = Op.getDebugLoc(); + MachineFunction &MF = DAG.getMachineFunction(); + XCoreFunctionInfo *XFI = MF.getInfo(); + SDValue Addr = DAG.getFrameIndex(XFI->getVarArgsFrameIndex(), MVT::i32); + return DAG.getStore(Op.getOperand(0), dl, Addr, Op.getOperand(1), MachinePointerInfo(), false, false, 0); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a1ee15c8b3b2429e290055b06727738ecfdd0e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,30 @@ +enum NodeType { + FIRST_NUMBER = ISD::BUILTIN_OP_END, + BL, + PCRelativeWrapper, + DPRelativeWrapper, + CPRelativeWrapper, + ABS16Wrapper, + LDWSP, + STWSP, + RETSP, + OUTPW, + INPW, + LADD, + LSUB, + LMUL, + MACCU, + MACCS, + BR_JT, + BR_JT32, + FRAME_TO_ARGS_OFFSET, + EH_RETURN, + MEMBARRIER, + RETURN_REG_HOLDER, + STACKSAVE, + STACKRESTORE, + STACKUP, + STACKDOWN, + ALLOCA, + LOOPMARKER +}; diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4fe03b109553d27111a8471ed9b45495d035e21c --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,211 @@ +SDValue XCoreTargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { + SelectionDAG &DAG = DCI.DAG; + DebugLoc dl = N->getDebugLoc(); + switch (N->getOpcode()) { + default: break; + case ISD::INTRINSIC_W_CHAIN: + switch (cast(N->getOperand(1))->getZExtValue()) { + case Intrinsic::xcore_in: { + const SDValue op = N->getOperand(0); + if (isSetPSC(op)) { + if (op->getOperand(2) != N->getOperand(2)) + break; + SDValue Chain = op->getOperand(0); + SDValue Resource = N->getOperand(2); + SDValue Width = op->getOperand(3); + return DAG.getNode(XCoreISD::INPW, dl, + DAG.getVTList(N->getValueType(0), N->getValueType(1)), + Chain, Resource, Width); + } + break; + } + } + break; + case ISD::INTRINSIC_VOID: + switch (cast(N->getOperand(1))->getZExtValue()) { + case Intrinsic::xcore_out: { + const SDValue op = N->getOperand(0); + if (isSetPSC(op)) { + if (op->getOperand(2) != N->getOperand(2)) + break; + SDValue Chain = op->getOperand(0); + SDValue Resource = N->getOperand(2); + SDValue OutVal = N->getOperand(3); + SDValue Width = op->getOperand(3); + return DAG.getNode(XCoreISD::OUTPW, dl, MVT::Other, Chain, Resource, OutVal, Width); + } + break; + } + case Intrinsic::xcore_outt: + case Intrinsic::xcore_outct: + case Intrinsic::xcore_chkct: { + SDValue OutVal = N->getOperand(3); + if (OutVal.hasOneUse()) { + unsigned BitWidth = OutVal.getValueSizeInBits(); + APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 8); + APInt KnownZero, KnownOne; + TargetLowering::TargetLoweringOpt TLO(DAG, !DCI.isBeforeLegalize(), !DCI.isBeforeLegalizeOps()); + const TargetLowering &TLI = DAG.getTargetLoweringInfo(); + if (TLO.ShrinkDemandedConstant(OutVal, DemandedMask) || TLI.SimplifyDemandedBits(OutVal, DemandedMask, KnownZero, KnownOne, TLO)) + DCI.CommitTargetLoweringOpt(TLO); + } + break; + } + case Intrinsic::xcore_setpt: { + SDValue Time = N->getOperand(3); + if (Time.hasOneUse()) { + unsigned BitWidth = Time.getValueSizeInBits(); + APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 16); + APInt KnownZero, KnownOne; + TargetLowering::TargetLoweringOpt TLO(DAG, !DCI.isBeforeLegalize(), !DCI.isBeforeLegalizeOps()); + const TargetLowering &TLI = DAG.getTargetLoweringInfo(); + if (TLO.ShrinkDemandedConstant(Time, DemandedMask) || TLI.SimplifyDemandedBits(Time, DemandedMask, KnownZero, KnownOne, TLO)) + DCI.CommitTargetLoweringOpt(TLO); + } + break; + } + } + break; + case XCoreISD::LADD: { + SDValue N0 = N->getOperand(0); + SDValue N1 = N->getOperand(1); + SDValue N2 = N->getOperand(2); + ConstantSDNode *N0C = dyn_cast(N0); + ConstantSDNode *N1C = dyn_cast(N1); + EVT VT = N0.getValueType(); + if (N0C && !N1C) + return DAG.getNode(XCoreISD::LADD, dl, DAG.getVTList(VT, VT), N1, N0, N2); + if (N0C && N0C->isNullValue() && N1C && N1C->isNullValue()) { + SDValue Carry = DAG.getConstant(0, VT); + SDValue Result = DAG.getNode(ISD::AND, dl, VT, N2, DAG.getConstant(1, VT)); + SDValue Ops [] = { Carry, Result }; + return DAG.getMergeValues(Ops, 2, dl); + } + if (N1C && N1C->isNullValue() && N->hasNUsesOfValue(0, 0)) { + APInt KnownZero, KnownOne; + APInt Mask = APInt::getAllOnesValue(VT.getSizeInBits()); + DAG.ComputeMaskedBits(N2, Mask, KnownZero, KnownOne); + if (~(KnownZero | APInt(VT.getSizeInBits(), 1)) == 0) { + SDValue Carry = DAG.getConstant(0, VT); + SDValue Result = DAG.getNode(ISD::ADD, dl, VT, N0, N2); + SDValue Ops [] = { Carry, Result }; + return DAG.getMergeValues(Ops, 2, dl); + } + } + } + break; + case XCoreISD::LSUB: { + SDValue N0 = N->getOperand(0); + SDValue N1 = N->getOperand(1); + SDValue N2 = N->getOperand(2); + ConstantSDNode *N0C = dyn_cast(N0); + ConstantSDNode *N1C = dyn_cast(N1); + EVT VT = N0.getValueType(); + if (N0C && N0C->isNullValue() && N1C && N1C->isNullValue()) { + APInt KnownZero, KnownOne; + APInt Mask = APInt::getAllOnesValue(VT.getSizeInBits()); + DAG.ComputeMaskedBits(N2, Mask, KnownZero, KnownOne); + if (~(KnownZero | APInt(VT.getSizeInBits(), 1)) == 0) { + SDValue Borrow = N2; + SDValue Result = DAG.getNode(ISD::SUB, dl, MVT::i32, DAG.getConstant(0, MVT::i32), N2); + SDValue Ops [] = { Borrow, Result }; + return DAG.getMergeValues(Ops, 2, dl); + } + } + if (N1C && N1C->isNullValue() && N->hasNUsesOfValue(0, 0)) { + APInt KnownZero, KnownOne; + APInt Mask = APInt::getAllOnesValue(VT.getSizeInBits()); + DAG.ComputeMaskedBits(N2, Mask, KnownZero, KnownOne); + if (~(KnownZero | APInt(VT.getSizeInBits(), 1)) == 0) { + SDValue Borrow = DAG.getConstant(0, VT); + SDValue Result = DAG.getNode(ISD::SUB, dl, VT, N0, N2); + SDValue Ops [] = { Borrow, Result }; + return DAG.getMergeValues(Ops, 2, dl); + } + } + } + break; + case XCoreISD::LMUL: { + SDValue N0 = N->getOperand(0); + SDValue N1 = N->getOperand(1); + SDValue N2 = N->getOperand(2); + SDValue N3 = N->getOperand(3); + ConstantSDNode *N0C = dyn_cast(N0); + ConstantSDNode *N1C = dyn_cast(N1); + EVT VT = N0.getValueType(); + if ((N0C && !N1C) || (N0C && N1C && N0C->getZExtValue() < N1C->getZExtValue())) + return DAG.getNode(XCoreISD::LMUL, dl, DAG.getVTList(VT, VT), N1, N0, N2, N3); + if (N1C && N1C->isNullValue()) { + if (N->hasNUsesOfValue(0, 0)) { + SDValue Lo = DAG.getNode(ISD::ADD, dl, VT, N2, N3); + SDValue Ops [] = { Lo, Lo }; + return DAG.getMergeValues(Ops, 2, dl); + } + return DAG.getNode(XCoreISD::LADD, dl, DAG.getVTList(VT, VT), N2, N3, N1); + } + ConstantSDNode *N2C = dyn_cast(N2); + ConstantSDNode *N3C = dyn_cast(N3); + if (N2C && N3C && N->hasNUsesOfValue(0, 0)) { + SDValue Mul = DAG.getNode(ISD::MUL, dl, VT, N0, N1); + SDValue AddRHS = DAG.FoldConstantArithmetic(ISD::ADD, VT, N2C, N3C); + SDValue Add = DAG.getNode(ISD::ADD, dl, VT, Mul, AddRHS); + SDValue Ops [] = { Add, Add }; + return DAG.getMergeValues(Ops, 2, dl); + } + if (N2C && N3C) + return DAG.getNode(XCoreISD::LMUL, dl, DAG.getVTList(VT, VT), N0, N1, N3, N2); + if (N3C && N3C->isNullValue() && N->hasNUsesOfValue(0, 0)) { + SDValue Mul = DAG.getNode(ISD::MUL, dl, VT, N0, N1); + SDValue Add = DAG.getNode(ISD::ADD, dl, VT, Mul, N2); + SDValue Ops [] = { Add, Add }; + return DAG.getMergeValues(Ops, 2, dl); + } + } + break; + case ISD::ADD: { + SDValue Mul0, Mul1, Addend0, Addend1; +#if 0 + if (N->getValueType(0) == MVT::i32 && isADDADDMUL(SDValue(N, 0), Mul0, Mul1, Addend0, Addend1, true)) { + SDValue Zero = DAG.getConstant(0, MVT::i32); + SDValue Ignored = DAG.getNode(XCoreISD::LMUL, dl, DAG.getVTList(MVT::i32, MVT::i32), Mul0, Mul1, Addend0, Addend1); + SDValue Result(Ignored.getNode(), 1); + return Result; + } +#endif + APInt HighMask = APInt::getHighBitsSet(64, 32); + if (N->getValueType(0) == MVT::i64 && isADDADDMUL(SDValue(N, 0), Mul0, Mul1, Addend0, Addend1, false) && DAG.MaskedValueIsZero(Mul0, HighMask) && DAG.MaskedValueIsZero(Mul1, HighMask) && DAG.MaskedValueIsZero(Addend0, HighMask) && DAG.MaskedValueIsZero(Addend1, HighMask)) { + SDValue Mul0L = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Mul0, DAG.getConstant(0, MVT::i32)); + SDValue Mul1L = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Mul1, DAG.getConstant(0, MVT::i32)); + SDValue Addend0L = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Addend0, DAG.getConstant(0, MVT::i32)); + SDValue Addend1L = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Addend1, DAG.getConstant(0, MVT::i32)); + SDValue Hi = DAG.getNode(XCoreISD::LMUL, dl, DAG.getVTList(MVT::i32, MVT::i32), Mul0L, Mul1L, Addend0L, Addend1L); + SDValue Lo(Hi.getNode(), 1); + return DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, Lo, Hi); + } + } + break; + case ISD::STORE: { + StoreSDNode *ST = cast(N); + if (!DCI.isBeforeLegalize() || allowsUnalignedMemoryAccesses(ST->getMemoryVT()) || ST->isVolatile() || ST->isIndexed()) { + break; + } + SDValue Chain = ST->getChain(); + unsigned StoreBits = ST->getMemoryVT().getStoreSizeInBits(); + if (StoreBits % 8) { + break; + } + unsigned ABIAlignment = getTargetData()->getABITypeAlignment(ST->getMemoryVT().getTypeForEVT(*DCI.DAG.getContext())); + unsigned Alignment = ST->getAlignment(); + if (Alignment >= ABIAlignment) { + break; + } + if (LoadSDNode *LD = dyn_cast(ST->getValue())) { + if (LD->hasNUsesOfValue(1, 0) && ST->getMemoryVT() == LD->getMemoryVT() && LD->getAlignment() == Alignment && !LD->isVolatile() && !LD->isIndexed() && Chain.reachesChainWithoutSideEffects(SDValue(LD, 1))) { + return DAG.getMemmove(Chain, dl, ST->getBasePtr(), LD->getBasePtr(), DAG.getConstant(StoreBits/8, MVT::i32), Alignment, false, ST->getPointerInfo(), LD->getPointerInfo()); + } + } + break; + } + } + return SDValue(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e2fa8425501ba6638136e12a8901efee0df4c33 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,11 @@ +void XCoreTargetLowering::ReplaceNodeResults(SDNode *N, SmallVectorImpl&Results, SelectionDAG &DAG) const { + switch (N->getOpcode()) { + default: + llvm_unreachable("Don't know how to custom expand this!"); + return; + case ISD::ADD: + case ISD::SUB: + Results.push_back(ExpandADDSUB(N, DAG)); + return; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6b970bf50533c78ff8eb44151f8591a567f1f66 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,67 @@ +XCoreTargetLowering::XCoreTargetLowering(XCoreTargetMachine &XTM) : TargetLowering(XTM, new XCoreTargetObjectFile()), TM(XTM), Subtarget(*XTM.getSubtargetImpl()) { + addRegisterClass(MVT::i32, XCore::GRRegsRegisterClass); + computeRegisterProperties(); + setIntDivIsCheap(false); + setStackPointerRegisterToSaveRestore(XCore::SP); + setSchedulingPreference(Sched::RegPressure); + setBooleanContents(ZeroOrOneBooleanContent); + setBooleanVectorContents(ZeroOrOneBooleanContent); + setOperationAction(ISD::BR_CC, MVT::Other, Expand); + setOperationAction(ISD::SELECT_CC, MVT::i32, Custom); + setOperationAction(ISD::ADDC, MVT::i32, Expand); + setOperationAction(ISD::ADDE, MVT::i32, Expand); + setOperationAction(ISD::SUBC, MVT::i32, Expand); + setOperationAction(ISD::SUBE, MVT::i32, Expand); + setOperationAction(ISD::SELECT_CC, MVT::Other, Expand); + setOperationAction(ISD::ADD, MVT::i64, Custom); + setOperationAction(ISD::SUB, MVT::i64, Custom); + setOperationAction(ISD::SMUL_LOHI, MVT::i32, Custom); + setOperationAction(ISD::UMUL_LOHI, MVT::i32, Custom); + setOperationAction(ISD::MULHS, MVT::i32, Expand); + setOperationAction(ISD::MULHU, MVT::i32, Expand); + setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRA_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::CTPOP, MVT::i32, Expand); + setOperationAction(ISD::ROTL , MVT::i32, Expand); + setOperationAction(ISD::ROTR , MVT::i32, Expand); + setOperationAction(ISD::TRAP, MVT::Other, Legal); + setOperationAction(ISD::BR_JT, MVT::Other, Custom); + setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); + setOperationAction(ISD::BlockAddress, MVT::i32 , Custom); + setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom); + setOperationAction(ISD::ConstantPool, MVT::i32, Custom); + setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i8, Expand); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i16, Expand); + setOperationAction(ISD::LOAD, MVT::i32, Custom); + setOperationAction(ISD::STORE, MVT::i32, Custom); + setOperationAction(ISD::FRAME_TO_ARGS_OFFSET, MVT::i32, Custom); + setOperationAction(ISD::VAEND, MVT::Other, Expand); + setOperationAction(ISD::VACOPY, MVT::Other, Expand); + setOperationAction(ISD::VAARG, MVT::Other, Custom); + setOperationAction(ISD::VASTART, MVT::Other, Custom); + setOperationAction(ISD::STACKSAVE, MVT::Other, Custom); + setOperationAction(ISD::STACKRESTORE, MVT::Other, Custom); + setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Custom); + setOperationAction(ISD::EXCEPTIONADDR, MVT::i32, Expand); + setOperationAction(ISD::EHSELECTION, MVT::i32, Expand); + setOperationAction(ISD::EH_RETURN, MVT::Other, Custom); + setExceptionPointerRegister(XCore::R0); + setExceptionSelectorRegister(XCore::R1); + setOperationAction(ISD::ATOMIC_FENCE, MVT::Other, Custom); + setOperationAction(ISD::INIT_TRAMPOLINE, MVT::Other, Custom); + setOperationAction(ISD::ADJUST_TRAMPOLINE, MVT::Other, Custom); + maxStoresPerMemset = maxStoresPerMemsetOptSize = 4; + maxStoresPerMemmove = maxStoresPerMemmoveOptSiz = maxStoresPerMemcpy = maxStoresPerMemcpyOptSize = 2; + benefitFromCodePlacementOpt = true; + setTargetDAGCombine(ISD::STORE); + setTargetDAGCombine(ISD::ADD); + setTargetDAGCombine(ISD::INTRINSIC_VOID); + setTargetDAGCombine(ISD::INTRINSIC_W_CHAIN); + setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom); + setMinFunctionAlignment(1); + setPrefFunctionAlignment(2); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a6a6a59496007195bb1f7b7e2615c40a9c9837f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp @@ -0,0 +1,32 @@ +void XCoreTargetLowering::computeMaskedBitsForTargetNode(const SDValue Op, const APInt &Mask, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, unsigned Depth) const { + KnownZero = KnownOne = APInt(Mask.getBitWidth(), 0); + switch (Op.getOpcode()) { + default: break; + case XCoreISD::LADD: + case XCoreISD::LSUB: + if (Op.getResNo() == 0) { + KnownZero = APInt::getHighBitsSet(Mask.getBitWidth(),Mask.getBitWidth() - 1); + } + break; + case ISD::INTRINSIC_W_CHAIN: { + unsigned IntNo = cast(Op.getOperand(1))->getZExtValue(); + switch (IntNo) { + case Intrinsic::xcore_int: + case Intrinsic::xcore_inct: + KnownZero = APInt::getHighBitsSet(Mask.getBitWidth(), Mask.getBitWidth() - 8); + break; + case Intrinsic::xcore_testct: + KnownZero = APInt::getHighBitsSet(Mask.getBitWidth(), Mask.getBitWidth() - 1); + break; + case Intrinsic::xcore_testwct: + KnownZero = APInt::getHighBitsSet(Mask.getBitWidth(), Mask.getBitWidth() - 3); + break; + case Intrinsic::xcore_getts: + KnownZero = APInt::getHighBitsSet(Mask.getBitWidth(), Mask.getBitWidth() - 16); + break; + } + } + break; + } + KnownZero &= Mask; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/enum NodeType.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/enum NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7dbfada60499fd466d80b554df14092a07c7992f --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/enum NodeType.cpp @@ -0,0 +1,26 @@ +enum NodeType { + ISD::ADD, + ISD::SUB, + ISD::MUL, + ISD::SDIV, + ISD::UDIV, + ISD::SREM, + ISD::UREM, + ISD::SMUL_LOHI, + ISD::UMUL_LOHI, + ISD::SDIVREM, + ISD::UDIVREM, + ISD::AND, + ISD::OR, + ISD::XOR, + ISD::SHL, + ISD::SRA, + ISD::SRL, + ISD::CTLZ, + ISD::CTLZ_ZERO_UNDEF, + ISD::CTTZ, + ISD::CTTZ_ZERO_UNDEF, + ISD::CTPOP, + ISD::SELECT, + ISD::SELECT_CC, +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb0be2290182886ca5cafde35b5b3f4ec6b7bbf2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp @@ -0,0 +1,3 @@ +unsigned XCoreTargetLowering::getJumpTableEncoding() const { + return MachineJumpTableInfo::EK_Inline; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4001e7e59af509ba2ee14f220400970fa5224c72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,13 @@ +std::pair XCoreTargetLowering::getRegForInlineAsmConstraint(const std::string &Constraint, EVT VT) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default : + break; + case 'r': + if (VT.getSizeInBits() <= 32) { + return std::make_pair(0U, XCore::GRRegsRegisterClass); + } + } + } + return TargetLowering::getRegForInlineAsmConstraint(Constraint, VT); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89dc8c9c1c2cda3be8fa11e4ff697346590dd063 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp @@ -0,0 +1,3 @@ +virtual MVT getShiftAmountTy(EVT LHSTy) const { + return MVT::i32; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31a988e9d6ac50c53966dce12aa3a58bbbffebf1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,46 @@ +const char *XCoreTargetLowering::getTargetNodeName(unsigned Opcode) const { + switch (Opcode) { + case XCoreISD::BL : + return "XCoreISD::BL"; + case XCoreISD::PCRelativeWrapper : + return "XCoreISD::PCRelativeWrapper"; + case XCoreISD::DPRelativeWrapper : + return "XCoreISD::DPRelativeWrapper"; + case XCoreISD::CPRelativeWrapper : + return "XCoreISD::CPRelativeWrapper"; + case XCoreISD::ABS16Wrapper : + return "XCoreISD::ABS16Wrapper"; + case XCoreISD::LDWSP : + return "XCoreISD::LDWSP"; + case XCoreISD::STWSP : + return "XCoreISD::STWSP"; + case XCoreISD::RETSP : + return "XCoreISD::RETSP"; + case XCoreISD::LADD : + return "XCoreISD::LADD"; + case XCoreISD::OUTPW : + return "XCoreISD::OUTPW"; + case XCoreISD::INPW : + return "XCoreISD::INPW"; + case XCoreISD::LSUB : + return "XCoreISD::LSUB"; + case XCoreISD::LMUL : + return "XCoreISD::LMUL"; + case XCoreISD::MACCU : + return "XCoreISD::MACCU"; + case XCoreISD::MACCS : + return "XCoreISD::MACCS"; + case XCoreISD::BR_JT : + return "XCoreISD::BR_JT"; + case XCoreISD::BR_JT32 : + return "XCoreISD::BR_JT32"; + case XCoreISD::FRAME_TO_ARGS_OFFSET : + return "XCoreISD::FRAME_TO_ARGS_OFFSET"; + case XCoreISD::EH_RETURN : + return "XCoreISD::EH_RETURN"; + case XCoreISD::MEMBARRIER : + return "XCoreISD::MEMBARRIER"; + default : + return NULL; + } +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d49ed42164af8d1d5fc83b341e857d7d24d2ea6e --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1,3 @@ +bool XCoreTargetLowering::isLegalAddImmediate(int64_t Imm) const { + return isImmUs(Imm) || isImmUs4(Imm) || isImmUs(-Imm) || isImmUs4(-Imm); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a52d819ba2f3415709b2ea7e1a31ba114f4a70a --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,28 @@ +bool XCoreTargetLowering::isLegalAddressingMode(const AddrMode &AM, Type *Ty) const { + if (Ty->getTypeID() == Type::VoidTyID) + return AM.Scale == 0 && isImmUs(AM.BaseOffs) && isImmUs4(AM.BaseOffs); + const TargetData *TD = TM.getTargetData(); + unsigned Size = TD->getTypeAllocSize(Ty); + if (AM.BaseGV) { + return Size >= 4 && !AM.HasBaseReg && AM.Scale == 0 && AM.BaseOffs%4 == 0; + } + switch (Size) { + case 1: + if (AM.Scale == 0) { + return isImmUs(AM.BaseOffs); + } + return AM.Scale == 1 && AM.BaseOffs == 0; + case 2: + case 3: + if (AM.Scale == 0) { + return isImmUs2(AM.BaseOffs); + } + return AM.Scale == 2 && AM.BaseOffs == 0; + default: + if (AM.Scale == 0) { + return isImmUs4(AM.BaseOffs); + } + return AM.Scale == 4 && AM.BaseOffs == 0; + } + return false; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bbf90dc1c01680efb3151e7def7fbe0cf9cfea1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1,3 @@ +bool XCoreTargetLowering::isLegalICmpImmediate(int64_t Imm) const { + return val >= 0 && val <= 11; +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fdf851619a2023d364c88e468a8e10f94ea80e81 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp @@ -0,0 +1,14 @@ +SDValue XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const { + unsigned SizeBitWidth = Size.getValueType().getSizeInBits(); + if ((Align & 3) == 0 && DAG.MaskedValueIsZero(Size, APInt(SizeBitWidth, 3))) { + TargetLowering::ArgListTy Args; + TargetLowering::ArgListEntry Entry; + Entry.Ty = TLI.getTargetData()->getIntPtrType(*DAG.getContext()); + Entry.Node = Dst; Args.push_back(Entry); + Entry.Node = Src; Args.push_back(Entry); + Entry.Node = Size; Args.push_back(Entry); + std::pair CallResult = TLI.LowerCallTo(Chain, Type::getVoidTy(*DAG.getContext()), false, false, false, false, 0, TLI.getLibcallCallingConv(RTLIB::MEMCPY), false, false, DAG.getExternalSymbol("__memcpy_4", TLI.getPointerTy()), Args, DAG, dl); + return CallResult.second; + } + return SDValue(); +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fde8beca3c06603dc51017ae842a289c990b8256 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp @@ -0,0 +1,2 @@ +XCoreSelectionDAGInfo::XCoreSelectionDAGInfo(const XCoreTargetMachine &TM) : TargetSelectionDAGInfo(TM), TLI(*TM.getTargetLowering()) { +} diff --git a/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e44e6f5cc19eabbc12d2f5562eaaf1408446aac3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/Std_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp @@ -0,0 +1,2 @@ +XCoreSelectionDAGInfo::~XCoreSelectionDAGInfo() { +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca18419a68e985917f1941d9a6aa0abcd34bda5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterBankInfo/RegisterBankInfo.cpp @@ -0,0 +1,2 @@ +PULPRegisterBankInfo :: PULPRegisterBankInfo ( const TargetRegisterInfo & TRI ) : PULPGenRegisterBankInfo ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f7a6be1e26ce148d5ad1febda8375ba27379912 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +PULPRegisterInfo :: PULPRegisterInfo ( unsigned HwMode ) : PULPGenRegisterInfo ( PULP :: X1 , 0 , 0 , 0 , HwMode ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..307ce8d4f6e49a2cfeee5b0a365a56ed4b6f4ac5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,23 @@ +void PULPRegisterInfo :: eliminateFrameIndex ( MachineBasicBlock :: iterator II , int SPAdj , unsigned FIOperandNum , RegScavenger * RS ) const { +assert ( SPAdj == 0 && "Unexpected non-zero SPAdj value" ) ; +MachineInstr & MI = * II ; +MachineFunction & MF = * MI . getParent ( ) -> getParent ( ) ; +MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; +DebugLoc DL = MI . getDebugLoc ( ) ; +const TargetFrameLowering * TFI = MF . getTarget ( ) . getFrameLowering ( ) ; +DebugLoc dl = MI . getDebugLoc ( ) ; +int FrameIndex = MI . getOperand ( FIOperandNum ) . getIndex ( ) ; +Register FrameReg ; +int Offset = getFrameLowering ( MF ) -> getFrameIndexReference ( MF , FrameIndex , FrameReg ) + MI . getOperand ( FIOperandNum + 1 ) . getImm ( ) ; +if ( ! isInt < 16 > ( Offset ) ) { +report_fatal_error ( "Frame offsets outside of the signed 16-bit range not supported" ) ; +} +MachineBasicBlock & MBB = * MI . getParent ( ) ; +unsigned DstReg = MI . getOperand ( 0 ) . getReg ( ) ; +int64_t spOffset = MF . getFrameInfo ( ) -> getObjectOffset ( frameIndex ) ; +bool FrameRegIsKill = true ; +int64_t Offset = spOffset + ( int64_t ) stackSize ; +MI . getOperand ( FIOperandNum ) . ChangeToRegister ( FrameReg , false , false , FrameRegIsKill ) ; +MI . getOperand ( FIOperandNum + 1 ) . ChangeToImmediate ( Offset ) ; +MI . getOperand ( OffsetOperandNo ) . ChangeToImmediate ( Offset ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be0593e6471d5d2691d585d75e4305f6d2fb6c72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getCallPreservedMask.cpp @@ -0,0 +1,24 @@ +const uint32_t * PULPRegisterInfo :: getCallPreservedMask ( const MachineFunction & MF , CallingConv :: ID CC ) const { +if ( CC == CallingConv :: GHC ) { +return CSR_NoRegs_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_ILP32 ) { +return CSR_ILP32_LP64_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_LP64 ) { +return CSR_ILP32_LP64_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_ILP32F ) { +return CSR_ILP32F_LP64F_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_LP64F ) { +return CSR_ILP32F_LP64F_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_ILP32D ) { +return CSR_ILP32D_LP64D_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_LP64D ) { +return CSR_ILP32D_LP64D_RegMask ; +} +llvm_unreachable ( "Unrecognized ABI" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2156dab6de93e1e71c3b2d17d5c9ca42067adc22 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,34 @@ +const MCPhysReg * PULPRegisterInfo :: getCalleeSavedRegs ( const MachineFunction * MF ) const { +auto & Subtarget = MF -> getSubtarget < PULPSubtarget > ( ) ; +if ( MF -> getFunction ( ) . getCallingConv ( ) == CallingConv :: GHC ) { +return CSR_NoRegs_SaveList ; +} +if ( MF -> getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +if ( Subtarget . hasStdExtD ( ) ) { +return CSR_XLEN_F64_Interrupt_SaveList ; +} +if ( Subtarget . hasStdExtF ( ) ) { +return CSR_XLEN_F32_Interrupt_SaveList ; +} +return CSR_Interrupt_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_ILP32 ) { +return CSR_ILP32_LP64_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_LP64 ) { +return CSR_ILP32_LP64_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_ILP32F ) { +return CSR_ILP32F_LP64F_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_LP64F ) { +return CSR_ILP32F_LP64F_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_ILP32D ) { +return CSR_ILP32D_LP64D_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == PULPABI :: ABI_LP64D ) { +return CSR_ILP32D_LP64D_SaveList ; +} +llvm_unreachable ( "Unrecognized ABI" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c88ca259851f992789d6f892eac0cc9055492291 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,4 @@ +Register PULPRegisterInfo :: getFrameRegister ( const MachineFunction & MF ) const { +const TargetFrameLowering * TFI = getFrameLowering ( MF ) ; +return TFI -> hasFP ( MF ) ? PULP :: X8 : PULP :: X2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ecd2035925c4a09d22874b22b444b8aa7977c9d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getNoPreservedMask.cpp @@ -0,0 +1,3 @@ +const uint32_t * PULPRegisterInfo :: getNoPreservedMask ( ) const { +return CSR_NoRegs_RegMask ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf50717cae939db934a1465be403f4a2831c7088 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getPointerRegClass.cpp @@ -0,0 +1,3 @@ +const TargetRegisterClass * getPointerRegClass ( const MachineFunction & MF , unsigned Kind = 0 ) const override { +return & PULP :: GPRRegClass ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b4ea25e86abc3e5bc463257c0e2de0b4eff81b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,25 @@ +BitVector PULPRegisterInfo :: getReservedRegs ( const MachineFunction & MF ) const { +const PULPFrameLowering * TFI = getFrameLowering ( MF ) ; +BitVector Reserved ( getNumRegs ( ) ) ; +for ( size_t Reg = 0 ; Reg < getNumRegs ( ) ; Reg ++ ) { +if ( MF . getSubtarget < PULPSubtarget > ( ) . isRegisterReservedByUser ( Reg ) ) { +markSuperRegs ( Reserved , Reg ) ; +} +} +if ( TFI -> hasBP ( MF ) ) { +markSuperRegs ( Reserved , PULP :: X9 ) ; +} +if ( TFI -> hasFP ( MF ) ) { +markSuperRegs ( Reserved , PULP :: X8 ) ; +} +markSuperRegs ( Reserved , PULP :: X0 ) ; +markSuperRegs ( Reserved , PULP :: X2 ) ; +markSuperRegs ( Reserved , PULP :: X3 ) ; +markSuperRegs ( Reserved , PULP :: X4 ) ; +markSuperRegs ( Reserved , PULP :: VL ) ; +markSuperRegs ( Reserved , PULP :: VTYPE ) ; +markSuperRegs ( Reserved , PULP :: VXSAT ) ; +markSuperRegs ( Reserved , PULP :: VXRM ) ; +assert ( checkAllSuperRegsMarked ( Reserved ) ) ; +return Reserved ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..17a7cdd240c417d73bb23373a6b756a50fffb5ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/hasReservedSpillSlot.cpp @@ -0,0 +1,6 @@ +bool PULPRegisterInfo :: hasReservedSpillSlot ( const MachineFunction & MF , Register Reg , int & FrameIdx ) const { +const auto * FI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +FrameIdx = FI -> getCRSpillFrameIndex ( ) ; +return true ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e1192ca89d9b62c31d6f5f45ae5a75a61719043e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/isAsmClobberable.cpp @@ -0,0 +1,3 @@ +bool PULPRegisterInfo :: isAsmClobberable ( const MachineFunction & MF , MCRegister PhysReg ) const { +return ! MF . getSubtarget < PULPSubtarget > ( ) . isRegisterReservedByUser ( PhysReg ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f2659261a3ed52e1f1f41d6308ee4acbee02c2af --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/isConstantPhysReg.cpp @@ -0,0 +1,5 @@ +bool PULPRegisterInfo :: isConstantPhysReg ( MCRegister PhysReg ) const { +if ( PhysReg == PULP :: X0 ) { +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91452a8e068d51b582b56820d11be174835fb85a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresFrameIndexScavenging ( const MachineFunction & MF ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be9254bdaf75d4ec168e9353281ffdaf92a1c0f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresRegisterScavenging ( const MachineFunction & MF ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/AsmParser.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/AsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0017bb8cee827c4d9e7f9c482e3a45fda5e2ef7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/AsmParser.cpp @@ -0,0 +1,7 @@ +PULPAsmParser ( const MCSubtargetInfo & STI , MCAsmParser & Parser , const MCInstrInfo & MII , const MCTargetOptions & Options ) : MCTargetAsmParser ( Options , STI , MII ) { +Parser . addAliasForDirective ( ".half" , ".2byte" ) ; +Parser . addAliasForDirective ( ".hword" , ".2byte" ) ; +Parser . addAliasForDirective ( ".word" , ".4byte" ) ; +Parser . addAliasForDirective ( ".dword" , ".8byte" ) ; +setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/KindTy.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/KindTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26577a75b88d8eaab0fd8482d40f85ef7b9af5c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/KindTy.cpp @@ -0,0 +1,7 @@ +enum class KindTy { +Token , +Register , +Immediate , +SystemRegister , +VType , +} Kind ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a3e735c7d1f1f07a6b445e4d144c76ad599147f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/LLVMInitializeAsmParser.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePULPAsmParser ( ) { +RegisterMCAsmParser < PULPAsmParser > X ( getThePULP32Target ( ) ) ; +RegisterMCAsmParser < PULPAsmParser > Y ( getThePULP64Target ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9bfecaa8c93ebc754d2d55ac753934158fe2c809 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/MatchAndEmitInstruction.cpp @@ -0,0 +1,166 @@ +bool PULPAsmParser :: MatchAndEmitInstruction ( SMLoc IDLoc , unsigned & Opcode , OperandVector & Operands , MCStreamer & Out , uint64_t & ErrorInfo , bool MatchingInlineAsm ) { +MCInst Inst ; +FeatureBitset MissingFeatures ; +auto Result = MatchInstructionImpl ( Operands , Inst , ErrorInfo , MissingFeatures , MatchingInlineAsm ) ; +if ( Result == Match_Success ) { +if ( validateInstruction ( Inst , Operands ) ) { +return true ; +} +return processInstruction ( Inst , IDLoc , Operands , Out ) ; +} +if ( Result == Match_MissingFeature ) { +assert ( MissingFeatures . any ( ) && "Unknown missing features!" ) ; +bool FirstFeature = true ; +std :: string Msg = "instruction requires the following:" ; +for ( unsigned i = 0 , e = MissingFeatures . size ( ) ; i != e ; ++ i ) { +if ( MissingFeatures [ i ] ) { +Msg = Msg + FirstFeature ? " " : ", " ; +Msg = Msg + getSubtargetFeatureName ( i ) ; +FirstFeature = false ; +} +} +return Error ( IDLoc , Msg ) ; +} +if ( Result == Match_MnemonicFail ) { +FeatureBitset FBS = ComputeAvailableFeatures ( getSTI ( ) . getFeatureBits ( ) ) ; +std :: string Suggestion = PULPMnemonicSpellCheck ( ( ( PULPOperand & ) * Operands [ 0 ] ) . getToken ( ) , FBS ) ; +return Error ( IDLoc , "unrecognized instruction mnemonic" + Suggestion ) ; +} +if ( Result == Match_InvalidOperand ) { +SMLoc ErrorLoc = IDLoc ; +if ( ErrorInfo != ~ 0ULL ) { +if ( ErrorInfo >= Operands . size ( ) ) { +return Error ( ErrorLoc , "too few operands for instruction" ) ; +} +ErrorLoc = ( ( PULPOperand & ) * Operands [ ErrorInfo ] ) . getStartLoc ( ) ; +if ( ErrorLoc == SMLoc ( ) ) { +ErrorLoc = IDLoc ; +} +} +return Error ( ErrorLoc , "invalid operand for instruction" ) ; +} +if ( Result > FIRST_TARGET_MATCH_RESULT_TY ) { +SMLoc ErrorLoc = IDLoc ; +if ( ErrorInfo != ~ 0ULL ) { +if ( ErrorInfo >= Operands . size ( ) ) { +return Error ( ErrorLoc , "too few operands for instruction" ) ; +} +} +} +if ( Result == Match_RequiresMsbNotLessThanLsb ) { +SMLoc ErrorStart = Operands [ 3 ] -> getStartLoc ( ) ; +return Error ( ErrorStart , "msb is less than lsb" , SMRange ( ErrorStart , Operands [ 4 ] -> getEndLoc ( ) ) ) ; +} +if ( Result == Match_RequiresOpnd2NotR0R1 ) { +return Error ( Operands [ 2 ] -> getStartLoc ( ) , "must not be $r0 or $r1" ) ; +} +if ( Result == Match_InvalidUImm2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 2 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm2plus1 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 1 , ( 1 << 2 ) ) ; +} +if ( Result == Match_InvalidUImm3 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 3 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm5 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 5 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm6 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 6 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 12 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm14lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 15 ) , ( 1 << 15 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 15 ) , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm20 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 19 ) , ( 1 << 19 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm21lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 22 ) , ( 1 << 22 ) - 4 , "immediate must be a multiple of 4 in the range" ) +} +if ( Result == Match_InvalidSImm21lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 22 ) , ( 1 << 22 ) - 4 , "immediate must be a multiple of 4 in the range" ) +} +if ( Result == Match_InvalidSImm21lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 22 ) , ( 1 << 22 ) - 4 , "immediate must be a multiple of 4 in the range" ) +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +llvm_unreachable ( "Unknown match type detected!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/Operand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce94f6645440d76acc5f23ab1503004b60fc5420 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/Operand.cpp @@ -0,0 +1,2 @@ +PULPOperand ( KindTy K ) : MCParsedAsmOperand ( ) , Kind ( K ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/Operand2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/Operand2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70ba022fc2b134b42d034a1741b9aa26ddfb703c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/Operand2.cpp @@ -0,0 +1,16 @@ +PULPOperand ( const PULPOperand & o ) : MCParsedAsmOperand ( ) { +Kind = o . Kind ; +StartLoc = o . StartLoc ; +EndLoc = o . EndLoc ; +if ( Kind == KindTy :: Register ) { +Reg = o . Reg ; +} +if ( Kind == KindTy :: Immediate ) { +} +if ( Kind == KindTy :: Token ) { +} +if ( Kind == KindTy :: SystemRegister ) { +} +if ( Kind == KindTy :: VType ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseDirective.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseDirective.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e22d15c41e72b806be78ef863416ed43f676feb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseDirective.cpp @@ -0,0 +1,10 @@ +bool PULPAsmParser :: ParseDirective ( AsmToken DirectiveID ) { +StringRef IDVal = DirectiveID . getString ( ) ; +if ( IDVal == ".option" ) { +return ParseDirectiveHSACodeObjectVersion ( ) ; +} +if ( IDVal == ".attribute" ) { +return ParseDirectiveHSACodeObjectISA ( ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40144f83d01c812e44b6add5ce186e4ced84a079 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseInstruction.cpp @@ -0,0 +1,22 @@ +bool PULPAsmParser :: ParseInstruction ( ParseInstructionInfo & Info , StringRef Name , SMLoc NameLoc , OperandVector & Operands ) { +Operands . push_back ( PULPOperand :: createToken ( Name , NameLoc ) ) ; +if ( getLexer ( ) . is ( AsmToken :: EndOfStatement ) ) { +return false ; +} +if ( parseOperand ( Operands ) ) { +return true ; +} +for ( ; getLexer ( ) . is ( AsmToken :: Comma ) ; ) { +getLexer ( ) . Lex ( ) ; +if ( parseOperand ( Operands ) ) { +return true ; +} +} +if ( getLexer ( ) . isNot ( AsmToken :: EndOfStatement ) ) { +SMLoc Loc = getLexer ( ) . getLoc ( ) ; +getParser ( ) . eatToEndOfStatement ( ) ; +return Error ( Loc , "unexpected token" ) ; +} +getParser ( ) . Lex ( ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4de8738cec50d419e8f4d8802ba124cb359c253 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/ParseRegister.cpp @@ -0,0 +1,6 @@ +bool PULPAsmParser :: ParseRegister ( unsigned & RegNo , SMLoc & StartLoc , SMLoc & EndLoc ) { +if ( tryParseRegister ( RegNo , StartLoc , EndLoc ) != MatchOperand_Success ) { +return Error ( StartLoc , "invalid register name" ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b014312f9d2f313df503bedb185eeb4e023460b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp @@ -0,0 +1,4 @@ +void addCSRSystemRegisterOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createImm ( SysReg . Encoding ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18dcad2acd83890c6545765b065c6ccd1b36bb80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addExpr.cpp @@ -0,0 +1,12 @@ +void addExpr ( MCInst & Inst , const MCExpr * Expr ) const { +assert ( Expr && "Expr shouldn't be null!" ) ; +int64_t Imm = 0 ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +bool IsConstant = evaluateConstantImm ( Expr , Imm , VK ) ; +if ( IsConstant ) { +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +} +if ( ! IsConstant ) { +Inst . addOperand ( MCOperand :: createExpr ( Expr ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1c7cefcbc2a13fab240d8157c57ba776c7be3f75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addFRMArgOperands.cpp @@ -0,0 +1,4 @@ +void addFRMArgOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createImm ( getRoundingMode ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..49d00e2a6d268ba6e0c27bf10807fbc11e780b1d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addFenceArgOperands.cpp @@ -0,0 +1,6 @@ +void addFenceArgOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +const MCConstantExpr * CE = cast < MCConstantExpr > ( getImm ( ) ) ; +unsigned RegNum = getCondCode ( ) == PULPCC :: AL ? 0 : PULP :: CPSR ; +Inst . addOperand ( MCOperand :: createReg ( RegNum ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addImmOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addImmOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8eba21454fa5e4a4bfc9ff898d4e04daf6f0ea8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addImmOperands.cpp @@ -0,0 +1,4 @@ +void addImmOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +addExpr ( Inst , getImm ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addRegOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addRegOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b214ebb9cbbf9f71b9975893c8d9359e39b9d067 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addRegOperands.cpp @@ -0,0 +1,4 @@ +void addRegOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createReg ( getReg ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3348483b699c85655a59ab63bb64559976801bd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/addVTypeIOperands.cpp @@ -0,0 +1,4 @@ +void addVTypeIOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createImm ( getVType ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e244a5b2712defef72cfb2824676727587990875 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/classifySymbolRef.cpp @@ -0,0 +1,20 @@ +bool PULPAsmParser :: classifySymbolRef ( const MCExpr * Expr , MCExpr :: VariantKind & Kind , ) { +Addend = 0 ; +if ( const PULPMCExpr * AE = dyn_cast < PULPMCExpr > ( Expr ) ) { +ELFRefKind = AE -> getKind ( ) ; +Expr = AE -> getSubExpr ( ) ; +} +if ( SE ) { +return true ; +MCValue Res ; +bool Relocatable = Expr -> evaluateAsRelocatable ( Res , nullptr , nullptr ) ; +if ( ! Relocatable ) { +return false ; +} +if ( ! Res . getSymA ( ) ) { +return false ; +if ( Res . getSymB ( ) ) { +return false ; +Addend = Res . getConstant ( ) ; +return ELFRefKind == PULPMCExpr :: VK_INVALID || DarwinRefKind == MCSymbolRefExpr :: VK_PULP_None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de07b0027863462223117d61cf91acd3c8710f4b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR16.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR16 ( MCRegister Reg ) { +assert ( Reg >= PULP :: F0_D && Reg <= PULP :: F31_D && "Invalid register" ) ; +return Reg - PULP :: F0_D + PULP :: F0_H ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cdf4d6c805f30c1595b6aff7dd393aa6829b9d60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/convertFPR64ToFPR32.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR32 ( MCRegister Reg ) { +assert ( Reg >= PULP :: F0_D && Reg <= PULP :: F31_D && "Invalid register" ) ; +return Reg - PULP :: F0_D + PULP :: F0_F ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..976b15261950ac9a50b49df0c9680ca328d17ee6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createImm.cpp @@ -0,0 +1,8 @@ +static std :: unique_ptr < PULPOperand > createImm ( const MCExpr * Val , SMLoc S , SMLoc E , bool IsRV64 ) { +auto Op = std :: make_unique < PULPOperand > ( KindTy :: Immediate ) ; +Op -> Imm . Val = Val ; +Op -> StartLoc = S ; +Op -> EndLoc = E ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b219ba307bd75c80c094aa7b5b732860b42228e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createReg.cpp @@ -0,0 +1,8 @@ +static std :: unique_ptr < PULPOperand > createReg ( unsigned RegNo , SMLoc S , SMLoc E , bool IsRV64 ) { +auto Op = std :: make_unique < PULPOperand > ( KindTy :: Register ) ; +Op -> Reg . RegNum = RegNo ; +Op -> StartLoc = S ; +Op -> EndLoc = E ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createSysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9e8b156b98236403de05bd35cca86bbccf829494 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createSysReg.cpp @@ -0,0 +1,10 @@ +static std :: unique_ptr < PULPOperand > createSysReg ( StringRef Str , SMLoc S , unsigned Encoding , bool IsRV64 ) { +auto Op = std :: make_unique < PULPOperand > ( KindTy :: SystemRegister ) ; +Op -> SysReg . Data = Str . data ( ) ; +Op -> SysReg . Length = Str . size ( ) ; +Op -> SysReg . Encoding = Encoding ; +Op -> StartLoc = S ; +Op -> EndLoc = S ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createToken.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c38f06a20440dd2ef2207cc7c96022563bf8034 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createToken.cpp @@ -0,0 +1,8 @@ +static std :: unique_ptr < PULPOperand > createToken ( StringRef Str , SMLoc S , bool IsRV64 ) { +auto Op = std :: make_unique < PULPOperand > ( KindTy :: Token ) ; +Op -> Tok = Str ; +Op -> StartLoc = S ; +Op -> EndLoc = S ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createVType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9e942ed5ab1e4c00c2398290a1abebb2ce3f9bd8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/createVType.cpp @@ -0,0 +1,7 @@ +static std :: unique_ptr < PULPOperand > createVType ( unsigned VTypeI , SMLoc S , bool IsRV64 ) { +auto Op = std :: make_unique < PULPOperand > ( KindTy :: VType ) ; +Op -> VType . Val = VTypeI ; +Op -> StartLoc = S ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..54f05808fb373ef8a61db7190295a9862a26dd5f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/defaultMaskRegOp.cpp @@ -0,0 +1,3 @@ +std :: unique_ptr < PULPOperand > PULPAsmParser :: defaultMaskRegOp ( ) const { +return PULPOperand :: createImm ( this , 0 , SMLoc ( ) , PULPOperand :: ImmTyDLC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d44c8b9131f9ffd3298a9d7f438206b654c3b0db --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/emitToStreamer.cpp @@ -0,0 +1,9 @@ +void PULPAsmParser :: emitToStreamer ( MCStreamer & S , const MCInst & Inst ) { +MCInst CInst ; +bool Res = false ; +Res = compressInst ( CInst , Inst , getSTI ( ) , S . getContext ( ) ) ; +if ( Res ) { +PULPNumInstrsCompressed = PULPNumInstrsCompressed + 1 ; +} +S . emitInstruction ( ( Res ? CInst : Inst ) , getSTI ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae5d6c9e2aa26d5ddff273149c1e516cb22b5d78 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/evaluateConstantImm.cpp @@ -0,0 +1,12 @@ +static bool evaluateConstantImm ( const MCExpr * Expr , int64_t & Imm , PULPMCExpr :: VariantKind & VK ) const { +if ( auto * RE = dyn_cast < PULPMCExpr > ( Expr ) ) { +VK = RE -> getKind ( ) ; +return RE -> evaluateAsConstant ( Imm ) ; +} +if ( auto CE = dyn_cast < MCConstantExpr > ( Expr ) ) { +VK = PULPMCExpr :: VK_PULP_None ; +Imm = CE -> getValue ( ) ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp new file mode 100644 index 0000000000000000000000000000000000000000..feb182cac8d263fbcaa7f4192ee9899553b13ef3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/generateImmOutOfRangeError.cpp @@ -0,0 +1,4 @@ +bool PULPAsmParser :: generateImmOutOfRangeError ( OperandVector & Operands , uint64_t ErrorInfo , int64_t Lower , int64_t Upper , Twine Msg = "immediate must be an integer in the range" ) { +SMLoc ErrorLoc = ( ( PULPOperand & ) * Operands [ ErrorInfo ] ) . getStartLoc ( ) ; +return Error ( ErrorLoc , Msg + " [" + Twine ( Lower ) + ", " + Twine ( Upper ) + "]" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getEndLoc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getEndLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e37ce2784f719036de35e1f8d8504cae1121c2bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getEndLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getEndLoc ( ) const override { +return EndLoc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..080034f18946182156ba430e043bdb8f9e5689a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getFeatureBits.cpp @@ -0,0 +1,3 @@ +bool getFeatureBits ( uint64_t Feature ) { +return getSTI ( ) . getFeatureBits ( ) [ Feature ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a295b3267dd5db0827725099e6a0db869691db64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getImm.cpp @@ -0,0 +1,4 @@ +const MCExpr * getImm ( ) const { +assert ( Kind == KindTy :: Immediate && "Invalid type access!" ) ; +return Imm . Val ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getLoc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35c966acc0c7ad3f7a0e321c17de19bd2ea70c74 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getLoc ( ) const { +return getParser ( ) . getTok ( ) . getLoc ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..462f8d464a8e61f2fabbd74202b7d383d8eb9362 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg ( ) const override { +assert ( Kind == KindTy :: Register && "Invalid type access!" ) ; +return Reg . RegNum . id ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b48b464a4825c33dc44a8279f74692c8de7cf7e9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getRoundingMode.cpp @@ -0,0 +1,3 @@ +PULPFPRndMode :: RoundingMode getRoundingMode ( ) const { +return ( MI . getDesc ( ) . TSFlags >> PULPII :: AddrModePos ) & PULPII :: AddrModeMask ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getStartLoc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getStartLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..07cb9bb6e768b7938b667280b2a7b15561f5e6a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getStartLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getStartLoc ( ) const override { +return StartLoc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getSysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1ebf9426b9608f4137ea7501f3b08bfab0d3808 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getSysReg.cpp @@ -0,0 +1,4 @@ +StringRef getSysReg ( ) const { +assert ( Kind == KindTy :: SystemRegister && "Invalid type access!" ) ; +return StringRef ( SysReg . Data , SysReg . Length ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d3e152cef9399d3298689025b6df27239beff5a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getTargetStreamer.cpp @@ -0,0 +1,4 @@ +PULPTargetStreamer & getTargetStreamer ( ) { +MCTargetStreamer & TS = * getParser ( ) . getStreamer ( ) . getTargetStreamer ( ) ; +return static_cast < PULPTargetStreamer & > ( TS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getToken.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ac25596a2291a838d72813f271e931ccf4073a7d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getToken.cpp @@ -0,0 +1,4 @@ +StringRef getToken ( ) const { +assert ( Kind == KindTy :: Token && "Invalid type access!" ) ; +return Tok ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getVType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f576808a24bb8b7dbf54d64605d91a3963ced115 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/getVType.cpp @@ -0,0 +1,4 @@ +unsigned getVType ( ) const { +assert ( Kind == KindTy :: VType && "Invalid type access!" ) ; +return VType . Val ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c9c55d391d00f0ddff67dcdc715080e2155ea5fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isBareSimmNLsb0.cpp @@ -0,0 +1,13 @@ +template < int N > bool isBareSimmNLsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +int64_t Imm ; +bool IsValid ; +IsValid = isShiftedInt < N - 1 , 1 > ( Imm ) ; +} +IsValid = PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) ; +} +return IsValid && VK == PULPMCExpr :: VK_PULP_None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b01aa67442a80c804df1727867f68683f36a63d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isBareSymbol.cpp @@ -0,0 +1,14 @@ +bool isBareSymbol ( ) const { +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a758bfbbdcd7dbf64f25b3137cb6801e41d1427 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCLUIImm.cpp @@ -0,0 +1,11 @@ +bool isCLUIImm ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return ( Imm != 0 ) && ( isUInt < 5 > ( Imm ) || ( Imm >= 0xfffe0 && Imm <= 0xfffff ) ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79a474c7b17dcd11436567b0a61bfa51e62dc75f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCSRSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isCSRSystemRegister ( ) const { +return Kind == KindTy :: SystemRegister ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..596437cc6a2aeb214d2d0b66113a3a24c82281ec --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isCallSymbol.cpp @@ -0,0 +1,11 @@ +bool isCallSymbol ( ) const { +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == PULPMCExpr :: VK_PULP_CALL || VK == PULPMCExpr :: VK_PULP_CALL_PLT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isFRMArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..30217c2871ef7359224eef4da11f3facd547fd50 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isFRMArg.cpp @@ -0,0 +1,10 @@ +bool isFRMArg ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +return ( ( Value & ~ 0xffff ) == 0xffff0000 ) ; +return isShiftedInt < 7 , 1 > ( getConstantImm ( ) ) ; +return isUInt < 5 > ( CE -> getValue ( ) ) ; +return isUInt < 3 > ( Value ) ; +if ( Val & 0x3 ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isFenceArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f694d687ac9afb99bfa633df54d5fe9dbb85c4a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isFenceArg.cpp @@ -0,0 +1,10 @@ +bool isFenceArg ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +return ( ( Value & ~ 0xffff ) == 0xffff0000 ) ; +return isShiftedInt < 7 , 1 > ( getConstantImm ( ) ) ; +return isUInt < 5 > ( CE -> getValue ( ) ) ; +return isUInt < 3 > ( Value ) ; +if ( Val & 0x3 ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isGPR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isGPR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f851d37242bd59b934086fa87b86ac0fc8286861 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isGPR.cpp @@ -0,0 +1,3 @@ +bool isGPR ( ) const { +return Kind == KindTy :: Register && PULPMCRegisterClasses [ PULP :: GPRRegClassID ] . contains ( Reg . RegNum ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64ea89f602caa02e1bd59a59834d9a28d2bb6af7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm ( ) const override { +return Kind == KindTy :: Immediate ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10b9e9a622e533fb1f68e77bac93fd5368eff199 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isImmXLenLI.cpp @@ -0,0 +1,11 @@ +bool isImmXLenLI ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == PULPMCExpr::VK_PULP_LO || VK == PULPMCExpr::VK_PULP_PCREL_LO || VK == PULPMCExpr::VK_PULP_None && (isRV64() || (isInt<32>(Imm) || isUInt<32>(Imm))) ; +} +return VK == PULPMCExpr :: VK_PULP_LO || VK == PULPMCExpr :: VK_PULP_PCREL_LO ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isMem.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isMem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbe89a41bb139dfc739a67a4bac398d6d354d13e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isMem.cpp @@ -0,0 +1,3 @@ +bool isMem ( ) const override { +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01e45618be862e8cbbaf0d80ea3b150ec88b4e04 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isPseudoJumpSymbol.cpp @@ -0,0 +1,11 @@ +bool isPseudoJumpSymbol ( ) const { +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_CALL ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV32E.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5bd24a827bc86d53d1fb7c9bf7815fc699f4250e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E ( ) const { +return getSTI ( ) . hasFeature ( PULP :: FeatureRV32E ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV64-2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV64-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3021409c1be9313d9e3c296a554215adb8c06a49 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV64-2.cpp @@ -0,0 +1,3 @@ +bool isRV64 ( ) const { +return getSTI ( ) . hasFeature ( PULP :: Feature64Bit ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV64.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b8327f239930562cfd20ff962aeefd2b2c8d911 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isRV64.cpp @@ -0,0 +1,3 @@ +bool isRV64 ( ) const { +return IsRV64 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..574f31b9597b3a47ea097df3635d56d107ec07ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg ( ) const override { +return Kind == KindTy :: Register ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73836dcd1461c0b830a5da7cf3fd41c591983a96 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm10Lsb0000NonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return ( Imm != 0 ) && isShiftedInt < 6 , 4 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm12.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13ff6ad21a713c1c3e3321ec851eaa00db31353b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm12.cpp @@ -0,0 +1,14 @@ +bool isSImm12 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt<12>(Imm) && (VK == PULPMCExpr::VK_PULP_None || VK == PULPMCExpr::VK_PULP_LO || VK == PULPMCExpr::VK_PULP_PCREL_LO || VK == PULPMCExpr::VK_PULP_TPREL_LO) ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == PULPMCExpr :: VK_PULP_LO || VK == PULPMCExpr :: VK_PULP_PCREL_LO || VK == PULPMCExpr :: VK_PULP_TPREL_LO ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d9614d3321d4278d55a8bbddd5c546c134fdac8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm12Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm12Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 11 , 1 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..00330ab2f534c0e004a6c4599bc0f7315b4a00a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm13Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm13Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 12 , 1 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c15a529cf19f881e5161c1338b77010e3b3874fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm21Lsb0JAL.cpp @@ -0,0 +1,14 @@ +bool isSImm21Lsb0JAL ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 20 , 1 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca63301cdc4ffdaa12f8cc8c3e8257d076e4a55c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm5.cpp @@ -0,0 +1,11 @@ +bool isSImm5 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt < 5 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f86f9b10bcabf2bca32a9271efe4569bd97b4e03 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm5Plus1.cpp @@ -0,0 +1,11 @@ +bool isSImm5Plus1 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt < 5 > ( Imm - 1 ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm6.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31e126c41eefa203616612b0ac80c7cfb3658712 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm6.cpp @@ -0,0 +1,11 @@ +bool isSImm6 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt < 6 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5eaa93d23d952fc34608be26400da486963a7759 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm6NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm6NonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt<6>(Imm) && (Imm != 0) && VK == PULPMCExpr::VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d33c9cb0cddcd93332589c6bb02ff63280f49af --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSImm9Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm9Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 8 , 1 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2b5c274c624fa3378b43fcdd1feb3fd91cc3ce4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isSystemRegister ( ) const { +return Kind == KindTy :: SystemRegister ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fde582f59d8fdcb9b81c6b8c6528a028709991a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isTPRelAddSymbol.cpp @@ -0,0 +1,14 @@ +bool isTPRelAddSymbol ( ) const { +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_TPREL_ADD ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isToken.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..765ad841fd47a89abdd004cc3850313674615334 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isToken.cpp @@ -0,0 +1,3 @@ +bool isToken ( ) const override { +return Kind == KindTy :: Token ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a44711ce23d8294ec199934c4cc5d6561d511607 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm1.cpp @@ -0,0 +1,11 @@ +bool isUImm1 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 1 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7a6caca2a780f86955dd7a1cf880d16e0d0e2654 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp @@ -0,0 +1,11 @@ +bool isUImm10Lsb00NonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 8 , 2 > ( Imm ) && ( Imm != 0 ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm12.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..242993d2e42d32a2547c9157a68762eae04184e2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm12.cpp @@ -0,0 +1,14 @@ +bool isUImm12 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 12 > ( Imm ) && ( VK == PULPMCExpr :: VK_PULP_None || VK == PULPMCExpr :: VK_PULP_LO || VK == PULPMCExpr :: VK_PULP_PCREL_LO || VK == PULPMCExpr :: VK_PULP_TPREL_LO ) ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == PULPMCExpr :: VK_PULP_LO || VK == PULPMCExpr :: VK_PULP_PCREL_LO || VK == PULPMCExpr :: VK_PULP_TPREL_LO ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..962a2d77f20cd4885a032118cc6149ca32dd2ef6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm12M1.cpp @@ -0,0 +1,11 @@ +bool isUImm12M1 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt<12>(Imm) && (Imm != 0) && VK == PULPMCExpr::VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f50f279f40313cef1226d8779b6f2174856c1251 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm13Lsb0.cpp @@ -0,0 +1,11 @@ +bool isUImm13Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 12 , 1 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5c7feab0c583a2ae255eb42320f1669dcb8482a7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm20AUIPC.cpp @@ -0,0 +1,14 @@ +bool isUImm20AUIPC ( ) const { +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt<20>(Imm) && (VK == PULPMCExpr::VK_PULP_None || VK == PULPMCExpr::VK_PULP_PCREL_HI || VK == PULPMCExpr::VK_PULP_GOT_HI || VK == PULPMCExpr::VK_PULP_TLS_GOT_HI || VK == PULPMCExpr::VK_PULP_TLS_GD_HI) ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == PULPMCExpr :: VK_PULP_PCREL_HI || VK == PULPMCExpr :: VK_PULP_GOT_HI || VK == PULPMCExpr :: VK_PULP_TLS_GOT_HI || VK == PULPMCExpr :: VK_PULP_TLS_GD_HI ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56268c5e34a7c274910dd13ac06930c43935718a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm20LUI.cpp @@ -0,0 +1,14 @@ +bool isUImm20LUI ( ) const { +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 20 > ( Imm ) && ( VK == PULPMCExpr :: VK_PULP_None || VK == PULPMCExpr :: VK_PULP_HI || VK == PULPMCExpr :: VK_PULP_TPREL_HI ) ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == PULPMCExpr :: VK_PULP_HI || VK == PULPMCExpr :: VK_PULP_TPREL_HI ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm3.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9e1e77b7fb53b22bc94cbdd783b8330dac688aaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm3.cpp @@ -0,0 +1,11 @@ +bool isUImm3 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 3 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm4.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm4.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05cbd883894edcc7466e46e10d59af9bea51dcfe --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm4.cpp @@ -0,0 +1,11 @@ +bool isUImm4 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 4 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21e44843070ac30950cbf2b70d6443d6b31af736 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm5.cpp @@ -0,0 +1,11 @@ +bool isUImm5 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 5 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm6.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24fa394380f9bdae7f73c0a8afcb305a19e313ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm6.cpp @@ -0,0 +1,11 @@ +bool isUImm6 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 6 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7ff5e6f3ae9a5cae2812cb91ffd1b3ce63fc3f2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm6Lsb0.cpp @@ -0,0 +1,14 @@ +bool isUImm6Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 5 , 1 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return PULPAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..234e70b993399b34e74f3118acb283b3dd585367 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm7Lsb00.cpp @@ -0,0 +1,11 @@ +bool isUImm7Lsb00 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 5 , 2 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc8a864719e3081c55ac25b1827081e15afbce89 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm8Lsb00.cpp @@ -0,0 +1,11 @@ +bool isUImm8Lsb00 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 6 , 2 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3edbe1fb000634889c5a86ef314510a5932416b2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm8Lsb000.cpp @@ -0,0 +1,11 @@ +bool isUImm8Lsb000 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 5 , 3 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4b30a84b0491361f910dbb1e1775b061b5341ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImm9Lsb000.cpp @@ -0,0 +1,11 @@ +bool isUImm9Lsb000 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 6 , 3 > ( Imm ) && VK == PULPMCExpr :: VK_PULP_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ef71938c542f8f9cbd5c7bdf26b9259ef32218f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLen.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLen ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == PULPMCExpr :: VK_PULP_None && ( ( isRV64 ( ) && isUInt < 6 > ( Imm ) ) || isUInt < 5 > ( Imm ) ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f0ccdbdf6e8a7610a8465bbe19873119e728743d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLenHalf.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenHalf ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == PULPMCExpr :: VK_PULP_None && ( ( isRV64 ( ) && isUInt < 5 > ( Imm ) ) || isUInt < 4 > ( Imm ) ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..898311b34db8a957451340d173fc709b2b0c2f48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenNonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: VK_PULP_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == PULPMCExpr :: VK_PULP_None && Imm && ( ( isRV64 ( ) && isUInt < 6 > ( Imm ) ) || isUInt < 5 > ( Imm ) ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isV0Reg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isV0Reg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..821a317bf574e6abc52a8d22b258241264ab83bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isV0Reg.cpp @@ -0,0 +1,3 @@ +bool isV0Reg ( ) const override { +return Kind == KindTy :: Register && Reg . RegNum == PULP :: V0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isVType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..858133aed67c3eb7ce07c8f10dc3ca4fb5309a37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isVType.cpp @@ -0,0 +1,3 @@ +bool isVType ( ) const { +return Kind == KindTy :: VType ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isVTypeI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2514871342beee8b97897aa604e92fab3063408a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/isVTypeI.cpp @@ -0,0 +1,3 @@ +bool isVTypeI ( ) const { +return Kind == KindTy :: VType ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ba50723bd06bd8fd34a52d61dff3d53ca63c9f5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/matchRegisterNameHelper.cpp @@ -0,0 +1,7 @@ +static bool matchRegisterNameHelper ( bool IsRV32E , MCRegister & RegNo , StringRef Name ) { +RegNo = MatchRegisterName ( Name ) ; +if ( RegNo == PULP :: NoRegister ) { +RegNo = MatchRegisterAltName ( Name ) ; +} +return RegNo == PULP :: NoRegister ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bcb34753eed032c47105536c04aac6f753d293fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseAtomicMemOp.cpp @@ -0,0 +1,19 @@ +OperandMatchResultTy PULPAsmParser :: parseAtomicMemOp ( OperandVector & Operands ) { +if ( getLexer ( ) . isNot ( AsmToken :: LParen ) ) { +Error ( getLoc ( ) , "expected '('" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( PULPOperand :: createToken ( "(" , getLoc ( ) ) ) ; +if ( parseRegister ( Operands ) != MatchOperand_Success ) { +Error ( getLoc ( ) , "expected register" ) ; +return MatchOperand_ParseFail ; +} +if ( getLexer ( ) . isNot ( AsmToken :: RParen ) ) { +Error ( getLoc ( ) , "expected ')'" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( PULPOperand :: createToken ( ")" , getLoc ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a41273a85527866f77e296b2c066caef801731c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseBareSymbol.cpp @@ -0,0 +1,56 @@ +OperandMatchResultTy PULPAsmParser :: parseBareSymbol ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +return MatchOperand_ParseFail ; +} +MCExpr :: VariantKind Kind = PULPMCExpr :: VK_PULP_None ; +if ( Identifier . consume_back ( "@plt" ) ) { +Error ( getLoc ( ) , "'@plt' operand not valid for instruction" ) ; +return MatchOperand_ParseFail ; +} +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +return MatchOperand_NoMatch ; +} +Res = V ; +} +if ( ! Sym -> isVariable ( ) ) { +} +MCBinaryExpr :: Opcode Opcode ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +Opcode = MCBinaryExpr :: Add ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +} +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +Opcode = MCBinaryExpr :: Sub ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +} +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( Kind != PULPMCExpr :: VK_PULP_Invalid ) { +Res = PULPMCExpr :: create ( Res , Kind , getContext ( ) ) ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a2dab26acc75f3bd26d9e3b6b4782554f23c93cc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseCSRSyestemRegister.cpp @@ -0,0 +1,5 @@ +OperandMatchResultTy PULPAsmParser :: parseCSRSystemRegister ( OperandVector & Operands , bool AllowParens ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +return MatchOperand_NoMatch ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c8d89dc42f1d9596ba80e80ccd3342554a347937 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseCallSymbol.cpp @@ -0,0 +1,46 @@ +OperandMatchResultTy PULPAsmParser :: parseCallSymbol ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +return MatchOperand_ParseFail ; +} +MCExpr :: VariantKind Kind = PULPMCExpr :: VK_PULP_None ; +if ( Identifier . consume_back ( "@plt" ) ) { +Kind = PULPMCExpr :: VK_CALL_PLT ; +} +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +return MatchOperand_ParseFail ; +if ( ! Sym -> isVariable ( ) ) { +MCBinaryExpr :: Opcode Opcode ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +Opcode = MCBinaryExpr :: Add ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +Opcode = MCBinaryExpr :: Sub ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( Kind != PULPMCExpr :: VK_PULP_None ) { +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4ba12881a11d96e7997a9f63836624d1d2291fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseImmediate.cpp @@ -0,0 +1,72 @@ +OperandMatchResultTy PULPAsmParser :: parseImmediate ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: LParen ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Integer ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: String ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Identifier ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Dot ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Tilde ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Exclaim ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Percent ) { +return parseOperandWithModifier ( Operands ) ; +} +return MatchOperand_NoMatch ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e31f93d617272ba25fb3a360115eb8476219598 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseJALOffset.cpp @@ -0,0 +1,31 @@ +OperandMatchResultTy PULPAsmParser :: parseJALOffset ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +return MatchOperand_ParseFail ; +if ( Sym -> isVariable ( ) ) { +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +return MatchOperand_ParseFail ; +if ( ! Sym -> isVariable ( ) ) { +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..724cf44c349ad2f6d58c760886cf175ac0ed0145 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseMaskReg.cpp @@ -0,0 +1,16 @@ +OperandMatchResultTy PULPAsmParser :: parseMaskReg ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Name = getLexer ( ) . getTok ( ) . getIdentifier ( ) ; +MCRegister RegNo ; +matchRegisterNameHelper ( RegNo , Name ) ; +if ( RegNo == PULP :: NoRegister ) { +return MatchOperand_NoMatch ; +} +getLexer ( ) . Lex ( ) ; +Operands . push_back ( PULPOperand :: createReg ( RegNo , S , E ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9605e1a3fe5faf374e4ac5c33b31c5ff92ff48b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseMemOpBaseReg.cpp @@ -0,0 +1,19 @@ +OperandMatchResultTy PULPAsmParser :: parseMemOpBaseReg ( OperandVector & Operands ) { +if ( getLexer ( ) . isNot ( AsmToken :: LParen ) ) { +Error ( getLoc ( ) , "expected '('" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( PULPOperand :: createToken ( "(" , getLoc ( ) , isRV64 ( ) ) ) ; +if ( parseRegister ( Operands ) != MatchOperand_Success ) { +Error ( getLoc ( ) , "expected register" ) ; +return MatchOperand_ParseFail ; +} +if ( getLexer ( ) . isNot ( AsmToken :: RParen ) ) { +Error ( getLoc ( ) , "expected ')'" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( PULPOperand :: createToken ( ")" , getLoc ( ) , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed44f3eb7777559d78790984d7275a79758b70f1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseOperand.cpp @@ -0,0 +1,20 @@ +bool PULPAsmParser :: parseOperand ( OperandVector & Operands , StringRef Mnemonic ) { +OperandMatchResultTy Result = MatchOperandParserImpl ( Operands , Mnemonic , true ) ; +if ( Result == MatchOperand_Success ) { +return false ; +} +if ( Result == MatchOperand_ParseFail ) { +return true ; +} +if ( parseRegister ( Operands , true ) == MatchOperand_Success ) { +return false ; +} +if ( parseImmediate ( Operands ) == MatchOperand_Success ) { +if ( getLexer ( ) . is ( AsmToken :: LParen ) ) { +return parseMemOpBaseReg ( Operands ) != MatchOperand_Success ; +} +return false ; +} +Error ( getLoc ( ) , "unknown operand" ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16bb49ab1862dc9bb73651eec385a6df9b74f166 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseOperandWithModifier.cpp @@ -0,0 +1,32 @@ +OperandMatchResultTy PULPAsmParser :: parseOperandWithModifier ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Percent ) { +Error ( getLoc ( ) , "expected '%' for operand modifier" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +Error ( getLoc ( ) , "expected valid identifier for operand modifier" ) ; +return MatchOperand_ParseFail ; +} +StringRef Identifier = getParser ( ) . getTok ( ) . getIdentifier ( ) ; +PULPMCExpr :: VariantKind VK = PULPMCExpr :: getVariantKindForName ( Identifier ) ; +if ( VK == PULPMCExpr :: VK_PULP_Invalid ) { +Error ( getLoc ( ) , "unrecognized operand modifier" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: LParen ) { +Error ( getLoc ( ) , "expected '('" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +const MCExpr * SubExpr ; +if ( getParser ( ) . parseParenExpression ( SubExpr , E ) ) { +return MatchOperand_ParseFail ; +} +const MCExpr * ModExpr = PULPMCExpr :: create ( VK , SubExpr , getContext ( ) ) ; +Operands . push_back ( PULPOperand :: createImm ( ModExpr , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ac24b3f9925f37bf9f679a0af2dccf9b850b417c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parsePseudoJumpSymbol.cpp @@ -0,0 +1,43 @@ +OperandMatchResultTy PULPAsmParser :: parsePseudoJumpSymbol ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +Error ( getLoc ( ) , "unknown identifier" ) ; +return MatchOperand_ParseFail ; +} +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +Error ( getLoc ( ) , "unknown symbol" ) ; +return MatchOperand_ParseFail ; +Res = V ; +if ( ! Sym -> isVariable ( ) ) { +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +Opcode = MCBinaryExpr :: Add ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( Kind != PULPMCExpr :: VK_PULP_None ) { +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseRegister2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseRegister2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ec5623c37d081638d31f2e57424114acffd777b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseRegister2.cpp @@ -0,0 +1,12 @@ +OperandMatchResultTy PULPAsmParser :: parseRegister ( OperandVector & Operands , bool AllowParens ) { +getLexer ( ) . Lex ( ) ; +SMLoc S = getLoc ( ) ; +StringRef Name = getLexer ( ) . getTok ( ) . getIdentifier ( ) ; +unsigned RegNo = MatchRegisterName ( Name ) ; +if ( RegNo == 0 ) { +} +Operands . push_back ( PULPOperand :: createReg ( RegNo , S , E ) ) ; +getLexer ( ) . Lex ( ) ; +Operands . push_back ( PULPOperand :: createReg ( RegNo , S , E ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5654080a3b187b8272b3c8ed01587e23a17c342d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/parseVTypeI.cpp @@ -0,0 +1,42 @@ +OperandMatchResultTy PULPAsmParser :: parseVTypeI ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +Error ( getLoc ( ) , "unknown identifier" ) ; +return MatchOperand_ParseFail ; +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +Error ( getLoc ( ) , "unknown symbol" ) ; +return MatchOperand_ParseFail ; +Res = V ; +if ( ! Sym -> isVariable ( ) ) { +MCBinaryExpr :: Opcode Opcode ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( Kind != PULPMCExpr :: VK_PULP_None ) { +Operands . push_back ( PULPOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/print.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5f3c376b1ff726cf240aa6395af8524515c9140 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/print.cpp @@ -0,0 +1,14 @@ +void print ( raw_ostream & OS ) const override { +if ( Kind == KindTy :: Token ) { +} +if ( Kind == KindTy :: Register ) { +} +if ( Kind == KindTy :: Immediate ) { +OS << getImm ( ) ; +} +if ( Kind == KindTy :: SystemRegister ) { +OS << "Register<" << Reg . RegNum << ">" ; +} +if ( Kind == KindTy :: VType ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3842effdce3debb109d5ef4f747e2c8306b202a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/setFeatureBits.cpp @@ -0,0 +1,6 @@ +void setFeatureBits ( uint64_t Feature , StringRef FeatureString ) { +if ( ! ( getSTI ( ) . getFeatureBits ( ) [ Feature ] ) ) { +MCSubtargetInfo & STI = copySTI ( ) ; +setAvailableFeatures ( ComputeAvailableFeatures ( STI . ToggleFeature ( FeatureString ) ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1223d542786d6a119f5d0309d611721679d6359e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/tryParseRegister.cpp @@ -0,0 +1,12 @@ +OperandMatchResultTy PULPAsmParser :: tryParseRegister ( unsigned & RegNo , SMLoc & StartLoc , SMLoc & EndLoc ) { +const AsmToken & Tok = getParser ( ) . getTok ( ) ; +StartLoc = Tok . getLoc ( ) ; +EndLoc = Tok . getEndLoc ( ) ; +RegNo = 0 ; +StringRef Name = getLexer ( ) . getTok ( ) . getIdentifier ( ) ; +if ( matchRegisterNameHelper ( isRV32E ( ) , ( MCRegister & ) RegNo , Name ) ) { +return MatchOperand_NoMatch ; +} +getParser ( ) . Lex ( ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ada0ba2b2acf61da477c39188e24e688a28af39 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmParser/validateTargetOperandClass.cpp @@ -0,0 +1,26 @@ +unsigned PULPAsmParser :: validateTargetOperandClass ( MCParsedAsmOperand & AsmOp , unsigned Kind ) { +PULPOperand & Op = static_cast < PULPOperand & > ( AsmOp ) ; +if ( ! Op . isReg ( ) ) { +return Match_InvalidOperand ; +} +MCRegister Reg = Op . getReg ( ) ; +if ( PULPMCRegisterClasses [ PULP :: FPR64RegClassID ] . contains ( Reg ) ) { +if ( Kind == MCK_FPR32 ) { +Op . Reg . RegNum = convertFPR64ToFPR32 ( Reg ) ; +return Match_Success ; +} +} +if ( PULPMCRegisterClasses [ PULP :: FPR64CRegClassID ] . contains ( Reg ) ) { +if ( Kind == MCK_FPR32C ) { +Op . Reg . RegNum = convertFPR64ToFPR32 ( Reg ) ; +return Match_Success ; +} +} +if ( PULPMCRegisterClasses [ PULP :: FPR64RegClassID ] . contains ( Reg ) ) { +if ( Kind == MCK_FPR16 ) { +Op . Reg . RegNum = convertFPR64ToFPR16 ( Reg ) ; +return Match_Success ; +} +} +return Match_InvalidOperand ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1cb12f7fdc9eba5c070efc786c654e994c5a8de --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit PULPAsmPrinter ( TargetMachine & TM , std :: unique_ptr < MCStreamer > Streamer ) : AsmPrinter ( TM , std :: move ( Streamer ) ) , STI ( TM . getMCSubtargetInfo ( ) ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e56a4978050a1b1cae881bc40a41eed68bedc88b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/EmitToStreamer.cpp @@ -0,0 +1,8 @@ +void PULPAsmPrinter :: EmitToStreamer ( MCStreamer & S , const MCInst & Inst ) { +MCInst CInst ; +bool Res = compressInst ( CInst , Inst , * STI , OutStreamer -> getContext ( ) ) ; +if ( Res ) { +PULPNumInstrsCompressed = PULPNumInstrsCompressed + 1 ; +} +AsmPrinter :: EmitToStreamer ( * OutStreamer , Res ? CInst : Inst ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35de9759dc4e117057bef34a2d8ca4cbe79288c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePULPAsmPrinter ( ) { +RegisterAsmPrinter < PULPAsmPrinter > X ( getThePULP32Target ( ) ) ; +RegisterAsmPrinter < PULPAsmPrinter > Y ( getThePULP64Target ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..60f24b92ca4fd4848f23b0ea98555afb402c5333 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,11 @@ +bool PULPAsmPrinter :: PrintAsmMemoryOperand ( const MachineInstr * MI , unsigned OpNo , const char * ExtraCode , raw_ostream & OS ) { +if ( ! ExtraCode ) { +const MachineOperand & MO = MI -> getOperand ( OpNo ) ; +if ( ! MO . isReg ( ) ) { +return true ; +} +OS << "0(" << PULPInstPrinter :: getRegisterName ( MO . getReg ( ) ) << ")" ; +return false ; +} +return AsmPrinter :: PrintAsmMemoryOperand ( MI , OpNo , ExtraCode , OS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83fcd08b9044ab869795cb3f4c893cc06238cd26 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,47 @@ +bool PULPAsmPrinter :: PrintAsmOperand ( const MachineInstr * MI , unsigned OpNo , const char * ExtraCode , raw_ostream & OS ) { +if ( ! AsmPrinter :: PrintAsmOperand ( MI , OpNo , ExtraCode , OS ) ) { +return false ; +} +const MachineOperand & MO = MI -> getOperand ( OpNo ) ; +if ( ExtraCode ) { +if ( ExtraCode [ 0 ] ) { +if ( ExtraCode [ 1 ] != 0 ) { +return true ; +} +if ( ExtraCode [ 0 ] == 'z' ) { +if ( MO . isImm ( ) ) { +if ( MO . getImm ( ) == 0 ) { +OS << PULPInstPrinter :: getRegisterName ( PULP::X0 ) ; +return false ; +} +} +} +if ( ExtraCode [ 0 ] == 'i' ) { +return false ; +if ( ! MO . isReg ( ) ) { +OS << 'i' ; +} +return false ; +} +return true ; +} +} +if ( MO . getType ( ) == MachineOperand :: MO_Immediate ) { +OS << MO . getImm ( ) ; +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_Register ) { +OS << PULPInstPrinter :: getRegisterName ( MO . getReg ( ) ) ; +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_GlobalAddress ) { +PrintSymbolOperand ( MO , OS ) ; +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_BlockAddress ) { +MCSymbol * Sym = GetBlockAddressSymbol ( MO . getBlockAddress ( ) ) ; +Sym -> print ( OS , MAI ) ; +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6eb8d08d8654c7fdeaa4741f944a832ebfece64a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitAttributes.cpp @@ -0,0 +1,9 @@ +void PULPAsmPrinter :: emitAttributes ( ) { +PULPTargetStreamer & CTS = static_cast < PULPTargetStreamer & > ( * OutStreamer -> getTargetStreamer ( ) ) ; +const Triple & TT = TM . getTargetTriple ( ) ; +StringRef CPU = TM . getTargetCPU ( ) ; +StringRef FS = TM . getTargetFeatureString ( ) ; +const PULPTargetMachine & CTM = static_cast < const PULPTargetMachine & > ( TM ) ; +const PULPSubtarget STI ( TT , CPU , CPU , FS , "" , CTM ) ; +CTS . emitTargetAttributes ( STI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e38ed76295f8ad0fd1ca1a100bcfa3c3380a13f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,6 @@ +void PULPAsmPrinter :: emitEndOfAsmFile ( Module & M ) { +PULPTargetStreamer & CTS = static_cast < PULPTargetStreamer & > ( * OutStreamer -> getTargetStreamer ( ) ) ; +if ( TM . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +CTS . finishAttributeSection ( ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2a556eeba32f05b445af3fa39e4d60c3caa3d8b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitInstruction.cpp @@ -0,0 +1,8 @@ +void PULPAsmPrinter :: emitInstruction ( const MachineInstr * MI ) { +if ( emitPseudoExpansionLowering ( * OutStreamer , MI ) ) { +return ; +} +MCInst TmpInst ; +LowerPULPMachineInstrToMCInst ( MI , TmpInst , * this ) ; +EmitToStreamer ( * OutStreamer , TmpInst ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79d6cdeb201825dd876c33db2cbce05d699c5fad --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,5 @@ +void PULPAsmPrinter :: emitStartOfAsmFile ( Module & M ) { +if ( TM . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +emitAttributes ( ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9fad6be9a969e9e459d66c2376c417b8caa47a4e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return "PULP Assembly Printer" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b740d3077addd416254f68794367cde5cbf0f4e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/lowerOperand.cpp @@ -0,0 +1,3 @@ +bool lowerOperand ( const MachineOperand & MO , MCOperand & MCOp ) const { +return LowerPULPMachineOperandToMCOperand ( MO , MCOp , * this ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c06658e1683e9b1a8db078e3dbf198f1aa8ad2d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool PULPAsmPrinter :: runOnMachineFunction ( MachineFunction & MF ) { +MCSubtargetInfo & NewSTI = OutStreamer -> getContext ( ) . getSubtargetCopy ( * TM . getMCSubtargetInfo ( ) ) ; +NewSTI . setFeatureBits ( MF . getSubtarget ( ) . getFeatureBits ( ) ) ; +STI = & NewSTI ; +SetupMachineFunction ( MF ) ; +emitFunctionBody ( ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08b354af1d98a9f083ccba19d7b6016e452c5e83 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR16RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = PULP :: F0_H + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09ecb49105527b9c0a975416955aaff8f110f47b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32CRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 8 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = PULP :: F8_F + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e8cce6a44e58650c841137b0149dbc02cafddc96 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = PULP :: F0_F + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be2dffc7df1c64381abae49b8b1c9bbd65e18790 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64CRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 8 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = PULP :: F8_D + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59244e5d1e335b593f69ca0ceaef7af4bdcb9908 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = PULP :: F0_D + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..81806bd98433df778610b76fcd71407ada1a0d76 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeGPRCRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 8 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = PULP :: X8 + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56ff4ef117332d294d29a991c66a0c16ddc875eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo == 0 ) { +return MCDisassembler :: Fail ; +} +return DecodeGPRRegisterClass ( Inst , RegNo , Address , Decoder ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8457ffe1102124e0dd4741d2b73b167a715d018 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0X2RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo == 2 ) { +return MCDisassembler :: Fail ; +} +return DecodeGPRNoX0RegisterClass ( Inst , RegNo , Address , Decoder ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eb8d5daff772c2abc2cc3d46585b336a1a61e27a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeGPRRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Register = PULP :: X0 + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0624ed7b2915f6d5db3c3bc9728352418a5caee3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodePulpV2RegisterClass.cpp @@ -0,0 +1,3 @@ +static DecodeStatus DecodePulpV2RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +return DecodeGPRRegisterClass ( Inst , RegNo , Address , Decoder ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..489321e8e2a3e5bb7e3b14839421a2f833146194 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodePulpV4RegisterClass.cpp @@ -0,0 +1,3 @@ +static DecodeStatus DecodePulpV4RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +return DecodeGPRRegisterClass ( Inst , RegNo , Address , Decoder ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4770fdfb4b977ebd711dc20dd7280dccf05d3783 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/DecodeVRRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeVRRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Register = PULP :: V0 + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/Disassembler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/Disassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6fba5d0b7a64444929258a8e122d683d683c913e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/Disassembler.cpp @@ -0,0 +1,2 @@ +PULPDisassembler ( const MCSubtargetInfo & STI , MCContext & Ctx , MCInstrInfo const * MCII ) : MCDisassembler ( STI , Ctx ) , MCII ( MCII ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6eb5f846d359f610f8c3de66fd49058bb6d676a7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePULPDisassembler ( ) { +TargetRegistry :: RegisterMCDisassembler ( getThePULP32Target ( ) , createPULPDisassembler ) ; +TargetRegistry :: RegisterMCDisassembler ( getThePULP64Target ( ) , createPULPDisassembler ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/addImplySP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/addImplySP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6984337e1c0b2b554e16973e592a86dd8700e618 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/addImplySP.cpp @@ -0,0 +1,43 @@ +static void addImplySP ( MCInst & Inst , int64_t Address , const void * Decoder ) { +if ( Inst . getOpcode ( ) == PULP :: C_LWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_LDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_SWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_SDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_FLWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_FLDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_FSWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_FSDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_ADDI4SPN ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_ADDI16SP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01cee6cb5b76c41282d69791c85d78bc2388cc15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/createDisassembler.cpp @@ -0,0 +1,3 @@ +static MCDisassembler * createPULPDisassembler ( const Target & T , const MCSubtargetInfo & STI , MCContext & Ctx ) { +return new PULPDisassembler ( STI , Ctx , T . createMCInstrInfo ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5c57b9b63caf407ad7192aaed4e2f2f0915396be --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeCLUIImmOperand.cpp @@ -0,0 +1,5 @@ +static DecodeStatus decodeCLUIImmOperand ( MCInst & Inst , uint64_t Imm , uint64_t Address , const void * Decoder ) { +assert ( isUInt < 6 > ( Imm ) ) && "Invalid immediate" ) ; +Inst . addOperand ( MCOperand :: createImm ( Imm > 31 ? ( SignExtend64 < 6 > ( Imm ) & 0xfffff ) : Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee39fe41a1d7a2989ce659dd881e764ff20b9bb2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeFRMArg.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeFRMArg ( MCInst & Inst , uint64_t Imm , uint64_t Address , const void * Decoder ) { +assert ( isUInt < 3 > ( Imm ) ) ; +if ( ! A64Imms :: isLogicalImmBits ( RegWidth , Bits , Imm ) ) { +return MCDisassembler :: Fail ; +} +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ccc40a6af115452415a83ccf45a94001eba8130 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp @@ -0,0 +1,13 @@ +static DecodeStatus decodeRVCInstrRdRs1Rs2 ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned d = fieldFromInstruction ( Insn , 7 , 5 ) ; +unsigned const9 = 0 ; +unsigned s1 = fieldFromInstruction ( Insn , 2 , 5 ) ; +DecodeStatus status = DecodeGPRRegisterClass ( Inst , d , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +Inst . addOperand ( MCOperand :: createImm ( const9 ) ) ; +status = DecodeGPRRegisterClass ( Inst , s1 , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da13f76689fe7263b763ab73458ee0c884ae8fab --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp @@ -0,0 +1,10 @@ +static DecodeStatus decodeRVCInstrRdRs1UImm ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned char op = ( insn >> 5 ) & 1 ; +unsigned char cmode = ( insn >> 8 ) & 0xF ; +unsigned char Imm8 = ( ( insn >> 24 ) & 1 ) << 7 | ( ( insn >> 16 ) & 7 ) << 4 | ( insn & 0xF ) ; +unsigned Offset = ( Insn & 0xffff ) ; +if ( Bits >= 16 ) { +return MCDisassembler :: Fail ; +} +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6fe70e90426d71fb0e173b67252d7ff580dda1d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp @@ -0,0 +1,13 @@ +static DecodeStatus decodeRVCInstrRdRs2 ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned Rd = fieldFromInstruction ( Insn , 7 , 5 ) ; +unsigned Rs2 = fieldFromInstruction ( Insn , 2 , 5 ) ; +DecodeStatus status = DecodeGPRRegisterClass ( Inst , Rd , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +} +status = DecodeGPRRegisterClass ( Inst , Rs2 , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +} +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7c00f52c104a5b6628597191543ac6cf4dc8106 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp @@ -0,0 +1,18 @@ +static DecodeStatus decodeRVCInstrRdSImm ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned char op = ( insn >> 5 ) & 1 ; +unsigned char cmode = ( insn >> 8 ) & 0xF ; +unsigned char Imm8 = ( ( insn >> 24 ) & 1 ) << 7 | ( ( insn >> 16 ) & 7 ) << 4 | ( insn & 0xF ) ; +unsigned Offset = ( Insn & 0xffff ) ; +if ( Bits >= 16 ) { +return MCDisassembler :: Fail ; +} +int64_t Imm = Bits + 1 ; +const JmpExtraValues * extra = ( reinterpret_cast < const JmpExtraValues * > ( Addr ) ) ; +uint64_t address = extra -> Address + extra -> Imm ; +if ( ! tryAddingSymbolicOperand ( address , 0 , true , 0 , Inst , Decoder ) ) { +Inst . addOperand ( MCOperand :: createImm ( extra -> Imm ) ) ; +} +unsigned Register = PredicateTable [ extra -> Predicate ] ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b3b7efb37c77265cefc5bea79aaf992cdecdb90 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeRVCInstrSImm.cpp @@ -0,0 +1,18 @@ +static DecodeStatus decodeRVCInstrSImm ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned char op = ( insn >> 5 ) & 1 ; +unsigned char cmode = ( insn >> 8 ) & 0xF ; +unsigned char Imm8 = ( ( insn >> 24 ) & 1 ) << 7 | ( ( insn >> 16 ) & 7 ) << 4 | ( insn & 0xF ) ; +unsigned Offset = ( Insn & 0xffff ) ; +if ( Bits >= 16 ) { +return MCDisassembler :: Fail ; +} +int64_t Imm = Bits + 1 ; +const JmpExtraValues * extra = ( reinterpret_cast < const JmpExtraValues * > ( Addr ) ) ; +uint64_t address = extra -> Address + extra -> Imm ; +if ( ! tryAddingSymbolicOperand ( address , 0 , true , 0 , Inst , Decoder ) ) { +Inst . addOperand ( MCOperand :: createImm ( extra -> Imm ) ) ; +} +unsigned Register = PredicateTable [ extra -> Predicate ] ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..992cc6c7a54db0d62e19897ac2e09341bf7660d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp @@ -0,0 +1,9 @@ +template < unsigned N > static DecodeStatus decodeSImmNonZeroOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +if ( Imm == 0 ) { +return MCDisassembler :: Fail ; +} +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( SignExtend64 < N > ( Imm ) ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c89f4af3b6e532a7cc8a1dd52b006ba415a839ec --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmOperand.cpp @@ -0,0 +1,6 @@ +template < unsigned N > static DecodeStatus decodeSImmOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( SignExtend64 < N > ( Imm ) ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..15963ce120e841adbc2f7e17ae57d854431f5c0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp @@ -0,0 +1,5 @@ +template < unsigned N > static DecodeStatus decodeSImmOperandAndLsl1 ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +Inst . addOperand ( MCOperand :: createImm ( SignExtend64 < N > ( Imm << 1 ) ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c9ebb73c32d8cb45f92f0e1e6df9ac435862e000 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmMinus1Operand.cpp @@ -0,0 +1,6 @@ +template < unsigned N > static DecodeStatus decodeUImmMinus1Operand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +assert ( isUInt < N > ( Imm + 1 ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( Imm + 1 ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..886faa3bb851945909f1de7e3c6d8b33d9176807 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp @@ -0,0 +1,9 @@ +template < unsigned N > static DecodeStatus decodeUImmNonZeroOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +if ( Imm == 0 ) { +return MCDisassembler :: Fail ; +} +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..202289bb54a00b03168ee8c05ae14e224c690da1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeUImmOperand.cpp @@ -0,0 +1,6 @@ +template < unsigned N > static DecodeStatus decodeUImmOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91ca4d691f82e4fd4b399947a7fe20d768dfa5ef --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/decodeVMaskReg.cpp @@ -0,0 +1,14 @@ +static DecodeStatus decodeVMaskReg ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +MCRegister Reg = PULP :: NoRegister ; +return MCDisassembler :: Success ; +return MCDisassembler :: Success ; +if ( RegNo == 0 ) { +Inst . addOperand ( MCOperand :: createReg ( PULP :: V0 ) ) ; +return MCDisassembler :: Success ; +} +if ( RegNo == 1 ) { +Inst . addOperand ( MCOperand :: createReg ( PULP :: NoRegister ) ) ; +return MCDisassembler :: Success ; +} +return MCDisassembler :: Fail ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/getInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/getInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36a8bf92b78af07f79b911977d975abe14f898c1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Disassembler/Disassembler/getInstruction.cpp @@ -0,0 +1,69 @@ +DecodeStatus PULPDisassembler :: getInstruction ( MCInst & MI , uint64_t & Size , ArrayRef < uint8_t > Bytes , uint64_t Address , raw_ostream & CS ) const { +DecodeStatus Result ; +if ( Bytes . size ( ) < 2 ) { +Size = 0 ; +return Fail ; +} +if ( ( Bytes [ 1 ] & 0xF7 ) >> 3 < 0x08 ) { +if ( Bytes . size ( ) < 4 ) { +Size = 0 ; +return Fail ; +} +if ( Bytes . size ( ) >= 8 ) { +uint64_t Insn64 ; +if ( ! readInstruction64 ( Bytes , Address , Size , Insn64 ) ) { +return Fail ; +} +Result = decodeInstruction ( DecoderTable64 , Instr , Insn64 , Address , this , STI ) ; +if ( Success == Result ) { +LLVM_DEBUG ( dbgs ( ) << "Successfully decoded 64-bit instruction." ) ; +return Result ; +} +LLVM_DEBUG ( dbgs ( ) << "Not a 64-bit instruction, falling back to 32-bit." ) ; +} +uint32_t Insn32 ; +if ( ! readInstruction32 ( Bytes , Address , Size , Insn32 ) ) { +return Fail ; +} +return decodeInstruction ( DecoderTable32 , Instr , Insn32 , Address , this , STI ) ; +} +if ( ( Bytes [ 1 ] & 0xF7 ) >> 3 >= 0x08 ) { +if ( Bytes . size ( ) >= 6 ) { +uint64_t Insn48 ; +if ( ! readInstruction48 ( Bytes , Address , Size , Insn48 ) ) { +return Fail ; +} +Result = decodeInstruction ( DecoderTable48 , Instr , Insn48 , Address , this , STI ) ; +if ( Success == Result ) { +LLVM_DEBUG ( dbgs ( ) << "Successfully decoded 16-bit instruction with limm." ) ; +return Result ; +} +LLVM_DEBUG ( dbgs ( ) << "Not a 16-bit instruction with limm, try without it." ) ; +} +uint32_t Insn16 ; +if ( ! readInstruction16 ( Bytes , Address , Size , Insn16 ) ) { +return Fail ; +} +return decodeInstruction ( DecoderTable16 , Instr , Insn16 , Address , this , STI ) ; +} +uint32_t Inst ; +if ( Bytes [ 0 ] & 1 == 1 ) { +if ( Bytes . size ( ) < 3 ) { +Size = 0 ; +return MCDisassembler :: Fail ; +} +Inst = Bytes [ 0 ] | ( Bytes [ 1 ] << 8 ) | ( Bytes [ 2 ] << 16 ) ; +LLVM_DEBUG ( dbgs ( ) << "Trying PULP 24bit table :\n" ) ; +Result = decodeInstruction ( DecoderTable24 , MI , Inst , Address , this , STI ) ; +} +if ( Bytes [ 0 ] & 1 != 1 ) { +if ( Bytes . size ( ) < 2 ) { +Size = 0 ; +return MCDisassembler :: Fail ; +} +Inst = support :: endian :: read16le ( Bytes . data ( ) ) ; +LLVM_DEBUG ( dbgs ( ) << "Trying PULP 16bit table :\n" ) ; +Result = decodeInstruction ( DecoderTable16 , MI , Inst , Address , this , STI ) ; +} +return Result ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/AsmBackend.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24d484539e4deacf841deb9838e3fe17d862239d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/AsmBackend.cpp @@ -0,0 +1,2 @@ +PULPAsmBackend ( const MCSubtargetInfo & STI , uint8_t OSABI , bool Is64Bit , const MCTargetOptions & Options ) : MCAsmBackend ( support :: little ) , STI ( STI ) , OSABI ( OSABI ) , Is64Bit ( Is64Bit ) , TargetOptions ( Options ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cedec69e79d5468d216540276f98f6db91b85116 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/adjustFixupValue.cpp @@ -0,0 +1,89 @@ +static uint64_t adjustFixupValue ( const MCFixup & Fixup , uint64_t Value , MCContext & Ctx ) { +unsigned Kind ; +Kind = Fixup . getTargetKind ( ) ; +if ( Kind == FK_Data_1 ) { +return Value ; +} +if ( Kind == FK_Data_2 ) { +return Value ; +} +if ( Kind == FK_Data_4 ) { +return Value ; +} +if ( Kind == FK_Data_8 ) { +return Value ; +} +if ( Kind == FK_Data_6b ) { +return Value ; +} +if ( Kind == PULP :: fixup_PULP_lo12_i ) { +return Value & 0xfff ; +} +if ( Kind == PULP :: fixup_PULP_pcrel_lo12_i ) { +return Value & 0xfff ; +} +if ( Kind == PULP :: fixup_PULP_tprel_lo12_i ) { +return Value & 0xfff ; +} +if ( Kind == PULP :: fixup_PULP_loop_setup ) { +return Value >> 1 ; +} +if ( Kind == PULP :: fixup_PULP_loop_setupi ) { +return Value >> 1 ; +} +if ( Kind == PULP :: fixup_PULP_lo12_s ) { +return ( ( ( Value >> 5 ) & 0x7f ) << 25 ) | ( ( Value & 0x1f ) << 7 ) ; +} +if ( Kind == PULP :: fixup_PULP_pcrel_lo12_s ) { +return ( ( ( Value >> 5 ) & 0x7f ) << 25 ) | ( ( Value & 0x1f ) << 7 ) ; +} +if ( Kind == PULP :: fixup_PULP_tprel_lo12_s ) { +return ( ( ( Value >> 5 ) & 0x7f ) << 25 ) | ( ( Value & 0x1f ) << 7 ) ; +} +if ( Kind == PULP :: fixup_PULP_hi20 ) { +return ( ( Value + 0x800 ) >> 12 ) & 0xfffff ; +} +if ( Kind == PULP :: fixup_PULP_pcrel_hi20 ) { +return ( ( Value + 0x800 ) >> 12 ) & 0xfffff ; +} +if ( Kind == PULP :: fixup_PULP_tprel_hi20 ) { +return ( ( Value + 0x800 ) >> 12 ) & 0xfffff ; +} +if ( Kind == PULP :: fixup_PULP_call ) { +return ( ( Value + 0x800ULL ) & 0xfffff000ULL ) | ( ( ( Value & 0xfffULL ) << 20 ) << 32 ) ; +} +if ( Kind == PULP :: fixup_PULP_call_plt ) { +return ( ( Value + 0x800ULL ) & 0xfffff000ULL ) | ( ( ( Value & 0xfffULL ) << 20 ) << 32 ) ; +} +if ( Kind == PULP :: fixup_PULP_rvc_jump ) { +return ( ( ( Value >> 11 ) & 0x1 ) << 10 ) | ( ( ( Value >> 4 ) & 0x1 ) << 9 ) | ( ( ( Value >> 8 ) & 0x3 ) << 7 ) | ( ( Value >> 10 ) & 0x1 ) << 6 ) | ( ( Value >> 6 ) & 0x1 ) << 5 ) | ( ( Value >> 7 ) & 0x1 ) << 4 ) | ( ( Value >> 1 ) & 0x7 ) << 1 ) ; +} +if ( Kind == PULP :: fixup_PULP_rvc_branch ) { +return ( ( ( Value >> 8 ) & 0x1 ) << 12 ) | ( ( ( Value >> 3 ) & 0x3 ) << 5 ) | ( ( ( Value >> 6 ) & 0x3 ) << 3 ) ; +} +if ( Kind == PULP :: fixup_PULP_tls_got_hi20 ) { +} +if ( Kind == PULP :: fixup_PULP_tls_gd_hi20 ) { +} +if ( Kind == PULP :: fixup_PULP_got_hi20 ) { +} +if ( Kind == PULP :: fixup_PULP_branch ) { +if ( ! isInt < 13 > ( Value ) ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value out of range" ) ; +} +if ( Value & 0x1 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value must be 2-byte aligned." ) ; +} +return ( ( ( Value >> 12 ) & 0x1 ) << 31 ) | ( ( ( Value >> 5 ) & 0x3f ) << 25 ) | ( ( ( Value >> 1 ) & 0x1 ) << 7 ) ; +} +if ( Kind == PULP :: fixup_PULP_jal ) { +if ( ! isInt < 21 > ( Value ) ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value out of range" ) ; +} +if ( Value & 0x1 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value must be 2-byte aligned." ) ; +} +return ( ( ( Value >> 20 ) & 0x1 ) << 19 ) | ( ( ( Value >> 11 ) & 0x1 ) << 8 ) ; +} +llvm_unreachable ( "Unknown fixup kind!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/applyFixup.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/applyFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dabe9fd329c1e442c34e7601af8db1cab4515db1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/applyFixup.cpp @@ -0,0 +1,25 @@ +void PULPAsmBackend :: applyFixup ( const MCAssembler & Asm , const MCFixup & Fixup , const MCValue & Target , MutableArrayRef < char > Data , uint64_t Value , bool IsResolved , const MCSubtargetInfo * STI ) const { +MCFixupKind Kind ; +Kind = Fixup . getKind ( ) ; +if ( Kind >= FirstLiteralRelocationKind ) { +return ; +} +MCContext & Ctx = Asm . getContext ( ) ; +if ( ! Value ) { +return ; +} +MCFixupKindInfo Info ; +Info = getFixupKindInfo ( Kind ) ; +Value = adjustFixupValue ( Fixup , Value , Ctx ) << Info . TargetOffset ; +unsigned Offset ; +Offset = Fixup . getOffset ( ) ; +unsigned NumBytes ; +NumBytes = alignTo ( Info . TargetSize + Info . TargetOffset , 8 ) / 8 ; +assert ( Offset + NumBytes <= Data . size ( ) && "Invalid fixup offset!" ) ; +if ( MCAsmBackend :: Endian == support :: little ) { +unsigned i ; +for ( i = 0 ; i != NumBytes ; ++ i ) { +Data [ Offset + i ] = Data [ Offset + i ] | uint8_t ( ( Value >> ( i * 8 ) ) & 0xff ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dabd6662b40887d4ec71d502d98492e99890fa46 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/createAsmBackend.cpp @@ -0,0 +1,5 @@ +MCAsmBackend * llvm :: createPULPAsmBackend ( const Target & T , const MCSubtargetInfo & STI , const MCRegisterInfo & MRI , const MCTargetOptions & Options ) { +const Triple & TT = STI . getTargetTriple ( ) ; +uint8_t OSABI = MCELFObjectTargetWriter :: getOSABI ( TT . getOS ( ) ) ; +return new PULPAsmBackend ( STI , OSABI , TT . isArch64Bit ( ) , Options ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6b9ff5cfb0328013a649f77b23cdbd3cd8483d2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/createObjectTargetWriter.cpp @@ -0,0 +1,4 @@ +std :: unique_ptr < MCObjectTargetWriter > PULPAsmBackend :: createObjectTargetWriter ( ) const { +StringRef CPU ( "Default" ) ; +return createPULPELFObjectWriter ( OSABI , Is64Bit ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea2d10760edca36021c049ba610fb0d85b23c8c6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/evaluateTargetFixup.cpp @@ -0,0 +1,2 @@ +bool PULPAsmBackend :: evaluateTargetFixup ( const MCAssembler & Asm , const MCAsmLayout & Layout , const MCFixup & Fixup , const MCFragment * DF , const MCValue & Target , uint64_t & Value , bool & WasForced ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6824221f10a156ddf44d2dae960a7bc794ab14c1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxation.cpp @@ -0,0 +1,3 @@ +bool fixupNeedsRelaxation ( const MCFixup & Fixup , uint64_t Value , const MCRelaxableFragment * DF , const MCAsmLayout & Layout ) const override { +llvm_unreachable ( "Handled by fixupNeedsRelaxationAdvanced" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b1ddd00b6a330ea57661a936128a4f723404183 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp @@ -0,0 +1,16 @@ +bool PULPAsmBackend :: fixupNeedsRelaxationAdvanced ( const MCFixup & Fixup , bool Resolved , uint64_t Value , const MCRelaxableFragment * DF , const MCAsmLayout & Layout , const bool WasForced ) const { +if ( ! Resolved ) { +if ( ! WasForced ) { +return true ; +} +} +int64_t Offset ; +Offset = int64_t ( Value ) ; +if ( Fixup . getTargetKind ( ) == PULP :: fixup_PULP_rvc_branch ) { +return Offset > 254 || Offset < - 256 ; +} +if ( Fixup . getTargetKind ( ) == PULP :: fixup_PULP_rvc_jump ) { +return Offset > 2046 || Offset < -2048 ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getFixupKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getFixupKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56b7c17f69d57ea67f93fe78570a0be9d7e28e82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getFixupKind.cpp @@ -0,0 +1,11 @@ +Optional < MCFixupKind > PULPAsmBackend :: getFixupKind ( StringRef Name ) const { +if ( STI . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +unsigned Type ; +Type = llvm :: StringSwitch < unsigned > ( Name ) +. Default ( - 1u ) ; +if ( Type != - 1u ) { +return static_cast < MCFixupKind > ( FirstLiteralRelocationKind + Type ) ; +} +} +return None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..853679194b96290465b052ebccebf0ff5aaa4851 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getFixupKindInfo.cpp @@ -0,0 +1,35 @@ +const MCFixupKindInfo & PULPAsmBackend :: getFixupKindInfo ( MCFixupKind Kind ) const { +const static MCFixupKindInfo Infos [ PULP :: NumTargetFixupKinds ] = { +{ "fixup_PULP_hi20" , 12 , 20 , 0 } , +{ "fixup_PULP_lo12_i" , 20 , 12 , 0 } , +{ "fixup_PULP_lo12_s" , 0 , 32 , 0 } , +{ "fixup_PULP_pcrel_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_pcrel_lo12_i" , 20 , 12 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_pcrel_lo12_s" , 0 , 32 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_got_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_tprel_hi20" , 12 , 20 , 0 } , +{ "fixup_PULP_tprel_lo12_i" , 20 , 12 , 0 } , +{ "fixup_PULP_tprel_lo12_s" , 0 , 32 , 0 } , +{ "fixup_PULP_tprel_add" , 0 , 0 , 0 } , +{ "fixup_PULP_tls_got_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_tls_gd_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_jal" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_branch" , 0 , 32 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_rvc_jump" , 2 , 11 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_rvc_branch" , 0 , 16 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_call" , 0 , 64 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_call_plt" , 0 , 64 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_relax" , 0 , 0 , 0 } , +{ "fixup_PULP_align" , 0 , 0 , 0 } , +{ "fixup_PULP_loop_setup" , 20 , 12 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_PULP_loop_setupi" , 15 , 5 , MCFixupKindInfo :: FKF_IsPCRel } +} ; +if ( Kind >= FirstLiteralRelocationKind ) { +return MCAsmBackend :: getFixupKindInfo ( FK_NONE ) ; +} +if ( Kind < FirstTargetFixupKind ) { +return MCAsmBackend :: getFixupKindInfo ( Kind ) ; +} +assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && "Invalid kind!" ) ; +return Infos [ Kind - FirstTargetFixupKind ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4fe6e5468f88cd3d3b95bd8361cd48f627577e0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getNumFixupKinds.cpp @@ -0,0 +1,3 @@ +unsigned getNumFixupKinds ( ) const override { +return PULP :: NumTargetFixupKinds ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..278c0cc76e473e6406be5828b642072bd5c2c931 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getRelaxedOpcode.cpp @@ -0,0 +1,15 @@ +unsigned PULPAsmBackend :: getRelaxedOpcode ( unsigned Op ) const { +if ( Op == PULP :: C_BEQZ ) { +return PULP :: BEQ ; +} +if ( Op == PULP :: C_BNEZ ) { +return PULP :: BNE ; +} +if ( Op == PULP :: C_J ) { +return PULP :: JAL ; +} +if ( Op == PULP :: C_JAL ) { +return PULP :: JAL ; +} +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2a5361219e721c25ce26aebe56fec7a9b3b3a80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getTargetABI.cpp @@ -0,0 +1,3 @@ +PULPABI :: ABI getTargetABI ( ) const { +return TargetABI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05f473298a9cd8a5b183051967a9322c84a1a94b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/getTargetOptions.cpp @@ -0,0 +1,3 @@ +const MCTargetOptions & getTargetOptions ( ) const { +return TargetOptions ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..528430a7b2a1531754b1acd714da7ccb49b05669 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/mayNeedRelaxation.cpp @@ -0,0 +1,15 @@ +bool PULPAsmBackend :: mayNeedRelaxation ( const MCInst & Inst , const MCSubtargetInfo & STI ) const { +if ( Inst . getOpcode ( ) == PULP :: C_BEQZ ) { +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: C_BNEZ ) { +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: C_J ) { +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: C_JAL ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..822a402de6cea47a1a6ba812bd79bd6dd18e331e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/relaxInstruction.cpp @@ -0,0 +1,32 @@ +void PULPAsmBackend :: relaxInstruction ( const MCInst & Inst , const MCSubtargetInfo & STI , MCInst & Res ) const { +MCInst Res ; +if ( Inst . getOpcode ( ) == PULP :: C_BEQZ ) { +Res . setOpcode ( PULP :: BEQ ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Res . addOperand ( Inst . getOperand ( 1 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_BNEZ ) { +Res . setOpcode ( PULP :: BNE ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Res . addOperand ( Inst . getOperand ( 1 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_J ) { +Res . setOpcode ( PULP :: JAL ) ; +Res . addOperand ( MCOperand :: createReg ( PULP :: X0 ) ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +if ( Inst . getOpcode ( ) == PULP :: C_JAL ) { +Res . setOpcode ( PULP :: JAL ) ; +Res . addOperand ( MCOperand :: createReg ( PULP :: X1 ) ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +llvm_unreachable ( "Opcode not expected!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eb2bcffee489f3110fed5e13dcdb38e9e8805d92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp @@ -0,0 +1,3 @@ +bool requiresDiffExpressionRelocations ( ) const override { +return STI . getFeatureBits ( ) [ PULP :: FeatureRelax ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b44816c017c6bd035ed1453ab624e78566974b0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/setForceRelocs.cpp @@ -0,0 +1,3 @@ +void setForceRelocs ( ) { +ForceRelocs = true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..806046d67f520c7fb7e7fbd2064545c3e9b789cc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldForceRelocation.cpp @@ -0,0 +1,22 @@ +bool PULPAsmBackend :: shouldForceRelocation ( const MCAssembler & Asm , const MCFixup & Fixup , const MCValue & Target ) { +if ( Fixup . getTargetKind ( ) >= FirstLiteralRelocationKind ) { +return true ; +} +if ( Fixup . getTargetKind ( ) == FK_Data_1 ) { +} +if ( Fixup . getTargetKind ( ) == FK_Data_2 ) { +} +if ( Fixup . getTargetKind ( ) == FK_Data_4 ) { +} +if ( Fixup . getTargetKind ( ) == FK_Data_8 ) { +} +if ( Fixup . getTargetKind ( ) == PULP :: fixup_PULP_got_hi20 ) { +return true ; +} +if ( Fixup . getTargetKind ( ) == PULP :: fixup_PULP_tls_got_hi20 ) { +return true ; +} +if ( Fixup . getTargetKind ( ) == PULP :: fixup_PULP_tls_gd_hi20 ) { +return true ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..81c50b8e4f3deba537909b890265eb536531a750 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp @@ -0,0 +1,2 @@ +bool PULPAsmBackend :: shouldInsertExtraNopBytesForCodeAlign ( MCAssembler & Asm , const MCAsmLayout & Layout , MCAlignFragment & AF ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1f4fbb1c6becfdf47f5827e2509aceded27313f2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp @@ -0,0 +1,2 @@ +bool PULPAsmBackend :: shouldInsertFixupForCodeAlign ( MCAssembler & Asm , const MCAsmLayout & Layout , MCAlignFragment & AF ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a43284016aa45e2c1ea1f41925d773e828f9c67a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/willForceRelocations.cpp @@ -0,0 +1,3 @@ +bool willForceRelocations ( ) const { +return STI . getFeatureBits ( ) [ PULP :: FeatureRelax ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/writeNopData.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/writeNopData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9b4165982f797f20da5603b1bed12d3e04f33e42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/writeNopData.cpp @@ -0,0 +1,14 @@ +bool PULPAsmBackend :: writeNopData ( raw_ostream & OS , uint64_t Count ) const { +if ( Count % 2 != 0 ) { +return false ; +} +uint64_t NopCount = Count / 4 ; +uint64_t i ; +for ( i = 0 ; i < NopCount ; ++ i ) { +OS . write ( "\x13\0\0\0" , 4 ) ; +} +if ( Count % 4 == 2 ) { +OS . write ( "\x01\0" , 2 ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7e335aecb6bb50dec6fc8508a171446cd094a51 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmBackend/~AsmBackend.cpp @@ -0,0 +1,2 @@ +~ PULPAsmBackend ( ) override { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..227571e26d6dcf0e4e8a509d9da11613b05d6d3c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,10 @@ +PULPMCAsmInfo :: PULPMCAsmInfo ( const Triple & TT ) { +CodePointerSize = TT . isArch64Bit ( ) ? 8 : 4 ; +CalleeSaveStackSlotSize = TT . isArch64Bit ( ) ? 8 : 4 ; +CommentString = "#" ; +AlignmentIsInBytes = false ; +SupportsDebugInformation = true ; +ExceptionsType = ExceptionHandling :: DwarfCFI ; +Data16bitsDirective = "\t.half\t" ; +Data32bitsDirective = "\t.word\t" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/anchor.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c47b5946452936592ff5affced053487a8599f78 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/anchor.cpp @@ -0,0 +1,2 @@ +void PULPMCAsmInfo :: anchor ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4832ffbee13bafe8b43783032c374f57e2f1079 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/AsmInfo/getExprForFDESymbol.cpp @@ -0,0 +1,7 @@ +const MCExpr * PULPMCAsmInfo :: getExprForFDESymbol ( const MCSymbol * Sym , unsigned Encoding , MCStreamer & Streamer ) const { +if ( Encoding & dwarf :: DW_EH_PE_pcrel ) { +MCContext & Ctx = Streamer . getContext ( ) ; +return PULPMCExpr :: create ( MCSymbolRefExpr :: create ( Sym , MCSymbolRefExpr :: VK_PULP_None , Ctx ) , PULPMCExpr :: VK_32_PCREL , Ctx ) ; +} +return MCAsmInfo :: getExprForFDESymbol ( Sym , Encoding , Streamer ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/ABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/ABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..344e5390354582b3fcc0654dedcf88d18f31172b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/ABI.cpp @@ -0,0 +1,10 @@ +enum ABI { +ABI_ILP32 , +ABI_ILP32F , +ABI_ILP32D , +ABI_ILP32E , +ABI_LP64 , +ABI_LP64F , +ABI_LP64D , +ABI_Unknown +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/FenceField.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/FenceField.cpp new file mode 100644 index 0000000000000000000000000000000000000000..951b42ade0ebffe40b0910851cdb0d179096c57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/FenceField.cpp @@ -0,0 +1,6 @@ +enum FenceField { +I = 8 , +O = 4 , +R = 2 , +W = 1 +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/II.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/II.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f22e5d241f5349952f05b0f4da6faa973010d741 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/II.cpp @@ -0,0 +1,53 @@ +namespace PULPII { +enum { +InstFormatPseudo = 0 , +InstFormatR = 1 , +InstFormatR4 = 2 , +InstFormatI = 3 , +InstFormatS = 4 , +InstFormatB = 5 , +InstFormatU = 6 , +InstFormatJ = 7 , +InstFormatCR = 8 , +InstFormatCI = 9 , +InstFormatCSS = 10 , +InstFormatCIW = 11 , +InstFormatCL = 12 , +InstFormatCS = 13 , +InstFormatCA = 14 , +InstFormatCB = 15 , +InstFormatCJ = 16 , +InstFormatOther = 17 , +InstFormatMask = 31 , +ConstraintShift = 5 , +ConstraintMask = 0b111 << ConstraintShift , +VLMulSh ConstraintShift = 3 , +VLMulMask = 0b111 << VLMulShift , +HasDummyMaskOpShift = VLMulShift + 3 , +HasDummyMaskOpMask = 1 << HasDummyMaskOpShift , +WritesElement0Shift HasDummyMaskOpShift + 1 , +WritesElement0Mask = 1 << WritesElement0Shift , +HasMergeOpShift = WritesElement0Shift + 1 , +HasMergeOpMask = 1 << HasMergeOpShift , +HasSEWOpShift = HasSEWOpShift + 1 , +HasSEWOpMask = 1 << HasSEWOpShift , +HasVLOpShift = HasSEWOpShift + 1 , +HasVLOpMask = 1 << HasVLOpShift , +} ; +enum { +MO_None = 0 , +MO_CALL = 1 , +MO_PLT = 2 , +MO_LO = 3 , +MO_HI = 4 , +MO_PCREL_LO = 5 , +MO_PCREL_HI = 6 , +MO_GOT_HI = 7 , +MO_TPREL_LO = 8 , +MO_TPREL_HI = 9 , +MO_TPREL_ADD = 10 , +MO_TLS_GOT_HI = 11 , +MO_TLS_GD_HI = 12 , +MO_DIRECT_FLAG_MASK = 15 +} ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/OperandType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/OperandType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..81022c53abe76556935172dc05a22c93030da9e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/OperandType.cpp @@ -0,0 +1,12 @@ +enum OperandType : unsigned { +OPERAND_FIRST_PULP_IMM = MCOI :: OPERAND_FIRST_TARGET , +OPERAND_UIMM4 = OPERAND_FIRST_PULP_IMM , +OPERAND_UIMM5 , +OPERAND_UIMM12 , +OPERAND_UIMM12M1 , +OPERAND_UIMM3 , +OPERAND_SIMM12 , +OPERAND_UIMM20 , +OPERAND_UIMMLOG2XLEN , +OPERAND_LAST_PULP_IMM OPERAND_UIMMLOG2XLEN +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..60795532f533987057867755321e75674abc3a2a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RISCVVSEW.cpp @@ -0,0 +1,10 @@ +enum class PULPVSEW { +SEW_8 = 0 , +SEW_16 , +SEW_32 , +SEW_64 , +SEW_128 , +SEW_256 , +SEW_512 , +SEW_1024 , +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04397cb26419a3b482dac55f78f74f9f2246284c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RVVConstraintType.cpp @@ -0,0 +1,6 @@ +enum RVVConstraintType { +NoConstraint = 0 , +VS2Constraint = 0b001 , +VS1Constraint = 0b010 , +VMConstraint = 0b100 +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RoundingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cea4c4f62e6b6477a15b997dfeb3942a5b63578a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/RoundingMode.cpp @@ -0,0 +1,9 @@ +enum RoundingMode { +RNE = 0 , +RTZ = 1 , +RDN = 2 , +RUP = 3 , +RMM = 4 , +DYN = 7 , +Invalid +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/VLMUL.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/VLMUL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4bdd002834cf184de3a3cb1c9c0ed536f658020 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/VLMUL.cpp @@ -0,0 +1,10 @@ +enum class PULPVLMUL { +LMUL_1 = 0 , +LMUL_2 , +LMUL_4 , +LMUL_8 , +LMUL_RESERVED , +LMUL_F8 , +LMUL_F4 , +LMUL_F2 +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/VMTs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/VMTs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98d11433e43d425ab972f7677297c9063fba5103 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/VMTs.cpp @@ -0,0 +1,37 @@ +enum PULPVMVTs { +vint8mf8_t = MVT :: nxv1i8 , +vint8mf4_t = MVT :: nxv2i8 , +vint8mf2_t = MVT :: nxv4i8 , +vint8m1_t = MVT :: nxv8i8 , +vint8m2_t = MVT :: nxv16i8 , +vint8m4_t = MVT :: nxv32i8 , +vint8m8_t = MVT :: nxv64i8 , +vint16mf4_t = MVT :: nxv1i16 , +vint16mf2_t = MVT :: nxv2i16 , +vint16m1_t = MVT :: nxv4i16 , +vint16m2_t = MVT :: nxv8i16 , +vint16m4_t = MVT :: nxv16i16 , +vint16m8_t = MVT :: nxv32i16 , +vint32mf2_t = MVT :: nxv1i32 , +vint32m1_t = MVT :: nxv2i32 , +vint32m2_t = MVT :: nxv4i32 , +vint32m4_t = MVT :: nxv8i32 , +vint32m8_t = MVT :: nxv16i32 , +vint64m1_t = MVT :: nxv1i64 , +vint64m2_t = MVT :: nxv2i64 , +vint64m4_t = MVT :: nxv4i64 , +vint64m8_t = MVT :: nxv8i64 , +vfloat16mf4_t = MVT :: nxv1f16 , +vfloat16mf2_t = MVT :: nxv2f16 , +vfloat16m1_t = MVT :: nxv4f16 , +vfloat16m2_t = MVT :: nxv8f16 , +vfloat16m4_t = MVT :: nxv16f16 , +vfloat16m8_t = MVT :: nxv32f16 , +vfloat32mf2_t = MVT :: nxv1f32 , +vfloat32m1_t = MVT :: nxv2f32 , +vfloat32m2_t = MVT :: nxv4f32 , +vfloat32m4_t = MVT :: nxv8f32 , +vfloat32m8_t = MVT :: nxv16f32 , +vfloat64m1_t = MVT :: nxv1f64 , +vfloat64m2_t = +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5fa52e122725f782f792aeda1fe915f7677e6699 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/computeTargetABI.cpp @@ -0,0 +1,14 @@ +ABI computeTargetABI ( const Triple & TT , FeatureBitset FeatureBits , StringRef ABIName ) { +auto TargetABI = getTargetABI ( ABIName ) ; +if ( ! ABIName . empty ( ) ) { +if ( TT . isPULP64 ( ) ) { +TargetABI = PULPABIInfo :: N64 ( ) ; +} +} +if ( ! ABIName . empty ( ) ) { +if ( ! TT . isPULP64 ( ) ) { +TargetABI = PULPABIInfo :: O32 ( ) ; +} +} +return TargetABI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/getTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2a6bf078a014887a1743d788e548c67a7b2b39c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/getTargetABI.cpp @@ -0,0 +1,24 @@ +ABI getTargetABI ( StringRef Str ) { +if ( Str == "ilp32" ) { +return ABI_ILP32 ; +} +if ( Str == "ilp32f" ) { +return ABI_ILP32F ; +} +if ( Str == "ilp32d" ) { +return ABI_ILP32D ; +} +if ( Str == "ilp32e" ) { +return ABI_ILP32E ; +} +if ( Str == "lp64" ) { +return ABI_LP64 ; +} +if ( Str == "lp64f" ) { +return ABI_LP64F ; +} +if ( Str == "lp64d" ) { +return ABI_LP64D ; +} +return ABI_Unknown ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5a29d5669cb6dd2ed9319eab5aa4efe3242354a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/roundingModeToString.cpp @@ -0,0 +1,21 @@ +inline static StringRef roundingModeToString ( RoundingMode RndMod ) { +if ( RndMod == PULPFPRndMode::RNE ) { +return "rne" ; +} +if ( RndMod == PULPFPRndMode::RTZ ) { +return "rtz" ; +} +if ( RndMod == PULPFPRndMode::RDN ) { +return "rdn" ; +} +if ( RndMod == PULPFPRndMode::RUP ) { +return "rup" ; +} +if ( RndMod == PULPFPRndMode::RMM ) { +return "rmm" ; +} +if ( RndMod == PULPFPRndMode::DYN ) { +return "dyn" ; +} +llvm_unreachable ( "Unknown floating point rounding mode" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0d7efba8ca0b44081f153ed729c2568ae08eb4dc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/stringToRoundingMode.cpp @@ -0,0 +1,21 @@ +inline static RoundingMode stringToRoundingMode ( StringRef Str ) { +if ( Str == "rne" ) { +return PULPFPRndMode::RNE ; +} +if ( Str == "rtz" ) { +return PULPFPRndMode::RTZ ; +} +if ( Str == "rdn" ) { +return PULPFPRndMode::RDN ; +} +if ( Str == "rup" ) { +return PULPFPRndMode::RUP ; +} +if ( Str == "rmm" ) { +return PULPFPRndMode::RMM ; +} +if ( Str == "dyn" ) { +return PULPFPRndMode::DYN ; +} +return PULPFPRndMode::Invalid ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/validate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/validate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f87f8d9df4e6e209200b63471299274b467fe694 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/BaseInfo/validate.cpp @@ -0,0 +1,7 @@ +void validate ( const Triple & TT , const FeatureBitset & FeatureBits ) { +if ( ! isABI_O32 ( ) ) { +if ( ! useOddSPReg ( ) ) { +report_fatal_error ( "RV32E can't be enabled for an RV64 target" ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31b98b689bb4bf72c473a700cc253fe257144423 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +PULPELFObjectWriter :: PULPELFObjectWriter ( uint8_t OSABI , bool Is64Bit ) : MCELFObjectTargetWriter ( Is64Bit , OSABI , EM_PULP , true ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96abdde135d390a814ad80404beecf995840dd7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/createELFObjectWriter.cpp @@ -0,0 +1,3 @@ +std :: unique_ptr < MCObjectTargetWriter > llvm :: createPULPELFObjectWriter ( uint8_t OSABI , bool Is64Bit ) { +return std :: make_unique < PULPELFObjectWriter > ( OSABI , Is64Bit ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..59566baccf9d3c6f1e46dd012c8dc3f7584dd504 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/getRelocType.cpp @@ -0,0 +1,140 @@ +unsigned PULPELFObjectWriter :: getRelocType ( MCContext & Ctx , const MCValue & Target , const MCFixup & Fixup , bool IsPCRel ) const { +const PULPMCExpr * SExpr ; +if ( SExpr = dyn_cast < PULPMCExpr > ( Fixup . getValue ( ) ) ) { +if ( SExpr -> getKind ( ) == PULPMCExpr :: VK_32_PCREL ) { +return ELF :: R_PULP_32_PCREL ; +} +} +const MCExpr * Expr ; +Expr = Fixup . getValue ( ) ; +unsigned Kind ; +Kind = Fixup . getTargetKind ( ) ; +if ( Kind >= FirstLiteralRelocationKind ) { +return Kind - FirstLiteralRelocationKind ; +} +if ( IsPCRel ) { +if ( Kind == FK_PCRel_4 ) { +return ELF :: R_PULP_32_PCREL ; +} +if ( Kind == PULP :: fixup_PULP_pcrel_hi20 ) { +return ELF :: R_PULP_PCREL_HI20 ; +} +if ( Kind == PULP :: fixup_PULP_pcrel_lo12_i ) { +return ELF :: R_PULP_PCREL_LO12_I ; +} +if ( Kind == PULP :: fixup_PULP_pcrel_lo12_s ) { +return ELF :: R_PULP_PCREL_LO12_S ; +} +if ( Kind == FK_Data_4 ) { +return ELF :: R_PULP_32_PCREL ; +} +if ( Kind == PULP :: fixup_PULP_got_hi20 ) { +return ELF :: R_PULP_GOT_HI20 ; +} +if ( Kind == PULP :: fixup_PULP_tls_got_hi20 ) { +return ELF :: R_PULP_TLS_GOT_HI20 ; +} +if ( Kind == PULP :: fixup_PULP_tls_gd_hi20 ) { +return ELF :: R_PULP_TLS_GD_HI20 ; +} +if ( Kind == PULP :: fixup_PULP_jal ) { +return ELF :: R_PULP_JAL ; +} +if ( Kind == PULP :: fixup_PULP_branch ) { +return ELF :: R_PULP_BRANCH ; +} +if ( Kind == PULP :: fixup_PULP_rvc_jump ) { +return ELF :: R_PULP_RVC_JUMP ; +} +if ( Kind == PULP :: fixup_PULP_rvc_branch ) { +return ELF :: R_PULP_RVC_BRANCH ; +} +if ( Kind == PULP :: fixup_PULP_call ) { +return ELF :: R_PULP_CALL ; +} +if ( Kind == PULP :: fixup_PULP_call_plt ) { +return ELF :: R_PULP_CALL_PLT ; +} +if ( Kind == PULP :: fixup_PULP_loop_setup ) { +return ELF :: R_PULP_LOOP_SETUP ; +} +if ( Kind == PULP :: fixup_PULP_loop_setupi ) { +return ELF :: R_PULP_LOOP_SETUPI ; +} +Ctx . reportError ( Fixup . getLoc ( ) , "Unsupported relocation type" ) ; +return ELF :: R_PULP_NONE ; +} +if ( Kind == FK_Data_4 ) { +return ELF :: R_PULP_32 ; +} +if ( Kind == FK_Data_8 ) { +return ELF :: R_PULP_64 ; +} +if ( Kind == FK_Data_Add_1 ) { +return ELF :: R_PULP_ADD8 ; +} +if ( Kind == FK_Data_Add_2 ) { +return ELF :: R_PULP_ADD16 ; +} +if ( Kind == FK_Data_Add_4 ) { +return ELF :: R_PULP_ADD32 ; +} +if ( Kind == FK_Data_Add_8 ) { +return ELF :: R_PULP_ADD64 ; +} +if ( Kind == FK_Data_1 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "1-byte data relocations not supported" ) ; +return ELF :: R_PULP_NONE ; +} +if ( Kind == FK_Data_2 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "2-byte data relocations not supported" ) ; +return ELF :: R_PULP_NONE ; +} +if ( Kind == FK_Data_Add_6b ) { +return ELF :: R_PULP_SET6 ; +} +if ( Kind == FK_Data_Sub_1 ) { +return ELF :: R_PULP_SUB8 ; +} +if ( Kind == FK_Data_Sub_2 ) { +return ELF :: R_PULP_SUB16 ; +} +if ( Kind == FK_Data_Sub_4 ) { +return ELF :: R_PULP_SUB32 ; +} +if ( Kind == FK_Data_Sub_8 ) { +return ELF :: R_PULP_SUB64 ; +} +if ( Kind == FK_Data_Sub_6b ) { +return ELF :: R_PULP_SUB6 ; +} +if ( Kind == PULP :: fixup_PULP_hi20 ) { +return ELF :: R_PULP_HI20 ; +} +if ( Kind == PULP :: fixup_PULP_lo12_i ) { +return ELF :: R_PULP_LO12_I ; +} +if ( Kind == PULP :: fixup_PULP_lo12_s ) { +return ELF :: R_PULP_LO12_S ; +} +if ( Kind == PULP :: fixup_PULP_tprel_hi20 ) { +return ELF :: R_PULP_TPREL_HI20 ; +} +if ( Kind == PULP :: fixup_PULP_tprel_lo12_i ) { +return ELF :: R_PULP_TPREL_LO12_I ; +} +if ( Kind == PULP :: fixup_PULP_tprel_lo12_s ) { +return ELF :: R_PULP_TPREL_LO12_S ; +} +if ( Kind == PULP :: fixup_PULP_tprel_add ) { +return ELF :: R_PULP_TPREL_ADD ; +} +if ( Kind == PULP :: fixup_PULP_relax ) { +return ELF :: R_PULP_RELAX ; +} +if ( Kind == PULP :: fixup_PULP_align ) { +return ELF :: R_PULP_ALIGN ; +} +Ctx . reportError ( Fixup . getLoc ( ) , "Unsupported relocation type" ) ; +return ELF :: R_PULP_NONE ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d32e5d47cdf21c903c9c0bba5ef56efc3a118a62 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp @@ -0,0 +1,3 @@ +bool needsRelocateWithSymbol ( const MCSymbol & Sym , unsigned Type ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d37d2a9a3430b7b74a6df173422d63f3e6907b5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFObjectWriter/~ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +PULPELFObjectWriter :: ~ PULPELFObjectWriter ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d4a8b8d43739a9660b269fe60e4c13f60b08b9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/AttributeItem.cpp @@ -0,0 +1,6 @@ +struct AttributeItem { +AttributeType Type ; +unsigned Tag ; +unsigned IntValue ; +std :: string StringValue ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/AttributeType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/AttributeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..11e84b4eac2ba89f7bac001f476bce2df9b96af0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/AttributeType.cpp @@ -0,0 +1,6 @@ +enum class AttributeType { +Hidden , +Numeric , +Text , +NumericAndText +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6ffeb56d67ab3455936bd2c17aba9404b381714 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/TargetELFStreamer.cpp @@ -0,0 +1,21 @@ +PULPTargetELFStreamer :: PULPTargetELFStreamer ( MCStreamer & S , const MCSubtargetInfo & STI ) : PULPTargetStreamer ( S ) , CurrentVendor ( "PULP" ) { +MCAssembler & MCA ; +MCA = getStreamer ( ) . getAssembler ( ) ; +const FeatureBitset & Features ; +Features = STI . getFeatureBits ( ) ; +PULPMCAsmBackend & MAB ; +MAB = static_cast < PULPMCAsmBackend & > ( MCA . getBackend ( ) ) ; +unsigned EFlags ; +EFlags = MCA . getELFHeaderEFlags ( ) ; +PULPABI :: ABI ABI ; +ABI = MAB . getTargetABI ( ) ; +if ( Features [ PULP :: FeatureStdExtC ] ) { +EFlags = EFlags | ELF :: EF_PULP_RVC ; +} +EFlags = EFlags | ELF :: EF_PULP_FLOAT_ABI_SINGLE ; +EFlags = EFlags | ELF :: EF_PULP_FLOAT_ABI_SINGLE ; +EFlags = EFlags | ELF :: EF_PULP_FLOAT_ABI_DOUBLE ; +EFlags = EFlags | ELF :: EF_PULP_FLOAT_ABI_DOUBLE ; +EFlags = EFlags | ELF :: EF_PULP_RVE ; +MCA . setELFHeaderEFlags ( EFlags ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08de53c9fe56e417a8349d0c5fa70b3e08d95553 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/calculateContentSize.cpp @@ -0,0 +1,29 @@ +size_t PULPTargetELFStreamer :: calculateContentSize ( ) const { +size_t Result ; +Result = 0 ; +size_t i ; +for ( i = 0 ; i < Contents . size ( ) ; ++ i ) { +AttributeItem item ; +item = Contents [ i ] ; +if ( item . Type == AttributeType :: Hidden ) { +continue ; +} +if ( item . Type == AttributeType :: Numeric ) { +Result = Result + getULEB128Size ( item . Tag ) ; +Result = Result + getULEB128Size ( item . IntValue ) ; +continue ; +} +if ( item . Type == AttributeType :: Text ) { +Result = Result + getULEB128Size ( item . Tag ) ; +Result = Result + item . StringValue . size ( ) + 1 ; +continue ; +} +if ( item . Type == AttributeType :: NumericAndText ) { +Result = Result + getULEB128Size ( item . Tag ) ; +Result = Result + getULEB128Size ( item . IntValue ) ; +Result = Result + item . StringValue . size ( ) + 1 ; +continue ; +} +} +return Result ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7fa743543411a5977b60fa062cf6e12b4ee33d4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void PULPTargetELFStreamer :: emitAttribute ( unsigned Attribute , unsigned Value ) { +setAttributeItem ( Attribute , Value , true ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3769c6f75dd7bc54169267ec548d0453b6f7f763 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionNoPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84ec457f710e910bb12e66f4e8a98d76f956a02a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionNoRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47958aef573e44aeefbdbde61ca93eb3f74edcc1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionNoRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27cc3f4e2fe15ab1f05486c4968af4010a8d2dea --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..efc9d5cdd85d07c80e8f66a6356960f35ac3856b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionPop ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09c011e895ba357df2479b477aaf333135f09d7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionPush ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f1743ee6a9af4393a9e93565374c9e7b65a2ec6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..17216e8388da5bf43be1a21db1fcb309f2ce1664 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,2 @@ +void PULPTargetELFStreamer :: emitDirectiveOptionRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..930bb8773438fab381a82a9889a3af706517d5b6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,3 @@ +void PULPTargetELFStreamer :: emitIntTextAttribute ( unsigned Attribute , unsigned IntValue , StringRef StringValue ) { +setAttributeItems ( Attribute , IntValue , StringValue , true ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0cb2883fb06e2a7c3f8eccd4300cab832cebd8da --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/emitTextAttribute.cpp @@ -0,0 +1,3 @@ +void PULPTargetELFStreamer :: emitTextAttribute ( unsigned Attribute , StringRef String ) { +setAttributeItem ( Attribute , String , true ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31dc2186b1f11826efd699f17003eb2e96f78284 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/finishAttributeSection.cpp @@ -0,0 +1,45 @@ +void PULPTargetELFStreamer :: finishAttributeSection ( ) { +if ( Contents . empty ( ) ) { +return ; +} +MCELFStreamer & Streamer = getStreamer ( ) ; +if ( AttributeSection ) { +Streamer . SwitchSection ( AttributeSection ) ; +} +if ( ! AttributeSection ) { +AttributeSection = Streamer . getContext ( ) . getELFSection ( ".PULP_lower.attributes" , ELF :: SHT_PULP_ATTRIBUTES , 0 ) ; +Streamer . SwitchSection ( AttributeSection ) ; +Streamer . emitInt8 ( ELFAttrs :: Format_Version ) ; +} +const size_t VendorHeaderSize = 4 + CurrentVendor . size ( ) + 1 ; +const size_t TagHeaderSize = 1 + 4 ; +const size_t ContentsSize = calculateContentSize ( ) ; +Streamer . emitInt32 ( VendorHeaderSize + TagHeaderSize + ContentsSize ) ; +Streamer . emitBytes ( CurrentVendor ) ; +Streamer . emitInt8 ( 0 ) ; +Streamer . emitInt8 ( ELFAttrs :: File ) ; +Streamer . emitInt32 ( TagHeaderSize + ContentsSize ) ; +size_t i ; +for ( i = 0 ; i < Contents . size ( ) ; ++ i ) { +AttributeItem item ; +item = Contents [ i ] ; +Streamer . emitULEB128IntValue ( item . Tag ) ; +if ( item . Type == AttributeType :: Numeric ) { +Streamer . emitULEB128IntValue ( item . IntValue ) ; +continue ; +} +if ( item . Type == AttributeType :: Text ) { +Streamer . emitBytes ( item . StringValue ) ; +Streamer . emitInt8 ( 0 ) ; +continue ; +} +if ( item . Type == AttributeType :: NumericAndText ) { +Streamer . emitULEB128IntValue ( item . IntValue ) ; +Streamer . emitBytes ( item . StringValue ) ; +Streamer . emitInt8 ( 0 ) ; +continue ; +} +llvm_unreachable ( "Invalid attribute type" ) ; +} +Contents . clear ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4c4f3a04f8aff4a632364d2dd166a8131e8ce0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/getAttributeItem.cpp @@ -0,0 +1,9 @@ +AttributeItem * getAttributeItem ( unsigned Attribute ) { +size_t i ; +for ( i = 0 ; i < Contents . size ( ) ; ++ i ) { +if ( Contents [ i ] . Tag == Attribute ) { +return & Contents [ i ] ; +} +} +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/getStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/getStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4092dca19a88ce96bff6ea03fbfbed16ffbc16b2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/getStreamer.cpp @@ -0,0 +1,3 @@ +MCELFStreamer & PULPTargetELFStreamer :: getStreamer ( ) { +return static_cast < MCELFStreamer & > ( Streamer ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4226193c148e049fab7718f81ce0f0309e9557d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItem1.cpp @@ -0,0 +1,12 @@ +void setAttributeItem ( unsigned Attribute , unsigned Value , bool OverwriteExisting ) { +AttributeItem * Item ; +if ( Item = getAttributeItem ( Attribute ) ) { +if ( ! OverwriteExisting ) { +return ; +} +Item -> Type = AttributeType :: Numeric ; +Item -> IntValue = Value ; +return ; +} +Contents . push_back ( { AttributeType :: Numeric , Attribute , Value , "" } ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b05a1b3223da60321ec2a64b1c6e99126cbe4e0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItem2.cpp @@ -0,0 +1,12 @@ +void setAttributeItem ( unsigned Attribute , StringRef Value , bool OverwriteExisting ) { +AttributeItem * Item ; +if ( Item = getAttributeItem ( Attribute ) ) { +if ( ! OverwriteExisting ) { +return ; +} +Item -> Type = AttributeType :: Text ; +Item -> StringValue = std :: string ( Value ) ; +return ; +} +Contents . push_back ( { AttributeType :: Text , Attribute , 0 , std :: string ( Value ) } ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52f682e8808f82b0ac277c275f668b743d449d66 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/ELFStreamer/setAttributeItems.cpp @@ -0,0 +1,13 @@ +void setAttributeItems ( unsigned Attribute , unsigned IntValue , StringRef StringValue , bool OverwriteExisting ) { +AttributeItem * Item ; +if ( Item = getAttributeItem ( Attribute ) ) { +if ( ! OverwriteExisting ) { +return ; +} +Item -> Type = AttributeType :: NumericAndText ; +Item -> IntValue = IntValue ; +Item -> StringValue = std :: string ( StringValue ) ; +return ; +} +Contents . push_back ( { AttributeType :: NumericAndText , Attribute , IntValue , std :: string ( StringValue ) } ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/FixupKind/enumFixups.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/FixupKind/enumFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ab953719246e1e37356da491ec2593fd0d4f512a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/FixupKind/enumFixups.cpp @@ -0,0 +1,27 @@ +enum Fixups { +fixup_PULP_hi20 = FirstTargetFixupKind , +fixup_PULP_lo12_i , +fixup_PULP_lo12_s , +fixup_PULP_pcrel_hi20 , +fixup_PULP_pcrel_lo12_i , +fixup_PULP_pcrel_lo12_s , +fixup_PULP_got_hi20 , +fixup_PULP_tprel_hi20 , +fixup_PULP_tprel_lo12_i , +fixup_PULP_tprel_lo12_s , +fixup_PULP_tprel_add , +fixup_PULP_tls_got_hi20 , +fixup_PULP_tls_gd_hi20 , +fixup_PULP_jal , +fixup_PULP_branch , +fixup_PULP_rvc_jump , +fixup_PULP_rvc_branch , +fixup_PULP_call , +fixup_PULP_call_plt , +fixup_PULP_relax , +fixup_PULP_align , +fixup_PULP_loop_setup , +fixup_PULP_loop_setupi , +fixup_PULP_invalid , +NumTargetFixupKinds = fixup_PULP_invalid - FirstTargetFixupKind +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/InstPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/InstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e1d69105062c1831a018759c97d868f47f55e4b1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/InstPrinter.cpp @@ -0,0 +1,2 @@ +PULPInstPrinter ( const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI ) : MCInstPrinter ( MAI , MII , MRI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ad9b15ac504f9456567f7c0675eccc063e1aa67 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/applyTargetSpecificCLOption.cpp @@ -0,0 +1,11 @@ +bool PULPInstPrinter :: applyTargetSpecificCLOption ( StringRef Opt ) { +if ( Opt == "numeric" ) { +ArchRegNames = true ; +return true ; +} +if ( Opt == "no-aliases" ) { +NoAliases = true ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/getRegisterName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/getRegisterName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d808eac711fb43d43bf4ea48e63661d71474b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/getRegisterName.cpp @@ -0,0 +1,3 @@ +const char * PULPInstPrinter :: getRegisterName ( unsigned RegNo ) { +return getRegisterName ( RegNo , ArchRegNames ? PULP :: NoRegAltName : PULP :: ABIRegAltName ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..360edebaf959d336e884373e92a4e2f964841fc8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printAtomicMemOp.cpp @@ -0,0 +1,10 @@ +void PULPInstPrinter :: printAtomicMemOp ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +const MCOperand & Op1 ; +Op1 = MI -> getOperand ( OpNo ) ; +const MCOperand & Op2 ; +Op2 = MI -> getOperand ( OpNo + 1 ) ; +OS << ")" ; +printRegName ( O , Op1 . getReg ( ) ) ; +unsigned Offset ; +OS << ")" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c5935f45d4d64c9da042e07014a80001e475433 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printBranchOperand.cpp @@ -0,0 +1,17 @@ +void PULPInstPrinter :: printBranchOperand ( const MCInst * MI , uint64_t Address , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & OS ) { +const MCOperand & MO = MI -> getOperand ( OpNo ) ; +if ( ! MO . isImm ( ) ) { +return printOperand ( MI , OpNo , STI , OS ) ; +} +if ( PrintBranchImmAsAddress ) { +uint64_t Target ; +Target = Address + MO . getImm ( ) ; +if ( ! STI . hasFeature ( PULP :: Feature64Bit ) ) { +Target = Target & 0xffffffff ; +} +OS << formatHex ( Target ) ; +} +if ( ! PrintBranchImmAsAddress ) { +OS << MO . getImm ( ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f49beac7b1f755ebdcef233aabddbefa6c9576f0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printCSRSystemRegister.cpp @@ -0,0 +1,16 @@ +void PULPInstPrinter :: printCSRSystemRegister ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +unsigned Val ; +Val = MI -> getOperand ( OpNo ) . getImm ( ) ; +return ; +const SysReg :: SysReg * Reg ; +Reg = SysReg :: lookupSysRegByEncoding ( Val ) ; +if ( Reg ) { +if ( Reg -> haveRequiredFeatures ( STI . getFeatureBits ( ) ) ) { +OS << Reg -> Name ; +} +} +if ( ! Reg ) { +return ; +if ( ! Reg -> haveRequiredFeatures ( STI . getFeatureBits ( ) ) ) { +return ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printFRMArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0dd8cc5dee2138ccd45c2158ad2d3fdd5070ff87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printFRMArg.cpp @@ -0,0 +1,4 @@ +void PULPInstPrinter :: printFRMArg ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +auto FRMArg = MI -> getOperand ( OpNo ) . getImm ( ) ; +OS << FPRndMode :: roundingModeToString ( MO . getImm ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printFenceArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..425fb947d9e83bfbe88c57a1457f3fcabb2265e0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printFenceArg.cpp @@ -0,0 +1,11 @@ +void PULPInstPrinter :: printFenceArg ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +unsigned FenceArg = MI -> getOperand ( OpNo ) . getImm ( ) ; +assert ( ( FenceArg >> 4 ) == 0 ) && "Invalid immediate in printFenceArg!" ) ; +OS << 'i' ; +OS << 'o' ; +OS << 'r' ; +OS << 'w' ; +if ( FenceArg == 0 ) { +OS << "unknown" ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b18a6bdb6a25cd30b6d4dd9fdb2073483bfacfb8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printInst.cpp @@ -0,0 +1,22 @@ +void PULPInstPrinter :: printInst ( const MCInst * MI , uint64_t Address , StringRef Annot , const MCSubtargetInfo & STI , raw_ostream & O ) { +bool Res ; +Res = false ; +const MCInst * NewMI ; +MCInst UncompressedMI ; +if ( ! printAliasInstr ( MI , STI , O ) ) { +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +return ; +} +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +return ; +} +if ( ! printAliasInstr ( NewMI , Address , STI , O ) ) { +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +return ; +} +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c41c3aeef1a8f4bd68ba6cd15500ce8e8133b2e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printOperand.cpp @@ -0,0 +1,14 @@ +void PULPInstPrinter :: printOperand ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & OS , const char * Modifier ) { +assert ( ( Modifier == 0 || Modifier [ 0 ] == 0 ) && "No modifiers supported" ) ; +const MCOperand & Op = MI -> getOperand ( OpNo ) ; +if ( Op . isReg ( ) ) { +OS << getRegisterName ( Op . getReg ( ) ) ; +return ; +} +if ( Op . isImm ( ) ) { +OS << Op . getImm ( ) ; +return ; +} +assert ( Op . isExpr ( ) && "Unknown operand kind in printOperand" ) ; +Op . getExpr ( ) -> print ( OS , & MAI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printRegName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printRegName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1593b5db251b410e059dd36929f103669af6ce83 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printRegName.cpp @@ -0,0 +1,3 @@ +void PULPInstPrinter :: printRegName ( raw_ostream & OS , unsigned RegNo ) const { +OS << getRegisterName ( RegNo ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91f881764167a81cca17eab6a371d75ac420a4c6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printVMaskReg.cpp @@ -0,0 +1,9 @@ +void PULPInstPrinter :: printVMaskReg ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +const MCOperand & Op1 ; +Op1 = MI -> getOperand ( OpNo ) ; +const MCOperand & Op2 ; +Op2 = MI -> getOperand ( OpNo + 1 ) ; +OS << ", " ; +printRegName ( O , Op1 . getReg ( ) ) ; +OS << ".t" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printVTypeI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f2b2f53421bc0591e82767a79f3f4d155dfddb1c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/InstPrinter/printVTypeI.cpp @@ -0,0 +1,5 @@ +void PULPInstPrinter :: printVTypeI ( const MCInst * MI , unsigned OpNo , raw_ostream & O ) { +unsigned Imm ; +Imm = MI -> getOperand ( OpNo ) . getImm ( ) ; +PULPVType :: printVType ( Imm , O ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..07fc8b1e5fbecddbec29c534040fb035dcbabbc1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +PULPMCCodeEmitter ( MCContext & ctx , MCInstrInfo const & MCII ) : Ctx ( ctx ) , MCII ( MCII ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..629ea285de77ecfccb3ac3a92bd074d0415c9c4a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/createMCCodeEmitter.cpp @@ -0,0 +1,3 @@ +MCCodeEmitter * llvm :: createPULPMCCodeEmitter ( const MCInstrInfo & MCII , const MCRegisterInfo & MRI , MCContext & Ctx ) { +return new PULPMCCodeEmitter ( Ctx , MCII ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38ab93f798ad2b7e11256ddb1f3361af6ddc7d36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/encodeInstruction.cpp @@ -0,0 +1,50 @@ +void PULPMCCodeEmitter :: encodeInstruction ( const MCInst & MI , raw_ostream & OS , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +verifyInstructionPredicates ( MI , computeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; +Desc = MCII . get ( MI . getOpcode ( ) ) ; +unsigned Size ; +Size = Desc . getSize ( ) ; +if ( MI . getOpcode ( ) == PULP :: PseudoCALLReg ) { +expand_TLSDESCCALL ( MI , OS , Fixups , STI ) ; +MCNumEmitted = MCNumEmitted + 0 ; +return ; +} +if ( MI . getOpcode ( ) == PULP :: PseudoCALL ) { +expand_CompilerBarrier ( MI , OS , Fixups , STI ) ; +MCNumEmitted = MCNumEmitted + 0 ; +return ; +} +if ( MI . getOpcode ( ) == PULP :: PseudoTAIL ) { +expand_SPACE ( MI , OS , Fixups , STI ) ; +MCNumEmitted = MCNumEmitted + 0 ; +return ; +} +if ( MI . getOpcode ( ) == PULP :: PseudoJump ) { +expand_EH_SjLj_Setup ( MI , OS , Fixups , STI ) ; +MCInst TmpInst ; +uint16_t Binary ; +uint32_t Binary ; +const MCExpr * CallExpr ; +CallExpr = MI . getOperand ( 0 ) . getExpr ( ) ; +TmpInst = MCInstBuilder ( PULP :: JS ) . addImm ( 0 ) ; +TmpInst = MCInstBuilder ( PULP :: J ) . addImm ( - 2 ) ; +Binary = getBinaryCodeForInstr ( TmpInst , Fixups , STI ) ; +expand_COPY_TO_REGCLASS ( MI , OS , Fixups , STI ) ; +return ; +} +if ( Size == 2 ) { +uint16_t Bits ; +Bits = getBinaryCodeForInstr ( MI , Fixups , STI ) ; +support :: endian :: write < uint16_t > ( OS , Bits , support :: little ) ; +MCNumEmitted = MCNumEmitted + 1 ; +return ; +} +if ( Size == 4 ) { +uint32_t Bits ; +Bits = getBinaryCodeForInstr ( MI , Fixups , STI ) ; +support :: endian :: write < uint32_t > ( OS , Bits , support :: little ) ; +MCNumEmitted = MCNumEmitted + 1 ; +return ; +} +llvm_unreachable ( "Unhandled encodeInstruction length!" ) ; +MCNumEmitted = MCNumEmitted + 1 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4881a608bb3ebc8b94add56d8c6c02f1bf3eed23 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValue.cpp @@ -0,0 +1,72 @@ +unsigned PULPMCCodeEmitter :: getImmOpValue ( const MCInst & MI , unsigned OpIdx , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +const MCOperand & MO ; +MO = MI . getOperand ( OpIdx ) ; +if ( MO . isReg ( ) ) { +return Ctx . getRegisterInfo ( ) -> getEncodingValue ( MO . getReg ( ) ) ; +} +if ( MO . isImm ( ) ) { +return static_cast < unsigned > ( MO . getImm ( ) ) ; +} +PULP :: Fixups FixupKind ; +FixupKind = PULP :: Fixups ( 0 ) ; +MCExpr :: ExprKind Kind ; +if ( Kind == MCExpr :: Constant ) { +return cast < MCConstantExpr > ( Expr ) -> getValue ( ) ; +} +if ( Kind == MCExpr :: Binary ) { +} +assert ( Kind == MCExpr :: SymbolRef && "unknown MCExpr kind" ) ; +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_LO ) { +FixupKind = PULP :: fixup_PULP_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_HI ) { +FixupKind = PULP :: fixup_PULP_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_PCREL_LO ) { +FixupKind = PULP :: fixup_PULP_pcrel_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_PCREL_HI ) { +FixupKind = PULP :: fixup_PULP_pcrel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_GOT_HI ) { +FixupKind = PULP :: fixup_PULP_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_LO ) { +FixupKind = PULP :: fixup_PULP_tprel_lo12_s ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_HI ) { +FixupKind = PULP :: fixup_PULP_tprel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GOT_HI ) { +FixupKind = PULP :: fixup_PULP_tls_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GD_HI ) { +FixupKind = PULP :: fixup_PULP_tls_gd_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_CALL ) { +FixupKind = PULP :: fixup_PULP_call ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +llvm_unreachable ( "Unknown fixup kind!" ) ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6437f2ea306e6313b9b3f2ae411e0de1ec4fd85 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp @@ -0,0 +1,72 @@ +unsigned PULPMCCodeEmitter :: getImmOpValueAsr1 ( const MCInst & MI , unsigned OpIdx , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +const MCOperand & MO ; +MO = MI . getOperand ( OpIdx ) ; +if ( MO . isReg ( ) ) { +return Ctx . getRegisterInfo ( ) -> getEncodingValue ( MO . getReg ( ) ) ; +} +if ( MO . isImm ( ) ) { +return static_cast < unsigned > ( MO . getImm ( ) ) ; +} +PULP :: Fixups FixupKind ; +FixupKind = PULP :: Fixups ( 0 ) ; +MCExpr :: ExprKind Kind ; +if ( Kind == MCExpr :: Constant ) { +return cast < MCConstantExpr > ( Expr ) -> getValue ( ) ; +} +if ( Kind == MCExpr :: Binary ) { +} +assert ( Kind == MCExpr :: SymbolRef && "unknown MCExpr kind" ) ; +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_LO ) { +FixupKind = PULP :: fixup_PULP_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_HI ) { +FixupKind = PULP :: fixup_PULP_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_PCREL_LO ) { +FixupKind = PULP :: fixup_PULP_pcrel_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_PCREL_HI ) { +FixupKind = PULP :: fixup_PULP_pcrel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_GOT_HI ) { +FixupKind = PULP :: fixup_PULP_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_LO ) { +FixupKind = PULP :: fixup_PULP_tprel_lo12_s ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_HI ) { +FixupKind = PULP :: fixup_PULP_tprel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GOT_HI ) { +FixupKind = PULP :: fixup_PULP_tls_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GD_HI ) { +FixupKind = PULP :: fixup_PULP_tls_gd_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == PULPMCExpr :: VK_PULP_CALL ) { +FixupKind = PULP :: fixup_PULP_call ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +llvm_unreachable ( "Unknown fixup kind!" ) ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..df6611aa45ebcd358e4559e2ae0c07044adb646c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getImmOpValueMinus1.cpp @@ -0,0 +1,24 @@ +unsigned PULPMCCodeEmitter :: getImmOpValueMinus1 ( const MCInst & MI , unsigned OpIdx , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +const MCOperand & MO ; +MO = MI . getOperand ( OpIdx ) ; +if ( MO . isReg ( ) ) { +return Ctx . getRegisterInfo ( ) -> getEncodingValue ( MO . getReg ( ) ) ; +} +if ( MO . isImm ( ) ) { +return static_cast < unsigned > ( MO . getImm ( ) ) ; +} +PULP :: Fixups FixupKind ; +FixupKind = PULP :: Fixups ( 0 ) ; +MCExpr :: ExprKind Kind ; +if ( Kind == MCExpr :: Constant ) { +return cast < MCConstantExpr > ( Expr ) -> getValue ( ) ; +} +if ( Kind == MCExpr :: Binary ) { +} +assert ( Kind == MCExpr :: SymbolRef && "unknown MCExpr kind" ) ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +llvm_unreachable ( "Unknown fixup kind!" ) ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dcce3a1e3e7da3576ed3985f055cc8980e43f6d2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getMachineOpValue.cpp @@ -0,0 +1,44 @@ +unsigned PULPMCCodeEmitter :: getMachineOpValue ( const MCInst & MI , const MCOperand & MO , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +if ( MO . isReg ( ) ) { +return Ctx . getRegisterInfo ( ) -> getEncodingValue ( MO . getReg ( ) ) ; +} +if ( MO . isImm ( ) ) { +return static_cast < unsigned > ( MO . getImm ( ) ) ; +} +if ( MO . isExpr ( ) ) { +if ( MI . getOpcode ( ) == PULP :: LOOP0setup ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP1setup ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP0setupi ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setupi ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP1setupi ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setupi ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP0starti ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP1starti ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP0endi ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP1endi ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP0counti ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP1counti ) { +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( PULP :: fixup_PULP_loop_setup ) , MI . getLoc ( ) ) ) ; +} +MCNumFixups = MCNumFixups + 1 ; +return 0 ; +} +llvm_unreachable ( "Unhandled expression!" ) ; +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f009ea02a33e875fab9025859e806bdf7d333b61 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/getVMaskReg.cpp @@ -0,0 +1,11 @@ +unsigned PULPMCCodeEmitter :: getVMaskReg ( const MCInst & MI , unsigned OpNo , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +auto MO = MI . getOperand ( OpNo ) ; +assert ( MO . isReg ( ) && "Expected a register." ) ; +if ( MO . getReg ( ) == PULP :: V0 ) { +return 0x00 ; +} +if ( MO . getReg ( ) == PULP :: NoRegister ) { +return 1 ; +} +llvm_unreachable ( "Invalid mask register." ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3e2ace444d66f22b70548320d683379d6a82d93a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCCodeEmitter/~MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +~ PULPMCCodeEmitter ( ) override { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/MCExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/MCExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a801e2642c61d947a367189fde416c2e13d7608 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/MCExpr.cpp @@ -0,0 +1,2 @@ +explicit PULPMCExpr ( const MCExpr * Expr , VariantKind Kind ) : Expr ( Expr ) , Kind ( Kind ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/classof1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b052897719aaca60ef09baece651fd4286e607f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/classof1.cpp @@ -0,0 +1,3 @@ +static bool classof ( const MCExpr * E ) { +return E -> getKind ( ) == MCExpr :: Target ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/classof2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be4aa051d4a3d4ac02c2b026b7e4e7ee1734c31f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/classof2.cpp @@ -0,0 +1,3 @@ +static bool classof ( const PULPMCExpr * ) { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/create.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/create.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a90abc2f0ef3f0912971fdf37f1bff6abf5500b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/create.cpp @@ -0,0 +1,3 @@ +const PULPMCExpr * PULPMCExpr :: create ( const MCExpr * Expr , VariantKind Kind , MCContext & Ctx ) { +return new ( Ctx ) PULPMCExpr ( Expr , Kind ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/enumVariantKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/enumVariantKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..309ecabf4e6ee0b73e414172fb11af99674df330 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/enumVariantKind.cpp @@ -0,0 +1,17 @@ +enum VariantKind { +VK_PULP_None , +VK_PULP_LO , +VK_PULP_HI , +VK_PULP_PCREL_LO , +VK_PULP_PCREL_HI , +VK_PULP_GOT_HI , +VK_PULP_TPREL_LO , +VK_PULP_TPREL_HI , +VK_PULP_TPREL_ADD , +VK_PULP_TLS_GOT_HI , +VK_PULP_TLS_GD_HI , +VK_PULP_CALL , +VK_PULP_CALL_PLT , +VK_PULP_32_PCREL , +VK_PULP_Invalid , +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4dfa46a1a411c781109a358584a7cb06fceca83e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsConstant.cpp @@ -0,0 +1,9 @@ +bool PULPMCExpr :: evaluateAsConstant ( int64_t & Res ) const { +MCValue Value ; +return false ; +} +if ( ! Value . isAbsolute ( ) ) { +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5534ce0805dabc8fb125923bb6633ca635cb0da --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsInt64.cpp @@ -0,0 +1,11 @@ +int64_t PULPMCExpr :: evaluateAsInt64 ( int64_t Value ) const { +if ( Kind == PULPMCExpr :: VK_PULP_LO ) { +Value = static_cast < uint64_t > ( ( Value << 52 ) >> 52 ) ; +return Value ; +} +if ( Kind == PULPMCExpr :: VK_PULP_HI ) { +Value = static_cast < uint64_t > ( ( Value + 0x800 ) >> 12 ) ; +return Value ; +} +llvm_unreachable ( "Invalid kind" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e8fb7851c59422e04c4f778c834be70a55b7a5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/evaluateAsRelocatableImpl.cpp @@ -0,0 +1,41 @@ +bool PULPMCExpr :: evaluateAsRelocatableImpl ( MCValue & Res , const MCAsmLayout * Layout , const MCFixup * Fixup ) const { +MCValue Value ; +if ( ! getSubExpr ( ) -> evaluateAsRelocatable ( Res , Layout , Fixup ) ) { +return false ; +} +if ( Res . getSymA ( ) ) { +if ( Res . getSymB ( ) ) { +if ( getKind ( ) == PULPMCExpr :: VK_PULP_LO ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_HI ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_PCREL_LO ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_PCREL_HI ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_GOT_HI ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_LO ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_HI ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_ADD ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GOT_HI ) { +return false ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GD_HI ) { +return false ; +} +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..00a5c41996b4821d7075c77e4ac4311bbd9c40e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/findAssociatedFragment.cpp @@ -0,0 +1,3 @@ +MCFragment * findAssociatedFragment ( ) const override { +return getSubExpr ( ) -> findAssociatedFragment ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e562c0d13371d3edd2790e816fdff60997e1a60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp @@ -0,0 +1,11 @@ +void PULPMCExpr :: fixELFSymbolsInTLSFixups ( MCAssembler & Asm ) const { +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TPREL_HI ) { +fixELFSymbolsInTLSFixupsImpl ( getSubExpr ( ) , Asm ) ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GOT_HI ) { +fixELFSymbolsInTLSFixupsImpl ( getSubExpr ( ) , Asm ) ; +} +if ( getKind ( ) == PULPMCExpr :: VK_PULP_TLS_GD_HI ) { +fixELFSymbolsInTLSFixupsImpl ( getSubExpr ( ) , Asm ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09abc3a6f4c60e0906522ecfba24bdbe49a286fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp @@ -0,0 +1,20 @@ +static void fixELFSymbolsInTLSFixupsImpl ( const MCExpr * Expr , MCAssembler & Asm ) { +if ( Expr -> getKind ( ) == MCExpr :: Target ) { +llvm_unreachable ( "Can't handle nested target expression" ) ; +} +if ( Expr -> getKind ( ) == MCExpr :: Constant ) { +} +if ( Expr -> getKind ( ) == MCExpr :: Binary ) { +const MCBinaryExpr * BE ; +BE = cast < MCBinaryExpr > ( Expr ) ; +fixELFSymbolsInTLSFixupsImpl ( BE -> getLHS ( ) , Asm ) ; +fixELFSymbolsInTLSFixupsImpl ( BE -> getRHS ( ) , Asm ) ; +} +if ( Expr -> getKind ( ) == MCExpr :: SymbolRef ) { +const MCSymbolRefExpr & SymRef = * cast < MCSymbolRefExpr > ( Expr ) ; +cast < MCSymbolELF > ( SymRef . getSymbol ( ) ) . setType ( ELF :: STT_TLS ) ; +} +if ( Expr -> getKind ( ) == MCExpr :: Unary ) { +fixELFSymbolsInTLSFixupsImpl ( cast < MCUnaryExpr > ( Expr ) -> getSubExpr ( ) , Asm ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d711002a252a9dd02f4cfd37981b41932cfcd805 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getKind.cpp @@ -0,0 +1,3 @@ +VariantKind getKind ( ) const { +return Kind ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eb574d8989caaf6fd17b4c6d8a8c8c5c738925d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getPCRelHiFixup.cpp @@ -0,0 +1,2 @@ +const MCFixup * PULPMCExpr :: getPCRelHiFixup ( const MCFragment * * DFOut ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getSubExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getSubExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7e2553d1d84be4fd14ae6489f4304e9c6da6514 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getSubExpr.cpp @@ -0,0 +1,3 @@ +const MCExpr * getSubExpr ( ) const { +return Expr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adc27d48ce3ba77c6f857737117ab2251210e4ef --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getVariantKindForName.cpp @@ -0,0 +1,33 @@ +PULPMCExpr :: VariantKind PULPMCExpr :: getVariantKindForName ( StringRef name ) { +if ( name == "lo" ) { +return PULPMCExpr :: VK_PULP_LO ; +} +if ( name == "hi" ) { +return PULPMCExpr :: VK_PULP_HI ; +} +if ( name == "pcrel_lo" ) { +return PULPMCExpr :: VK_PULP_PCREL_LO ; +} +if ( name == "pcrel_hi" ) { +return PULPMCExpr :: VK_PULP_PCREL_HI ; +} +if ( name == "got_pcrel_hi" ) { +return PULPMCExpr :: VK_PULP_GOT_HI ; +} +if ( name == "tprel_lo" ) { +return PULPMCExpr :: VK_PULP_TPREL_LO ; +} +if ( name == "tprel_hi" ) { +return PULPMCExpr :: VK_PULP_TPREL_HI ; +} +if ( name == "tprel_add" ) { +return PULPMCExpr :: VK_PULP_TPREL_ADD ; +} +if ( name == "tls_ie_pcrel_hi" ) { +return PULPMCExpr :: VK_PULP_TLS_GOT_HI ; +} +if ( name == "tls_gd_pcrel_hi" ) { +return PULPMCExpr :: VK_PULP_TLS_GD_HI ; +} +return PULPMCExpr :: VK_PULP_Invalid ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getVariantKindName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getVariantKindName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa320e8791fa22bda9e097a674cb91c2f4279192 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/getVariantKindName.cpp @@ -0,0 +1,33 @@ +StringRef PULPMCExpr :: getVariantKindName ( VariantKind Kind ) { +if ( Kind == PULPMCExpr :: VK_PULP_LO ) { +return "lo" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_HI ) { +return "hi" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_PCREL_LO ) { +return "pcrel_lo" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_PCREL_HI ) { +return "pcrel_hi" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_GOT_HI ) { +return "got_pcrel_hi" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TPREL_LO ) { +return "tprel_lo" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TPREL_HI ) { +return "tprel_hi" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TPREL_ADD ) { +return "tprel_add" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TLS_GOT_HI ) { +return "tls_ie_pcrel_hi" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TLS_GD_HI ) { +return "tls_gd_pcrel_hi" ; +} +llvm_unreachable ( "Invalid ELF symbol kind" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/printImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/printImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aee1e419c590cad29f41c574b30bb1c8b2b9f05b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/printImpl.cpp @@ -0,0 +1,70 @@ +void PULPMCExpr :: printImpl ( raw_ostream & OS , const MCAsmInfo * MAI ) const { +VariantKind Kind ; +Kind = getKind ( ) ; +if ( Kind == PULPMCExpr :: VK_PULP_PCREL_LO ) { +OS << "%pcrel_lo(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_PCREL_HI ) { +OS << "%pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TPREL_LO ) { +OS << "%tprel_lo(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TPREL_HI ) { +OS << "%tprel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TPREL_ADD ) { +OS << "%tprel_add(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_LO ) { +OS << "%lo(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_HI ) { +OS << "%hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_GOT_HI ) { +OS << "%got_pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TLS_GOT_HI ) { +OS << "%tls_ie_pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_TLS_GD_HI ) { +OS << "%tls_gd_pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_CALL_PLT ) { +OS << "" ; +Expr -> print ( OS , MAI ) ; +OS << "@plt" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_CALL ) { +OS << "" ; +Expr -> print ( OS , MAI ) ; +OS << "" ; +} +if ( Kind == PULPMCExpr :: VK_PULP_None ) { +OS << "" ; +Expr -> print ( OS , MAI ) ; +OS << "" ; +} +llvm_unreachable ( "Invalid ELF symbol kind" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1e7599b75de72f3d5ac53a0ab8ae534294d877f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCExpr/visitUsedExpr.cpp @@ -0,0 +1,3 @@ +void PULPMCExpr :: visitUsedExpr ( MCStreamer & Streamer ) const { +Streamer . visitUsedExpr ( * getSubExpr ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b215b170843fd48bb87e157968d6f9da9361981c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/InstrAnalysis.cpp @@ -0,0 +1,2 @@ +explicit PULPMCInstrAnalysis ( const MCInstrInfo * Info ) : MCInstrAnalysis ( Info ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7989b7052da93c03583f329d868b799a47d5a747 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,15 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePULPTargetMC ( ) { +for ( Target * T : { & getThePULP32Target ( ) , & getThePULP64Target ( ) } ) { +TargetRegistry :: RegisterMCAsmInfo ( * T , createPULPMCAsmInfo ) ; +TargetRegistry :: RegisterMCInstrInfo ( * T , createPULPMCInstrInfo ) ; +TargetRegistry :: RegisterMCRegInfo ( * T , createPULPMCRegisterInfo ) ; +TargetRegistry :: RegisterMCAsmBackend ( * T , createPULPAsmBackend ) ; +TargetRegistry :: RegisterMCCodeEmitter ( * T , createPULPMCCodeEmitter ) ; +TargetRegistry :: RegisterMCInstPrinter ( * T , createPULPMCInstPrinter ) ; +TargetRegistry :: RegisterMCSubtargetInfo ( * T , createPULPMCSubtargetInfo ) ; +TargetRegistry :: RegisterObjectTargetStreamer ( * T , createPULPObjectTargetStreamer ) ; +TargetRegistry :: RegisterMCInstrAnalysis ( * T , createPULPInstrAnalysis ) ; +TargetRegistry :: RegisterAsmTargetStreamer ( * T , createPULPAsmTargetStreamer ) ; +TargetRegistry :: RegisterNullTargetStreamer ( * T , createPULPNullTargetStreamer ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b94eb1d03fd28255fc5fea6c469da98001a67e6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createAsmTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer * createPULPAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS , MCInstPrinter * InstPrint , bool isVerboseAsm ) { +return new PULPTargetAsmStreamer ( S , OS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e8782b271e1f1d0ddf9bd0916554e7c1c9bcdf6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createInstrAnalysis.cpp @@ -0,0 +1,3 @@ +static MCInstrAnalysis * createPULPInstrAnalysis ( const MCInstrInfo * Info ) { +return new PULPMCInstrAnalysis ( Info ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..85ac1af3350f2d2a2ddc16be83913c5b532acb3c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,9 @@ +static MCAsmInfo * createPULPMCAsmInfo ( const MCRegisterInfo & MRI , const Triple & TT , const MCTargetOptions & Options ) { +MCAsmInfo * MAI ; +MAI = new PULPMCAsmInfo ( TT ) ; +MCRegister Reg ; +Reg = MRI . getDwarfRegNum ( PULP :: X2 , true ) ; +MCCFIInstruction Inst = MCCFIInstruction :: cfiDefCfa ( nullptr , Reg , 0 ) ; +MAI -> addInitialFrameState ( Inst ) ; +return MAI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9fd1e454106525336457dc9384a594c59c70dac --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCInstPrinter.cpp @@ -0,0 +1,3 @@ +static MCInstPrinter * createPULPMCInstPrinter ( const Triple & T , unsigned SyntaxVariant , const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI ) { +return new PULPInstPrinter ( MAI , MII , MRI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3071d8391440e65411b747299fe2dfc6363df83c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,6 @@ +static MCInstrInfo * createPULPMCInstrInfo ( ) { +MCInstrInfo * X ; +X = new MCInstrInfo ( ) ; +InitPULPMCInstrInfo ( X ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4555aa31b04d1c8192ffd5d3c74275f3748059a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,6 @@ +static MCRegisterInfo * createPULPMCRegisterInfo ( const Triple & TT ) { +MCRegisterInfo * X ; +X = new MCRegisterInfo ( ) ; +InitPULPMCRegisterInfo ( X , PULP :: X1 ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7bb0c940a5faff0b5058e8158343f2c6801759b8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,13 @@ +static MCSubtargetInfo * createPULPMCSubtargetInfo ( const Triple & TT , StringRef CPU , StringRef FS ) { +std :: string CPUName ; +CPUName = std :: string ( CPU ) ; +if ( CPUName . empty ( ) ) { +if ( TT . isArch64Bit ( ) ) { +CPUName = "generic-rv64" ; +} +if ( ! TT . isArch64Bit ( ) ) { +CPUName = "generic-rv32" ; +} +} +return createPULPMCSubtargetInfoImpl ( TT , CPUName , CPUName , FS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d317aee919208f7ff4f29a7a82b8224521436012 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createNullTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer * createPULPNullTargetStreamer ( MCStreamer & S ) { +return new PULPTargetStreamer ( S ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10e3b1629be2f6631c1bed9a1aca81ff3981bca1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/createObjectTargetStreamer.cpp @@ -0,0 +1,7 @@ +static MCTargetStreamer * createPULPObjectTargetStreamer ( MCStreamer & S , const MCSubtargetInfo & STI ) { +const Triple & TT = STI . getTargetTriple ( ) ; +if ( TT . isOSBinFormatELF ( ) ) { +return new PULPTargetELFStreamer ( S , STI ) ; +} +return new PULPTargetELFStreamer ( S , STI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f9353ec9d4b9afe93b70f5d226d85e19830d0c94 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MCTargetDesc/evaluateBranch.cpp @@ -0,0 +1,55 @@ +bool evaluateBranch ( const MCInst & Inst , uint64_t Addr , uint64_t Size , uint64_t & Target ) const { +if ( Inst . getOpcode ( ) == PULP :: BEQ ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: BNE ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: BLT ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: BGE ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: BLTU ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: BGEU ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: C_BEQZ ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: C_BNEZ ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: JAL ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: C_JAL ) { +Target = Addr + Inst . getOperand ( 0 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: C_J ) { +Target = Addr + Inst . getOperand ( 0 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: P_BEQIMM ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == PULP :: P_BNEIMM ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/generateInstSeq.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/generateInstSeq.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ddc6ae15a0d43899bbcceee8789b59998772a4e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/generateInstSeq.cpp @@ -0,0 +1,32 @@ +MatInt :: InstSeq MatInt :: generateInstSeq ( int64_t Val ) { +InstSeq Insts ; +if ( Highest12 != 0 ) { +if ( SignExtend64 < 52 > ( Val ) == 0 ) { +Insts . push_back ( Inst ( PULP :: LU52I_D , SignExtend64 < 12 > ( Highest12 ) ) ) ; +return Insts ; +} +} +if ( Hi20 == 0 ) { +Insts . push_back ( Inst ( PULP :: ORI , Lo12 ) ) ; +} +if ( Hi20 != 0 ) { +if ( SignExtend32 < 1 > ( Lo12 >> 11 ) == SignExtend32 < 20 > ( Hi20 ) ) { +Insts . push_back ( Inst ( PULP :: ADDI_W , SignExtend64 < 12 > ( Lo12 ) ) ) ; +} +} +if ( Hi20 != 0 ) { +if ( SignExtend32 < 1 > ( Lo12 >> 11 ) != SignExtend32 < 20 > ( Hi20 ) ) { +Insts . push_back ( Inst ( PULP :: LU12I_W , SignExtend64 < 20 > ( Hi20 ) ) ) ; +if ( Lo12 != 0 ) { +Insts . push_back ( Inst ( PULP :: ORI , Lo12 ) ) ; +} +} +} +if ( SignExtend32 < 1 > ( Hi20 >> 19 ) != SignExtend32 < 20 > ( Higher20 ) ) { +Insts . push_back ( Inst ( PULP :: LU32I_D , SignExtend64 < 20 > ( Higher20 ) ) ) ; +} +if ( SignExtend32 < 1 > ( Higher20 >> 19 ) != SignExtend32 < 12 > ( Highest12 ) ) { +Insts . push_back ( Inst ( PULP :: LU52I_D , SignExtend64 < 12 > ( Highest12 ) ) ) ; +} +return Insts ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/getIntMatCost.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/getIntMatCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98bcc8a891aab82616d0c0346d7724187bc88265 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/getIntMatCost.cpp @@ -0,0 +1,3 @@ +int getIntMatCost ( const APInt & Val , unsigned Size , bool IsRV64 ) { +return std :: max ( 1 , Cost ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/structInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/structInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f25780f5a7195e77e9196dea579a14a99922338c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/MatInt/structInst.cpp @@ -0,0 +1,6 @@ +struct Inst { +unsigned Opc ; +int64_t Imm ; +Inst ( unsigned Opc , int64_t Imm ) : Opc ( Opc ) , Imm ( Imm ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3fd9887c8b2db9bcc132412344695be54dea83d7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/TargetAsmStreamer.cpp @@ -0,0 +1,2 @@ +PULPTargetAsmStreamer :: PULPTargetAsmStreamer ( MCStreamer & S , formatted_raw_ostream & OS ) : PULPTargetStreamer ( S ) , OS ( OS ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f32649e14787fd1970274129d540e0cc19fc5d0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/TargetStreamer.cpp @@ -0,0 +1,2 @@ +PULPTargetStreamer :: PULPTargetStreamer ( MCStreamer & S ) : MCTargetStreamer ( S ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5871ec90c0beaadb1e938a1d9a38781a5721f2ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitAttribute ( unsigned Attribute , unsigned Value ) { +OS << "\t.attribute\t" << Attribute << ", " << Twine ( Value ) << "\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9eb900f4fdad9ab2de4645eab7b08ad27af6dafc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitAttribute2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitAttribute ( unsigned Attribute , unsigned Value ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3d354b0a8b78d99a8450980a7be68eadeab64027 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionNoPIC ( ) { +OS << "\t.option\tnopic\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90b5a9c00f1db2ea64746cda077779ed28d7688d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionNoPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..afbcbe6dd5cc251c2bd1e4ea45702f628f94f503 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionNoRVC ( ) { +OS << "\t.option\tnorvc\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..109d66264d23183b601914b6c46c390842eee447 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionNoRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36dbde68ceebe75909af78e691dfc2bb32994d89 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionNoRelax ( ) { +OS << "\t.option\tnorelax\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7342f32426ea1846e670001fd296df0b320df3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionNoRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21a6b06456b1a69bde0daff6fb0f47f213c1edf4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionPIC ( ) { +OS << "\t.option\tpic\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..540c35197e0924cc26d66baae9036f73fafcbdc2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..035d22f257d7564921cda90ce150f9ef24d9de1b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionPop ( ) { +OS << "\t.option\tpop\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da14688e8e0ec22170bacec29380c1e35fd9ca40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionPop ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c10a53f320ec7572a8f7ef0399f367b7a7abdfbe --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionPush ( ) { +OS << "\t.option\tpush\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b7f46ba1b159b31f46197c81c0e6c9e5bf95a8a6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionPush ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..811393879c976038e2f3b58591caec3376a46a8d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionRVC ( ) { +OS << "\t.option\trvc\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1f37473d31354c790cd2b23628b2f1c6df90806a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ad8e233cd44d9dff51b8a5480216b012decd6d8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitDirectiveOptionRelax ( ) { +OS << "\t.option\trelax\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0400daf42b8fc61d915754ffd777dd78d1a97d87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitDirectiveOptionRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e559a0f22eedad3247f9d9d8bfe83c52248008f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void PULPTargetAsmStreamer :: emitIntTextAttribute ( unsigned Attribute , unsigned IntValue , StringRef StringValue ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..95d0f6131b9bf81142645aced73336d06d948f00 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitIntTextAttribute2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitIntTextAttribute ( unsigned Attribute , unsigned IntValue , StringRef StringValue ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f766af87d29c5e76fcfc4a19e717923b203de53d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTargetAttributes.cpp @@ -0,0 +1,123 @@ +void PULPTargetStreamer :: emitTargetAttributes ( const MCSubtargetInfo & STI ) { +StringRef CPU ; +CPU = STI . getCPU ( ) ; +PULP :: ArchKind ArchID ; +ArchID = PULP :: parseCPUArch ( CPU ) ; +if ( ArchID == PULP :: ArchKind :: CK804 ) { +ArchID = PULP :: ArchKind :: CK803 ; +} +StringRef CPU_ARCH ; +CPU_ARCH = PULP :: getArchName ( ArchID ) ; +if ( ArchID == PULP :: ArchKind :: INVALID ) { +} +emitTextAttribute ( PULPAttrs :: PULP_ARCH_NAME | zm - split | CPU_ARCH , PULPAttrs :: PULP_ARCH_NAME | zm - split | CPU_ARCH ) ; +emitTextAttribute ( PULPAttrs :: PULP_CPU_NAME | zm - split | CPU , PULPAttrs :: PULP_CPU_NAME | zm - split | CPU ) ; +unsigned ISAFlag ; +ISAFlag = 0 ; +if ( STI . hasFeature ( PULP :: Feature64Bit ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_E1 ; +} +if ( STI . hasFeature ( PULP :: FeatureRV32E ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_1E2 ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtM ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_2E3 ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtA ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_MP ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtF ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_3E3R1 ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtD ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_3E3R2 ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtC ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_3E3R3 ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtB ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_3E7 ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtV ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_MP_1E2 ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZfh ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_7E10 ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZba ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_10E60 ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbb ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_TRUST ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbc ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_JAVA ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbe ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_CACHE ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbf ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_NVIC ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbm ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_DSP ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbp ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_DSP_1E2 ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbproposedc ) ) { +ISAFlag = ISAFlag | PULPAttrs :: V2_ISA_DSPE60 ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbr ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_DSP_ENHANCE ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbs ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_DSP_SILAN ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZbt ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_VDSP ; +} +if ( STI . hasFeature ( PULP :: FeatureExtZvamo ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_VDSP_2 ; +} +if ( STI . hasFeature ( PULP :: FeatureStdExtZvlsseg ) ) { +ISAFlag = ISAFlag | PULPAttrs :: ISA_VDSP_2E3 ; +} +ISAFlag = ISAFlag | PULPAttrs :: ISA_VDSP_2E60F ; +emitAttribute ( PULPAttrs :: PULP_ISA_FLAGS | zm - split | ISAFlag , PULPAttrs :: PULP_ISA_FLAGS | zm - split | ISAFlag ) ; +unsigned ISAExtFlag ; +ISAExtFlag = 0 ; +ISAExtFlag = ISAExtFlag | PULPAttrs :: ISA_FLOAT_E1 ; +ISAExtFlag = ISAExtFlag | PULPAttrs :: ISA_FLOAT_1E2 ; +ISAExtFlag = ISAExtFlag | PULPAttrs :: ISA_FLOAT_1E3 ; +ISAExtFlag = ISAExtFlag | PULPAttrs :: ISA_FLOAT_3E4 ; +ISAExtFlag = ISAExtFlag | PULPAttrs :: ISA_FLOAT_7E60 ; +emitAttribute ( PULPAttrs :: PULP_ISA_EXT_FLAGS | zm - split | ISAExtFlag , PULPAttrs :: PULP_ISA_EXT_FLAGS | zm - split | ISAExtFlag ) ; +emitAttribute ( PULPAttrs :: PULP_DSP_VERSION | zm - split | PULPAttrs :: DSP_VERSION_EXTENSION , PULPAttrs :: PULP_DSP_VERSION | zm - split | PULPAttrs :: DSP_VERSION_EXTENSION ) ; +emitAttribute ( PULPAttrs :: PULP_DSP_VERSION | zm - split | PULPAttrs :: DSP_VERSION_2 , PULPAttrs :: PULP_DSP_VERSION | zm - split | PULPAttrs :: DSP_VERSION_2 ) ; +emitAttribute ( PULPAttrs :: PULP_VDSP_VERSION | zm - split | PULPAttrs :: VDSP_VERSION_2 , PULPAttrs :: PULP_VDSP_VERSION | zm - split | PULPAttrs :: VDSP_VERSION_2 ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_2 , PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_2 ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_2 , PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_2 ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_3 , PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_3 ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_3 , PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_3 ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_3 , PULPAttrs :: PULP_FPU_VERSION | zm - split | PULPAttrs :: FPU_VERSION_3 ) ; +bool hasAnyFloatExt ; +hasAnyFloatExt = STI . hasFeature ( PULP :: FeatureFPUV2_SF ) || STI . hasFeature ( PULP :: FeatureFPUV2_DF ) || STI . hasFeature ( PULP :: FeatureFPUV3_HF ) || STI . hasFeature ( PULP :: FeatureFPUV3_SF ) || STI . hasFeature ( PULP :: FeatureFPUV3_DF ) ; +if ( ! hasAnyFloatExt ) { +emitAttribute ( PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP , PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP , PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP , PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP , PULPAttrs :: PULP_FPU_ABI | zm - split | PULPAttrs :: FPU_ABI_SOFTFP ) ; +unsigned HardFPFlag ; +HardFPFlag = 0 ; +HardFPFlag = HardFPFlag | PULPAttrs :: FPU_HARDFP_HALF ; +HardFPFlag = HardFPFlag | PULPAttrs :: FPU_HARDFP_SINGLE ; +HardFPFlag = HardFPFlag | PULPAttrs :: FPU_HARDFP_SINGLE ; +HardFPFlag = HardFPFlag | PULPAttrs :: FPU_HARDFP_DOUBLE ; +HardFPFlag = HardFPFlag | PULPAttrs :: FPU_HARDFP_DOUBLE ; +if ( HardFPFlag != 0 ) { +emitAttribute ( PULPAttrs :: PULP_FPU_DENORMAL | zm - split | PULPAttrs :: NEEDED , PULPAttrs :: PULP_FPU_DENORMAL | zm - split | PULPAttrs :: NEEDED ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_EXCEPTION | zm - split | PULPAttrs :: NEEDED , PULPAttrs :: PULP_FPU_EXCEPTION | zm - split | PULPAttrs :: NEEDED ) ; +emitTextAttribute ( PULPAttrs :: PULP_FPU_NUMBER_MODULE | zm - split | "IEEE 754" , PULPAttrs :: PULP_FPU_NUMBER_MODULE | zm - split | "IEEE 754" ) ; +emitAttribute ( PULPAttrs :: PULP_FPU_HARDFP | zm - split | HardFPFlag , PULPAttrs :: PULP_FPU_HARDFP | zm - split | HardFPFlag ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7f0590e63b460e39ca6cc5b20cab0ef1de15ca8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTextAttribute.cpp @@ -0,0 +1,3 @@ +void PULPTargetAsmStreamer :: emitTextAttribute ( unsigned Attribute , StringRef String ) { +OS << "\t.attribute\t" << Attribute << ", \"" << String << "\"\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a89abce423eb68bdc298d3d2be7183696c598f02 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/emitTextAttribute2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: emitTextAttribute ( unsigned Attribute , StringRef String ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finish.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finish.cpp new file mode 100644 index 0000000000000000000000000000000000000000..abec0429f881dac5db9a177bfabd3237ecbf8ad3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finish.cpp @@ -0,0 +1,3 @@ +void PULPTargetStreamer :: finish ( ) { +finishAttributeSection ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a53591cd00f7c19fbfb0a46f3b29267752ec6b42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finishAttributeSection.cpp @@ -0,0 +1,2 @@ +void PULPTargetAsmStreamer :: finishAttributeSection ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0bcc4dd2b98dac99df3db89a10f6c56f6382c243 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Emission/TargetStreamer/finishAttributeSection2.cpp @@ -0,0 +1,2 @@ +void PULPTargetStreamer :: finishAttributeSection ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a74bdb9a84fd3d15c5e543b49150824b229a2f5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp @@ -0,0 +1,3 @@ +PULPCleanupVSETVLI ( ) : MachineFunctionPass ( ID ) { +initializePULPCleanupVSETVLIPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61f65ea15343c96b6ec89be3ddea38fe6f37a3ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createPULPCleanupVSETVLIPass ( ) { +return new PULPCleanupVSETVLI ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ead5f1a786d8e94c38aaeccf54e965a7633f1381 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . setPreservesCFG ( ) ; +MachineFunctionPass :: getAnalysisUsage ( AU ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe5dd1adfa5bb36bae4ebe8618f90add4d94c953 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return PULP_CLEANUP_VSETVLI_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0adda88e88df06602241df5ea12b1b2b61a75d55 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties ( ) const override { +return MachineFunctionProperties ( ) . set ( MachineFunctionProperties :: Property :: IsSSA ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3b1139cf483e480d519cdbd2bd9f26bb4687465f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp @@ -0,0 +1,11 @@ +bool PULPCleanupVSETVLI :: runOnMachineBasicBlock ( MachineBasicBlock & MBB ) { +bool Changed = false ; +for ( MachineBasicBlock :: iterator I = MBB . instr_begin ( ) ; I != MBB . instr_end ( ) ; ++ I ) { +Changed = true ; +Changed = true ; +continue ; +Changed = true ; +Changed = true ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbde87ee40ffebec072781cc8580ee50120fd96e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp @@ -0,0 +1,13 @@ +bool PULPCleanupVSETVLI :: runOnMachineFunction ( MachineFunction & MF ) { +if ( skipFunction ( MF . getFunction ( ) ) ) { +return false ; +} +bool Changed = false ; +if ( ! ST . hasStdExtV ( ) ) { +return false ; +} +for ( MachineBasicBlock & MBB : MF ) { +Changed = Changed | runOnMachineBasicBlock ( MBB ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b9955556873257824b2e943301c7a01f9d38c027 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp @@ -0,0 +1,3 @@ +PULPExpandAtomicPseudo ( ) : MachineFunctionPass ( ID ) { +initializePULPExpandAtomicPseudoPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7afd2bb82feefd21426d7afd42f396117cc9006e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createPULPExpandAtomicPseudoPass ( ) { +return new PULPExpandAtomicPseudo ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5f98aa477e18908f178c3c9cebed29ff846854e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool PULPExpandAtomicPseudo :: expandMBB ( MachineBasicBlock & MBB ) { +bool Modified = false ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) , E = MBB . end ( ) ; +for ( ; MBBI != E ; ) { +MachineBasicBlock :: iterator NMBBI = std :: next ( MBBI ) ; +Modified = Modified | expandMI ( MBB , MBBI , NMBBI ) ; +MBBI = NMBBI ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4131b6c3779c492885ba4a17bb95cdfa65414038 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp @@ -0,0 +1,42 @@ +bool PULPExpandAtomicPseudo :: expandMI ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , MachineBasicBlock :: iterator & NextMBBI ) { +if ( MBBI -> getOpcode ( ) == PULP :: PseudoAtomicLoadNand32 ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoAtomicLoadNand64 ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicSwap32 ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicLoadAdd32 ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicLoadSub32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicLoadNand32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicLoadMax32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicLoadMin32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicLoadUMax32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedAtomicLoadUMin32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoCmpXchg32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoCmpXchg64 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoMaskedCmpXchg32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b1aefad2264dd70b08814b093dc54695dbc6096 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return PULP_EXPAND_ATOMIC_PSEUDO_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec9aa80cdc99633ba2bef5e2e9c1632feefa6ea8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool PULPExpandAtomicPseudo :: runOnMachineFunction ( MachineFunction & MF ) { +TII = static_cast < const PULPInstrInfo * > ( MF . getSubtarget ( ) . getInstrInfo ( ) ) ; +bool Modified = false ; +for ( auto & MBB : MF ) { +Modified = Modified | expandMBB ( MBB ) ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38f31d94a8180e193fba77348c717343bfdebba1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp @@ -0,0 +1,3 @@ +PULPExpandPseudo ( ) : MachineFunctionPass ( ID ) { +initializePULPExpandPseudoPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39f7818769a14b096ce87e337822b80c2cce886d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * createPULPExpandPseudoPass ( ) { +return new PULPExpandPseudo ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3cb82547693da888a53a13fdf1118108e1850cc7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool PULPExpandPseudo :: expandMBB ( MachineBasicBlock & MBB ) { +bool Modified = false ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) , E = MBB . end ( ) ; +for ( ; MBBI != E ; ) { +MachineBasicBlock :: iterator NMBBI = std :: next ( MBBI ) ; +Modified = Modified | expandMI ( MBB , MBBI , NMBBI ) ; +MBBI = NMBBI ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4f9e54c8b55143332cfff858d98b83cb3e0dc7d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/expandMI.cpp @@ -0,0 +1,63 @@ +bool PULPExpandPseudo :: expandMI ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , MachineBasicBlock :: iterator & NextMBBI ) { +if ( MBBI -> getOpcode ( ) == PULP :: PseudoLLA ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoLA ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoLA_TLS_IE ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoLA_TLS_GD ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVSETVLI ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVSETIVLI ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMCLR_M_B1 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMCLR_M_B2 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMCLR_M_B4 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMCLR_M_B8 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMCLR_M_B16 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMCLR_M_B32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMCLR_M_B64 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMSET_M_B1 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMSET_M_B2 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMSET_M_B4 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMSET_M_B8 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMSET_M_B16 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMSET_M_B32 ) { +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == PULP :: PseudoVMSET_M_B64 ) { +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..594dfc162e7c79e60a8a6ae498b91e840c1ac128 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return PULP_EXPAND_PSEUDO_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69c92883e163858ad472c622dedcd08807a4ef2f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool PULPExpandPseudo :: runOnMachineFunction ( MachineFunction & MF ) { +TII = static_cast < const PULPInstrInfo * > ( MF . getSubtarget ( ) . getInstrInfo ( ) ) ; +bool Modified = false ; +for ( auto & MBB : MF ) { +Modified = Modified | expandMBB ( MBB ) ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec10837f7c8fd22ddc85f1e1bebd704d18a0ac79 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMA.cpp @@ -0,0 +1,3 @@ +PULPExpandSDMA ( ) : MachineFunctionPass ( ID ) { +initializePULPExpandSDMAPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b09cb138b81e142b9f132beb0e5141b14486f039 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/ExpandSDMAInsts.cpp @@ -0,0 +1,3 @@ +RISCVExpandSDMA() : MachineFunctionPass(ID) { + initializeRISCVExpandSDMAPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..29ee610664b05d847dad84f4dd6dffd2659d5168 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * createPULPExpandSDMAPass ( ) { +return new PULPExpandSDMA ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35b97012d193d8974353401e63ff594112a38d42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool PULPExpandSDMA :: expandMBB ( MachineBasicBlock & MBB ) { +bool Modified = false ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) , E = MBB . end ( ) ; +for ( ; MBBI != E ; ) { +MachineBasicBlock :: iterator NMBBI = std :: next ( MBBI ) ; +Modified = Modified | expandMI ( MBB , MBBI , NMBBI ) ; +MBBI = NMBBI ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19d4714b83cf0b580e3a52ae648417386d5e731e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/expandMI.cpp @@ -0,0 +1,37 @@ +bool PULPExpandSDMAInsts :: expandMI ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , MachineBasicBlock :: iterator & NextMBBI ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4b9aa065df6b57dfa392976496c0c01fc68da42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return PULP_EXPAND_SDMA_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69c92883e163858ad472c622dedcd08807a4ef2f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSDMAInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool PULPExpandPseudo :: runOnMachineFunction ( MachineFunction & MF ) { +TII = static_cast < const PULPInstrInfo * > ( MF . getSubtarget ( ) . getInstrInfo ( ) ) ; +bool Modified = false ; +for ( auto & MBB : MF ) { +Modified = Modified | expandMBB ( MBB ) ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa757aa1fd9eaedaca391e3d7e85b7cbdce96b27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSR.cpp @@ -0,0 +1,4 @@ +//zmCorrectzm +RISCVExpandSSR() : MachineFunctionPass(ID) { + initializeRISCVExpandSSRPass(*PassRegistry::getPassRegistry()); +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..446c274c42ec018df5525243647514bb4fa07d9d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/ExpandSSRInsts.cpp @@ -0,0 +1,3 @@ +PULPExpandSSR ( ) : MachineFunctionPass ( ID ) { +initializePULPExpandSSRPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef147cb04d030b7fbbf048d7711316a96edeb3ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * createPULPExpandSSRPass ( ) { +return new PULPExpandSSR ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..703a337770042aab369e2e1d65f68852d16d5763 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool PULPExpandSSR :: expandMBB ( MachineBasicBlock & MBB ) { +bool Modified = false ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) , E = MBB . end ( ) ; +for ( ; MBBI != E ; ) { +MachineBasicBlock :: iterator NMBBI = std :: next ( MBBI ) ; +Modified = Modified | expandMI ( MBB , MBBI , NMBBI ) ; +MBBI = NMBBI ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b7f1bb06ce44662b318ccfad64a07990e9d527e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/expandMI.cpp @@ -0,0 +1,37 @@ +bool PULPExpandSSRInsts :: expandMI ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , MachineBasicBlock :: iterator & NextMBBI ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4fa0fb6f72d127a2d93f64ecf0ad52e91cd41da --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return PULP_EXPAND_SSR_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ae52bc13eab7fd11f1ba03ba294ef5982dab53e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/ExpandSSRInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool PULPExpandSSRInsts :: runOnMachineFunction ( MachineFunction & MF ) { +TII = static_cast < const PULPInstrInfo * > ( MF . getSubtarget ( ) . getInstrInfo ( ) ) ; +bool Modified = false ; +for ( auto & MBB : MF ) { +Modified = Modified | expandMBB ( MBB ) ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb64e637365b930f09897a9341991ae2f7b757cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp @@ -0,0 +1,2 @@ +PULPMergeBaseOffsetOpt ( ) : MachineFunctionPass ( ID ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a2bc73c41981e43a16177f47e6487db23648630 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createPULPMergeBaseOffsetOptPass ( ) { +return new PULPMergeBaseOffsetOpt ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a9985fc3aee7f96543facf9785b217c4291c5d4e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return PULP_MERGE_BASE_OFFSET_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0adda88e88df06602241df5ea12b1b2b61a75d55 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties ( ) const override { +return MachineFunctionProperties ( ) . set ( MachineFunctionProperties :: Property :: IsSSA ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0fa2c9cd1050ff57f7fbef1fce389eb2ca05fee5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/MergeBaseOffset/runOnMachineFunction.cpp @@ -0,0 +1,18 @@ +bool PULPMergeBaseOffset :: runOnMachineFunction ( MachineFunction & MF ) { +if ( skipFunction ( * F . getFunction ( ) ) ) { +return false ; +} +bool Changed = false ; +const Subtarget & ST = MF . getSubtarget < Subtarget > ( ) ; +TII = ST . getInstrInfo ( ) ; +TRI = ST . getRegisterInfo ( ) ; +MRI = & MF . getRegInfo ( ) ; +ClobberedRegs . resize ( TRI -> getNumRegs ( ) ) ; +if ( ST . isV9 ( ) ) { +return false ; +} +for ( MachineBasicBlock & MBB : MF ) { +Changed = Changed | runOnMachineBasicBlock ( MBB ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..316b34c4cf0c8e5d9e4236ab94f33861df884864 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/FixupHwLoops.cpp @@ -0,0 +1,3 @@ +PULPFixupHwLoops() : MachineFunctionPass(ID) { + initializePULPFixupHwLoopsPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f2e20f163bb9a495009a9912f6d423e741d1b569 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/PULPFixupHwLoops.cpp @@ -0,0 +1,3 @@ +PULPFixupHwLoops ( ) : MachineFunctionPass ( ID ) { +initializePULPFixupHwLoopsPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9228c6d2483d6a53cbfa3ed48c0366f7bb8826bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/createPULPFixupHwLoops.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createPULPFixupHwLoops() { + return new PULPFixupHwLoops(); +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..63b442a8b8053c2c1d2694a0a5a19fb9ed2c47dd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createPULPFixupHwLoops ( ) { +return new PULPFixupHwLoops ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f094f032585ed58ef522e13ff3f7e356125fea65 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getAnalysisUsage.cpp @@ -0,0 +1,5 @@ +void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . addRequired < MachineDominatorTree > ( ) ; +AU . addRequired < MachineLoopInfo > ( ) ; +MachineFunctionPass :: getAnalysisUsage ( AU ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ddac9f96a3fc44c9d6529ecca363e0d38ec0507 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return "PULP Hardware Loop Fixup" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c30a670ece262053445746835921f39923610ca --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties ( ) const override { +return MachineFunctionProperties ( ) . set ( MachineFunctionProperties :: Property :: NoVRegs ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d3a3ebaed08b513825924bee37642929c5ead392 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPFixupHwLoops/runOnMachineFunction.cpp @@ -0,0 +1,14 @@ +bool PULPFixupHwLoops :: runOnMachineFunction ( MachineFunction & MF ) { +LLVM_DEBUG ( dbgs ( ) << "------------ PULP FixupHw Loops ------------\n" ) ; +bool Changed = false ; +MLI = & getAnalysis < MachineLoopInfo > ( ) ; +MDT = & getAnalysis < MachineDominatorTree > ( ) ; +TII = MF . getSubtarget < PULPSubtarget > ( ) . getInstrInfo ( ) ; +for ( auto & L : * MLI ) +if ( ! L -> getParentLoop ( ) ) { +bool L0Used = false ; +bool L1Used = false ; +Changed = Changed | convertToHardwareLoop ( L , L0Used , L1Used ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee8c980c44d93f1d05491bc44ed5f820d1fe34b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/CountValue.cpp @@ -0,0 +1,10 @@ +explicit CountValue ( CountValueType t , unsigned v , unsigned u = 0 ) { +Kind = t ; +if ( Kind == CV_Register ) { +Contents . R . Reg = v ; +Contents . R . Sub = u ; +} +if ( Kind != CV_Register ) { +Contents . ImmVal = v ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c8a3b75db790109fddd7331458b05b266d8eb82 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/HardWareLoops.cpp @@ -0,0 +1,2 @@ +PULPHardwareLoops ( ) : MachineFunctionPass ( ID ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..059b70f62c067de93e000828574ee0e617720529 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/PULPHardwareLoops.cpp @@ -0,0 +1,2 @@ +PULPHardwareLoops() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f284e32f96ba536c62f236bf53657fefe28acbbe --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/checkForImmediate.cpp @@ -0,0 +1,218 @@ +bool PULPHardwareLoops :: checkForImmediate ( const MachineOperand & MO , int64_t & Val ) const { +if ( MO . isImm ( ) ) { +Val = MO . getImm ( ) ; +return true ; +} +if ( ! MO . isReg ( ) ) { +return false ; +} +int64_t TV ; +Register R = MO . getReg ( ) ; +if ( ! R . isVirtual ( ) ) { +return false ; +} +MachineInstr * DI = MRI -> getVRegDef ( R ) ; +unsigned DOpc = DI -> getOpcode ( ) ; +if ( DOpc == TargetOpcode :: COPY ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_tfrsi ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_tfrpi ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: CONST32_Int_Real ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: CONST64_Int_Real ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_combineii ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A4_combineir ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A4_combineii ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A4_combineri ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_combinew ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == TargetOpcode :: REG_SEQUENCE ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S3 = DI -> getOperand ( 3 ) ; +int64_t V1 ; +int64_t V3 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S3 , V3 ) ) { +return false ; +} +unsigned Sub2 = DI -> getOperand ( 2 ) . getImm ( ) ; +unsigned Sub4 = DI -> getOperand ( 4 ) . getImm ( ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +TV = V1 | ( V3 << 32 ) ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +TV = V3 | ( V1 << 32 ) ; +} +llvm_unreachable ( "Unexpected form of REG_SEQUENCE" ) ; +return true ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee654739abe4fe280d9b835c5824b2db4cf2eaae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/containsInvalidInstruction.cpp @@ -0,0 +1,11 @@ +bool PULPHardwareLoops :: containsInvalidInstruction ( MachineLoop * L ) const { +for ( MachineBasicBlock * MBB : L -> getBlocks ( ) ) { +for ( MachineInstr & MI : * MBB ) { +if ( isInvalidLoopOperation ( MI ) ) { +LLVM_DEBUG ( dbgs ( ) << "\nCannot convert to hwloop due to:" ; MI . dump ( ) ; ) ; +return true ; +} +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbf503d3e8209a118f1b3e619a8b0c6fa04f622c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/convertToHardwareLoop.cpp @@ -0,0 +1,156 @@ +bool PULPHardwareLoops :: convertToHardwareLoop ( MachineLoop * L , bool & RecL0used , bool & RecL1used ) { +assert ( L -> getHeader ( ) && "Loop without a header?" ) ; +bool Changed = false ; +bool L0Used = false ; +bool L1Used = false ; +for ( MachineLoop :: iterator I = L -> begin ( ) , E = L -> end ( ) ; I != E ; ++ I ) { +Changed = Changed | convertToHardwareLoop ( * I , RecL0used , RecL1used ) ; +L0Used = L0Used | RecL0used ; +L1Used = L1Used | RecL1used ; +} +if ( Changed ) { +if ( L0Used ) { +if ( L1Used ) { +return Changed ; +} +} +} +unsigned LOOP_i ; +unsigned LOOP_r ; +unsigned ENDLOOP ; +unsigned IsInnerHWLoop = 1 ; +if ( L0Used ) { +LOOP_i = PULP :: J2_loop1i ; +LOOP_r = PULP :: J2_loop1r ; +ENDLOOP = PULP :: ENDLOOP1 ; +IsInnerHWLoop = 0 ; +} +if ( ! L0Used ) { +LOOP_i = PULP :: J2_loop0i ; +LOOP_r = PULP :: J2_loop0r ; +ENDLOOP = PULP :: ENDLOOP0 ; +} +if ( containsInvalidInstruction ( L , IsInnerHWLoop ) ) { +return false ; +} +MachineBasicBlock * LastMBB = getExitingBlock ( L ) ; +if ( ! LastMBB ) { +return false ; +} +MachineBasicBlock :: iterator LastI = LastMBB -> getFirstTerminator ( ) ; +if ( LastI == LastMBB -> end ( ) ) { +return false ; +} +if ( ! fixupInductionVariable ( L ) ) { +return false ; +} +MachineBasicBlock * Preheader = L -> getLoopPreheader ( ) ; +if ( ! Preheader ) { +Preheader = createPreheaderForLoop ( L ) ; +if ( ! Preheader ) { +return false ; +} +} +MachineBasicBlock :: iterator InsertPos = Preheader -> getFirstTerminator ( ) ; +SmallVector < MachineInstr * , 2 > OldInsts ; +CountValue * TripCount = getLoopTripCount ( L , OldInsts ) ; +if ( ! TripCount ) { +return false ; +} +if ( TripCount -> isReg ( ) ) { +MachineInstr * TCDef = MRI -> getVRegDef ( TripCount -> getReg ( ) ) ; +MachineBasicBlock * BBDef = TCDef -> getParent ( ) ; +if ( ! MDT -> dominates ( BBDef , Preheader ) ) { +return false ; +} +} +MachineBasicBlock * TopBlock = L -> getTopBlock ( ) ; +MachineBasicBlock * ExitingBlock = getExitingBlock ( L ) ; +MachineBasicBlock * LoopStart = 0 ; +if ( ExitingBlock != L -> getLoopLatch ( ) ) { +MachineBasicBlock * TB = 0 , * FB = 0 ; +SmallVector < MachineOperand , 2 > Cond ; +if ( TII -> analyzeBranch ( * ExitingBlock , TB , FB , Cond , false ) ) { +return false ; +} +if ( L -> contains ( TB ) ) { +LoopStart = TB ; +} +if ( L -> contains ( FB ) ) { +LoopStart = FB ; +} +if ( ! L -> contains ( TB ) ) { +if ( ! L -> contains ( FB ) ) { +return false ; +} +} +} +if ( ExitingBlock == L -> getLoopLatch ( ) ) { +LoopStart = TopBlock ; +} +DEBUG ( dbgs ( ) << "Change to hardware loop at " ; L -> dump ( ) ) ; +DebugLoc DL ; +if ( InsertPos != Preheader -> end ( ) ) { +DL = InsertPos -> getDebugLoc ( ) ; +} +if ( TripCount -> isReg ( ) ) { +unsigned CountReg = MRI -> createVirtualRegister ( & PULP :: IntRegsRegClass ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( TargetOpcode :: COPY ) , CountReg ) . addReg ( TripCount -> getReg ( ) , 0 , TripCount -> getSubReg ( ) ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( LOOP_r ) ) . addMBB ( LoopStart ) . addReg ( CountReg ) ; +} +if ( ! TripCount -> isReg ( ) ) { +assert ( TripCount -> isImm ( ) && "Expecting immediate value for trip count" ) ; +int64_t CountImm = TripCount -> getImm ( ) ; +if ( ! TII -> isValidOffset ( LOOP_i , CountImm ) ) { +unsigned CountReg = MRI -> createVirtualRegister ( & PULP :: IntRegsRegClass ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( PULP :: A2_tfrsi ) , CountReg ) . addImm ( CountImm ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( LOOP_r ) ) . addMBB ( LoopStart ) . addReg ( CountReg ) ; +} +if ( TII -> isValidOffset ( LOOP_i , CountImm ) ) { +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( LOOP_i ) ) . addMBB ( LoopStart ) . addImm ( CountImm ) ; +} +} +LoopStart -> setHasAddressTaken ( ) ; +BlockAddress :: get ( const_cast < BasicBlock * > ( LoopStart -> getBasicBlock ( ) ) ) ; +DebugLoc LastIDL = LastI -> getDebugLoc ( ) ; +BuildMI ( * LastMBB , LastI , LastIDL , TII -> get ( ENDLOOP ) ) . addMBB ( LoopStart ) ; +if ( LastI -> getOpcode ( ) == PULP :: J2_jumpt ) { +MachineBasicBlock * BranchTarget = LastI -> getOperand ( 1 ) . getMBB ( ) ; +LastI = LastMBB -> erase ( LastI ) ; +if ( ! L -> contains ( BranchTarget ) ) { +if ( LastI != LastMBB -> end ( ) ) { +LastI = LastMBB -> erase ( LastI ) ; +} +SmallVector < MachineOperand , 0 > Cond ; +TII -> InsertBranch ( * LastMBB , BranchTarget , nullptr , Cond , LastIDL ) ; +} +} +if ( LastI -> getOpcode ( ) == PULP :: J2_jumpf ) { +MachineBasicBlock * BranchTarget = LastI -> getOperand ( 1 ) . getMBB ( ) ; +LastI = LastMBB -> erase ( LastI ) ; +if ( ! L -> contains ( BranchTarget ) ) { +if ( LastI != LastMBB -> end ( ) ) { +LastI = LastMBB -> erase ( LastI ) ; +} +SmallVector < MachineOperand , 0 > Cond ; +TII -> InsertBranch ( * LastMBB , BranchTarget , nullptr , Cond , LastIDL ) ; +} +} +if ( LastI -> getOpcode ( ) != PULP :: J2_jumpt ) { +if ( LastI -> getOpcode ( ) != PULP :: J2_jumpf ) { +LastMBB -> erase ( LastI ) ; +} +} +delete TripCount ; +for ( unsigned i = 0 ; i < OldInsts . size ( ) ; ++ i ) { +removeIfDead ( OldInsts [ i ] ) ; +} +NumHWLoops = NumHWLoops + 1 ; +if ( L0Used ) { +RecL1used = true ; +} +if ( ! L0Used ) { +RecL0used = true ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22e78cc2e7b7238ff9e98a897b042dbb37b79065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/createPULPHardwareLoops.cpp @@ -0,0 +1,3 @@ +FunctionPass *llvm::createPULPHardwareLoops() { + return new PULPHardwareLoops(); +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..12ea7bdf624696e5a6d397719648ee8c6038e9b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createPULPHardwareLoops ( ) { +return new PULPHardwareLoops ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed7f2c9968b3fed4477bd9c3d08bb562c76ac4fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/enumCountValueType.cpp @@ -0,0 +1,4 @@ +enum CountValueType { +CV_Register , +CV_Immediate +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de0cf91473ebe1e290307572f8ca6f52f0a64904 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/enumKind.cpp @@ -0,0 +1,15 @@ +enum Kind { +EQ = 0x01 , +NE = 0x02 , +L = 0x04 , +G = 0x08 , +U = 0x40 , +LTs = L , +LEs = L | EQ , +GTs = G , +GEs = G | EQ , +LTu = L | U , +LEu = L | EQ | U , +GTu = G | U , +GEu = G | EQ | U +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8854a0e598bd9b25b8c4b823e49620bfd9e17e4a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/findInductionRegister.cpp @@ -0,0 +1,86 @@ +bool PULPHardwareLoops :: findInductionRegister ( MachineLoop * L , unsigned & Reg , int64_t & IVBump , MachineInstr * & IVOp ) const { +MachineBasicBlock * Preheader = MLI -> findLoopPreheader ( L , SpecPreheader ) ; +MachineBasicBlock * Header = L -> getHeader ( ) ; +MachineBasicBlock * Latch = L -> getLoopLatch ( ) ; +MachineBasicBlock * ExitingBlock = L -> findLoopControlBlock ( ) ; +if ( ! Header ) { +return false ; +} +if ( ! Preheader ) { +return false ; +} +if ( ! Latch ) { +return false ; +} +if ( ! ExitingBlock ) { +return false ; +} +using RegisterBump = std :: pair < unsigned , int64_t > ; +using InductionMap = std :: map < unsigned , RegisterBump > ; +InductionMap IndMap ; +using instr_iterator = MachineBasicBlock :: instr_iterator ; +for ( instr_iterator I = Header -> instr_begin ( ) , E = Header -> instr_end ( ) ; I != E && I -> isPHI ( ) ; ++ I ) { +MachineInstr * Phi = & * I ; +for ( unsigned i = 1 , n = Phi -> getNumOperands ( ) ; i < n ; i += 2 ) { +if ( Phi -> getOperand ( i + 1 ) . getMBB ( ) != Latch ) { +continue ; +} +unsigned PhiOpReg = Phi -> getOperand ( i ) . getReg ( ) ; +MachineInstr * DI = MRI -> getVRegDef ( PhiOpReg ) ; +if ( DI -> getDesc ( ) . getOpcode ( ) == PULP :: ADDI ) { +unsigned IndReg = DI -> getOperand ( 1 ) . getReg ( ) ; +MachineOperand & Opnd2 = DI -> getOperand ( 2 ) ; +int64_t V ; +if ( MRI -> getVRegDef ( IndReg ) == Phi ) { +if ( checkForImmediate ( Opnd2 , V ) ) { +unsigned UpdReg = DI -> getOperand ( 0 ) . getReg ( ) ; +IndMap . insert ( std :: make_pair ( UpdReg , std :: make_pair ( IndReg , V ) ) ) ; +} +} +} +} +} +SmallVector < MachineOperand , 2 > Cond ; +MachineBasicBlock * TB = nullptr , * FB = nullptr ; +bool NotAnalyzed = TII -> analyzeBranch ( * ExitingBlock , TB , FB , Cond , false ) ; +if ( NotAnalyzed ) { +return false ; +} +unsigned PredR , PredPos , PredRegFlags ; +if ( ! TII -> getPredReg ( Cond , PredR , PredPos , PredRegFlags ) ) { +return false ; +} +MachineInstr * PredI = MRI -> getVRegDef ( PredR ) ; +if ( ! PredI -> isCompare ( ) ) { +return false ; +} +unsigned CmpReg1 = 0 , CmpReg2 = 0 ; +int CmpImm = 0 , CmpMask = 0 ; +bool CmpAnalyzed = TII -> analyzeCompare ( * PredI , CmpReg1 , CmpReg2 , CmpMask , CmpImm ) ; +if ( ! CmpAnalyzed ) { +return false ; +} +InductionMap :: iterator IndMapEnd = IndMap . end ( ) ; +InductionMap :: iterator F = IndMapEnd ; +if ( CmpReg1 != 0 ) { +InductionMap :: iterator F1 = IndMap . find ( CmpReg1 ) ; +if ( F1 != IndMapEnd ) { +F = F1 ; +} +} +if ( CmpReg2 != 0 ) { +InductionMap :: iterator F2 = IndMap . find ( CmpReg2 ) ; +if ( F2 != IndMapEnd ) { +if ( F != IndMapEnd ) +return false ; +F = F2 ; +} +} +if ( F == IndMapEnd ) { +return false ; +} +Reg = F -> second . first ; +IVBump = F -> second . second ; +IVOp = MRI -> getVRegDef ( F -> first ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1d3ea994619de753f89111198b51a819a611528 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getAnalysisUsage.cpp @@ -0,0 +1,6 @@ +void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . setPreservesCFG ( ) ; +AU . addRequired < MachineDominatorTree > ( ) ; +AU . addRequired < MachineLoopInfo > ( ) ; +MachineFunctionPass :: getAnalysisUsage ( AU ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a0e7ce9ebaad0c036a08499ce2301e77c2004fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getComparisonKind.cpp @@ -0,0 +1,28 @@ +PULPHardWareLoops :: Comparison :: Kind PULPHardwareLoops :: getComparisonKind ( unsigned CondOpc , MachineOperand * InitialValue , const MachineOperand * EndValue , int64_t IVBump ) const { +Comparison :: Kind Cmp = ( Comparison :: Kind ) 0 ; +if ( CondOpc == PULP :: BEQ ) { +return Comparison :: EQ ; +} +if ( CondOpc == PULP :: BNE ) { +return Comparison :: NE ; +} +if ( CondOpc == PULP :: BLT ) { +return Comparison :: NE ; +} +if ( CondOpc == PULP :: BLTU ) { +return Comparison :: LTs ; +} +if ( CondOpc == PULP :: BGE ) { +return Comparison :: LTu ; +} +if ( CondOpc == PULP :: BGEU ) { +return Comparison :: GEs ; +} +if ( CondOpc == PULP :: P_BNEIMM ) { +return Comparison :: NE ; +} +if ( CondOpc == PULP :: P_BEQIMM ) { +return Comparison :: EQ ; +} +return ( Comparison :: Kind ) 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61a9973ed8aa33286e17f9a6b7cec48dffcc69f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getImm.cpp @@ -0,0 +1,4 @@ +unsigned getImm ( ) const { +assert ( isImm ( ) && "Wrong CountValue accessor" ) ; +return Contents . ImmVal ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cd697bc04edab9d1db48bd0a6809f2c9e238af8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getLoopTripCount.cpp @@ -0,0 +1,173 @@ +CountValue * PULPHardwareLoops :: getLoopTripCount ( MachineLoop * L , SmallVectorImpl < MachineInstr * > & OldInsts ) { +MachineBasicBlock * TopMBB = L -> getTopBlock ( ) ; +MachineBasicBlock :: pred_iterator PI = TopMBB -> pred_begin ( ) ; +assert ( PI != TopMBB -> pred_end ( ) && "Loop must have more than one incoming edge!" ) ; +MachineBasicBlock * Backedge = * PI ++ ; +if ( PI == TopMBB -> pred_end ( ) ) { +return nullptr ; +} +MachineBasicBlock * Incoming = * PI ++ ; +if ( PI != TopMBB -> pred_end ( ) ) { +return nullptr ; +} +if ( L -> contains ( Incoming ) ) { +if ( L -> contains ( Backedge ) ) { +return nullptr ; +} +std :: swap ( Incoming , Backedge ) ; +} +if ( ! L -> contains ( Incoming ) ) { +if ( ! L -> contains ( Backedge ) ) { +return nullptr ; +} +} +MachineBasicBlock * ExitingBlock = L -> findLoopControlBlock ( ) ; +if ( ! ExitingBlock ) { +return nullptr ; +} +unsigned IVReg = 0 ; +int64_t IVBump = 0 ; +MachineInstr * IVOp ; +bool FoundIV = findInductionRegister ( L , IVReg , IVBump , IVOp ) ; +if ( ! FoundIV ) { +return nullptr ; +} +MachineBasicBlock * Preheader = MLI -> findLoopPreheader ( L , SpecPreheader ) ; +MachineOperand * InitialValue = nullptr ; +MachineInstr * IV_Phi = MRI -> getVRegDef ( IVReg ) ; +MachineBasicBlock * Latch = L -> getLoopLatch ( ) ; +for ( unsigned i = 1 , n = IV_Phi -> getNumOperands ( ) ; i < n ; i += 2 ) { +MachineBasicBlock * MBB = IV_Phi -> getOperand ( i + 1 ) . getMBB ( ) ; +if ( MBB == Preheader ) { +InitialValue = & IV_Phi -> getOperand ( i ) ; +} +if ( MBB != Preheader ) { +if ( MBB == Latch ) { +IVReg = IV_Phi -> getOperand ( i ) . getReg ( ) ; +} +} +} +if ( ! InitialValue ) { +return nullptr ; +} +SmallVector < MachineOperand , 2 > Cond ; +MachineBasicBlock * TB = nullptr ; +MachineBasicBlock * FB = nullptr ; +bool NotAnalyzed = TII -> analyzeBranch ( * ExitingBlock , TB , FB , Cond , false ) ; +if ( NotAnalyzed ) { +return nullptr ; +} +MachineBasicBlock * Header = L -> getHeader ( ) ; +assert ( TB && "Exit block without a branch?" ) ; +if ( ExitingBlock != Latch ) { +if ( TB == Latch ) { +MachineBasicBlock * LTB = nullptr ; +MachineBasicBlock * LFB = nullptr ; +SmallVector < MachineOperand , 2 > LCond ; +bool NotAnalyzed = TII -> analyzeBranch ( * Latch , LTB , LFB , LCond , false ) ; +if ( NotAnalyzed ) { +return nullptr ; +} +TB = ( LTB == Header ) ? LTB : LFB ; +} +if ( TB != Latch ) { +if ( FB == Latch ) { +MachineBasicBlock * LTB = nullptr ; +MachineBasicBlock * LFB = nullptr ; +SmallVector < MachineOperand , 2 > LCond ; +bool NotAnalyzed = TII -> analyzeBranch ( * Latch , LTB , LFB , LCond , false ) ; +if ( NotAnalyzed ) { +return nullptr ; +} +FB = ( LTB == Header ) ? LTB : LFB ; +} +} +} +assert ( ( ! FB || TB == Header || FB == Header ) && "Branches not to header?" ) ; +if ( ! TB ) { +return nullptr ; +} +if ( FB ) { +if ( TB != Header ) { +if ( FB != Header ) { +return nullptr ; +} +} +} +bool Negated = TII -> predOpcodeHasNot ( Cond ) ^ ( TB != Header ) ; +unsigned PredReg ; +unsigned PredPos ; +unsigned PredRegFlags ; +if ( ! TII -> getPredReg ( Cond , PredReg , PredPos , PredRegFlags ) ) { +return nullptr ; +} +MachineInstr * CondI = MRI -> getVRegDef ( PredReg ) ; +unsigned CondOpc = CondI -> getOpcode ( ) ; +unsigned CmpReg1 ; +unsigned CmpReg2 ; +int Mask = 0 ; +int ImmValue = 0 ; +bool AnalyzedCmp = TII -> analyzeCompare ( * CondI , CmpReg1 , CmpReg2 , Mask , ImmValue ) ; +if ( ! AnalyzedCmp ) { +return nullptr ; +} +OldInsts . push_back ( CondI ) ; +OldInsts . push_back ( IVOp ) ; +Comparison :: Kind Cmp ; +bool isSwapped = false ; +const MachineOperand & Op1 = CondI -> getOperand ( 1 ) ; +const MachineOperand & Op2 = CondI -> getOperand ( 2 ) ; +const MachineOperand * EndValue = nullptr ; +if ( Op1 . isReg ( ) ) { +if ( Op2 . isImm ( ) ) { +EndValue = & Op2 ; +} +if ( ! Op2 . isImm ( ) ) { +if ( Op1 . getReg ( ) == IVReg ) { +EndValue = & Op2 ; +} +} +if ( ! Op2 . isImm ( ) ) { +if ( Op1 . getReg ( ) != IVReg ) { +EndValue = & Op1 ; +isSwapped = true ; +} +} +} +if ( ! EndValue ) { +return nullptr ; +} +Cmp = getComparisonKind ( CondOpc , InitialValue , EndValue , IVBump ) ; +if ( ! Cmp ) { +return nullptr ; +} +if ( Negated ) { +Cmp = Comparison :: getNegatedComparison ( Cmp ) ; +} +if ( isSwapped ) { +Cmp = Comparison :: getSwappedComparison ( Cmp ) ; +} +if ( InitialValue -> isReg ( ) ) { +unsigned R = InitialValue -> getReg ( ) ; +MachineBasicBlock * DefBB = MRI -> getVRegDef ( R ) -> getParent ( ) ; +if ( ! MDT -> properlyDominates ( DefBB , Header ) ) { +int64_t V ; +if ( ! checkForImmediate ( * InitialValue , V ) ) { +return nullptr ; +} +} +OldInsts . push_back ( MRI -> getVRegDef ( R ) ) ; +} +if ( EndValue -> isReg ( ) ) { +unsigned R = EndValue -> getReg ( ) ; +MachineBasicBlock * DefBB = MRI -> getVRegDef ( R ) -> getParent ( ) ; +if ( ! MDT -> properlyDominates ( DefBB , Header ) ) { +int64_t V ; +if ( ! checkForImmediate ( * EndValue , V ) ) { +return nullptr ; +} +} +OldInsts . push_back ( MRI -> getVRegDef ( R ) ) ; +} +return computeCount ( L , InitialValue , EndValue , IVReg , IVBump , Cmp ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2412e32e79ee9f8b82866a4230dee4038eb8250a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getNegatedComparison.cpp @@ -0,0 +1,15 @@ +static Kind getNegatedComparison ( Kind Cmp ) { +if ( Cmp & L ) { +return ( Kind ) ( ( Cmp ^ ( L | G ) ) ^ EQ ) ; +} +if ( Cmp & G ) { +return ( Kind ) ( ( Cmp ^ ( L | G ) ) ^ EQ ) ; +} +if ( Cmp & NE ) { +return ( Kind ) ( Cmp ^ ( EQ | NE ) ) ; +} +if ( Cmp & EQ ) { +return ( Kind ) ( Cmp ^ ( EQ | NE ) ) ; +} +return ( Kind ) 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b752ec7167fbcf4cc686e4dd9e0e9e71ef1388d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return "PULP Hardware Loops" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a5b2c5e0312f971a08d886e42c8e74a2864bfed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg ( ) const { +assert ( isReg ( ) && "Wrong CountValue accessor" ) ; +return Contents . R . Reg ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09c6a1ee80848a50e8171505de85cd829f5d6701 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getSubReg.cpp @@ -0,0 +1,4 @@ +unsigned getSubReg ( ) const { +assert ( isReg ( ) && "Wrong CountValue accessor" ) ; +return Contents . R . Sub ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c6ed44d6c64562d2eb723fb9c7446954ed9187c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/getSwappedComparison.cpp @@ -0,0 +1,10 @@ +static Kind getSwappedComparison ( Kind Cmp ) { +assert ( ( ! ( ( Cmp & L ) && ( Cmp & G ) ) ) && "Malformed comparison operator" ) ; +if ( Cmp & L ) { +return ( Kind ) ( Cmp ^ ( L | G ) ) ; +} +if ( Cmp & G ) { +return ( Kind ) ( Cmp ^ ( L | G ) ) ; +} +return Cmp ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d515edb75bcef3225d017ab73686855b8f626c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isDead.cpp @@ -0,0 +1,42 @@ +bool PULPHardwareLoops :: isDead ( const MachineInstr * MI , SmallVectorImpl < MachineInstr * > & DeadPhis ) const { +for ( unsigned i = 0 , e = MI -> getNumOperands ( ) ; i != e ; ++ i ) { +const MachineOperand & MO = MI -> getOperand ( i ) ; +if ( MO . isReg ( ) && MO . isDef ( ) ) { +unsigned Reg = MO . getReg ( ) ; +if ( ! MRI -> use_nodbg_empty ( Reg ) ) { +MachineRegisterInfo :: use_nodbg_iterator I = MRI -> use_nodbg_begin ( Reg ) ; +MachineRegisterInfo :: use_nodbg_iterator End = MRI -> use_nodbg_end ( ) ; +if ( std :: next ( I ) == End ) { +if ( I -> getParent ( ) -> isPHI ( ) ) { +MachineInstr * OnePhi = I . getOperand ( ) . getParent ( ) ; +for ( unsigned j = 0 , f = OnePhi -> getNumOperands ( ) ; j != f ; ++ j ) { +const MachineOperand & OPO = OnePhi -> getOperand ( j ) ; +if ( OPO . isReg ( ) ) { +if ( OPO . isDef ( ) ) { +unsigned OPReg = OPO . getReg ( ) ; +MachineRegisterInfo :: use_nodbg_iterator nextJ ; +for ( MachineRegisterInfo :: use_nodbg_iterator J = MRI -> use_nodbg_begin ( OPReg ) ; J != End ; J = nextJ ) { +nextJ = std :: next ( J ) ; +MachineOperand & Use = * J ; +MachineInstr * UseMI = Use . getParent ( ) ; +if ( MI != UseMI ) { +return false ; +} +} +} +} +} +} +DeadPhis . push_back ( OnePhi ) ; +} +if ( std :: next ( I ) != End ) { +return false ; +} +if ( ! I -> getParent ( ) -> isPHI ( ) ) { +return false ; +} +} +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..680c98be8c03fd333032f8f00b0a1a98ea862ae7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm ( ) const { +return Kind == CV_Immediate ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b92780621f8345b3e7924637298a02ddf20317ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isInvalidLoopOperation.cpp @@ -0,0 +1,36 @@ +bool PULPHardwareLoops :: isInvalidLoopOperation ( const MachineInstr * MI ) const { +if ( MI -> getDesc ( ) . isCall ( ) ) { +return true ; +} +if ( isHardwareLoop ( MI ) ) { +return true ; +} +for ( unsigned i = 0 , e = MI -> getNumOperands ( ) ; i != e ; ++ i ) { +const MachineOperand & MO = MI -> getOperand ( i ) ; +if ( ! MO . isReg ( ) ) { +continue ; +} +if ( ! MO . isDef ( ) ) { +continue ; +} +if ( MO . getReg ( ) == PULP :: LC0 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: LC1 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: SA0 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: SA1 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: CTR ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: CTR8 ) { +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80a0cb3a9afcd42a5c021e28f26ec397434b7d0c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isLoopFeeder.cpp @@ -0,0 +1,14 @@ +bool PULPHardwareLoops :: isLoopFeeder ( MachineLoop * L , MachineBasicBlock * A , MachineInstr * MI , const MachineOperand * MO , LoopFeederMap & LoopFeederPhi ) const { +if ( LoopFeederPhi . find ( MO -> getReg ( ) ) == LoopFeederPhi . end ( ) ) { +LLVM_DEBUG ( dbgs ( ) << "\nhw_loop head, " << printMBBReference ( * * L -> block_begin ( ) ) ) ; +for ( MachineBasicBlock * MBB : L -> getBlocks ( ) ) { +if ( A == MBB ) { +return false ; +} +} +MachineInstr * Def = MRI -> getVRegDef ( MO -> getReg ( ) ) ; +LoopFeederPhi . insert ( std :: make_pair ( MO -> getReg ( ) , Def ) ) ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c02a2f99d0033d1211ac86164fca924d4fb7a003 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg ( ) const { +return Kind == CV_Register ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d728346e98cf1c2b2809437cc84328a2cefce4d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isSigned.cpp @@ -0,0 +1,3 @@ +static bool isSigned ( Kind Cmp ) { +return ( Cmp & ( L | G ) && ! ( Cmp & U ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4f08102b8f8ca2a83f98f07a8863cdbe6eeab70 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/isUnsigned.cpp @@ -0,0 +1,3 @@ +static bool isUnsigned ( Kind Cmp ) { +return ( Cmp & U ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..279bed7ed3c56d07c7518ba49e46deaa0ff875ca --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/loopCountMayWrapOrUnderFlow.cpp @@ -0,0 +1,73 @@ +bool PULPHardwareLoops :: loopCountMayWrapOrUnderFlow ( const MachineOperand * InitVal , const MachineOperand * EndVal , MachineBasicBlock * MBB , MachineLoop * L , LoopFeederMap & LoopFeederPhi ) const { +if ( ! InitVal -> isReg ( ) ) { +return false ; +} +if ( ! EndVal -> isImm ( ) ) { +return false ; +} +int64_t Imm ; +if ( checkForImmediate ( * InitVal , Imm ) ) { +return EndVal -> getImm ( ) == Imm ; +} +Register Reg = InitVal -> getReg ( ) ; +if ( ! Reg . isVirtual ( ) ) { +return true ; +} +MachineInstr * Def = MRI -> getVRegDef ( Reg ) ; +if ( ! Def ) { +return true ; +} +if ( Def -> isPHI ( ) ) { +if ( ! phiMayWrapOrUnderflow ( Def , EndVal , Def -> getParent ( ) , L , LoopFeederPhi ) ) { +return false ; +} +} +if ( Def -> isCopy ( ) ) { +if ( ! loopCountMayWrapOrUnderFlow ( & ( Def -> getOperand ( 1 ) ) , EndVal , Def -> getParent ( ) , L , LoopFeederPhi ) ) { +return false ; +} +} +for ( MachineRegisterInfo :: use_instr_nodbg_iterator I = MRI -> use_instr_nodbg_begin ( Reg ) , E = MRI -> use_instr_nodbg_end ( ) ; I != E ; ++ I ) { +MachineInstr * MI = & * I ; +Register CmpReg1 = 0 ; +Register CmpReg2 = 0 ; +int CmpMask = 0 ; +int CmpValue = 0 ; +if ( ! TII -> analyzeCompare ( * MI , CmpReg1 , CmpReg2 , CmpMask , CmpValue ) ) { +continue ; +} +MachineBasicBlock * TBB = nullptr ; +MachineBasicBlock * FBB = nullptr ; +SmallVector < MachineOperand , 2 > Cond ; +if ( TII -> analyzeBranch ( * MI -> getParent ( ) , TBB , FBB , Cond , false ) ) { +continue ; +} +Comparison :: Kind Cmp = getComparisonKind ( MI -> getOpcode ( ) , nullptr , nullptr , 0 ) ; +if ( Cmp == 0 ) { +continue ; +} +if ( TII -> predOpcodeHasNot ( Cond ) ^ ( TBB != MBB ) ) { +Cmp = Comparison :: getNegatedComparison ( Cmp ) ; +} +if ( CmpReg2 != 0 ) { +if ( CmpReg2 == Reg ) { +Cmp = Comparison :: getSwappedComparison ( Cmp ) ; +} +} +if ( Comparison :: isSigned ( Cmp ) ) { +return false ; +} +if ( Cmp & Comparison :: G ) { +return false ; +} +if ( Cmp == Comparison :: NE ) { +return false ; +} +} +if ( ! Def -> isCopy ( ) ) { +if ( ! Def -> isPHI ( ) ) { +return false ; +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a12f0aed9270681a899e1f9239853a444f90b5c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/phiMayWrapOrUnderflow.cpp @@ -0,0 +1,11 @@ +bool PULPHardwareLoops :: phiMayWrapOrUnderflow ( MachineInstr * Phi , const MachineOperand * EndVal , MachineBasicBlock * MBB , MachineLoop * L , LoopFeederMap & LoopFeederPhi ) const { +assert ( Phi -> isPHI ( ) && "Expecting a Phi." ) ; +for ( int i = 1 , n = Phi -> getNumOperands ( ) ; i < n ; i += 2 ) { +if ( isLoopFeeder ( L , MBB , Phi , & ( Phi -> getOperand ( i ) ) , LoopFeederPhi ) ) { +if ( loopCountMayWrapOrUnderFlow ( & ( Phi -> getOperand ( i ) ) , EndVal , Phi -> getParent ( ) , L , LoopFeederPhi ) ) { +return true ; +} +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/print.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ec36822e1fb42512cca1ae2e4f555c41b35dad3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/print.cpp @@ -0,0 +1,8 @@ +void print ( raw_ostream & OS , const TargetRegisterInfo * TRI = nullptr ) const { +if ( isReg ( ) ) { +OS << "register: " << printReg ( Contents . R . Reg , TRI , Contents . R . Sub ) << '\n' ; +} +if ( isImm ( ) ) { +OS << "immediate: " << Contents . ImmVal << '\n' ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ac31f30839c62263d76d277dab25f3ff1d3abc6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/removeIfDead.cpp @@ -0,0 +1,32 @@ +void PULPHardwareLoops :: removeIfDead ( MachineInstr * MI ) { +SmallVector < MachineInstr * , 1 > DeadPhis ; +if ( isDead ( MI , DeadPhis ) ) { +LLVM_DEBUG ( dbgs ( ) << "HW looping will remove: " << * MI ) ; +for ( unsigned i = 0 , e = MI -> getNumOperands ( ) ; i != e ; ++ i ) { +const MachineOperand & MO = MI -> getOperand ( i ) ; +if ( ! MO . isReg ( ) ) { +continue ; +} +if ( ! MO . isDef ( ) ) { +continue ; +} +unsigned Reg = MO . getReg ( ) ; +MachineRegisterInfo :: use_iterator nextI ; +for ( MachineRegisterInfo :: use_iterator I = MRI -> use_begin ( Reg ) , E = MRI -> use_end ( ) ; I != E ; I = nextI ) { +nextI = std :: next ( I ) ; +MachineOperand & Use = * I ; +MachineInstr * UseMI = I -> getParent ( ) ; +if ( UseMI == MI ) { +continue ; +} +if ( Use . isDebug ( ) ) { +UseMI -> getOperand ( 0 ) . setReg ( 0U ) ; +} +} +} +MI -> eraseFromParent ( ) ; +for ( unsigned i = 0 ; i < DeadPhis . size ( ) ; ++ i ) { +DeadPhis [ i ] -> eraseFromParent ( ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16633673f1c397ec72c6b5f26831b0a8ff146777 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/runOnMachineFunction.cpp @@ -0,0 +1,14 @@ +bool PULPFrepLoops :: runOnMachineFunction ( MachineFunction & MF ) { +LLVM_DEBUG ( dbgs ( ) << "------------ PULP Frep Loops ------------\n" ) ; +bool Changed = false ; +MLI = & getAnalysis < MachineLoopInfo > ( ) ; +MDT = & getAnalysis < MachineDominatorTree > ( ) ; +TII = MF . getSubtarget < PULPSubtarget > ( ) . getInstrInfo ( ) ; +for ( auto & L : * MLI ) +if ( ! L -> getParentLoop ( ) ) { +bool L0Used = false ; +bool L1Used = false ; +Changed = Changed | convertToHardwareLoop ( L , L0Used , L1Used ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96b70faea4c2d1cf3c27369e98a584955a9138d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/PULPHardWareLoops/unionValues.cpp @@ -0,0 +1,7 @@ +union Values { +struct { +unsigned Reg ; +unsigned Sub ; +} R ; +unsigned ImmVal ; +} Contents ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee8c980c44d93f1d05491bc44ed5f820d1fe34b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/CountValue.cpp @@ -0,0 +1,10 @@ +explicit CountValue ( CountValueType t , unsigned v , unsigned u = 0 ) { +Kind = t ; +if ( Kind == CV_Register ) { +Contents . R . Reg = v ; +Contents . R . Sub = u ; +} +if ( Kind != CV_Register ) { +Contents . ImmVal = v ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13936cfca703d35d770e43949d27e63bbf244673 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoop.cpp @@ -0,0 +1,3 @@ +explicit FrepLoop ( MachineLoop * ML ) { +L = ML ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..76de241fa75ec2b2b96de00673900aec866a6bc1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/FrepLoopsPass.cpp @@ -0,0 +1,3 @@ +PULPFrepLoops ( ) : MachineFunctionPass ( ID ) { +initializePULPFrepLoopsPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9b4e37e0af58cc8245b4eba37735a07b26093555 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/SNITCHFrepLoops.cpp @@ -0,0 +1,3 @@ +SNITCHFrepLoops() : MachineFunctionPass(ID) { + initializeSNITCHFrepLoopsPass(*PassRegistry::getPassRegistry()); +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..035417a4a3d7b0eb531137a5d1163be7121d09ac --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/checkForImmediate.cpp @@ -0,0 +1,218 @@ +bool PULPFrepLoops :: checkForImmediate ( const MachineOperand & MO , int64_t & Val ) const { +if ( MO . isImm ( ) ) { +Val = MO . getImm ( ) ; +return true ; +} +if ( ! MO . isReg ( ) ) { +return false ; +} +int64_t TV ; +Register R = MO . getReg ( ) ; +if ( ! R . isVirtual ( ) ) { +return false ; +} +MachineInstr * DI = MRI -> getVRegDef ( R ) ; +unsigned DOpc = DI -> getOpcode ( ) ; +if ( DOpc == TargetOpcode :: COPY ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_tfrsi ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_tfrpi ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: CONST32_Int_Real ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: CONST64_Int_Real ) { +if ( ! checkForImmediate ( DI -> getOperand ( 1 ) , TV ) ) { +return false ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_combineii ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A4_combineir ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A4_combineii ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A4_combineri ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == PULP :: A2_combinew ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S2 = DI -> getOperand ( 2 ) ; +int64_t V1 ; +int64_t V2 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S2 , V2 ) ) { +return false ; +} +TV = V2 | ( V1 << 32 ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +Val = TV & 0xFFFFFFFFULL ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +Val = TV & 0xFFFFFFFFULL ; +Val = ( TV >> 32 ) & 0xFFFFFFFFULL ; +} +Val = TV ; +return true ; +} +if ( DOpc == TargetOpcode :: REG_SEQUENCE ) { +const MachineOperand & S1 = DI -> getOperand ( 1 ) ; +const MachineOperand & S3 = DI -> getOperand ( 3 ) ; +int64_t V1 ; +int64_t V3 ; +if ( ! checkForImmediate ( S1 , V1 ) ) { +return false ; +} +if ( ! checkForImmediate ( S3 , V3 ) ) { +return false ; +} +unsigned Sub2 = DI -> getOperand ( 2 ) . getImm ( ) ; +unsigned Sub4 = DI -> getOperand ( 4 ) . getImm ( ) ; +if ( MO . getSubReg ( ) == PULP :: subreg_loreg ) { +TV = V1 | ( V3 << 32 ) ; +} +if ( MO . getSubReg ( ) == PULP :: subreg_hireg ) { +TV = V3 | ( V1 << 32 ) ; +} +llvm_unreachable ( "Unexpected form of REG_SEQUENCE" ) ; +return true ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee654739abe4fe280d9b835c5824b2db4cf2eaae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/containsInvalidInstruction.cpp @@ -0,0 +1,11 @@ +bool PULPHardwareLoops :: containsInvalidInstruction ( MachineLoop * L ) const { +for ( MachineBasicBlock * MBB : L -> getBlocks ( ) ) { +for ( MachineInstr & MI : * MBB ) { +if ( isInvalidLoopOperation ( MI ) ) { +LLVM_DEBUG ( dbgs ( ) << "\nCannot convert to hwloop due to:" ; MI . dump ( ) ; ) ; +return true ; +} +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbf503d3e8209a118f1b3e619a8b0c6fa04f622c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/convertToHardwareLoop.cpp @@ -0,0 +1,156 @@ +bool PULPHardwareLoops :: convertToHardwareLoop ( MachineLoop * L , bool & RecL0used , bool & RecL1used ) { +assert ( L -> getHeader ( ) && "Loop without a header?" ) ; +bool Changed = false ; +bool L0Used = false ; +bool L1Used = false ; +for ( MachineLoop :: iterator I = L -> begin ( ) , E = L -> end ( ) ; I != E ; ++ I ) { +Changed = Changed | convertToHardwareLoop ( * I , RecL0used , RecL1used ) ; +L0Used = L0Used | RecL0used ; +L1Used = L1Used | RecL1used ; +} +if ( Changed ) { +if ( L0Used ) { +if ( L1Used ) { +return Changed ; +} +} +} +unsigned LOOP_i ; +unsigned LOOP_r ; +unsigned ENDLOOP ; +unsigned IsInnerHWLoop = 1 ; +if ( L0Used ) { +LOOP_i = PULP :: J2_loop1i ; +LOOP_r = PULP :: J2_loop1r ; +ENDLOOP = PULP :: ENDLOOP1 ; +IsInnerHWLoop = 0 ; +} +if ( ! L0Used ) { +LOOP_i = PULP :: J2_loop0i ; +LOOP_r = PULP :: J2_loop0r ; +ENDLOOP = PULP :: ENDLOOP0 ; +} +if ( containsInvalidInstruction ( L , IsInnerHWLoop ) ) { +return false ; +} +MachineBasicBlock * LastMBB = getExitingBlock ( L ) ; +if ( ! LastMBB ) { +return false ; +} +MachineBasicBlock :: iterator LastI = LastMBB -> getFirstTerminator ( ) ; +if ( LastI == LastMBB -> end ( ) ) { +return false ; +} +if ( ! fixupInductionVariable ( L ) ) { +return false ; +} +MachineBasicBlock * Preheader = L -> getLoopPreheader ( ) ; +if ( ! Preheader ) { +Preheader = createPreheaderForLoop ( L ) ; +if ( ! Preheader ) { +return false ; +} +} +MachineBasicBlock :: iterator InsertPos = Preheader -> getFirstTerminator ( ) ; +SmallVector < MachineInstr * , 2 > OldInsts ; +CountValue * TripCount = getLoopTripCount ( L , OldInsts ) ; +if ( ! TripCount ) { +return false ; +} +if ( TripCount -> isReg ( ) ) { +MachineInstr * TCDef = MRI -> getVRegDef ( TripCount -> getReg ( ) ) ; +MachineBasicBlock * BBDef = TCDef -> getParent ( ) ; +if ( ! MDT -> dominates ( BBDef , Preheader ) ) { +return false ; +} +} +MachineBasicBlock * TopBlock = L -> getTopBlock ( ) ; +MachineBasicBlock * ExitingBlock = getExitingBlock ( L ) ; +MachineBasicBlock * LoopStart = 0 ; +if ( ExitingBlock != L -> getLoopLatch ( ) ) { +MachineBasicBlock * TB = 0 , * FB = 0 ; +SmallVector < MachineOperand , 2 > Cond ; +if ( TII -> analyzeBranch ( * ExitingBlock , TB , FB , Cond , false ) ) { +return false ; +} +if ( L -> contains ( TB ) ) { +LoopStart = TB ; +} +if ( L -> contains ( FB ) ) { +LoopStart = FB ; +} +if ( ! L -> contains ( TB ) ) { +if ( ! L -> contains ( FB ) ) { +return false ; +} +} +} +if ( ExitingBlock == L -> getLoopLatch ( ) ) { +LoopStart = TopBlock ; +} +DEBUG ( dbgs ( ) << "Change to hardware loop at " ; L -> dump ( ) ) ; +DebugLoc DL ; +if ( InsertPos != Preheader -> end ( ) ) { +DL = InsertPos -> getDebugLoc ( ) ; +} +if ( TripCount -> isReg ( ) ) { +unsigned CountReg = MRI -> createVirtualRegister ( & PULP :: IntRegsRegClass ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( TargetOpcode :: COPY ) , CountReg ) . addReg ( TripCount -> getReg ( ) , 0 , TripCount -> getSubReg ( ) ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( LOOP_r ) ) . addMBB ( LoopStart ) . addReg ( CountReg ) ; +} +if ( ! TripCount -> isReg ( ) ) { +assert ( TripCount -> isImm ( ) && "Expecting immediate value for trip count" ) ; +int64_t CountImm = TripCount -> getImm ( ) ; +if ( ! TII -> isValidOffset ( LOOP_i , CountImm ) ) { +unsigned CountReg = MRI -> createVirtualRegister ( & PULP :: IntRegsRegClass ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( PULP :: A2_tfrsi ) , CountReg ) . addImm ( CountImm ) ; +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( LOOP_r ) ) . addMBB ( LoopStart ) . addReg ( CountReg ) ; +} +if ( TII -> isValidOffset ( LOOP_i , CountImm ) ) { +BuildMI ( * Preheader , InsertPos , DL , TII -> get ( LOOP_i ) ) . addMBB ( LoopStart ) . addImm ( CountImm ) ; +} +} +LoopStart -> setHasAddressTaken ( ) ; +BlockAddress :: get ( const_cast < BasicBlock * > ( LoopStart -> getBasicBlock ( ) ) ) ; +DebugLoc LastIDL = LastI -> getDebugLoc ( ) ; +BuildMI ( * LastMBB , LastI , LastIDL , TII -> get ( ENDLOOP ) ) . addMBB ( LoopStart ) ; +if ( LastI -> getOpcode ( ) == PULP :: J2_jumpt ) { +MachineBasicBlock * BranchTarget = LastI -> getOperand ( 1 ) . getMBB ( ) ; +LastI = LastMBB -> erase ( LastI ) ; +if ( ! L -> contains ( BranchTarget ) ) { +if ( LastI != LastMBB -> end ( ) ) { +LastI = LastMBB -> erase ( LastI ) ; +} +SmallVector < MachineOperand , 0 > Cond ; +TII -> InsertBranch ( * LastMBB , BranchTarget , nullptr , Cond , LastIDL ) ; +} +} +if ( LastI -> getOpcode ( ) == PULP :: J2_jumpf ) { +MachineBasicBlock * BranchTarget = LastI -> getOperand ( 1 ) . getMBB ( ) ; +LastI = LastMBB -> erase ( LastI ) ; +if ( ! L -> contains ( BranchTarget ) ) { +if ( LastI != LastMBB -> end ( ) ) { +LastI = LastMBB -> erase ( LastI ) ; +} +SmallVector < MachineOperand , 0 > Cond ; +TII -> InsertBranch ( * LastMBB , BranchTarget , nullptr , Cond , LastIDL ) ; +} +} +if ( LastI -> getOpcode ( ) != PULP :: J2_jumpt ) { +if ( LastI -> getOpcode ( ) != PULP :: J2_jumpf ) { +LastMBB -> erase ( LastI ) ; +} +} +delete TripCount ; +for ( unsigned i = 0 ; i < OldInsts . size ( ) ; ++ i ) { +removeIfDead ( OldInsts [ i ] ) ; +} +NumHWLoops = NumHWLoops + 1 ; +if ( L0Used ) { +RecL1used = true ; +} +if ( ! L0Used ) { +RecL0used = true ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f53e20d5f654191a88633fc0a94a9d966670635 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * createPULPFrepLoopsPass ( ) { +return new PULPFrepLoops ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08c67b5d3aca9dafc9d664780176f3a1114b9854 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/createSNITCHFrepLoopsPass.cpp @@ -0,0 +1,3 @@ +FunctionPass *createSNITCHFrepLoopsPass() { + return new SNITCHFrepLoops(); +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed7f2c9968b3fed4477bd9c3d08bb562c76ac4fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/enumCountValueType.cpp @@ -0,0 +1,4 @@ +enum CountValueType { +CV_Register , +CV_Immediate +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de0cf91473ebe1e290307572f8ca6f52f0a64904 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/enumKind.cpp @@ -0,0 +1,15 @@ +enum Kind { +EQ = 0x01 , +NE = 0x02 , +L = 0x04 , +G = 0x08 , +U = 0x40 , +LTs = L , +LEs = L | EQ , +GTs = G , +GEs = G | EQ , +LTu = L | U , +LEu = L | EQ | U , +GTu = G | U , +GEu = G | EQ | U +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f017b2997a1970a44c430388c4b7753fcd9dc22 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/findBranchInstruction.cpp @@ -0,0 +1,86 @@ +const MachineInstr * PULPFrepLoops :: findBranchInstruction ( MachineLoop * L ) { +MachineBasicBlock * Preheader = MLI -> findLoopPreheader ( L , SpecPreheader ) ; +MachineBasicBlock * Header = L -> getHeader ( ) ; +MachineBasicBlock * Latch = L -> getLoopLatch ( ) ; +MachineBasicBlock * ExitingBlock = L -> findLoopControlBlock ( ) ; +if ( ! Header ) { +return false ; +} +if ( ! Preheader ) { +return false ; +} +if ( ! Latch ) { +return false ; +} +if ( ! ExitingBlock ) { +return false ; +} +using RegisterBump = std :: pair < unsigned , int64_t > ; +using InductionMap = std :: map < unsigned , RegisterBump > ; +InductionMap IndMap ; +using instr_iterator = MachineBasicBlock :: instr_iterator ; +for ( instr_iterator I = Header -> instr_begin ( ) , E = Header -> instr_end ( ) ; I != E && I -> isPHI ( ) ; ++ I ) { +MachineInstr * Phi = & * I ; +for ( unsigned i = 1 , n = Phi -> getNumOperands ( ) ; i < n ; i += 2 ) { +if ( Phi -> getOperand ( i + 1 ) . getMBB ( ) != Latch ) { +continue ; +} +unsigned PhiOpReg = Phi -> getOperand ( i ) . getReg ( ) ; +MachineInstr * DI = MRI -> getVRegDef ( PhiOpReg ) ; +if ( DI -> getDesc ( ) . getOpcode ( ) == PULP :: ADDI ) { +unsigned IndReg = DI -> getOperand ( 1 ) . getReg ( ) ; +MachineOperand & Opnd2 = DI -> getOperand ( 2 ) ; +int64_t V ; +if ( MRI -> getVRegDef ( IndReg ) == Phi ) { +if ( checkForImmediate ( Opnd2 , V ) ) { +unsigned UpdReg = DI -> getOperand ( 0 ) . getReg ( ) ; +IndMap . insert ( std :: make_pair ( UpdReg , std :: make_pair ( IndReg , V ) ) ) ; +} +} +} +} +} +SmallVector < MachineOperand , 2 > Cond ; +MachineBasicBlock * TB = nullptr , * FB = nullptr ; +bool NotAnalyzed = TII -> analyzeBranch ( * ExitingBlock , TB , FB , Cond , false ) ; +if ( NotAnalyzed ) { +return false ; +} +unsigned PredR , PredPos , PredRegFlags ; +if ( ! TII -> getPredReg ( Cond , PredR , PredPos , PredRegFlags ) ) { +return false ; +} +MachineInstr * PredI = MRI -> getVRegDef ( PredR ) ; +if ( ! PredI -> isCompare ( ) ) { +return false ; +} +unsigned CmpReg1 = 0 , CmpReg2 = 0 ; +int CmpImm = 0 , CmpMask = 0 ; +bool CmpAnalyzed = TII -> analyzeCompare ( * PredI , CmpReg1 , CmpReg2 , CmpMask , CmpImm ) ; +if ( ! CmpAnalyzed ) { +return false ; +} +InductionMap :: iterator IndMapEnd = IndMap . end ( ) ; +InductionMap :: iterator F = IndMapEnd ; +if ( CmpReg1 != 0 ) { +InductionMap :: iterator F1 = IndMap . find ( CmpReg1 ) ; +if ( F1 != IndMapEnd ) { +F = F1 ; +} +} +if ( CmpReg2 != 0 ) { +InductionMap :: iterator F2 = IndMap . find ( CmpReg2 ) ; +if ( F2 != IndMapEnd ) { +if ( F != IndMapEnd ) +return false ; +F = F2 ; +} +} +if ( F == IndMapEnd ) { +return false ; +} +Reg = F -> second . first ; +IVBump = F -> second . second ; +IVOp = MRI -> getVRegDef ( F -> first ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/findInductionRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/findInductionRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8854a0e598bd9b25b8c4b823e49620bfd9e17e4a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/findInductionRegister.cpp @@ -0,0 +1,86 @@ +bool PULPHardwareLoops :: findInductionRegister ( MachineLoop * L , unsigned & Reg , int64_t & IVBump , MachineInstr * & IVOp ) const { +MachineBasicBlock * Preheader = MLI -> findLoopPreheader ( L , SpecPreheader ) ; +MachineBasicBlock * Header = L -> getHeader ( ) ; +MachineBasicBlock * Latch = L -> getLoopLatch ( ) ; +MachineBasicBlock * ExitingBlock = L -> findLoopControlBlock ( ) ; +if ( ! Header ) { +return false ; +} +if ( ! Preheader ) { +return false ; +} +if ( ! Latch ) { +return false ; +} +if ( ! ExitingBlock ) { +return false ; +} +using RegisterBump = std :: pair < unsigned , int64_t > ; +using InductionMap = std :: map < unsigned , RegisterBump > ; +InductionMap IndMap ; +using instr_iterator = MachineBasicBlock :: instr_iterator ; +for ( instr_iterator I = Header -> instr_begin ( ) , E = Header -> instr_end ( ) ; I != E && I -> isPHI ( ) ; ++ I ) { +MachineInstr * Phi = & * I ; +for ( unsigned i = 1 , n = Phi -> getNumOperands ( ) ; i < n ; i += 2 ) { +if ( Phi -> getOperand ( i + 1 ) . getMBB ( ) != Latch ) { +continue ; +} +unsigned PhiOpReg = Phi -> getOperand ( i ) . getReg ( ) ; +MachineInstr * DI = MRI -> getVRegDef ( PhiOpReg ) ; +if ( DI -> getDesc ( ) . getOpcode ( ) == PULP :: ADDI ) { +unsigned IndReg = DI -> getOperand ( 1 ) . getReg ( ) ; +MachineOperand & Opnd2 = DI -> getOperand ( 2 ) ; +int64_t V ; +if ( MRI -> getVRegDef ( IndReg ) == Phi ) { +if ( checkForImmediate ( Opnd2 , V ) ) { +unsigned UpdReg = DI -> getOperand ( 0 ) . getReg ( ) ; +IndMap . insert ( std :: make_pair ( UpdReg , std :: make_pair ( IndReg , V ) ) ) ; +} +} +} +} +} +SmallVector < MachineOperand , 2 > Cond ; +MachineBasicBlock * TB = nullptr , * FB = nullptr ; +bool NotAnalyzed = TII -> analyzeBranch ( * ExitingBlock , TB , FB , Cond , false ) ; +if ( NotAnalyzed ) { +return false ; +} +unsigned PredR , PredPos , PredRegFlags ; +if ( ! TII -> getPredReg ( Cond , PredR , PredPos , PredRegFlags ) ) { +return false ; +} +MachineInstr * PredI = MRI -> getVRegDef ( PredR ) ; +if ( ! PredI -> isCompare ( ) ) { +return false ; +} +unsigned CmpReg1 = 0 , CmpReg2 = 0 ; +int CmpImm = 0 , CmpMask = 0 ; +bool CmpAnalyzed = TII -> analyzeCompare ( * PredI , CmpReg1 , CmpReg2 , CmpMask , CmpImm ) ; +if ( ! CmpAnalyzed ) { +return false ; +} +InductionMap :: iterator IndMapEnd = IndMap . end ( ) ; +InductionMap :: iterator F = IndMapEnd ; +if ( CmpReg1 != 0 ) { +InductionMap :: iterator F1 = IndMap . find ( CmpReg1 ) ; +if ( F1 != IndMapEnd ) { +F = F1 ; +} +} +if ( CmpReg2 != 0 ) { +InductionMap :: iterator F2 = IndMap . find ( CmpReg2 ) ; +if ( F2 != IndMapEnd ) { +if ( F != IndMapEnd ) +return false ; +F = F2 ; +} +} +if ( F == IndMapEnd ) { +return false ; +} +Reg = F -> second . first ; +IVBump = F -> second . second ; +IVOp = MRI -> getVRegDef ( F -> first ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f094f032585ed58ef522e13ff3f7e356125fea65 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getAnalysisUsage.cpp @@ -0,0 +1,5 @@ +void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . addRequired < MachineDominatorTree > ( ) ; +AU . addRequired < MachineLoopInfo > ( ) ; +MachineFunctionPass :: getAnalysisUsage ( AU ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6384f0de23448ecb81ca6aabc3ce26cac784a10 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getComparisonKind.cpp @@ -0,0 +1,22 @@ +PULPFrepLoops :: Comparison :: Kind PULPFrepLoops :: getComparisonKind ( unsigned CondOpc , MachineOperand * InitialValue , const MachineOperand * EndValue , int64_t IVBump ) const { +Comparison :: Kind Cmp = ( Comparison :: Kind ) 0 ; +if ( CondOpc == PULP :: BEQ ) { +return Comparison :: EQ ; +} +if ( CondOpc == PULP :: BNE ) { +return Comparison :: NE ; +} +if ( CondOpc == PULP :: BLT ) { +return Comparison :: LTs ; +} +if ( CondOpc == PULP :: BLTU ) { +return Comparison :: LTu ; +} +if ( CondOpc == PULP :: BGE ) { +return Comparison :: GEs ; +} +if ( CondOpc == PULP :: BGEU ) { +return Comparison :: GEs ; +} +return ( Comparison :: Kind ) 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..61a9973ed8aa33286e17f9a6b7cec48dffcc69f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getImm.cpp @@ -0,0 +1,4 @@ +unsigned getImm ( ) const { +assert ( isImm ( ) && "Wrong CountValue accessor" ) ; +return Contents . ImmVal ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6a9d8e36c26eb6332d9222cc741ca28162baca95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getLoopTripCount.cpp @@ -0,0 +1,173 @@ +CountValue * PULPFrepLoops :: getLoopTripCount ( MachineLoop * L , SmallVectorImpl < MachineInstr * > & OldInsts ) { +MachineBasicBlock * TopMBB = L -> getTopBlock ( ) ; +MachineBasicBlock :: pred_iterator PI = TopMBB -> pred_begin ( ) ; +assert ( PI != TopMBB -> pred_end ( ) && "Loop must have more than one incoming edge!" ) ; +MachineBasicBlock * Backedge = * PI ++ ; +if ( PI == TopMBB -> pred_end ( ) ) { +return nullptr ; +} +MachineBasicBlock * Incoming = * PI ++ ; +if ( PI != TopMBB -> pred_end ( ) ) { +return nullptr ; +} +if ( L -> contains ( Incoming ) ) { +if ( L -> contains ( Backedge ) ) { +return nullptr ; +} +std :: swap ( Incoming , Backedge ) ; +} +if ( ! L -> contains ( Incoming ) ) { +if ( ! L -> contains ( Backedge ) ) { +return nullptr ; +} +} +MachineBasicBlock * ExitingBlock = L -> findLoopControlBlock ( ) ; +if ( ! ExitingBlock ) { +return nullptr ; +} +unsigned IVReg = 0 ; +int64_t IVBump = 0 ; +MachineInstr * IVOp ; +bool FoundIV = findInductionRegister ( L , IVReg , IVBump , IVOp ) ; +if ( ! FoundIV ) { +return nullptr ; +} +MachineBasicBlock * Preheader = MLI -> findLoopPreheader ( L , SpecPreheader ) ; +MachineOperand * InitialValue = nullptr ; +MachineInstr * IV_Phi = MRI -> getVRegDef ( IVReg ) ; +MachineBasicBlock * Latch = L -> getLoopLatch ( ) ; +for ( unsigned i = 1 , n = IV_Phi -> getNumOperands ( ) ; i < n ; i += 2 ) { +MachineBasicBlock * MBB = IV_Phi -> getOperand ( i + 1 ) . getMBB ( ) ; +if ( MBB == Preheader ) { +InitialValue = & IV_Phi -> getOperand ( i ) ; +} +if ( MBB != Preheader ) { +if ( MBB == Latch ) { +IVReg = IV_Phi -> getOperand ( i ) . getReg ( ) ; +} +} +} +if ( ! InitialValue ) { +return nullptr ; +} +SmallVector < MachineOperand , 2 > Cond ; +MachineBasicBlock * TB = nullptr ; +MachineBasicBlock * FB = nullptr ; +bool NotAnalyzed = TII -> analyzeBranch ( * ExitingBlock , TB , FB , Cond , false ) ; +if ( NotAnalyzed ) { +return nullptr ; +} +MachineBasicBlock * Header = L -> getHeader ( ) ; +assert ( TB && "Exit block without a branch?" ) ; +if ( ExitingBlock != Latch ) { +if ( TB == Latch ) { +MachineBasicBlock * LTB = nullptr ; +MachineBasicBlock * LFB = nullptr ; +SmallVector < MachineOperand , 2 > LCond ; +bool NotAnalyzed = TII -> analyzeBranch ( * Latch , LTB , LFB , LCond , false ) ; +if ( NotAnalyzed ) { +return nullptr ; +} +TB = ( LTB == Header ) ? LTB : LFB ; +} +if ( TB != Latch ) { +if ( FB == Latch ) { +MachineBasicBlock * LTB = nullptr ; +MachineBasicBlock * LFB = nullptr ; +SmallVector < MachineOperand , 2 > LCond ; +bool NotAnalyzed = TII -> analyzeBranch ( * Latch , LTB , LFB , LCond , false ) ; +if ( NotAnalyzed ) { +return nullptr ; +} +FB = ( LTB == Header ) ? LTB : LFB ; +} +} +} +assert ( ( ! FB || TB == Header || FB == Header ) && "Branches not to header?" ) ; +if ( ! TB ) { +return nullptr ; +} +if ( FB ) { +if ( TB != Header ) { +if ( FB != Header ) { +return nullptr ; +} +} +} +bool Negated = TII -> predOpcodeHasNot ( Cond ) ^ ( TB != Header ) ; +unsigned PredReg ; +unsigned PredPos ; +unsigned PredRegFlags ; +if ( ! TII -> getPredReg ( Cond , PredReg , PredPos , PredRegFlags ) ) { +return nullptr ; +} +MachineInstr * CondI = MRI -> getVRegDef ( PredReg ) ; +unsigned CondOpc = CondI -> getOpcode ( ) ; +unsigned CmpReg1 ; +unsigned CmpReg2 ; +int Mask = 0 ; +int ImmValue = 0 ; +bool AnalyzedCmp = TII -> analyzeCompare ( * CondI , CmpReg1 , CmpReg2 , Mask , ImmValue ) ; +if ( ! AnalyzedCmp ) { +return nullptr ; +} +OldInsts . push_back ( CondI ) ; +OldInsts . push_back ( IVOp ) ; +Comparison :: Kind Cmp ; +bool isSwapped = false ; +const MachineOperand & Op1 = CondI -> getOperand ( 1 ) ; +const MachineOperand & Op2 = CondI -> getOperand ( 2 ) ; +const MachineOperand * EndValue = nullptr ; +if ( Op1 . isReg ( ) ) { +if ( Op2 . isImm ( ) ) { +EndValue = & Op2 ; +} +if ( ! Op2 . isImm ( ) ) { +if ( Op1 . getReg ( ) == IVReg ) { +EndValue = & Op2 ; +} +} +if ( ! Op2 . isImm ( ) ) { +if ( Op1 . getReg ( ) != IVReg ) { +EndValue = & Op1 ; +isSwapped = true ; +} +} +} +if ( ! EndValue ) { +return nullptr ; +} +Cmp = getComparisonKind ( CondOpc , InitialValue , EndValue , IVBump ) ; +if ( ! Cmp ) { +return nullptr ; +} +if ( Negated ) { +Cmp = Comparison :: getNegatedComparison ( Cmp ) ; +} +if ( isSwapped ) { +Cmp = Comparison :: getSwappedComparison ( Cmp ) ; +} +if ( InitialValue -> isReg ( ) ) { +unsigned R = InitialValue -> getReg ( ) ; +MachineBasicBlock * DefBB = MRI -> getVRegDef ( R ) -> getParent ( ) ; +if ( ! MDT -> properlyDominates ( DefBB , Header ) ) { +int64_t V ; +if ( ! checkForImmediate ( * InitialValue , V ) ) { +return nullptr ; +} +} +OldInsts . push_back ( MRI -> getVRegDef ( R ) ) ; +} +if ( EndValue -> isReg ( ) ) { +unsigned R = EndValue -> getReg ( ) ; +MachineBasicBlock * DefBB = MRI -> getVRegDef ( R ) -> getParent ( ) ; +if ( ! MDT -> properlyDominates ( DefBB , Header ) ) { +int64_t V ; +if ( ! checkForImmediate ( * EndValue , V ) ) { +return nullptr ; +} +} +OldInsts . push_back ( MRI -> getVRegDef ( R ) ) ; +} +return computeCount ( L , InitialValue , EndValue , IVReg , IVBump , Cmp ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2412e32e79ee9f8b82866a4230dee4038eb8250a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getNegatedComparison.cpp @@ -0,0 +1,15 @@ +static Kind getNegatedComparison ( Kind Cmp ) { +if ( Cmp & L ) { +return ( Kind ) ( ( Cmp ^ ( L | G ) ) ^ EQ ) ; +} +if ( Cmp & G ) { +return ( Kind ) ( ( Cmp ^ ( L | G ) ) ^ EQ ) ; +} +if ( Cmp & NE ) { +return ( Kind ) ( Cmp ^ ( EQ | NE ) ) ; +} +if ( Cmp & EQ ) { +return ( Kind ) ( Cmp ^ ( EQ | NE ) ) ; +} +return ( Kind ) 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..058a1bf6f230944504a09707a41666a39e4b52e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return PULP_FREP_LOOPS_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a5b2c5e0312f971a08d886e42c8e74a2864bfed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg ( ) const { +assert ( isReg ( ) && "Wrong CountValue accessor" ) ; +return Contents . R . Reg ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09c6a1ee80848a50e8171505de85cd829f5d6701 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getSubReg.cpp @@ -0,0 +1,4 @@ +unsigned getSubReg ( ) const { +assert ( isReg ( ) && "Wrong CountValue accessor" ) ; +return Contents . R . Sub ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c6ed44d6c64562d2eb723fb9c7446954ed9187c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/getSwappedComparison.cpp @@ -0,0 +1,10 @@ +static Kind getSwappedComparison ( Kind Cmp ) { +assert ( ( ! ( ( Cmp & L ) && ( Cmp & G ) ) ) && "Malformed comparison operator" ) ; +if ( Cmp & L ) { +return ( Kind ) ( Cmp ^ ( L | G ) ) ; +} +if ( Cmp & G ) { +return ( Kind ) ( Cmp ^ ( L | G ) ) ; +} +return Cmp ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ea04d9231f1d04fdc41097df9556d433c3eec3c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isDead.cpp @@ -0,0 +1,42 @@ +bool PULPFrepLoops :: isDead ( const MachineInstr * MI , SmallVectorImpl < MachineInstr * > & DeadPhis ) const { +for ( unsigned i = 0 , e = MI -> getNumOperands ( ) ; i != e ; ++ i ) { +const MachineOperand & MO = MI -> getOperand ( i ) ; +if ( MO . isReg ( ) && MO . isDef ( ) ) { +unsigned Reg = MO . getReg ( ) ; +if ( ! MRI -> use_nodbg_empty ( Reg ) ) { +MachineRegisterInfo :: use_nodbg_iterator I = MRI -> use_nodbg_begin ( Reg ) ; +MachineRegisterInfo :: use_nodbg_iterator End = MRI -> use_nodbg_end ( ) ; +if ( std :: next ( I ) == End ) { +if ( I -> getParent ( ) -> isPHI ( ) ) { +MachineInstr * OnePhi = I . getOperand ( ) . getParent ( ) ; +for ( unsigned j = 0 , f = OnePhi -> getNumOperands ( ) ; j != f ; ++ j ) { +const MachineOperand & OPO = OnePhi -> getOperand ( j ) ; +if ( OPO . isReg ( ) ) { +if ( OPO . isDef ( ) ) { +unsigned OPReg = OPO . getReg ( ) ; +MachineRegisterInfo :: use_nodbg_iterator nextJ ; +for ( MachineRegisterInfo :: use_nodbg_iterator J = MRI -> use_nodbg_begin ( OPReg ) ; J != End ; J = nextJ ) { +nextJ = std :: next ( J ) ; +MachineOperand & Use = * J ; +MachineInstr * UseMI = Use . getParent ( ) ; +if ( MI != UseMI ) { +return false ; +} +} +} +} +} +} +DeadPhis . push_back ( OnePhi ) ; +} +if ( std :: next ( I ) != End ) { +return false ; +} +if ( ! I -> getParent ( ) -> isPHI ( ) ) { +return false ; +} +} +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..680c98be8c03fd333032f8f00b0a1a98ea862ae7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm ( ) const { +return Kind == CV_Immediate ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..adb8290834c47612bb2bc3515809feb03ef97cb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isInvalidLoopOperation.cpp @@ -0,0 +1,36 @@ +bool PULPFrepLoops :: isInvalidLoopOperation ( const MachineInstr * MI ) const { +if ( MI -> getDesc ( ) . isCall ( ) ) { +return true ; +} +if ( isHardwareLoop ( MI ) ) { +return true ; +} +for ( unsigned i = 0 , e = MI -> getNumOperands ( ) ; i != e ; ++ i ) { +const MachineOperand & MO = MI -> getOperand ( i ) ; +if ( ! MO . isReg ( ) ) { +continue ; +} +if ( ! MO . isDef ( ) ) { +continue ; +} +if ( MO . getReg ( ) == PULP :: LC0 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: LC1 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: SA0 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: SA1 ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: CTR ) { +return true ; +} +if ( MO . getReg ( ) == PULP :: CTR8 ) { +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c02a2f99d0033d1211ac86164fca924d4fb7a003 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg ( ) const { +return Kind == CV_Register ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d728346e98cf1c2b2809437cc84328a2cefce4d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isSigned.cpp @@ -0,0 +1,3 @@ +static bool isSigned ( Kind Cmp ) { +return ( Cmp & ( L | G ) && ! ( Cmp & U ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4f08102b8f8ca2a83f98f07a8863cdbe6eeab70 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/isUnsigned.cpp @@ -0,0 +1,3 @@ +static bool isUnsigned ( Kind Cmp ) { +return ( Cmp & U ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ec36822e1fb42512cca1ae2e4f555c41b35dad3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/print.cpp @@ -0,0 +1,8 @@ +void print ( raw_ostream & OS , const TargetRegisterInfo * TRI = nullptr ) const { +if ( isReg ( ) ) { +OS << "register: " << printReg ( Contents . R . Reg , TRI , Contents . R . Sub ) << '\n' ; +} +if ( isImm ( ) ) { +OS << "immediate: " << Contents . ImmVal << '\n' ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4baf1936c92afdbb5884279572e9fbd612ec316 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/removeIfDead.cpp @@ -0,0 +1,32 @@ +void PULPFrepLoops :: removeIfDead ( MachineInstr * MI ) { +SmallVector < MachineInstr * , 1 > DeadPhis ; +if ( isDead ( MI , DeadPhis ) ) { +LLVM_DEBUG ( dbgs ( ) << "HW looping will remove: " << * MI ) ; +for ( unsigned i = 0 , e = MI -> getNumOperands ( ) ; i != e ; ++ i ) { +const MachineOperand & MO = MI -> getOperand ( i ) ; +if ( ! MO . isReg ( ) ) { +continue ; +} +if ( ! MO . isDef ( ) ) { +continue ; +} +unsigned Reg = MO . getReg ( ) ; +MachineRegisterInfo :: use_iterator nextI ; +for ( MachineRegisterInfo :: use_iterator I = MRI -> use_begin ( Reg ) , E = MRI -> use_end ( ) ; I != E ; I = nextI ) { +nextI = std :: next ( I ) ; +MachineOperand & Use = * I ; +MachineInstr * UseMI = I -> getParent ( ) ; +if ( UseMI == MI ) { +continue ; +} +if ( Use . isDebug ( ) ) { +UseMI -> getOperand ( 0 ) . setReg ( 0U ) ; +} +} +} +MI -> eraseFromParent ( ) ; +for ( unsigned i = 0 ; i < DeadPhis . size ( ) ; ++ i ) { +DeadPhis [ i ] -> eraseFromParent ( ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..933b78b0c65013f30b6e0f88d80805678b437bc8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/runOnMachineFunction.cpp @@ -0,0 +1,14 @@ +bool PULPHardwareLoops :: runOnMachineFunction ( MachineFunction & MF ) { +LLVM_DEBUG ( dbgs ( ) << "------------ PULP Frep Loops ------------\n" ) ; +bool Changed = false ; +MLI = & getAnalysis < MachineLoopInfo > ( ) ; +MDT = & getAnalysis < MachineDominatorTree > ( ) ; +TII = MF . getSubtarget < PULPSubtarget > ( ) . getInstrInfo ( ) ; +for ( auto & L : * MLI ) +if ( ! L -> getParentLoop ( ) ) { +bool L0Used = false ; +bool L1Used = false ; +Changed = Changed | convertToHardwareLoop ( L , L0Used , L1Used ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96b70faea4c2d1cf3c27369e98a584955a9138d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Optimization/SNITCHFrepLoops/unionValues.cpp @@ -0,0 +1,7 @@ +union Values { +struct { +unsigned Reg ; +unsigned Sub ; +} R ; +unsigned ImmVal ; +} Contents ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..215d7ed4e5a82ed3dbae80f42cf769f77e3bed8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +PULPInstrInfo :: PULPInstrInfo ( PULPSubtarget & STI ) : PULPGenInstrInfo ( PULP :: ADJCALLSTACKDOWN , PULP :: ADJCALLSTACKUP ) , STI ( STI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ce181d01786c7e2e743941273c59db2ed955d10 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,60 @@ +bool PULPInstrInfo :: analyzeBranch ( MachineBasicBlock & MBB , MachineBasicBlock * & TBB , MachineBasicBlock * & FBB , SmallVectorImpl < MachineOperand > & Cond , bool AllowModify ) const { +TBB = nullptr ; +FBB = nullptr ; +Cond . clear ( ) ; +MachineBasicBlock :: iterator I = MBB . getLastNonDebugInstr ( ) ; +if ( I == MBB . end ( ) ) { +return false ; +} +if ( ! isUnpredicatedTerminator ( * I ) ) { +return false ; +} +MachineBasicBlock :: iterator FirstUncondOrIndirectBr = MBB . end ( ) ; +int NumTerminators = 0 ; +for ( auto J = I . getReverse ( ) ; J != MBB . rend ( ) && isUnpredicatedTerminator ( * J ) ; J ++ ) { +NumTerminators = NumTerminators + 1 ; +if ( J -> getDesc ( ) . isUnconditionalBranch ( ) ) { +FirstUncondOrIndirectBr = J . getReverse ( ) ; +} +if ( J -> getDesc ( ) . isIndirectBranch ( ) ) { +FirstUncondOrIndirectBr = J . getReverse ( ) ; +} +} +if ( AllowModify ) { +if ( FirstUncondOrIndirectBr != MBB . end ( ) ) { +for ( ; std :: next ( FirstUncondOrIndirectBr ) != MBB . end ( ) ; ) { +std :: next ( FirstUncondOrIndirectBr ) -> eraseFromParent ( ) ; +NumTerminators = NumTerminators - 1 ; +} +I = FirstUncondOrIndirectBr ; +} +} +if ( I -> getDesc ( ) . isIndirectBranch ( ) ) { +return true ; +} +if ( NumTerminators > 2 ) { +return true ; +} +if ( NumTerminators == 1 ) { +if ( I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +TBB = getBranchDestBlock ( * I ) ; +return false ; +} +} +if ( NumTerminators == 1 ) { +if ( I -> getDesc ( ) . isConditionalBranch ( ) ) { +parseCondBranch ( * I , TBB , Cond ) ; +return false ; +} +} +if ( NumTerminators == 2 ) { +if ( I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +if ( std :: prev ( I ) -> getDesc ( ) . isConditionalBranch ( ) ) { +parseCondBranch ( * std :: prev ( I ) , TBB , Cond ) ; +FBB = getBranchDestBlock ( * I ) ; +return false ; +} +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8ba306b6e3da46ee987e08c38605e80b48cab43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp @@ -0,0 +1,36 @@ +bool PULPInstrInfo :: areMemAccessesTriviallyDisjoint ( const MachineInstr & MIa , const MachineInstr & MIb ) const { +assert ( MIa . mayLoadOrStore ( ) && "MIa must be a load or store." ) ; +assert ( MIb . mayLoadOrStore ( ) && "MIb must be a load or store." ) ; +if ( MIa . hasUnmodeledSideEffects ( ) ) { +return false ; +} +if ( MIb . hasUnmodeledSideEffects ( ) ) { +return false ; +} +if ( MIa . hasOrderedMemoryRef ( ) ) { +return false ; +} +if ( MIb . hasOrderedMemoryRef ( ) ) { +return false ; +} +const TargetRegisterInfo * TRI = STI . getRegisterInfo ( ) ; +const MachineOperand * BaseOpA = nullptr ; +const MachineOperand * BaseOpB = nullptr ; +int64_t OffsetA = 0 ; +int64_t OffsetB = 0 ; +unsigned WidthA = 0 ; +unsigned WidthB = 0 ; +if ( getMemOperandWithOffsetWidth ( MIa , BaseOpA , OffsetA , WidthA , TRI ) ) { +if ( getMemOperandWithOffsetWidth ( MIb , BaseOpB , OffsetB , WidthB , TRI ) ) { +if ( BaseOpA -> isIdenticalTo ( * BaseOpB ) ) { +int LowOffset = std :: min ( OffsetA , OffsetB ) ; +int HighOffset = std :: max ( OffsetA , OffsetB ) ; +int LowWidth = ( LowOffset == OffsetA ) ? WidthA : WidthB ; +if ( LowOffset + LowWidth <= HighOffset ) { +return true ; +} +} +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3b5946b00f2c714a9b67ed058b6b5d48abb0c313 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/buildOutlinedFrame.cpp @@ -0,0 +1,45 @@ +void PULPInstrInfo :: buildOutlinedFrame ( MachineBasicBlock & MBB , MachineFunction & MF , const outliner :: OutlinedFunction & OF ) const { +if ( OF . FrameConstructionID == MachineOutlinerThunk ) { +MachineInstr * Call = & * -- MBB . instr_end ( ) ; +bool isThumb = Subtarget . isThumb ( ) ; +unsigned FuncOp = isThumb ? 2 : 0 ; +unsigned Opc = Call -> getOperand ( FuncOp ) . isReg ( ) ? isThumb ? PULP :: tTAILJMPr : PULP :: TAILJMPr : isThumb ? Subtarget . isTargetMachO ( ) ? PULP :: tTAILJMPd : PULP :: tTAILJMPdND : PULP :: TAILJMPd ; +MachineInstrBuilder MIB = BuildMI ( MBB , MBB . end ( ) , DebugLoc ( ) , get ( Opc ) ) . add ( Call -> getOperand ( FuncOp ) ) ; +if ( isThumb ) { +if ( ! Call -> getOperand ( FuncOp ) . isReg ( ) ) { +MIB . add ( predOps ( PULPCC :: AL ) ) ; +} +} +Call -> eraseFromParent ( ) ; +} +if ( llvm :: any_of ( MBB . instrs ( ) , IsNonTailCall ) ) { +MachineBasicBlock :: iterator It = MBB . begin ( ) ; +MachineBasicBlock :: iterator Et = MBB . end ( ) ; +if ( OF . FrameConstructionID == MachineOutlinerTailCall ) { +Et = std :: prev ( MBB . end ( ) ) ; +} +if ( OF . FrameConstructionID == MachineOutlinerThunk ) { +Et = std :: prev ( MBB . end ( ) ) ; +} +if ( ! MBB . isLiveIn ( PULP :: LR ) ) { +MBB . addLiveIn ( PULP :: LR ) ; +} +saveLROnStack ( MBB , It ) ; +emitCFIForLRSaveOnStack ( MBB , It ) ; +fixupPostOutline ( MBB ) ; +restoreLRFromStack ( MBB , Et ) ; +emitCFIForLRRestoreFromStack ( MBB , Et ) ; +} +if ( OF . FrameConstructionID == MachineOutlinerTailCall ) { +return ; +} +return ; +if ( OF . FrameConstructionID != MachineOutlinerDefault ) { +if ( OF . Candidates [ 0 ] . CallConstructionID != MachineOutlinerDefault ) { +return ; +} +} +fixupPostOutline ( MBB ) ; +MachineInstr * retq = BuildMI ( MF , DebugLoc ( ) , get ( PULP :: RET64 ) ) ; +MBB . insert ( MBB . end ( ) , retq ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fb8dcde578c472b0d999acee2452f889fc2d55fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,31 @@ +void PULPInstrInfo :: copyPhysReg ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , const DebugLoc & DL , MCRegister DstReg , MCRegister SrcReg , bool KillSrc ) const { +if ( PULP :: GPRRegClass . contains ( DstReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( PULP::ADDI ) , DstReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( PULP :: R0 ) ; +return ; +} +if ( PULP :: FPR16RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( PULP :: FSGNJ_H ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( PULP :: FPR32RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( PULP :: FSGNJ_S ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( PULP :: FPR64RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( PULP :: FSGNJ_D ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( PULP :: VRRegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( PULP :: PseudoVMV1R_V ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( PULP :: VRM2RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( PULP :: PseudoVMV2R_V ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( PULP :: VRM4RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( PULP :: PseudoVMV4R_V ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +llvm_unreachable ( "Impossible reg-to-reg copy" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b7f010a1c2821bfe4cbf61900dfc038220ae3a1e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp @@ -0,0 +1,4 @@ +std :: pair < unsigned , unsigned > PULPInstrInfo :: decomposeMachineOperandsTargetFlags ( unsigned TF ) const { +const unsigned Mask = PULPII :: MO_DIRECT_FLAG_MASK ; +return std :: make_pair ( TF & Mask , TF & ~ Mask ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..483736fe80b4a40e10947e10787dd0186c751934 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getBranchDestBlock.cpp @@ -0,0 +1,4 @@ +MachineBasicBlock * PULPInstrInfo :: getBranchDestBlock ( const MachineInstr & MI ) const { +assert ( MI . getDesc ( ) . isBranch ( ) && "Unexpected opcode!" ) ; +return MI . getOperand ( MI . getNumExplicitOperands ( ) - 1 ) . getMBB ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7c36448cfe3d869b9a34e69241814fafba04edd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getInstSizeInBytes.cpp @@ -0,0 +1,35 @@ +unsigned PULPInstrInfo :: getInstSizeInBytes ( const MachineInstr & MI ) const { +const MachineBasicBlock & MBB = * MI . getParent ( ) ; +const MachineFunction * MF = MBB . getParent ( ) ; +const MCAsmInfo * MAI = MF -> getTarget ( ) . getMCAsmInfo ( ) ; +unsigned Opcode = MI . getOpcode ( ) ; +if ( Opcode == TargetOpcode :: INLINEASM ) { +const MachineFunction * MF = MI -> getParent ( ) -> getParent ( ) ; +const char * AsmStr = MI -> getOperand ( 0 ) . getSymbolName ( ) ; +return getInlineAsmLength ( AsmStr , * MF -> getTarget ( ) . getMCAsmInfo ( ) ) ; +return 0 ; +} +return MI -> getDesc ( ) . getSize ( ) ; +if ( Opcode == TargetOpcode :: EH_LABEL ) { +return 0 ; +} +if ( Opcode == TargetOpcode :: IMPLICIT_DEF ) { +return 0 ; +} +if ( Opcode == TargetOpcode :: KILL ) { +return 0 ; +} +if ( Opcode == PULP :: PseudoCALLReg ) { +return 16 ; +} +if ( Opcode == TargetOpcode :: INLINEASM_BR ) { +return 12 ; +} +if ( Opcode == PULP :: PseudoCALL ) { +return 12 ; +} +if ( Opcode == PULP :: PseudoJump ) { +return 12 ; +} +return MI . getDesc ( ) . getSize ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f9c17d094866fac11bff3fac016b1c5ca47c919a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp @@ -0,0 +1,21 @@ +bool PULPInstrInfo :: getMemOperandWithOffsetWidth ( const MachineInstr & LdSt , const MachineOperand * & BaseReg , int64_t & Offset , unsigned & Width , const TargetRegisterInfo * TRI ) const { +if ( ! LdSt . mayLoadOrStore ( ) ) { +return false ; +} +if ( LdSt . getNumExplicitOperands ( ) != 3 ) { +return false ; +} +if ( ! LdSt . getOperand ( 2 ) . isImm ( ) ) { +return false ; +} +if ( ! LdSt . getOperand ( 1 ) . isReg ( ) ) { +return false ; +} +if ( ! LdSt . hasOneMemOperand ( ) ) { +return false ; +} +Width = ( * LdSt . memoperands_begin ( ) ) -> getSize ( ) ; +Offset = LdSt . getOperand ( 2 ) . getImm ( ) ; +BaseReg = & LdSt . getOperand ( 1 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b719f3cdc68c920b65b874f8e1be9b67b5931365 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp @@ -0,0 +1,23 @@ +outliner :: OutlinedFunction PULPInstrInfo :: getOutliningCandidateInfo ( std :: vector < outliner :: Candidate > & RepeatedSequenceLocs ) const { +unsigned CFICount = 0 ; +MachineBasicBlock :: iterator MBBI = RepeatedSequenceLocs [ 0 ] . front ( ) ; +for ( unsigned Loc = RepeatedSequenceLocs [ 0 ] . getStartIdx ( ) ; Loc < RepeatedSequenceLocs [ 0 ] . getEndIdx ( ) + 1 ; Loc ++ ) { +if ( MBBI -> isCFIInstruction ( ) ) { +MBBI = MBBI + 1 ; +for ( outliner :: Candidate & C : RepeatedSequenceLocs ) { +std :: vector < MCCFIInstruction > CFIInstructions = C . getMF ( ) -> getFrameInstructions ( ) ; +if ( CFICount > 0 ) { +if ( CFICount != CFIInstructions . size ( ) ) { +return outliner :: OutlinedFunction ( ) ; +if ( RepeatedSequenceLocs [ 0 ] . back ( ) -> isTerminator ( ) ) { +for ( outliner :: Candidate & C : RepeatedSequenceLocs ) { +C . setCallInfo ( MachineOutlinerTailCall , 1 ) ; +} +return outliner :: OutlinedFunction ( RepeatedSequenceLocs , SequenceSize , 0 , MachineOutlinerTailCall ) ; +if ( CFICount > 0 ) { +return outliner :: OutlinedFunction ( ) ; +for ( outliner :: Candidate & C : RepeatedSequenceLocs ) { +C . setCallInfo ( MachineOutlinerDefault , 1 ) ; +} +return outliner :: OutlinedFunction ( RepeatedSequenceLocs , SequenceSize , 1 , MachineOutlinerDefault ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0588a546f60f5c64de1a1941b94b5d1589a182d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getOutliningType.cpp @@ -0,0 +1,68 @@ +outliner :: InstrType PULPInstrInfo :: getOutliningType ( MachineBasicBlock :: iterator & MBBI , unsigned Flags ) const { +achineInstr & MI = * MBBI ; +MachineBasicBlock * MBB = MI . getParent ( ) ; +const TargetRegisterInfo * TRI = MBB -> getParent ( ) -> getSubtarget ( ) . getRegisterInfo ( ) ; +if ( MI . isDebugValue ( ) ) { +return MachineOutlinerInstrType :: Invisible ; +} +if ( MI . isIndirectDebugValue ( ) ) { +return MachineOutlinerInstrType :: Invisible ; +} +if ( isTailCall ( MI ) ) { +return MachineOutlinerInstrType :: Legal ; +} +if ( MI . isTerminator ( ) ) { +if ( MI . getParent ( ) -> succ_empty ( ) ) { +return MachineOutlinerInstrType :: Legal ; +} +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . isReturn ( ) ) { +if ( MI . getParent ( ) -> succ_empty ( ) ) { +return MachineOutlinerInstrType :: Legal ; +} +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . modifiesRegister ( OpcodeRSP , & RI ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . readsRegister ( OpcodeRSP , & RI ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitUseOfPhysReg ( OpcodeRSP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitDefOfPhysReg ( OpcodeRSP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . readsRegister ( OpcodeRIP , & RI ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitUseOfPhysReg ( OpcodeRIP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitDefOfPhysReg ( OpcodeRIP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . isPosition ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +for ( const MachineOperand & MOP : MI . operands ( ) ) { +if ( MOP . isCPI ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isJTI ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isCFIIndex ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isFI ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isTargetIndex ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +} +return MachineOutlinerInstrType :: Legal ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..052a970ba05e5c03368e753f04fee87f04a62f92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp @@ -0,0 +1,5 @@ +ArrayRef < std :: pair < unsigned , const char * >> PULPInstrInfo :: getSerializableDirectMachineOperandTargetFlags ( ) const { +using namespace PULPII ; +static const std :: pair < unsigned , const char * > TargetFlags [ ] = { { MO_CALL , "riscv-call" } , { MO_PLT , "riscv-call" } , { MO_LP , "riscv-plt" } , { MO_LO , "riscv-lo" } , { MO_HI , "riscv-hi" } , { MO_PCREL_LO , "riscv-pcrel-lo" } , { MO_PCREL_HI , "riscv-pcrel-hi" } , { MO_GOT_HI , "riscv-got-hi" } , { MO_TPREL_LO , "riscv-tls-got-hi" } , { MO_TLS_GD_HI , "riscv-tls-gd-hi" } , { MO_TLS_GD_HI , "riscv-tls-gd-hi" } , { MO_TPREL_ADD , "riscv-tprel-add" } , { MO_TLS_GOT_HI , "riscv-tls-got-hi" } , { MO +return makeArrayRef ( TargetFlags ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0abe51d787ba696ecc1a89f98927804e3159e6ff --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,27 @@ +unsigned PULPInstrInfo :: insertBranch ( MachineBasicBlock & MBB , MachineBasicBlock * TBB , MachineBasicBlock * FBB , ArrayRef < MachineOperand > Cond , const DebugLoc & DL , int * BytesAdded ) const { +if ( BytesAdded ) { +* BytesAdded = 0 ; +} +assert ( TBB && "insertBranch must not be told to insert a fallthrough" ) ; +assert ( ( Cond . size ( ) == 3 || Cond . size ( ) == 0 ) && "PULP branch conditions have two components!" ) ; +if ( Cond . empty ( ) ) { +MachineInstr & MI = * BuildMI ( & MBB , DL , get ( PULP :: PseudoBR ) ) . addMBB ( TBB ) ; +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( MI ) ; +} +return 1 ; +} +unsigned Opc = Cond [ 0 ] . getImm ( ) ; +MachineInstr & CondMI = * BuildMI ( & MBB , DL , get ( Opc ) ) . add ( Cond [ 1 ] ) . add ( Cond [ 2 ] ) . addMBB ( TBB ) ; +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( CondMI ) ; +} +if ( ! FBB ) { +return 1 ; +} +MachineInstr & MI = * BuildMI ( & MBB , DL , get ( PULP :: PseudoBR ) ) . addMBB ( FBB ) ; +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( MI ) ; +} +return 2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73b132845630aadeefc8108adf01f98c2018390e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertIndirectBranch.cpp @@ -0,0 +1,23 @@ +unsigned PULPInstrInfo :: insertIndirectBranch ( MachineBasicBlock & MBB , MachineBasicBlock & DestBB , const DebugLoc & DL , int64_t BrOffset , RegScavenger * RS ) const { +assert ( RS && "RegScavenger required for long branching" ) ; +assert ( MBB . empty ( ) && "new block should be inserted for expanding unconditional branch" ) ; +assert ( MBB . pred_size ( ) == 1 ) ; +MachineFunction * MF = MBB . getParent ( ) ; +MachineRegisterInfo & MRI = MF -> getRegInfo ( ) ; +unsigned PCReg = MRI . createVirtualRegister ( & PULP :: SReg_64RegClass ) ; +Register ScratchReg = MRI . createVirtualRegister ( & PULP :: GPRRCRegClass ) ; +auto I = MBB . end ( ) ; +MachineInstr * GetPC = BuildMI ( MBB , I , DL , get ( PULP :: S_GETPC_B64 ) , PCReg ) ; +if ( BrOffset >= 0 ) { +BuildMI ( MBB , I , DL , get ( PULP :: PseudoJump ) ) . addReg ( PCReg , RegState :: Define , PULP :: sub0 ) . addReg ( PCReg , 0 , PULP :: sub0 ) . addMBB ( & DestBB , PULP :: TF_LONG_BRANCH_BACKWARD ) ; +MachineInstr * MI = BuildMI ( MBB , I , DL , get ( PULP :: JMP ) ) . addReg ( ScratchReg ) ; +RS -> enterBasicBlockEnd ( MBB ) ; +unsigned Scav = RS -> scavengeRegisterBackwards ( PULP :: SReg_64RegClass , MachineBasicBlock :: iterator ( GetPC ) , false , 0 ) ; +MRI . replaceRegWith ( PCReg , Scav ) ; +unsigned Scav = RS -> scavengeRegisterBackwards ( PULP :: GPRRCRegClass , MI -> getIterator ( ) , false , 0 ) ; +assert ( Scav != PULP :: NoRegister && "No register is scavenged!" ) ; +MRI . replaceRegWith ( ScratchReg , Scav ) ; +MRI . clearVirtRegs ( ) ; +RS -> setRegUsed ( Scav ) ; +return 20 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2777cf70047940f4453af06844d4af50c5226f7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/insertOutlinedCall.cpp @@ -0,0 +1,6 @@ +MachineBasicBlock :: iterator PULPInstrInfo :: insertOutlinedCall ( Module & M , MachineBasicBlock & MBB , MachineBasicBlock :: iterator & It , MachineFunction & MF , outliner :: Candidate & C ) const { +It = MBB . insert ( It , BuildMI ( MF , DebugLoc ( ) , get ( PULP :: JMP_1 ) ) . addGlobalAddress ( M . getNamedValue ( MF . getName ( ) ) ) ) ; +return It ; +It = MBB . insert ( It , BuildMI ( MF , DebugLoc ( ) , get ( PULP :: CALL64pcrel32 ) ) . addGlobalAddress ( M . getNamedValue ( MF . getName ( ) ) ) ) ; +return It ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp new file mode 100644 index 0000000000000000000000000000000000000000..197a59efee091ba41afa2ec9e99be5707984bf1f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isAsCheapAsAMove.cpp @@ -0,0 +1,19 @@ +bool PULPInstrInfo :: isAsCheapAsAMove ( const MachineInstr & MI ) const { +const unsigned Opcode = MI . getOpcode ( ) ; +if ( Opcode == PULP :: FSGNJ_D ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == PULP :: ZERO ) ; +} +if ( Opcode == PULP :: FSGNJ_S ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == PULP :: ZERO ) ; +} +if ( Opcode == PULP :: ADDI ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == PULP :: ZERO ) ; +} +if ( Opcode == PULP :: ORI ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == PULP :: ZERO ) ; +} +if ( Opcode == PULP :: XORI ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == PULP :: ZERO ) ; +} +return MI . isAsCheapAsAMove ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp new file mode 100644 index 0000000000000000000000000000000000000000..11a57adf5987e09748865732f8d9ea1a8c687ab1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isBranchOffsetInRange.cpp @@ -0,0 +1,36 @@ +bool PULPInstrInfo :: isBranchOffsetInRange ( unsigned BranchOpc , int64_t BrOffset ) const { +if ( BranchOpc == PULP :: BEQ ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == PULP :: BNE ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == PULP :: BLT ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == PULP :: BGE ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == PULP :: BLTU ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == PULP :: BGEU ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == PULP :: JAL ) { +return isIntN ( 21 , BrOffset ) ; +} +if ( BranchOpc == PULP :: PseudoBR ) { +return isIntN ( 21 , BrOffset ) ; +} +if ( BranchOpc == PULP :: PseudoJump ) { +return isIntN ( 32 , SignExtend64 ( BrOffset + 0x800 , STI . getZLen ( ) ) ) ; +} +if ( BranchOpc == PULP :: P_BEQIMM ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == PULP :: P_BNEIMM ) { +return isIntN ( 13 , BrOffset ) ; +} +llvm_unreachable ( "Unexpected opcode!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc2ea802e7368fea65d3f735325e8ede614f194d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isCopyInstrImpl.cpp @@ -0,0 +1,25 @@ +Optional < DestSourcePair > PULPInstrInfo :: isCopyInstrImpl ( const MachineInstr & MI ) const { +if ( MI . isMoveReg ( ) ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 1 ) } ; +} +if ( MI . getOpcode ( ) == PULP :: ADDI ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0x0 ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 1 ) } ; +} +} +if ( MI . getOpcode ( ) == PULP::FSGNJ_D ) { +if ( MI . getOperand ( 1 ) . getReg ( ) == PULP :: WZR ) { +if ( MI . getOperand ( 3 ) . getImm ( ) == 0x0 ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 2 ) } ; +} +} +} +if ( MI . getOpcode ( ) == PULP::FSGNJ_S ) { +if ( MI . getOperand ( 1 ) . getReg ( ) == PULP :: XZR ) { +if ( MI . getOperand ( 3 ) . getImm ( ) == 0x0 ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 2 ) } ; +} +} +} +return None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..686fa2f918a2895d7d81909d5775e0e33981a05e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp @@ -0,0 +1,12 @@ +bool PULPInstrInfo :: isFunctionSafeToOutlineFrom ( MachineFunction & MF , bool OutlineFromLinkOnceODRs ) const { +const Function & F = MF . getFunction ( ) ; +if ( ! OutlineFromLinkOnceODRs ) { +if ( F . hasLinkOnceODRLinkage ( ) ) { +return false ; +} +} +if ( F . hasSection ( ) ) { +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..efa61131d11a5807427c43c99cde07fea28c35b7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,103 @@ +unsigned PULPInstrInfo :: isLoadFromStackSlot ( const MachineInstr & MI , int & FrameIndex ) const { +if ( MI . getOpcode ( ) == PULP::LB ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: LBU ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: LH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: LHU ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP::FLH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: LW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP::FLW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: LWU ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: LD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: FLD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e9ae1632ecb6a54096e6399148d56ae67b2e0e7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp @@ -0,0 +1,3 @@ +bool PULPInstrInfo :: isMBBSafeToOutlineFrom ( MachineBasicBlock & MBB , unsigned & Flags ) const { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp new file mode 100644 index 0000000000000000000000000000000000000000..571d654b8f2d2c84c557e259318414054b78b0e7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isSchedulingBoundary.cpp @@ -0,0 +1,18 @@ +bool PULPInstrInfo :: isSchedulingBoundary ( const MachineInstr & MI , const MachineBasicBlock * MBB , const MachineFunction & MF ) const { +if ( TargetInstrInfo :: isSchedulingBoundary ( MI , MBB , MF ) ) { +return true ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP0setup ) { +return true ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP1setup ) { +return true ; +} +if ( MI . getOpcode ( ) == PULP :: LOOP0setupi ) { +return true ; +} +if ( MI . getOpcode ( ) == PULP::LOOP1setupi ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e344ba60d0acde779215174046e226983181aaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,73 @@ +unsigned PULPInstrInfo :: isStoreToStackSlot ( const MachineInstr & MI , int & FrameIndex ) const { +if ( MI . getOpcode ( ) == PULP :: SB ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: SH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: SW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: FSH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: FSW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: SD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == PULP :: FSD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb2cda5148c586ed3a8c8a2513b71a5bfa5b8622 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,31 @@ +void PULPInstrInfo :: loadRegFromStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator I , Register DstReg , int FI , const TargetRegisterClass * RC , const TargetRegisterInfo * TRI ) const { +DebugLoc DL ; +if ( I != MBB . end ( ) ) { +DL = I -> getDebugLoc ( ) ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const MachineFrameInfo & MFI = MF -> getFrameInfo ( ) ; +MachineMemOperand * MMO = MF -> getMachineMemOperand ( MachinePointerInfo :: getFixedStack ( * MF , FI ) , MachineMemOperand :: MOLoad , MFI . getObjectSize ( FI ) , MFI . getObjectAlign ( FI ) ) ; +unsigned Opcode ; +if ( PULP :: GPRRegClass . hasSubClassEq ( RC ) ) { +Opcode = TRI -> getRegSizeInBits ( PULP :: GPRRegClass ) == 32 ? PULP :: LW : PULP :: LD ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( PULP :: FPR16RegClass . hasSubClassEq ( RC ) ) { +Opcode = PULP::FLH ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( PULP :: FPR32RegClass . hasSubClassEq ( RC ) ) { +Opcode = PULP::FLW ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( PULP :: FPR64RegClass . hasSubClassEq ( RC ) ) { +Opcode = PULP :: FLD ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +llvm_unreachable ( "Can't load this register from stack slot" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/movImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/movImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48ba98010ec588b8ea4aa16f5ba545eed86dd48c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/movImm.cpp @@ -0,0 +1,21 @@ +void PULPInstrInfo :: movImm ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , const DebugLoc & DL , Register DstReg , uint64_t Val , MachineInstr :: MIFlag Flag ) const { +assert ( ( Seq . size ( ) > 0 ) ? "movImm" : "movImm" ) ) ; +MachineRegisterInfo & MRI = MBB . getParent ( ) -> getRegInfo ( ) ; +DstReg = MRI . createVirtualRegister ( & PULP :: GPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , get ( PULP :: MOVI32 ) , DstReg ) . addImm ( Val & 0xFFFF ) . setMIFlags ( Flag ) ; +BuildMI ( MBB , MBBI , DL , get ( PULP :: MOVIH32 ) , DstReg ) . addImm ( ( Val >> 16 ) & 0xFFFF ) . setMIFlags ( Flag ) ; +if ( ! STI . hasE2 ( ) ) { +DstReg = MRI . createVirtualRegister ( & PULP :: mGPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , get ( PULP :: MOVI16 ) , DstReg ) . addImm ( Val & 0xFF ) . setMIFlags ( Flag ) ; +return DstReg ; +BuildMI ( MBB , MBBI , DL , get ( PULP :: MOVI16 ) , DstReg ) . addImm ( ( Val >> 8 ) & 0xFF ) . setMIFlags ( Flag ) ; +if ( ( Val & 0xFF ) != 0 ) { +return DstReg ; +BuildMI ( MBB , MBBI , DL , get ( PULP :: MOVI16 ) , DstReg ) . addImm ( ( Val >> 16 ) & 0xFF ) . setMIFlags ( Flag ) ; +if ( ( Val & 0xFF ) != 0 ) { +return DstReg ; +BuildMI ( MBB , MBBI , DL , get ( PULP :: MOVI16 ) , DstReg ) . addImm ( ( Val >> 24 ) & 0xFF ) . setMIFlags ( Flag ) ; +if ( ( Val & 0xFF ) != 0 ) { +return DstReg ; +return DstReg ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee61a6f99c524feca29f0c4363a86c730ce1069a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/parseCondBranch.cpp @@ -0,0 +1,7 @@ +static void parseCondBranch ( MachineInstr & LastInst , MachineBasicBlock * & Target , SmallVectorImpl < MachineOperand > & Cond ) { +assert ( LastInst . getDesc ( ) . isConditionalBranch ( ) && "Unknown conditional branch" ) ; +Target = LastInst . getOperand ( 2 ) . getMBB ( ) ; +Cond . push_back ( MachineOperand :: CreateImm ( LastInst . getOpcode ( ) ) ) ; +Cond . push_back ( LastInst . getOperand ( 0 ) ) ; +Cond . push_back ( LastInst . getOperand ( 1 ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79327225bd7fc3cd1b8afa9434da684dbe6be343 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,31 @@ +unsigned PULPInstrInfo :: removeBranch ( MachineBasicBlock & MBB , int * BytesRemoved ) const { +if ( BytesRemoved ) { +* BytesRemoved = 0 ; +} +MachineBasicBlock :: iterator I = MBB . getLastNonDebugInstr ( ) ; +if ( I == MBB . end ( ) ) { +return 0 ; +} +if ( ! I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +if ( ! I -> getDesc ( ) . isConditionalBranch ( ) ) { +return 0 ; +} +} +if ( BytesRemoved ) { +* BytesRemoved = * BytesRemoved + getInstSizeInBytes ( * I ) ; +} +I -> eraseFromParent ( ) ; +I = MBB . end ( ) ; +if ( I == MBB . begin ( ) ) { +return 1 ; +} +I -- ; +if ( ! I -> getDesc ( ) . isConditionalBranch ( ) ) { +return 1 ; +} +if ( BytesRemoved ) { +* BytesRemoved = * BytesRemoved + getInstSizeInBytes ( * I ) ; +} +I -> eraseFromParent ( ) ; +return 2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..535116b08f06b3f0ccc5cfa7ed4394cf24352d11 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,37 @@ +bool PULPInstrInfo :: reverseBranchCondition ( SmallVectorImpl < MachineOperand > & Cond ) const { +assert ( ( Cond . size ( ) == 3 ) && "Invalid branch condition!" ) ; +if ( Cond [ 0 ] . getImm ( ) == PULP :: BEQ ) { +Cond [ 0 ] . setImm ( PULP :: BNE ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == PULP :: BNE ) { +Cond [ 0 ] . setImm ( PULP :: BEQ ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == PULP :: BLT ) { +Cond [ 0 ] . setImm ( PULP :: BGE ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == PULP :: BGE ) { +Cond [ 0 ] . setImm ( PULP :: BLT ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == PULP :: BLTU ) { +Cond [ 0 ] . setImm ( PULP :: BGEU ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == PULP :: BGEU ) { +Cond [ 0 ] . setImm ( PULP :: BLTU ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == PULP :: P_BEQIMM ) { +Cond [ 0 ] . setImm ( PULP :: P_BNEIMM ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == PULP :: P_BNEIMM ) { +Cond [ 0 ] . setImm ( PULP :: P_BEQIMM ) ; +return false ; +} +llvm_unreachable ( "Unrecognized conditional branch" ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d24e0adda35dd6d872f141fb893726d0a9138f4e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,32 @@ +void PULPInstrInfo :: storeRegToStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator I , Register SrcReg , bool IsKill , int FI , const TargetRegisterClass * RC , const TargetRegisterInfo * TRI ) const { +DebugLoc DL ; +if ( I != MBB . end ( ) ) { +DL = I -> getDebugLoc ( ) ; +} +MachineFunction & MF = * MBB . getParent ( ) ; +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineMemOperand * MMO = MF . getMachineMemOperand ( MachinePointerInfo :: getFixedStack ( MF , FI ) , MachineMemOperand :: MOStore , MFI . getObjectSize ( FI ) , MFI . getObjectAlign ( FI ) ) ; +MachineFunctionInfo * CFI = MF . getInfo < MachineFunctionInfo > ( ) ; +unsigned Opcode ; +if ( PULP :: GPRRegClass . hasSubClassEq ( RC ) ) { +Opcode = TRI -> getRegSizeInBits ( PULP :: GPRRegClass ) == 32 ? PULP :: SW : PULP :: SD ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( PULP :: FPR16RegClass . hasSubClassEq ( RC ) ) { +Opcode = PULP :: FSH ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( PULP :: FPR32RegClass . hasSubClassEq ( RC ) ) { +Opcode = PULP :: FSW ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( PULP :: FPR64RegClass . hasSubClassEq ( RC ) ) { +Opcode = PULP :: FSD ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +llvm_unreachable ( "Can't store this register to stack slot" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcc10dbebee6a317646b16a7267e491c9f33c58c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/InstrInfo/verifyInstruction.cpp @@ -0,0 +1,26 @@ +bool zmntarzmInstrInfo :: verifyInstruction ( const MachineInstr & MI , StringRef & ErrInfo ) const { +return false ; +return false ; +for ( const MachineOperand & MO : llvm :: drop_begin ( MI . operands ( ) , 2 ) ) { +continue ; +if ( ! MO . isReg ( ) ) { +continue ; +return false ; +return false ; +} +for ( const MachineOperand & MO : llvm :: drop_begin ( MI . operands ( ) , 2 ) ) { +continue ; +if ( ! MO . isReg ( ) ) { +continue ; +return false ; +return false ; +for ( const MachineOperand & MO : llvm :: drop_begin ( MI . operands ( ) , 2 ) ) { +continue ; +if ( ! MO . isReg ( ) ) { +continue ; +return false ; +return false ; +ErrInfo = "Incorrect array index for MVE_VMOV_q_rr" ; +return false ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dec350caa0d7e69e8fca201c97e14571afe45b39 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp @@ -0,0 +1,2 @@ +PULPMachineFunctionInfo ( const MachineFunction & MF ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dd76ab5ba3323d65a4477bccc65534dc7962a22e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp @@ -0,0 +1,3 @@ +unsigned getLibCallStackSize ( ) const { +return LibCallStackSize ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1506385c39ba129264d05e3aeef80f525f072626 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp @@ -0,0 +1,3 @@ +int getMoveF64FrameIndex ( MachineFunction & MF ) { +return VarArgsFrameIndex ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf3059c9836b6dd477ebf27a54167e1208d90ffc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getUsedSSR.cpp @@ -0,0 +1,3 @@ +unsigned getUsedSSR ( ) const { +return UsedSSR ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc86317bf4ffdb2157afe0cc9f496c3f8454b58d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex ( ) const { +return VarArgsFrameIndex ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..984c1825c54e81864add7c3ce18abcc8f75abfb1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +unsigned getVarArgsSaveSize ( ) const { +return VarArgsSaveSize ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5abdcaac1a49937450075b01349b77aad5cba33e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp @@ -0,0 +1,3 @@ +void setLibCallStackSize ( unsigned Size ) { +LibCallStackSize = Size ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..120e16da41cbeb7ef433d94aac262b11322e235d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setUsedSSR.cpp @@ -0,0 +1,3 @@ +void setUsedSSR ( unsigned SSR ) { +UsedSSR = SSR ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66ec61362627179d015c191feff7e83b189ae468 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex ( int Index ) { +VarArgsFrameIndex = Index ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65028936eed662052285bdc438536ed2db9e126d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +void setVarArgsSaveSize ( int Size ) { +VarArgsSaveSize = Size ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7bf2af87f47f7fccd53a9869143ed96dbc2a7d2b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp @@ -0,0 +1,4 @@ +bool useSaveRestoreLibCalls ( const MachineFunction & MF ) const { +return UseLongCalls ; +return UseRetpolineIndirectCalls ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5d2323fed8e6241a94d307b24fc139b97a0fc51 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,7 @@ +PULPSubtarget :: PULPSubtarget ( const Triple & TT , StringRef CPU , StringRef TuneCPU , StringRef FS , StringRef ABIName , const TargetMachine & TM ) : PULPGenSubtargetInfo ( TT , CPU , TuneCPU , FS ) , UserReservedRegister ( PULP :: NUM_TARGET_REGS ) , FrameLowering ( initializeSubtargetDependencies ( TT , CPU , TuneCPU , FS , ABIName ) ) , InstrInfo ( * this ) , RegInfo ( getHwMode ( ) ) , TLInfo ( TM , * this ) { +CallLoweringInfo . reset ( new PULPCallLowering ( * getTargetLowering ( ) ) ) ; +Legalizer . reset ( new PULPLegalizerInfo ( * this ) ) ; +auto * RBI = new PULPRegisterBankInfo ( * getRegisterInfo ( ) ) ; +RegBankInfo . reset ( RBI ) ; +InstSelector . reset ( createPULPInstructionSelector ( * static_cast < const PULPTargetMachine * > ( & TM ) , * this , * RBI ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/anchor.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88e30455bc00b667a0e07b1c0d8bf3ab6ef51963 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/anchor.cpp @@ -0,0 +1,2 @@ +void PULPSubtarget :: anchor ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70a8d18a0f4959c58f34faee220172dc3452205e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableLinkerRelax.cpp @@ -0,0 +1,3 @@ +bool enableLinkerRelax ( ) const { +return EnableLinkerRelax ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..51af53569dda58106126bb9616c9b0e228522932 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableMachineScheduler.cpp @@ -0,0 +1,3 @@ +bool enableMachineScheduler ( ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88c4f2c9ef4b883b0ff22bc15363b377cf8c1e96 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableRVCHintInstrs.cpp @@ -0,0 +1,3 @@ +bool enableRVCHintInstrs ( ) const { +return EnableRVCHintInstrs ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5523878c63a3fec5d0d102911de8a2fb644c25da --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/enableSaveRestore.cpp @@ -0,0 +1,3 @@ +bool enableSaveRestore ( ) const { +return EnableSaveRestore ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a8365a13e63882bafd738000cff8a090f0160b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getCallLowering.cpp @@ -0,0 +1,3 @@ +const CallLowering * PULPSubtarget :: getCallLowering ( ) const { +return CallLoweringInfo . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5bbed15ea719d6d42255c0a92a1f394ddde43a0d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const PULPFrameLowering * getFrameLowering ( ) const override { +return & FrameLowering ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41bce5f76393a63852e1f0b159240cccc3d55f14 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getInstrInfo.cpp @@ -0,0 +1,3 @@ +const PULPInstrInfo * getInstrInfo ( ) const override { +return & InstrInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcb22050146181e46f479d20d687089bb86a5c3f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector * PULPSubtarget :: getInstructionSelector ( ) const { +return InstSelector . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f452b57138601c1ae86145e1495564c493e7bd7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getLegalizerInfo.cpp @@ -0,0 +1,3 @@ +const LegalizerInfo * PULPSubtarget :: getLegalizerInfo ( ) const { +return Legalizer . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c5cee3aa868061494bbb2d7bbeb9fef151c919bd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getRegBankInfo.cpp @@ -0,0 +1,3 @@ +const RegisterBankInfo * PULPSubtarget :: getRegBankInfo ( ) const { +return RegBankInfo . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70af2237e212bb543bccb120911f80c58a77f711 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const PULPRegisterInfo * getRegisterInfo ( ) const override { +return & RegInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83c31a22c7236b0e11e56881d95a0f360d309ab2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +const SelectionDAGTargetInfo * getSelectionDAGInfo ( ) const override { +return & TSInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2a5361219e721c25ce26aebe56fec7a9b3b3a80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getTargetABI.cpp @@ -0,0 +1,3 @@ +PULPABI :: ABI getTargetABI ( ) const { +return TargetABI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b73263bed8668c8348fa210c03fd28a2277d00e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getTargetLowering.cpp @@ -0,0 +1,3 @@ +const PULPTargetLowering * getTargetLowering ( ) const override { +return & TLInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getXLen.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getXLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a6e3bde5f9b6b485447a8bce8a0091f1a0340c94 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getXLen.cpp @@ -0,0 +1,3 @@ +unsigned getXLen ( ) const { +return XLen ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d4f4a2499c523fc8594ec194a1d030d0dad1e92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/getXLenVT.cpp @@ -0,0 +1,3 @@ +MVT getXLenVT ( ) const { +return XLenVT ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe9c424ea6f2aed686d7d43e3159a33bda4c7319 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXdma.cpp @@ -0,0 +1,3 @@ +bool hasExtXdma ( ) const { +return HasExtXdma ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3009034d61fd80a08c01dac822559712989ecdf2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfalthalf ( ) const { +return HasExtXfalthalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bab4daab1eee65c295bf4f69e40a236a339b47b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfaltquarter ( ) const { +return HasExtXfaltquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88369b5f7705891c6636665e5afc49e99f8adeb8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxalthalf ( ) const { +return HasExtXfauxalthalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..237e500d36b35492c0584866abdcd38a20e5b2e8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxaltquarter ( ) const { +return HasExtXfauxaltquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..164d2b559b215992ac5dd61cdee28950af74d821 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxhalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxhalf ( ) const { +return HasExtXfauxhalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..12190b04f61d74eae2cb3e2b59342c9fc9e1cca0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxquarter ( ) const { +return HasExtXfauxquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb8ba2fc2f6afe98c7c6bf4fd389fcc7ed0578d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecalthalf ( ) const { +return HasExtXfauxvecalthalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ae742fdd06c0a952cee9360313f256773f1e781 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecaltquarter ( ) const { +return HasExtXfauxvecaltquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ab66044e38a430bad413da5473a483a960629d1d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvechalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvechalf ( ) const { +return HasExtXfauxvechalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1f211da2a9a94789f6c005440d7171f7cdbd380c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecquarter ( ) const { +return HasExtXfauxvecquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1ab3f27f885f9f093b121d2e39591c76440eaf4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfauxvecsingle.cpp @@ -0,0 +1,3 @@ +bool hasExtXfauxvecsingle ( ) const { +return HasExtXfauxvecsingle ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23fb8a403af5615e9766755d61bf31026c360d9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvecalthalf ( ) const { +return HasExtXfexpauxvecalthalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c81e30ef0d5ef0080ebc1f6c2fabe2818aa8d163 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvecaltquarter ( ) const { +return HasExtXfexpauxvecaltquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d29f3d4a7443be13b47e6f853b3492830aaf0b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvechalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvechalf ( ) const { +return HasExtXfexpauxvechalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2485f99aedadba92788e867bdbf05595fa3ca6ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfexpauxvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfexpauxvecquarter ( ) const { +return HasExtXfexpauxvecquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e3a5aafd523e1384ad62b424d88de1e4c99de60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfquarter ( ) const { +return HasExtXfquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9572b27b2650a20c1e651c8000b84b3bfc23dcff --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfrep.cpp @@ -0,0 +1,3 @@ +bool hasExtXfrep ( ) const { +return HasExtXfrep ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0aec901fb8bb8ee5d373d4e2f560c46934ff7065 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecalthalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecalthalf ( ) const { +return HasExtXfvecalthalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cdc24e81790f4baa40491898d6ad8be7abea1ce5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecaltquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecaltquarter ( ) const { +return HasExtXfvecaltquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f9ad1761fa085b00baab742c675f574678b7ef2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvechalf.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvechalf ( ) const { +return HasExtXfvechalf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9e071bfba2f0bdf9dfb25c346bd716eaaffc3814 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecquarter.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecquarter ( ) const { +return HasExtXfvecquarter ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47173c96cc91a36b2b5c4d64fca2e1581e2258e6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXfvecsingle.cpp @@ -0,0 +1,3 @@ +bool hasExtXfvecsingle ( ) const { +return HasExtXfvecsingle ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..311dfa7acbaf30e4204ad4e76b4ecb02b02fc810 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXmempool.cpp @@ -0,0 +1,3 @@ +bool hasExtXmempool ( ) const { +return HasExtXmempool ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86dee38376b5ab12493c76375b8a768e803fe679 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXsmallfloat.cpp @@ -0,0 +1,66 @@ +bool hasExtXsmallfloat ( ) const { +if ( HasExtXfalthalf ) { +return true ; +} +if ( HasExtXfquarter ) { +return true ; +} +if ( HasExtXfaltquarter ) { +return true ; +} +if ( HasExtXfvecsingle ) { +return true ; +} +if ( HasExtXfvechalf ) { +return true ; +} +if ( HasExtXfvecalthalf ) { +return true ; +} +if ( HasExtXfvecquarter ) { +return true ; +} +if ( HasExtXfvecaltquarter ) { +return true ; +} +if ( HasExtXfauxhalf ) { +return true ; +} +if ( HasExtXfauxalthalf ) { +return true ; +} +if ( HasExtXfauxquarter ) { +return true ; +} +if ( HasExtXfauxaltquarter ) { +return true ; +} +if ( HasExtXfauxvecsingle ) { +return true ; +} +if ( HasExtXfauxvechalf ) { +return true ; +} +if ( HasExtXfauxvecalthalf ) { +return true ; +} +if ( HasExtXfauxvecquarter ) { +return true ; +} +if ( HasExtXfauxvecaltquarter ) { +return true ; +} +if ( HasExtXfexpauxvechalf ) { +return true ; +} +if ( HasExtXfexpauxvecalthalf ) { +return true ; +} +if ( HasExtXfexpauxvecquarter ) { +return true ; +} +if ( HasExtXfexpauxvecaltquarter ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48c1fc1917c48139a2d35cdececafe4e577e654f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasExtXssr.cpp @@ -0,0 +1,3 @@ +bool hasExtXssr ( ) const { +return HasExtXssr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..655a005f88888e9a146b42979893f0809a54a652 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasPULPExtV2.cpp @@ -0,0 +1,3 @@ +bool hasPULPExtV2 ( ) const { +return HasPULPExtV2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f2e661f51d43203396d1e225cbc8278eace7b4df --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtA.cpp @@ -0,0 +1,3 @@ +bool hasStdExtA ( ) const { +return HasStdExtA ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce5e9fb80677325f4d15acae0c205541ba3f0a86 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtB.cpp @@ -0,0 +1,3 @@ +bool hasStdExtB ( ) const { +return HasStdExtB ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6afa2dea62227c40e77b1d809e422cc828634c13 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtC.cpp @@ -0,0 +1,3 @@ +bool hasStdExtC ( ) const { +return HasStdExtC ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e777c791d438d140046213757adc02b4ad72943b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtD.cpp @@ -0,0 +1,3 @@ +bool hasStdExtD ( ) const { +return HasStdExtD ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6604f1a6d0b9bd50209386800e4b95b032d791ad --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtF.cpp @@ -0,0 +1,3 @@ +bool hasStdExtF ( ) const { +return HasStdExtF ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21ed588c30fce8b938d0734277487193cd84c592 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtM.cpp @@ -0,0 +1,3 @@ +bool hasStdExtM ( ) const { +return HasStdExtM ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a73c0d3f407b71b90ca2ba8539d287063ccf6f3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtV.cpp @@ -0,0 +1,3 @@ +bool hasStdExtV ( ) const { +return HasStdExtV ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5a9225770f654fcd514c1da5ab6e925fd96804a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZba.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZba ( ) const { +return HasStdExtZba ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28a3678f936fee5641edcb5075f2abf9fdfe7335 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbb.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbb ( ) const { +return HasStdExtZbb ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d024a63261d9fb21603c6b130f22b925d50b933 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbc ( ) const { +return HasStdExtZbc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ebad6fe9769e6edcc5bc81d781126d04df82694e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbe.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbe ( ) const { +return HasStdExtZbe ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dbc5d68d500b25105271947368d1a77de4d31b40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbf.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbf ( ) const { +return HasStdExtZbf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..efaa1d7da6ca38abca75b0da6b48aced6cd1696d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbm.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbm ( ) const { +return HasStdExtZbm ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5396d1bb87eb10eee1d64fb4d8315b808898b02 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbp.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbp ( ) const { +return HasStdExtZbp ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c12b3ad22e06eb29ebda5ab08e3dddda0e9f320 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbproposedc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbproposedc ( ) const { +return HasStdExtZbproposedc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65e76b1debf4bcd1997f16adfa040bb88faf6617 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbr.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbr ( ) const { +return HasStdExtZbr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98ab2c86bcc3ffd2a227696236b28d03e20fe466 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbs.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbs ( ) const { +return HasStdExtZbs ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10ad75e226f3fc188a0b8134df8a8284a1ed10b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZbt.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbt ( ) const { +return HasStdExtZbt ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a754f5f42aa332191c6959d7b43fe6e6657d2d1a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZfh.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZfh ( ) const { +return HasStdExtZfh ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe9c8a54a357a1f5f9686c085c4f28943257ae0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZvamo.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvamo ( ) const { +return HasStdExtZvamo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9740e1eb0dce59980aa951a67fca0ad5a27ad003 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/hasStdExtZvlsseg.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvlsseg ( ) const { +return HasStdExtZvlsseg ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5562388ba774934d86c579a717eea19ac879a34f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/initializeSubtargetDependencies.cpp @@ -0,0 +1,17 @@ +PULPSubtarget & PULPSubtarget :: initializeSubtargetDependencies ( const Triple & TT , StringRef CPU , StringRef TuneCPU , StringRef FS , StringRef ABIName ) { +std :: string CPUName = CPU ; +bool Is64Bit = TT . isArch64Bit ( ) ; +if ( CPU . empty ( ) ) { +CPUName = Is64Bit ? "generic-la64" : "generic-la32" ; +} +if ( TuneCPU . empty ( ) ) { +TuneCPU = CPUName ; +} +ParseSubtargetFeatures ( CPUName , TuneCPU , FS ) ; +if ( Is64Bit ) { +GRLenVT = MVT :: i64 ; +GRLen = 64 ; +} +TargetABI = Is64Bit ? PULPABI :: ABI_LP64D : PULPABI :: ABI_ILP32D ; +return * this ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/is64Bit.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/is64Bit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..44cd572e277dadcf0f1bd6ba82d9e10c25d718c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/is64Bit.cpp @@ -0,0 +1,3 @@ +bool is64Bit ( ) const { +return HasRV64 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isPULP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isPULP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..42fba830a512d7708d5062031df4142d37aa0609 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isPULP.cpp @@ -0,0 +1,3 @@ +bool isPULP ( ) const { +return IsPULP ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isRV32E.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d3e892bba6b18878664cc247c83bf009dbe49640 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E ( ) const { +return IsRV32E ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..215b11b8089680f6135e3d2ae941e293b1c51b85 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/Subtarget/isRegisterReservedByUser.cpp @@ -0,0 +1,4 @@ +bool isRegisterReservedByUser ( Register R ) const { +assert ( R < PULP :: NUM_TARGET_REGS && "Register out of range" ) ; +return UserReservedRegister [ R ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e797fda060833ebe4090d580eb0d8c72c77cc3e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePULPTargetInfo ( ) { +RegisterTarget < Triple :: PULP32 > X ( getThePULP32Target ( ) , "PULP32" , "32-bit PULP" , "PULP" ) ; +RegisterTarget < Triple :: PULP64 > Y ( getThePULP64Target ( ) , "PULP64" , "64-bit PULP" , "PULP" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..99e1c1f759361b6abe2a63ae526e5783ed512bcd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/getThe32Target.cpp @@ -0,0 +1,4 @@ +Target & llvm :: getThePULP32Target ( ) { +static Target ThePULP32Target ; +return ThePULP32Target ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9715d77fe8c65801fad6c96543a293d29280744d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetInfo/getThe64Target.cpp @@ -0,0 +1,4 @@ +Target & llvm :: getThePULP64Target ( ) { +static Target ThePULP64Target ; +return ThePULP64Target ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee0ff876464d19ee5c5279741c3a7cf5c224b24e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,12 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePULPTarget ( ) { +RegisterTargetMachine < PULPTargetMachine > X ( getThePULP32Target ( ) ) ; +RegisterTargetMachine < PULPTargetMachine > Y ( getThePULP64Target ( ) ) ; +auto * PR = PassRegistry :: getPassRegistry ( ) ; +initializeGlobalISel ( * PR ) ; +initializePULPMergeBaseOffsetOptPass ( * PR ) ; +initializePULPExpandSSRPass ( * PR ) ; +initializePULPFrepLoopPass ( * PR ) ; +initializePULPExpandSDMAPass ( * PR ) ; +initializePULPExpandPseudoPass ( * PR ) ; +initializePULPCleanupVSETVLIPass ( * PR ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d98ca95e2918d43eb3d8514ddc55aadde8ab9ef --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/PassConfig.cpp @@ -0,0 +1,2 @@ +PULPPassConfig ( PULPTargetMachine & TM , PassManagerBase & PM ) : TargetPassConfig ( TM , PM ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53846d1e5c992fb2127a00c9c76e0bc4d445df96 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,3 @@ +PULPTargetMachine :: PULPTargetMachine ( const Target & T , const Triple & TT , StringRef CPU , StringRef FS , const TargetOptions & Options , Optional < Reloc :: Model > RM , CodeModel :: Model CM , CodeGenOpt :: Level OL ) : LLVMTargetMachine ( T , computeDataLayout ( TT ) , TT , CPU , FS , Options , getEffectiveRelocModel ( RM ) , CM , OL ) , TLOF ( make_unique < TargetObjectFile > ( ) ) , Subtarget ( TT , CPU , FS , * this ) { +initAsmInfo ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e54057db3f5f5dd4877a8136a85cebfb21452d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp @@ -0,0 +1,4 @@ +bool PULPPassConfig :: addGlobalInstructionSelect ( ) { +addPass ( new InstructionSelect ( ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89e855f951071b6e7221a83ea4d2d381b56d1085 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addIRPasses.cpp @@ -0,0 +1,4 @@ +void PULPPassConfig :: addIRPasses ( ) { +addPass ( createAtomicExpandPass ( ) ) ; +TargetPassConfig :: addIRPasses ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6848710e5833cf1f0d09d434942fd7d615249f97 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addIRTranslator.cpp @@ -0,0 +1,4 @@ +bool PULPPassConfig :: addIRTranslator ( ) { +addPass ( new IRTranslator ( getOptLevel ( ) ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48be69f530d3cef75db77002055fcf8c1a16b3e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,4 @@ +bool PULPPassConfig :: addInstSelector ( ) { +addPass ( createPULPISelDag ( getPULPTargetMachine ( ) ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..025029726f16ba1085721bb0f51045fe28431d5d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addLegalizeMachineIR.cpp @@ -0,0 +1,4 @@ +bool PULPPassConfig :: addLegalizeMachineIR ( ) { +addPass ( new Legalizer ( ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f73822f1b0fb3073a5793449d851f429fe3c6af9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,3 @@ +void PULPPassConfig :: addPreEmitPass ( ) { +addPass ( & BranchRelaxationPassID ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5958376e90ea2b59ad8510ad43fb245e8ed23caf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreEmitPass2.cpp @@ -0,0 +1,5 @@ +void PULPPassConfig :: addPreEmitPass2 ( ) { +addPass ( createPULPExpandPseudoPass ( ) ) ; +addPass ( createPULPExpandAtomicPseudoPass ( ) ) ; +addPass ( createPULPFixupHwLoops ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..200ea4650c836ba4adfe574c87c58b1da2dc6f84 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreRegAlloc.cpp @@ -0,0 +1,8 @@ +void PULPPassConfig :: addPreRegAlloc ( ) { +if ( TM -> getOptLevel ( ) != CodeGenOpt :: None ) { +if ( EnableAdvSIMDScalar ) { +addPass ( createPULPAdvSIMDScalar ( ) ) ; +addPass ( & PeepholeOptimizerID ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e838d3370e9eae9a6c5af6e3cb490a275e8bac95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addPreSched2.cpp @@ -0,0 +1,2 @@ +void PULPPassConfig :: addPreSched2 ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a77f455584537679760a029f7c220d00d6761e98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/addRegBankSelect.cpp @@ -0,0 +1,4 @@ +bool PULPPassConfig :: addRegBankSelect ( ) { +addPass ( new RegBankSelect ( ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e269813941069ddc6f79665edc9b1dc98b70ebc7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/computeDataLayout.cpp @@ -0,0 +1,10 @@ +static StringRef computeDataLayout ( const Triple & TT ) { +if ( TT . isArch64Bit ( ) ) { +return "e-m:e-p:64:64-i64:64-i128:128-n64-S128" ; +} +assert ( TT . isArch32Bit ( ) && "only RV32 and RV64 is currently supported" ) ; +if ( TT . getVendor ( ) == Triple :: HERO ) { +return "e-m:e-p:32:32-p1:64:32-i64:64-n32-S128-P0-A0" ; +} +return "e-m:e-p:32:32-i64:64-n32-S128" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f878015918400ca994abe14d9c6b6ddf4cb72803 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/createPassConfig.cpp @@ -0,0 +1,3 @@ +TargetPassConfig * TargetMachine :: createPassConfig ( PassManagerBase & PM ) { +return new PULPPassConfig ( * this , PM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9424f05ebb3cbbd3ce9eff02ee928b811b620b67 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getEffectiveRelocModel.cpp @@ -0,0 +1,6 @@ +static Reloc :: Model getEffectiveRelocModel ( const Triple & TT , Optional < Reloc :: Model > RM ) { +if ( ! RM . hasValue ( ) ) { +return Reloc :: Static ; +} +return * RM ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6174dfa05f7cbe9092209bade1a1dee2435f5e04 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getObjFileLowering.cpp @@ -0,0 +1,3 @@ +TargetLoweringObjectFile * getObjFileLowering ( ) const override { +return TLOF . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b2bce729a5fed56e869190c341c51b6b402f879 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,25 @@ +const PULPSubtarget * PULPTargetMachine :: getSubtargetImpl ( const Function & F ) const { +Attribute TuneAttr = F . getFnAttribute ( "tune-cpu" ) ; +Attribute CPUAttr = F . getFnAttribute ( "target-cpu" ) ; +Attribute FSAttr = F . getFnAttribute ( "target-features" ) ; +std :: string CPU = CPUAttr . isValid ( ) ? CPUAttr . getValueAsString ( ) . str ( ) : TargetCPU ; +std :: string TuneCPU = TuneAttr . isValid ( ) ? TuneAttr . getValueAsString ( ) . str ( ) : CPU ; +std :: string FS = FSAttr . isValid ( ) ? FSAttr . getValueAsString ( ) . str ( ) : TargetFS ; +std :: string Key = CPU + TuneCPU + FS ; +auto & I = SubtargetMap [ Key ] ; +if ( ! I ) { +resetTargetOptions ( F ) ; +auto ABIName = Options . MCOptions . getABIName ( ) ; +if ( const MDString * ModuleTargetABI = dyn_cast_or_null < MDString > ( F . getParent ( ) -> getModuleFlag ( "target-abi" ) ) ) { +auto TargetABI = PULPABI :: getTargetABI ( ABIName ) ; +if ( TargetABI != PULPABI :: ABI_Unknown ) { +if ( ModuleTargetABI -> getString ( ) != ABIName ) { +report_fatal_error ( "-target-abi option != target-abi module flag" ) ; +} +} +ABIName = ModuleTargetABI -> getString ( ) ; +} +I = std :: make_unique < PULPSubtarget > ( TargetTriple , CPU , TuneCPU , FS , ABIName , * this ) ; +} +return I . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6f7900c59a3ba6809e562704d5d33c3fefcba65 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getTargetMachine.cpp @@ -0,0 +1,3 @@ +PULPTargetMachine & getPULPTargetMachine ( ) const { +return getTM < PULPTargetMachine > ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..37011fd448c968457fe7e6eb3e0fc317d4cec726 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/getTargetTransformInfo.cpp @@ -0,0 +1,3 @@ +TargetTransformInfo PULPTargetMachine :: getTargetTransformInfo ( const Function & F ) { +return TargetTransformInfo ( PULPTTIImpl ( this , F ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ba852ada71e64e222c63045b5d352a5135aedb29 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp @@ -0,0 +1,3 @@ +bool PULPTargetMachine :: isNoopAddrSpaceCast ( unsigned SrcAS , unsigned DestAS ) const { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66f3233ce462bbcd95e92c3d5c6453c1765eb60c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetMachine/setTargetOptionsWithModuleMetadata.cpp @@ -0,0 +1,23 @@ +void PULPTargetMachine :: setTargetOptionsWithModuleMetadata ( const Module & M LLVM_ATTRIBUTE_UNUSED ) { +constexpr StringLiteral DeadKeys [ ] = { ValVerKey } ; +StringSet < > DeadKeySet ; +for ( auto & Key : DeadKeys ) { +if ( M . getModuleFlag ( Key ) ) { +DeadKeySet . insert ( Key ) ; +} +} +if ( DeadKeySet . empty ( ) ) { +return ; +} +SmallVector < Module :: ModuleFlagEntry , 8 > ModuleFlags ; +M . getModuleFlagsMetadata ( ModuleFlags ) ; +NamedMDNode * MDFlags = M . getModuleFlagsMetadata ( ) ; +MDFlags -> eraseFromParent ( ) ; +for ( auto & Flag : ModuleFlags ) { +StringRef Key = Flag . Key -> getString ( ) ; +if ( DeadKeySet . contains ( Key ) ) { +continue ; +} +M . addModuleFlag ( Flag . Behavior , Key , Flag . Val ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e90a31ca6ed22f65dbeebcb53ffe68d40f77772b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,5 @@ +void PULPELFTargetObjectFile :: Initialize ( MCContext & Ctx , const TargetMachine & TM ) { +TargetLoweringObjectFileELF :: Initialize ( Ctx , TM ) ; +SmallDataSection = getContext ( ) . getELFSection ( ".sdata" , ELF :: SHT_PROGBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC ) ; +SmallBSSSection = getContext ( ) . getELFSection ( ".sbss" , ELF :: SHT_NOBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc78dc414b87c5bd03df0ef01a6b7712982a47f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,13 @@ +MCSection * PULPELFTargetObjectFile :: SelectSectionForGlobal ( const GlobalObject * GO , SectionKind Kind , const TargetMachine & TM ) const { +if ( Kind . isBSS ( ) ) { +if ( isGlobalInSmallSection ( GO , TM ) ) { +return SmallBSSSection ; +} +} +if ( Kind . isData ( ) ) { +if ( isGlobalInSmallSection ( GO , TM ) ) { +return SmallDataSection ; +} +} +return TargetLoweringObjectFileELF :: SelectSectionForGlobal ( GO , Kind , TM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84bb6c56c9dbc97b815c0af6bf6624e7d97a9d6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/getModuleMetadata.cpp @@ -0,0 +1,23 @@ +void PULPELFTargetObjectFile :: getModuleMetadata ( Module & M ) { +constexpr StringLiteral DeadKeys [ ] = { ValVerKey } ; +StringSet < > DeadKeySet ; +for ( auto & Key : DeadKeys ) { +if ( M . getModuleFlag ( Key ) ) { +DeadKeySet . insert ( Key ) ; +} +} +if ( DeadKeySet . empty ( ) ) { +return ; +} +SmallVector < Module :: ModuleFlagEntry , 8 > ModuleFlags ; +M . getModuleFlagsMetadata ( ModuleFlags ) ; +NamedMDNode * MDFlags = M . getModuleFlagsMetadata ( ) ; +MDFlags -> eraseFromParent ( ) ; +for ( auto & Flag : ModuleFlags ) { +StringRef Key = Flag . Key -> getString ( ) ; +if ( DeadKeySet . contains ( Key ) ) { +continue ; +} +M . addModuleFlag ( Flag . Behavior , Key , Flag . Val ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..641db18231fa94f60506f117957c3e508ee106a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,6 @@ +MCSection * PULPELFTargetObjectFile :: getSectionForConstant ( const DataLayout & DL , SectionKind Kind , const Constant * C , Align & Alignment ) const { +if ( isConstantInSmallSection ( DL , C ) ) { +return SmallDataSection ; +} +return TargetLoweringObjectFileELF :: getSectionForConstant ( DL , Kind , C , Alignment ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bf38d3cb3c4ceb2081f51a95db8e57c8932949b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp @@ -0,0 +1,3 @@ +bool PULPELFTargetObjectFile :: isConstantInSmallSection ( const DataLayout & DL , const Constant * CN ) const { +return isInSmallSection ( DL . getTypeAllocSize ( CN -> getType ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a6b23dea4216f64922521a118dfde35700085f25 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp @@ -0,0 +1,12 @@ +bool PULPTargetObjectFile :: isGlobalInSmallSection ( const GlobalObject * GO , const TargetMachine & TM ) const { +if ( GO == nullptr ) { +return TM . getCodeModel ( ) == CodeModel :: Small ; +} +if ( GO -> isDeclaration ( ) ) { +return isGlobalInSmallSectionImpl ( GO , TM ) ; +} +if ( GO -> hasAvailableExternallyLinkage ( ) ) { +return isGlobalInSmallSectionImpl ( GO , TM ) ; +} +return isGlobalInSmallSection ( GO , TM , getKindForGlobal ( GO , TM ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5300e35df49d0511cfba12c4f83de9b0f0ee366a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetObjectFile/isInSmallSection.cpp @@ -0,0 +1,3 @@ +bool PULPELFTargetObjectFile :: isInSmallSection ( uint64_t Size ) const { +return Size > 0 && Size <= SSThreshold ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d658c44122256f95dfe0e40a16541ff66d475491 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/TTIImpl.cpp @@ -0,0 +1,2 @@ +explicit PULPTTIImpl ( const PULPTargetMachine * TM , const Function & F ) : BaseT ( TM , F . getParent ( ) -> getDataLayout ( ) ) , ST ( TM -> getSubtargetImpl ( F ) ) , TLI ( ST -> getTargetLowering ( ) ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3fe40d9eb032baa80ed019aa9ac1f5086c2c3937 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCost.cpp @@ -0,0 +1,6 @@ +int PULPTTIImpl :: getIntImmCost ( const APInt & Imm , Type * Ty , TTI :: TargetCostKind CostKind ) { +if ( Imm == 0 ) { +return TTI :: TCC_Free ; +} +return PULPMatInt::getIntMatCost(Imm, DL.getTypeSizeInBits(Ty), getST()->is64Bit()) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..174d925f5605ea1f4ad0c168fe1f0510661cbcab --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp @@ -0,0 +1,71 @@ +int PULPTTIImpl :: getIntImmCostInst ( unsigned Opcode , unsigned Idx , const APInt & Imm , Type * Ty , TTI :: TargetCostKind CostKind , Instruction * Inst ) { +assert ( Ty -> isIntegerTy ( ) && "getIntImmCost can only estimate cost of materialising integers" ) ; +if ( Opcode == Instruction :: GetElementPtr ) { +return TTI :: TCC_Free ; +} +if ( Opcode == Instruction :: Add ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( Ty -> getPrimitiveSizeInBits ( ) == 8 ) { +return TTI :: TCC_Free ; +} +} +} +if ( Opcode == Instruction :: And ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Or ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Xor ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Mul ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Sub ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Shl ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +} +if ( Opcode == Instruction :: LShr ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( Ty -> getPrimitiveSizeInBits ( ) <= 32 ) { +return TTI :: TCC_Free ; +} +} +} +if ( Opcode == Instruction :: AShr ) { +return TTI :: TCC_Free ; +} +return TTI :: TCC_Free ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..687335d569416b2f632bada71895423e78301e1b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp @@ -0,0 +1,3 @@ +int PULPTTIImpl :: getIntImmCostIntrin ( Intrinsic :: ID IID , unsigned Idx , const APInt & Imm , Type * Ty , TTI :: TargetCostKind CostKind ) { +return TTI :: TCC_Free ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eaacee90dd5a704417d08b0ded1af204f68512e8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getST.cpp @@ -0,0 +1,3 @@ +const PULPSubtarget * getST ( ) const { +return ST ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..272b63030f382ea7c4ea6fc26923abd0bc321ad3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/getTLI.cpp @@ -0,0 +1,3 @@ +const PULPTargetLowering * getTLI ( ) const { +return TLI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a3bc6bfb8b4ea9f5836a152e665de12cba2aee1c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/isLoweredToCall.cpp @@ -0,0 +1,9 @@ +bool PULPTTIImpl :: isLoweredToCall ( const Function * F ) { +if ( ! F -> isIntrinsic ( ) ) { +BaseT :: isLoweredToCall ( F ) ; +} +if ( F -> getName ( ) . startswith ( "llvm.PULP_lower" ) ) { +return false ; +} +return BaseT :: isLoweredToCall ( F ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25cc01cb9449b4de1a266ee4285e8e4a20907fa6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Scheduling/TargetTransformInfo/shouldFavorPostInc.cpp @@ -0,0 +1,6 @@ +bool PULPTTIImpl :: shouldFavorPostInc ( ) const { +if ( ST -> hasPULPExtV2 ( ) ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/CallLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/CallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f148a59bf28097d834f8735509ac8eb35eb71887 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/CallLowering.cpp @@ -0,0 +1,2 @@ +PULPCallLowering :: PULPCallLowering ( const PULPTargetLowering & TLI ) : CallLowering ( & TLI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d84f053e84fec3bffcd99a79d13349820044ebff --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerCall.cpp @@ -0,0 +1,3 @@ +bool PULPCallLowering :: lowerCall ( MachineIRBuilder & MIRBuilder , CallLoweringInfo & Info ) const { +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..30f788cf6208dd00686d12511330fda677163c6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerFormalArguments.cpp @@ -0,0 +1,6 @@ +bool PULPCallLowering :: lowerFormalArguments ( MachineIRBuilder & MIRBuilder , const Function & F , ArrayRef < ArrayRef < Register >> VRegs , FunctionLoweringInfo & FLI ) const { +if ( F . arg_empty ( ) ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c29f4b207cace56001c9bb8d6b673fc2ad75815 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/CallLowering/lowerReturn.cpp @@ -0,0 +1,8 @@ +bool PULPCallLowering :: lowerReturn ( MachineIRBuilder & MIRBuilder , const Value * Val , ArrayRef < Register > VRegs , FunctionLoweringInfo & FLI ) const { +MachineInstrBuilder Ret = MIRBuilder . buildInstrNoInsert ( PULP :: PseudoRET ) ; +if ( Val != nullptr ) { +return false ; +} +MIRBuilder . insertInstr ( Ret ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..903e9eea1293fd7173a722fde4752eaf684ccaa2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +explicit PULPSubtarget & STI ) : TargetFrameLowering ( StackGrowsDown , 4 , 0 ) , STI ( STI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/adjustReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/adjustReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7166711db0ea0fc444c65ad4c958cd3d09209bca --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/adjustReg.cpp @@ -0,0 +1,22 @@ +void PULPFrameLowering :: adjustReg ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , const DebugLoc & DL , Register DestReg , Register SrcReg , int64_t Val , MachineInstr :: MIFlag Flag ) const { +MachineRegisterInfo & MRI = MBB . getParent ( ) -> getRegInfo ( ) ; +const PULPInstrInfo * TII = STI . getInstrInfo ( ) ; +if ( DestReg == SrcReg ) { +if ( Val == 0 ) { +return ; +} +} +if ( DestReg != SrcReg ) { +if ( isInt < 12 > ( Val ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( PULP :: ADDI ) , DestReg ) . addReg ( SrcReg ) . addImm ( Val ) . setMIFlag ( Flag ) ; +} +if ( ! isInt < 12 > ( Val ) ) { +unsigned Opc = PULP :: ADD ; +bool isSub = Val < 0 ; +if ( isSub ) { +Opc = PULP :: SUB ; +} +Register ScratchReg = MRI . createVirtualRegister ( & PULP :: GPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( Opc ) , DestReg ) . addReg ( SrcReg ) . addReg ( ScratchReg , RegState :: Kill ) . setMIFlag ( Flag ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62a9bb54630ef743a516a9558641755de580fe4c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/canUseAsEpilogue.cpp @@ -0,0 +1,4 @@ +bool PULPFrameLowering :: canUseAsEpilogue ( const MachineBasicBlock & MBB ) const { +return false ; +return SuccMBB -> isReturnBlock ( ) && SuccMBB -> size ( ) == 1 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8553a120623a3803280c7f765bb6d1fb113dafc1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/canUseAsPrologue.cpp @@ -0,0 +1,4 @@ +bool PULPFrameLowering :: canUseAsPrologue ( const MachineBasicBlock & MBB ) const { +const MachineFunction * MF = MBB . getParent ( ) ; +return !RS.isRegUsed(PULP::X5) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d636cc08c16a3eb1045e16cb7aa7d4ee026d231 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/determineCalleeSaves.cpp @@ -0,0 +1,66 @@ +void PULPFrameLowering :: determineCalleeSaves ( MachineFunction & MF , BitVector & SavedRegs , RegScavenger * RS ) const { +TargetFrameLowering :: determineCalleeSaves ( MF , SavedRegs , RS ) ; +PULPMachineFunctionInfo * CFI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +if ( hasFP ( MF ) ) { +SavedRegs . set ( PULP :: R8 ) ; +} +if ( hasBP ( MF ) ) { +SavedRegs . set ( PULP :: R7 ) ; +} +if ( MF . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +if ( MFI . hasCalls ( ) ) { +static const MCPhysReg CSRegs [ ] = { PULP :: R0 , PULP :: R1 , PULP :: R2 , PULP :: R3 , PULP :: R12 , PULP :: R13 , 0 } ; +for ( unsigned i = 0 ; CSRegs [ i ] ; ++ i ) { +SavedRegs . set ( CSRegs [ i ] ) ; +} +static const MCPhysReg CSHRegs [ ] = { PULP :: R18 , PULP :: R19 , PULP :: R20 , PULP :: R21 , PULP :: R22 , PULP :: R23 , PULP :: R24 , PULP :: R25 , 0 } ; +for ( unsigned i = 0 ; CSHRegs [ i ] ; ++ i ) { +SavedRegs . set ( CSHRegs [ i ] ) ; +} +static const MCPhysReg CSF32Regs [ ] = { PULP :: F8_32 , PULP :: F9_32 , PULP :: F10_32 , PULP :: F11_32 , PULP :: F12_32 , PULP :: F13_32 , PULP :: F14_32 , PULP :: F15_32 , 0 } ; +static const MCPhysReg CSF64Regs [ ] = { PULP :: F8_64 , PULP :: F9_64 , PULP :: F10_64 , PULP :: F11_64 , PULP :: F12_64 , PULP :: F13_64 , PULP :: F14_64 , PULP :: F15_64 , 0 } ; +const MCPhysReg * FRegs = NULL ; +FRegs = CSF64Regs ; +FRegs = CSF64Regs ; +FRegs = CSF32Regs ; +FRegs = CSF32Regs ; +if ( FRegs != NULL ) { +const MCPhysReg * Regs = MF . getRegInfo ( ) . getCalleeSavedRegs ( ) ; +for ( unsigned i = 0 ; Regs [ i ] ; ++ i ) { +unsigned x = 0 ; +for ( ; FRegs [ x ] ; ++ x ) { +if ( FRegs [ x ] == Regs [ i ] ) { +break ; +} +} +if ( FRegs [ x ] == 0 ) { +SavedRegs . set ( Regs [ i ] ) ; +unsigned x = 0 ; +for ( ; FRegs [ x ] ; ++ x ) { +if ( FRegs [ x ] == Regs [ i ] ) { +break ; +if ( FRegs [ x ] == 0 ) { +SavedRegs . set ( Regs [ i ] ) ; +} +} +CFI -> setLRIsSpilled ( SavedRegs . test ( PULP :: R15 ) ) ; +unsigned CSStackSize = 0 ; +for ( unsigned Reg : SavedRegs . set_bits ( ) ) { +auto RegSize = TRI -> getRegSizeInBits ( Reg , MRI ) / 8 ; +CFI -> setCalleeSaveAreaSize ( CSStackSize ) ; +uint64_t Limit = estimateRSStackSizeLimit ( MF , STI ) ; +bool BigFrame = ( MFI . estimateStackSize ( MF ) + CSStackSize >= Limit ) ; +if ( BigFrame ) { +const TargetRegisterClass * RC = & PULP :: GPRRegClass ; +unsigned size = TRI -> getSpillSize ( * RC ) ; +Align align = TRI -> getSpillAlign ( * RC ) ; +if ( CFI -> isCRSpilled ( ) ) { +const TargetRegisterClass * RC = & PULP :: GPRRegClass ; +unsigned size = TRI -> getSpillSize ( * RC ) ; +Align align = TRI -> getSpillAlign ( * RC ) ; +if ( ! STI . hasE2 ( ) ) { +const TargetRegisterClass * RC = & PULP :: GPRRegClass ; +unsigned size = TRI -> getSpillSize ( * RC ) ; +Align align = TRI -> getSpillAlign ( * RC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3090b9774d92b5582d1afe499461606e086813c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,15 @@ +MachineBasicBlock :: iterator PULPFrameLowering :: eliminateCallFramePseudoInstr ( MachineFunction & MF , MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI ) const { +Register SPReg = PULP :: X2 ; +DebugLoc DL = MI -> getDebugLoc ( ) ; +if ( ! hasReservedCallFrame ( MF ) ) { +int64_t Amount = MI -> getOperand ( 0 ) . getImm ( ) ; +if ( Amount != 0 ) { +Amount = alignSPAdjust ( Amount ) ; +if ( MI -> getOpcode ( ) == PULP :: ADJCALLSTACKDOWN ) { +Amount = - Amount ; +} +adjustReg ( MBB , MI , DL , SPReg , SPReg , Amount , MachineInstr :: NoFlags ) ; +} +} +return MBB . erase ( MI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8e0b98eae277442ebaaa937802cf8eac4089443 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,33 @@ +void PULPFrameLowering :: emitEpilogue ( MachineFunction & MF , MachineBasicBlock & MBB ) const { +const TargetInstrInfo & TII = * MF . getSubtarget ( ) . getInstrInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +PULPMachineFunctionInfo * CFI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +Register FPReg = getFPReg ( STI ) ; +Register SPReg = getSPReg ( STI ) ; +MachineBasicBlock :: iterator MBBI = MBB . end ( ) ; +DebugLoc DL ; +DL = MBBI -> getDebugLoc ( ) ; +if ( ! MBB . empty ( ) ) { +MBBI = MBB . getFirstTerminator ( ) ; +if ( MBBI == MBB . end ( ) ) { +MBBI = MBB . getLastNonDebugInstr ( ) ; +} +if ( ! MBBI -> isTerminator ( ) ) { +MBBI = std :: next ( MBBI ) ; +} +} +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +auto LastFrameDestroy = MBBI ; +if ( ! CSI . empty ( ) ) { +LastFrameDestroy = std :: prev ( MBBI , CSI . size ( ) ) ; +} +uint64_t StackSize = MFI . getStackSize ( ) ; +uint64_t ActualSize = CFI -> getCalleeSaveAreaSize ( ) + CFI -> getVarArgsSaveSize ( ) ; +if ( hasFP ( MF ) ) { +BuildMI ( MBB , LastFrameDestroy , DL , TII -> get ( TargetOpcode :: COPY ) , SPReg ) . addReg ( FPReg ) . setMIFlag ( MachineInstr :: NoFlags ) ; +} +if ( ! hasFP ( MF ) ) { +adjustReg ( MBB , LastFrameDestroy , DL , SPReg , SPReg , ( StackSize - ActualSize ) , MachineInstr :: FrameDestroy ) ; +} +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , ActualSize , MachineInstr :: FrameDestroy ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01a8b3710584081db87d35243397c5450962d749 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,55 @@ +void PULPFrameLowering :: emitPrologue ( MachineFunction & MF , MachineBasicBlock & MBB ) const { +const RegisterInfo * RI = STI . getRegisterInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineFunctionInfo * CFI = MF . getInfo < MachineFunctionInfo > ( ) ; +Register SPReg = getSPReg ( STI ) ; +Register BPReg = getBPReg ( STI ) ; +const PULPInstrInfo * TII = STI . getInstrInfo ( ) ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) ; +const TargetRegisterInfo * TRI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +const MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +DebugLoc DL ; +if ( MF . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +determineFrameLayout ( MF ) ; +uint64_t StackSize = MFI . getStackSize ( ) ; +if ( StackSize == 0 ) { +if ( ! MFI . adjustsStack ( ) ) { +return ; +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +unsigned spillAreaSize = CFI -> getCalleeSaveAreaSize ( ) ; +uint64_t ActualSize = spillAreaSize + CFI -> getVarArgsSaveSize ( ) ; +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( ActualSize ) ) , MachineInstr :: NoFlags ) ; +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: cfiDefCfaOffset ( nullptr , ActualSize ) ) ; +std :: advance ( MBBI , CSI . size ( ) ) ; +for ( const auto & Entry : CSI ) { +int64_t Offset = MFI . getObjectOffset ( Entry . getFrameIdx ( ) ) ; +unsigned Num = TRI -> getRegSizeInBits ( Reg , MRI ) / 32 ; +for ( unsigned i = 0 ; i < Num ; i ++ ) { +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: createOffset ( nullptr , RI -> getDwarfRegNum ( Reg , true ) + i , Offset + i * 4 ) ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( TargetOpcode :: CFI_INSTRUCTION ) ) . addCFIIndex ( CFIIndex ) ; +} +if ( hasFP ( MF ) ) { +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: createDefCfaRegister ( nullptr , RI -> getDwarfRegNum ( FPReg , true ) ) ) ; +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( StackSize - ActualSize ) ) , MachineInstr :: NoFlags ) ; +if ( RI -> hasStackRealignment ( MF ) ) { +Align MaxAlignment = MFI . getMaxAlign ( ) ; +if ( isUInt < 12 > ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( TargetOpcode :: CFI_INSTRUCTION ) , SPReg ) . addReg ( SPReg ) . addImm ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ; +if ( ! STI . hasE2 ( ) ) { +if ( ! STI . hasE2 ( ) ) { +if ( ! isUInt < 12 > ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( PULP::ANDI ) , SPReg ) . addReg ( VR ) . addImm ( ShiftAmount ) ; +if ( ! STI . hasE2 ( ) ) { +Register VR = MF . getRegInfo ( ) . createVirtualRegister ( & PULP :: mGPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( PULP :: ANDI ) , VR ) . addReg ( SPReg ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( PULP::SRLI ) , VR ) . addReg ( VR ) . addImm ( ShiftAmount ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( PULP :: SLLI ) , SPReg ) . addReg ( VR ) ; +} +if ( hasBP ( MF ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( PULP::ADDI ) , BPReg ) . addReg ( SPReg ) ; +} +} +if ( ! hasFP ( MF ) ) { +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( StackSize - ActualSize ) ) , MachineInstr :: NoFlags ) ; +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: cfiDefCfaOffset ( nullptr , MFI . getStackSize ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e433fa325b525de3b924d51c98e3be0c162d853f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/getFrameIndexReference.cpp @@ -0,0 +1,55 @@ +StackOffset PULPFrameLowering :: getFrameIndexReference ( const MachineFunction & MF , int FI , Register & FrameReg ) const { +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterInfo * RI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +const auto * CFI = MF . getInfo < MachineFunctionInfo > ( ) ; +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +int MinCSFI = 0 ; +int MaxCSFI = - 1 ; +int Offset = MFI . getObjectOffset ( FI ) + MFI . getOffsetAdjustment ( ) ; +if ( CSI . size ( ) ) { +MinCSFI = CSI [ 0 ] . getFrameIdx ( ) ; +MaxCSFI = CSI [ CSI . size ( ) - 1 ] . getFrameIdx ( ) ; +} +if ( FI >= MinCSFI ) { +if ( FI <= MaxCSFI ) { +FrameReg = PULP :: X2 ; +Offset = Offset + CFI -> getVarArgsSaveSize ( ) + CFI -> getCalleeSaveAreaSize ( ) ; +} +} +if ( RI -> hasStackRealignment ( MF ) ) { +if ( ! MFI . isFixedObjectIndex ( FI ) ) { +FrameReg = PULP :: X9 ; +Offset = Offset + MFI . getStackSize ( ) ; +} +if ( MFI . isFixedObjectIndex ( FI ) ) { +FrameReg = getFPReg ( STI ) ; +Offset = Offset + CFI -> getVarArgsSaveSize ( ) + CFI -> getCalleeSaveAreaSize ( ) ; +} +if ( FI > MaxCSFI ) { +if ( ! MFI . isFixedObjectIndex ( FI ) ) { +Offset = Offset + MFI . getStackSize ( ) ; +} +if ( MFI . isFixedObjectIndex ( FI ) ) { +FrameReg = getFPReg ( STI ) ; +Offset = Offset + CFI -> getVarArgsSaveSize ( ) + CFI -> getCalleeSaveAreaSize ( ) ; +} +} +} +int64_t FrameOffset = MF . getFrameInfo ( ) . getObjectOffset ( FI ) ; +if ( ! hasFP ( MF ) ) { +return StackOffset :: getFixed ( FrameOffset + MF . getFrameInfo ( ) . getStackSize ( ) ) ; +} +if ( RI -> needsStackRealignment ( MF ) ) { +if ( ! MFI . isFixedObjectIndex ( FI ) ) { +if ( hasBP ( MF ) ) { +FrameReg = PULP :: X9 ; +} +if ( ! hasBP ( MF ) ) { +FrameReg = PULP :: X2 ; +} +return StackOffset :: getFixed ( FrameOffset + MF . getFrameInfo ( ) . getStackSize ( ) ) ; +} +} +FrameReg = RI -> getFrameRegister ( MF ) ; +return StackOffset :: getFixed ( Offset ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasBP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasBP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc703371e6d4a7dff01632cd8a601fbb12708ce2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasBP.cpp @@ -0,0 +1,5 @@ +bool PULPFrameLowering :: hasBP ( const MachineFunction & MF ) const { +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterInfo * TRI = STI . getRegisterInfo ( ) ; +return MFI . hasVarSizedObjects ( ) && TRI -> needsStackRealignment ( MF ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4b3147a8aee14d873c7e885d29732db6a9ba332 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,5 @@ +bool PULPFrameLowering :: hasFP ( const MachineFunction & MF ) const { +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterInfo * RegInfo = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +return MF . getTarget ( ) . Options . DisableFramePointerElim ( MF ) || RegInfo -> needsStackRealignment ( MF ) || MFI . hasVarSizedObjects ( ) || MFI . isFrameAddressTaken ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5acc7e11ddf64f3376c7ed135d57362b166ee6d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/hasReservedCallFrame.cpp @@ -0,0 +1,3 @@ +bool PULPFrameLowering :: hasReservedCallFrame ( const MachineFunction & MF ) const { +return ! MF . getFrameInfo ( ) . hasVarSizedObjects ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6fa31340782d714e7a5d86ab7790f9bc2e2a54c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,9 @@ +void PULPFrameLowering :: processFunctionBeforeFrameFinalized ( MachineFunction & MF , RegScavenger * RS ) const { +const TargetRegisterInfo * RegInfo = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterClass * RC = & PULP :: GPRRegClass ; +if ( ! isInt < 11 > ( MFI . estimateStackSize ( MF ) ) ) { +int RegScavFI = MFI . CreateStackObject ( RegInfo -> getSpillSize ( * RC ) , RegInfo -> getSpillAlign ( * RC ) , false ) ; +RS -> addScavengingFrameIndex ( RegScavFI ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb2e4591184cdd537ccbfd4087077cfd35b30ce3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,19 @@ +bool PULPFrameLowering :: restoreCalleeSavedRegisters ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , MutableArrayRef < CalleeSavedInfo > CSI , const TargetRegisterInfo * TRI ) const { +if ( CSI . empty ( ) ) { +return true ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const TargetInstrInfo & TII = * MF -> getSubtarget ( ) . getInstrInfo ( ) ; +DebugLoc DL ; +if ( MI != MBB . end ( ) ) { +if ( ! MI -> isDebugInstr ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +} +for ( auto & CS : reverse ( CSI ) ) { +Register Reg = CS . getReg ( ) ; +TII . loadRegFromStackSlot ( MBB , MI , Reg , CS . getFrameIdx ( ) , RC , TRI ) ; +assert ( MI != MBB . begin ( ) && "loadRegFromStackSlot didn't insert any code!" ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6628096b81352d333fa08ebdccba49f4f4cd5a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,30 @@ +bool PULPFrameLowering :: spillCalleeSavedRegisters ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , ArrayRef < CalleeSavedInfo > CSI , const TargetRegisterInfo * TRI ) const { +if ( CSI . empty ( ) ) { +return false ; +} +DebugLoc DL ; +unsigned CalleeFrameSize = 0 ; +DebugLoc DL = MBB . findDebugLoc ( MI ) ; +DebugLoc dl ; +if ( MI != MBB . end ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const TargetInstrInfo & TII = * MF -> getSubtarget ( ) . getInstrInfo ( ) ; +DebugLoc DL ; +if ( MI != MBB . end ( ) ) { +DL = MI -> getDebugLoc ( ) ; +if ( ! MI -> isDebugInstr ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +} +for ( unsigned i = CSI . size ( ) ; i != 0 ; -- i ) { +unsigned Reg = CS . getReg ( ) ; +MachineFunction * MF = MBB . getParent ( ) ; +BuildMI ( MBB , MI , DL , TII . get ( PULP :: PseudoCALL ) ) . addReg ( Reg , getKillRegState ( IsNotLiveIn ) ) . setMIFlag ( MachineInstr :: FrameSetup ) ; +Register Reg = CS . getReg ( ) ; +const TargetRegisterClass * RC = TRI -> getMinimalPhysRegClass ( Reg ) ; +TII -> storeRegToStackSlot ( MBB , MBBI , Reg , true , CS . getFrameIdx ( ) , RC , TRI ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1dc2908e4cd5f64cd2c641decc34a912f7d9f6b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +explicit PULPDAGToDAGISel ( PULPTargetMachine & TargetMachine ) : SelectionDAGISel ( TargetMachine ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..95e798d3721fbc5256a21b7b93656e3572f0893c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/MatchSLLIUW.cpp @@ -0,0 +1,2 @@ +bool PULPDAGToDAGISel :: MatchSLLIUW ( SDNode * N ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7f2f80b43df5e9e855bbddab419f93060c32afe --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/MatchSRLIUW.cpp @@ -0,0 +1,2 @@ +bool PULPDAGToDAGISel :: MatchSRLIUW ( SDNode * N ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b692e9a17b7ac3a5b6558496683133124c56fef7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp @@ -0,0 +1,106 @@ +void PULPDAGToDAGISel :: PostprocessISelDAG ( ) { +bool IsModified = false ; +if ( TM . getOptLevel ( ) == CodeGenOpt :: None ) { +SelectionDAG :: allnodes_iterator Position ( CurDAG -> getRoot ( ) . getNode ( ) ) ; +Position = Position + 1 ; +for ( ; IsModified ; ) { +IsModified = false ; +SelectionDAG :: allnodes_iterator Position = CurDAG -> allnodes_begin ( ) ; +for ( ; Position != CurDAG -> allnodes_end ( ) ; ) { +SDNode * Node = & * Position ++ ; +MachineSDNode * MachineNode = dyn_cast < MachineSDNode > ( Node ) ; +if ( ! MachineNode ) { +continue ; +} +SDNode * ResNode = Lowering . PostISelFolding ( MachineNode , * CurDAG ) ; +if ( ResNode != Node ) { +if ( ResNode ) { +ReplaceUses ( Node , ResNode ) ; +} +IsModified = true ; +} +} +CurDAG -> RemoveDeadNodes ( ) ; +DNode * N = Position - 1 ; +Position = Posiiton - 1 +if ( N -> use_empty ( ) ) { +continue ; +} +if ( ! N -> isMachineOpcode ( ) ) { +continue ; +} +unsigned FirstOp ; +unsigned StorageOpcode = N -> getMachineOpcode ( ) ; +if ( StorageOpcode == PULP::LB ) { +FirstOp = 0 ; +} +if ( StorageOpcode == PULP :: LH ) { +FirstOp = 0 ; +} +if ( StorageOpcode == PULP :: LW ) { +FirstOp = 0 ; +} +if ( StorageOpcode == PULP :: LBU ) { +FirstOp = 0 ; +} +if ( StorageOpcode == PULP :: LHU ) { +FirstOp = 0 ; +} +if ( StorageOpcode == PULP :: LWU ) { +FirstOp = 0 ; +} +if ( StorageOpcode == PULP :: LD ) { +FirstOp = 1 ; +} +if ( StorageOpcode == PULP::FLH ) { +FirstOp = 1 ; +} +if ( StorageOpcode == PULP::FLW ) { +FirstOp = 1 ; +} +if ( StorageOpcode == PULP :: FLD ) { +FirstOp = 1 ; +} +if ( StorageOpcode == PULP :: SB ) { +FirstOp = 1 ; +} +if ( ! isa < ConstantSDNode > ( N -> getOperand ( FirstOp ) ) ) { +continue ; +} +if ( N -> getConstantOperandVal ( FirstOp ) != 0 ) { +continue ; +} +SDValue Base = N -> getOperand ( FirstOp + 1 ) ; +if ( ! Base . isMachineOpcode ( ) ) { +continue ; +} +unsigned Flags = 0 ; +bool ReplaceFlags = true ; +ReplaceFlags = false ; +Flags = PULPII :: MO_DTPREL_LO ; +Flags = PULPII :: MO_TLSLD_LO ; +Flags = PULPII :: MO_TOC_LO ; +DEBUG ( dbgs ( ) << "Folding add-immediate into mem-op:\nBase: " ) ; +SDValue ImmOpnd = Base . getOperand ( 1 ) ; +if ( ReplaceFlags ) { +if ( GlobalAddressSDNode * GA = dyn_cast < GlobalAddressSDNode > ( ImmOpnd ) ) { +SDLoc dl ( GA ) ; +const GlobalValue * GV = GA -> getGlobal ( ) ; +ImmOpnd = CurDAG -> getTargetGlobalAddress ( GV , dl , MVT :: i64 , 0 , Flags ) ; +} +if ( ConstantPoolSDNode * CP = dyn_cast < ConstantPoolSDNode > ( ImmOpnd ) ) { +const Constant * C = CP -> getConstVal ( ) ; +ImmOpnd = CurDAG -> getTargetConstantPool ( C , MVT :: i64 , CP -> getAlignment ( ) , 0 , Flags ) ; +} +} +if ( FirstOp == 1 ) { +( void ) CurDAG -> UpdateNodeOperands ( N , N -> getOperand ( 0 ) , ImmOpnd , Base . getOperand ( 0 ) , N -> getOperand ( 3 ) ) ; +} +if ( FirstOp != 1 ) { +( void ) CurDAG -> UpdateNodeOperands ( N , N -> getOperand ( 0 ) , ImmOpnd , Base . getOperand ( 0 ) , N -> getOperand ( 3 ) ) ; +} +if ( Base . getNode ( ) -> use_empty ( ) ) { +CurDAG -> RemoveDeadNode ( Base . getNode ( ) ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e42919cf19a3d8e76fe877fb2e21fdf483614e72 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1,66 @@ +void PULPDAGToDAGISel :: Select ( SDNode * Node ) { +unsigned Opcode = Node -> getOpcode ( ) ; +if ( Node -> isMachineOpcode ( ) ) { +LLVM_DEBUG ( dbgs ( ) << "== " ; Node -> dump ( CurDAG ) ; dbgs ( ) << "\n" ) ; +Node -> setNodeId ( - 1 ) ; +return ; +} +EVT NodeTy = Node -> getValueType ( 0 ) ; +unsigned MultOpc ; +SDLoc Dl ( Node ) ; +unsigned Opcode = Node -> getOpcode ( ) ; +bool IsSelected = false ; +if ( Opcode == ISD :: ADD ) { +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( PULP :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +if ( IntNo == ISD :: Constant ) { +SDLoc DL ( Node ) ; +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( PULP :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +} +if ( IntNo == ISD :: FrameIndex ) { +SDLoc DL ( Node ) ; +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( PULP :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +} +} +if ( Opcode == ISD :: INTRINSIC_W_CHAIN ) { +int FI = cast < FrameIndexSDNode > ( Node ) -> getIndex ( ) ; +EVT VT = Node -> getValueType ( 0 ) ; +SDValue TFI = CurDAG -> getTargetFrameIndex ( FI , VT ) ; +unsigned Opc = PULP :: MOV_rr ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( Opc , SDLoc ( Node ) , VT , TFI ) ) ; +return ; +} +if ( Opcode == ISD :: INTRINSIC_VOID ) { +const ConstantSDNode * CN = dyn_cast < ConstantSDNode > ( Node ) ; +unsigned Size = CN -> getValueSizeInBits ( 0 ) ; +int FI = cast < FrameIndexSDNode > ( Node ) -> getIndex ( ) ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( Subtarget -> hasE2 ( ) ? PULP :: ADDI32 : PULP :: ADDI16XZ , Dl , MVT :: i32 , TFI , Imm ) ) ; +IsSelected = true ; +selectFrameIndex ( Node ) ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( PULP :: ADDI , DL , VT , TFI , Imm ) ) ; +return ; +} +SDNode * ResNode = SelectCode ( Node ) ; +return ResNode ; +if ( IsSelected ) { +return ; +} +SelectCode ( Node ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8fbf4a2214f637e6eccc01c52f7cc1b0c9cf1763 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/SelectAddrFI.cpp @@ -0,0 +1,7 @@ +bool PULPDAGToDAGISel :: SelectAddrFI ( SDValue Addr , SDValue & Base ) { +if ( auto FIN = dyn_cast < FrameIndexSDNode > ( Addr ) ) { +Base = CurDAG -> getTargetFrameIndex ( FIN -> getIndex ( ) , Subtarget -> getXLenVT ( ) ) ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4509a401e6c43b431e223768d8ba5ec2a51e2838 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,12 @@ +bool PULPDAGToDAGISel :: SelectInlineAsmMemoryOperand ( const SDValue & Op , unsigned ConstraintID , std :: vector < SDValue > & OutOps ) { +if ( ConstraintID == InlineAsm :: Constraint_m ) { +OutOps . push_back ( Op ) ; +return false ; +} +if ( ConstraintID == InlineAsm :: Constraint_A ) { +OutOps . push_back ( Op ) ; +return false ; +} +llvm_unreachable ( "Unexpected asm memory constraint" ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c3030ea31ab2bbe2899c273ffe78ae1ea2cb654 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createPULPISelDag ( PULPTargetMachine & TM ) { +return new PULPDAGToDAGISel ( TM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27db29b6084b37c3094e16c49b5b6b3cbaf61c4f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return "PULP DAG->DAG Pattern Instruction Selection" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ea920d1371515e7e58918ea8d68eb5287146de2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/runOnMachineFunction.cpp @@ -0,0 +1,4 @@ +bool runOnMachineFunction ( MachineFunction & MF ) override { +Subtarget = & MF . getSubtarget < PULPSubtarget > ( ) ; +return SelectionDAGISel :: runOnMachineFunction ( MF ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e37cd9ddbb8e4a39b365e49ab0036ede53f1312d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVLOp.cpp @@ -0,0 +1,9 @@ +bool PULPDAGToDAGISel :: selectVLOp ( SDValue N , SDValue & VL ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +Val = N ; +if ( v ) { +if ( ! ( v & ( v - 1 ) ) ) { +return true ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83d708061c474ce9d75e8e12e8f69778633b9456 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplat.cpp @@ -0,0 +1,10 @@ +bool PULPDAGToDAGISel :: selectVSplat ( SDValue N , SDValue & SplatVal ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +} +int bit = 0x1f - __builtin_clz ( v ) ; +imm = CurDAG -> getTargetConstant ( bit , MVT :: i32 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b17ff2744359b56cf3b47ea78d1c0ad380cbda8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp @@ -0,0 +1,10 @@ +bool PULPDAGToDAGISel :: selectVSplatSimm5 ( SDValue N , SDValue & SplatVal ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +} +int bit = 0x1f - __builtin_clz ( v ) ; +imm = CurDAG -> getTargetConstant ( bit , MVT :: i32 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53accdf0a0231bc08b357f1c20570eb6ab59d22c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp @@ -0,0 +1,9 @@ +bool PULPDAGToDAGISel :: selectVSplatUimm5 ( SDValue N , SDValue & SplatVal ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +} +imm = CurDAG -> getTargetConstant ( bit , MVT :: i32 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7b0e4f3f81dff6d5185324b3d24b8e8bbf0f0b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,14 @@ +bool PULPTargetLowering :: CanLowerReturn ( CallingConv :: ID CallConv , MachineFunction & MF , bool IsVarArg , const SmallVectorImpl < ISD :: OutputArg > & Outs , LLVMContext & Context ) const { +CCAssignFn * RetCC = CallConv == CallingConv :: WebKit_JS ? RetCC_PULP_WebKit_JS : RetCC_PULP_AAPCS ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState CCInfo ( CallConv , isVarArg , MF , RVLocs , Context ) ; +CCState CCInfo ( CallConv , IsVarArg , MF , RVLocs , Context ) ; +auto CCFunction = CCAssignFnForReturn ( CallConv ) ; +for ( unsigned i = 0 , e = Outs . size ( ) ; i != e ; ++ i ) { +MVT VT = Outs [ i ] . VT ; +if ( VT == MVT :: i128 ) { +return false ; +} +} +return CCInfo . CheckReturn ( Outs , RetCC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f118a22c9ad89d07507166874e9392b65da000a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp @@ -0,0 +1,39 @@ +unsigned PULPTargetLowering :: ComputeNumSignBitsForTargetNode ( SDValue Op , const APInt & DemandedElts , const SelectionDAG & DAG , unsigned Depth ) const { +if ( Op . getOpcode ( ) == PULPISD :: SLLW ) { +return Op . getScalarValueSizeInBits ( ) ; +} +if ( Op . getOpcode ( ) == PULPISD :: SRAW ) { +return Op . getScalarValueSizeInBits ( ) ; +} +if ( Op . getOpcode ( ) == PULPISD :: SRLW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == PULPISD :: DIVW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == PULPISD :: DIVUW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == PULPISD :: REMUW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == PULPISD::VMV_X_S ) { +ConstantSDNode * Width = dyn_cast < ConstantSDNode > ( Op . getOperand ( 2 ) ) ; +if ( ! Width ) { +return 1 ; +} +unsigned SignBits = 32 - Width -> getZExtValue ( ) + 1 ; +if ( ! isNullConstant ( Op . getOperand ( 1 ) ) ) { +return SignBits ; +} +unsigned Op0SignBits = DAG . ComputeNumSignBits ( Op . getOperand ( 0 ) , Depth + 1 ) ; +SDValue Src = Op . getOperand ( 0 ) ; +unsigned Tmp = DAG . ComputeNumSignBits ( Src , Depth + 1 ) ; +Tmp = Tmp + VTBits - Src . getScalarValueSizeInBits ( ) ; +} +if ( Op . getOpcode ( ) == PULPISD :: ROLW ) { +unsigned Tmp = DAG . ComputeNumSignBits ( Src , Depth + 1 ) ; +return 33 ; +} +return 1 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f9d01d0d52cd284f3f8bf94df716cea0055ce66 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,22 @@ +MachineBasicBlock * PULPTargetLowering :: EmitInstrWithCustomInserter ( MachineInstr & MI , MachineBasicBlock * BB ) const { +if ( MI . getOpcode ( ) == PULP :: Select_GPR_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , PULP :: BCOND ) ; +} +if ( MI . getOpcode ( ) == PULP :: Select_FPR16_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , PULP :: BCOND ) ; +} +if ( MI . getOpcode ( ) == PULP :: Select_FPR32_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , PULP :: BCOND ) ; +} +if ( MI . getOpcode ( ) == PULP :: Select_FPR64_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , PULP :: BCOND ) ; +} +if ( MI . getOpcode ( ) == PULP :: BuildPairF64Pseudo ) { +return expandSelectCC ( MI , BB , PULP :: FBCOND ) ; +return EmitSelectInstr ( MI , MBB ) ; +} +if ( MI . getOpcode ( ) == PULP :: SplitF64Pseudo ) { +return expandSelectCC ( MI , BB , PULP :: FBCOND ) ; +} +llvm_unreachable ( "Unexpected instruction for custom inserter!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c0c4e8f3a468d2db19c10954ce33adb623485fa9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp @@ -0,0 +1,35 @@ +void PULPTargetLowering :: LowerAsmOperandForConstraint ( SDValue Op , std :: string & Constraint , std :: vector < SDValue > & Ops , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +SDValue Result ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +if ( Constraint . length ( ) == 1 ) { +if ( Constraint [ 0 ] == 'I' ) { +if ( auto * C = dyn_cast < ConstantSDNode > ( Op ) ) { +uint64_t Val = C -> getSExtValue ( ) ; +if ( isInt < 12 > ( Val ) ) { +Ops . push_back ( DAG . getTargetConstant ( Val , DL , XLenVT ) ) ; +} +} +return ; +} +if ( Constraint [ 0 ] == 'J' ) { +if ( auto * C = dyn_cast < ConstantSDNode > ( Op ) ) { +uint64_t Val = C -> getSExtValue ( ) ; +if ( Val == 0 ) { +Ops . push_back ( DAG . getTargetConstant ( 0 , DL , XLenVT ) ) ; +} +} +return ; +} +if ( Constraint [ 0 ] == 'K' ) { +if ( auto * C = dyn_cast < ConstantSDNode > ( Op ) ) { +uint64_t Val = C -> getSExtValue ( ) ; +if ( isUInt < 5 > ( Val ) ) { +Ops . push_back ( DAG . getTargetConstant ( Val , DL , XLenVT ) ) ; +} +} +return ; +} +} +TargetLowering :: LowerAsmOperandForConstraint ( Op , Constraint , Ops , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7423a42a3736436c160b860a97355e7f9c401b06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,4 @@ +SDValue PULPTargetLowering :: lowerBlockAddress ( SDValue Op , SelectionDAG & DAG ) const { +BlockAddressSDNode * N = cast < BlockAddressSDNode > ( Op ) ; +return getAddr ( N , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa3b194a89c2574c5bc371a36f4b3b923cf9745a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,348 @@ +SDValue PULPTargetLowering :: LowerCall ( CallLoweringInfo & CLI , SmallVectorImpl < SDValue > & InVals ) const { +SelectionDAG & DAG = CLI . DAG ; +SDLoc & DL = CLI . DL ; +SmallVectorImpl < ISD :: OutputArg > & Outs = CLI . Outs ; +SmallVectorImpl < SDValue > & OutVals = CLI . OutVals ; +SmallVectorImpl < ISD :: InputArg > & Ins = CLI . Ins ; +DebugLoc & dl = CLI . DL ; +SmallVector < ISD :: OutputArg , 32 > & Outs = CLI . Outs ; +SmallVector < SDValue , 32 > & OutVals = CLI . OutVals ; +SmallVector < ISD :: InputArg , 32 > & Ins = CLI . Ins ; +SDValue Chain = CLI . Chain ; +SDValue Callee = CLI . Callee ; +bool & isTailCall = CLI . IsTailCall ; +CallingConv :: ID CallConv = CLI . CallConv ; +bool isVarArg = CLI . IsVarArg ; +const char * PULP16HelperFunction = 0 ; +bool needPULP16Helper = false ; +if ( Subtarget -> inMips16Mode ( ) ) { +bool lookupHelper = true ; +if ( ExternalSymbolSDNode * S = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +if ( noHelperNeeded . find ( S -> getSymbol ( ) ) != noHelperNeeded . end ( ) ) { +lookupHelper = false ; +} +} +if ( lookupHelper ) { +PULP16HelperFunction = getPULP16HelperFunction ( CLI . RetTy , CLI . Args , needPULP16Helper ) ; +} +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +isTailCall = false ; +MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; +const TargetFrameLowering * TFL = MF . getTarget ( ) . getFrameLowering ( ) ; +bool IsPIC = getTargetMachine ( ) . getRelocationModel ( ) == Reloc :: PIC_ ; +SmallVector < CCValAssign , 16 > ArgLocs ; +CCState CCInfo ( CallConv , isVarArg , DAG . getMachineFunction ( ) , ArgLocs , * DAG . getContext ( ) ) ; +const Function * F = nullptr ; +if ( const GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +const GlobalValue * GV = G -> getGlobal ( ) ; +F = cast < Function > ( GV ) ; +Callee = DAG . getTargetGlobalAddress ( GV , DL , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +} +if ( const ExternalSymbolSDNode * ES = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +Callee = DAG . getTargetExternalSymbol ( ES -> getSymbol ( ) , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +} +analyzeArguments ( & CLI , F , & DAG . getDataLayout ( ) , & Outs , 0 , CallConv , ArgLocs , CCInfo , true , isVarArg ) ; +unsigned NumBytes = CCInfo . getNextStackOffset ( ) ; +CCState CCInfo ( CallConv , isVarArg , DAG . getTarget ( ) , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeCallOperands ( Outs , CC_PULP32 ) ; +unsigned ArgsSize = CCInfo . getNextStackOffset ( ) ; +ArgsSize = ( ArgsSize + 7 ) & ~ 7 ; +MachineFrameInfo * MFI = DAG . getMachineFunction ( ) . getFrameInfo ( ) ; +SmallVector < SDValue , 8 > ByValArgs ; +for ( unsigned i = 0 , e = Outs . size ( ) ; i != e ; ++ i ) { +ISD :: ArgFlagsTy Flags = Outs [ i ] . Flags ; +if ( ! Flags . isByVal ( ) ) { +continue ; +} +SDValue Arg = OutVals [ i ] ; +unsigned Size = Flags . getByValSize ( ) ; +unsigned Align = Flags . getByValAlign ( ) ; +int FI = MFI -> CreateStackObject ( Size , Align , false ) ; +SDValue FIPtr = DAG . getFrameIndex ( FI , getPointerTy ( ) ) ; +SDValue SizeNode = DAG . getConstant ( Size , MVT :: i32 ) ; +Chain = DAG . getMemcpy ( Chain , dl , FIPtr , Arg , SizeNode , Align , false , ( Size <= 32 ) , MachinePointerInfo ( ) , MachinePointerInfo ( ) ) ; +ByValArgs . push_back ( FIPtr ) ; +} +Chain = DAG . getCALLSEQ_START ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DL ) ; +SmallVector < std :: pair < unsigned , SDValue > , 8 > RegsToPass ; +unsigned AI ; +unsigned AE ; +bool HasStackArgs = false ; +CCState CCInfo ( CallConv , isVarArg , DAG . getMachineFunction ( ) , getTargetMachine ( ) , ArgLocs , * DAG . getContext ( ) ) ; +PULPCC PULPCCInfo ( CallConv , IsO32 , CCInfo ) ; +PULPCCInfo . analyzeCallOperands ( Outs , isVarArg ) ; +unsigned NextStackOffset = CCInfo . getNextStackOffset ( ) ; +if ( isTailCall ) { +isTailCall = IsEligibleForTailCallOptimization ( PULPCCInfo , NextStackOffset , * MF . getInfo < PULPFunctionInfo > ( ) ) ; +} +if ( isTailCall ) { +NumTailCalls = NumTailCalls + 1 ; +} +unsigned StackAlignment = TFL -> getStackAlignment ( ) ; +NextStackOffset = RoundUpToAlignment ( NextStackOffset , StackAlignment ) ; +SDValue NextStackOffsetVal = DAG . getIntPtrConstant ( NextStackOffset , true ) ; +if ( ! isTailCall ) { +Chain = DAG . getCALLSEQ_START ( Chain , NextStackOffsetVal ) ; +} +SDValue StackPtr = DAG . getCopyFromReg ( Chain , dl , IsN64 ? PULP :: SP_64 : PULP :: SP , getPointerTy ( ) ) ; +std :: deque < std :: pair < unsigned , SDValue > > RegsToPass ; +SmallVector < SDValue , 8 > MemOpChains ; +PULPCC :: byval_iterator ByValArg = PULPCCInfo . byval_begin ( ) ; +const unsigned StackOffset = 92 ; +bool hasStructRetAttr = false ; +for ( AI = 0 , AE = ArgLocs . size ( ) ; AI != AE ; ++ AI ) { +CCValAssign & VA = ArgLocs [ AI ] ; +EVT RegVT = VA . getLocVT ( ) ; +SDValue Arg = OutVals [ AI ] ; +CCValAssign & VA = ArgLocs [ i ] ; +MVT ValVT = VA . getValVT ( ) , LocVT = VA . getLocVT ( ) ; +if ( Flags . isByVal ( ) ) { +assert ( ! isTailCall && "Do not tail-call optimize if there is a byval argument." ) ; +passByValArg ( Chain , dl , RegsToPass , MemOpChains , StackPtr , MFI , DAG , Arg , PULPCCInfo , * ByValArg , Flags , Subtarget -> isLittle ( ) ) ; +ByValArg = ByValArg + 1 ; +continue ; +Arg = ByValArgs [ byvalArgIdx ++ ] ; +} +Arg = DAG . getNode ( ISD :: SIGN_EXTEND , DL , RegVT , Arg ) ; +if ( ValVT == MVT :: f32 ) { +if ( LocVT == MVT :: i32 ) { +Arg = DAG . getNode ( ISD :: BITCAST , dl , LocVT , Arg ) ; +} +} +if ( ValVT == MVT :: f64 ) { +if ( LocVT == MVT :: i64 ) { +Arg = DAG . getNode ( ISD :: BITCAST , dl , LocVT , Arg ) ; +} +} +if ( LocVT == MVT :: i32 ) { +if ( ValVT == MVT :: f64 ) { +SDValue Lo = DAG . getNode ( PULPISD :: ExtractElementF64 , dl , MVT :: i32 , Arg , DAG . getConstant ( 0 , MVT :: i32 ) ) ; +SDValue Hi = DAG . getNode ( PULPISD :: ExtractElementF64 , dl , MVT :: i32 , Arg , DAG . getConstant ( 1 , MVT :: i32 ) ) ; +std :: swap ( Lo , Hi ) ; +unsigned LocRegLo = VA . getLocReg ( ) ; +unsigned LocRegHigh = getNextIntArgReg ( LocRegLo ) ; +RegsToPass . push_back ( std :: make_pair ( LocRegLo , Lo ) ) ; +RegsToPass . push_back ( std :: make_pair ( LocRegHigh , Hi ) ) ; +continue ; +} +} +Arg = DAG . getNode ( ISD :: ZERO_EXTEND , DL , RegVT , Arg ) ; +Arg = DAG . getNode ( ISD :: ANY_EXTEND , DL , RegVT , Arg ) ; +Arg = DAG . getNode ( ISD :: BITCAST , DL , RegVT , Arg ) ; +if ( VA . isMemLoc ( ) ) { +HasStackArgs = true ; +break ; +} +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +if ( Flags . isSRet ( ) ) { +SDValue StackPtr = DAG . getRegister ( PULP :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( 64 ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +hasStructRetAttr = true ; +continue ; +} +if ( VA . needsCustom ( ) ) { +if ( VA . isMemLoc ( ) ) { +unsigned Offset = VA . getLocMemOffset ( ) + StackOffset ; +if ( Offset % 8 == 0 ) { +SDValue StackPtr = DAG . getRegister ( PULP :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +continue ; +} +} +SDValue StackPtr = DAG . CreateStackTemporary ( MVT :: f64 , MVT :: i32 ) ; +SDValue Store = DAG . getStore ( DAG . getEntryNode ( ) , dl , Arg , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +SDValue Hi = DAG . getLoad ( MVT :: i32 , dl , Store , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +StackPtr = DAG . getNode ( ISD :: ADD , dl , StackPtr . getValueType ( ) , StackPtr , DAG . getIntPtrConstant ( 4 ) ) ; +SDValue Lo = DAG . getLoad ( MVT :: i32 , dl , Store , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +if ( VA . isRegLoc ( ) ) { +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Hi ) ) ; +CCValAssign & NextVA = ArgLocs [ ++ i ] ; +if ( NextVA . isRegLoc ( ) ) { +RegsToPass . push_back ( std :: make_pair ( NextVA . getLocReg ( ) , Lo ) ) ; +} +if ( ! NextVA . isRegLoc ( ) ) { +unsigned Offset = NextVA . getLocMemOffset ( ) + StackOffset ; +SDValue StackPtr = DAG . getRegister ( PULP :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Lo , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +} +if ( ! VA . isRegLoc ( ) ) { +unsigned Offset = VA . getLocMemOffset ( ) + StackOffset ; +SDValue StackPtr = DAG . getRegister ( PULP :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Hi , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +PtrOff = DAG . getIntPtrConstant ( Offset + 4 ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Lo , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +continue ; +} +if ( VA . isRegLoc ( ) ) { +if ( VA . getLocVT ( ) != MVT :: f32 ) { +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +continue ; +} +Arg = DAG . getNode ( ISD :: BITCAST , dl , MVT :: i32 , Arg ) ; +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +continue ; +} +assert ( VA . isMemLoc ( ) ) ; +MemOpChains . push_back ( passArgOnStack ( StackPtr , VA . getLocMemOffset ( ) , Chain , Arg , dl , isTailCall , DAG ) ) ; +SDValue StackPtr = DAG . getRegister ( PULP :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) + StackOffset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +if ( HasStackArgs ) { +for ( AE = AI , AI = ArgLocs . size ( ) ; AI != AE ; -- AI ) { +unsigned Loc = AI - 1 ; +CCValAssign & VA = ArgLocs [ Loc ] ; +SDValue Arg = OutVals [ Loc ] ; +assert ( VA . isMemLoc ( ) ) ; +SDValue PtrOff = DAG . getNode ( ISD :: ADD , DL , getPointerTy ( DAG . getDataLayout ( ) ) , DAG . getRegister ( PULP :: SP , getPointerTy ( DAG . getDataLayout ( ) ) ) , DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) + 1 , DL ) ) ; +Chain = DAG . getStore ( Chain , DL , Arg , PtrOff , MachinePointerInfo :: getStack ( MF , VA . getLocMemOffset ( ) ) , 0 ) ; +} +} +if ( ! MemOpChains . empty ( ) ) { +Chain = DAG . getCopyToReg ( Chain , DL , Reg . first , Reg . second , InFlag ) ; +} +bool IsPICCall = ( IsN64 || IsPIC ) ; +bool GlobalOrExternal = false , InternalLinkage = false ; +SDValue CalleeLo ; +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +if ( IsPICCall ) { +InternalLinkage = G -> getGlobal ( ) -> hasInternalLinkage ( ) ; +if ( InternalLinkage ) { +Callee = getAddrLocal ( Callee , DAG , HasPULP64 ) ; +} +if ( LargeGOT ) { +Callee = getAddrGlobalLargeGOT ( Callee , DAG , PULPII :: MO_CALL_HI16 , PULPII :: MO_CALL_LO16 ) ; +} +if ( ! InternalLinkage ) { +if ( ! LargeGOT ) { +Callee = getAddrGlobal ( Callee , DAG , PULPII :: MO_GOT_CALL ) ; +} +} +} +if ( ! IsPICCall ) { +Callee = DAG . getTargetGlobalAddress ( G -> getGlobal ( ) , dl , getPointerTy ( ) , 0 , PULPII :: MO_NO_FLAG ) ; +} +GlobalOrExternal = true ; +} +if ( ExternalSymbolSDNode * S = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +if ( ! IsN64 ) { +if ( ! IsPIC ) { +Callee = DAG . getTargetExternalSymbol ( S -> getSymbol ( ) , getPointerTy ( ) , PULPII :: MO_NO_FLAG ) ; +} +} +if ( LargeGOT ) { +Callee = getAddrGlobalLargeGOT ( Callee , DAG , PULPII :: MO_CALL_HI16 , PULPII :: MO_CALL_LO16 ) ; +} +if ( ! LargeGOT ) { +Callee = getAddrGlobal ( Callee , DAG , PULPII :: MO_GOT_CALL ) ; +} +GlobalOrExternal = true ; +} +SDValue JumpTarget = Callee ; +if ( IsPICCall ) { +unsigned T9Reg = IsN64 ? PULP :: T9_64 : PULP :: T9 ; +unsigned V0Reg = PULP :: V0 ; +if ( needPULP16Helper ) { +RegsToPass . push_front ( std :: make_pair ( V0Reg , Callee ) ) ; +JumpTarget = DAG . getExternalSymbol ( PULP16HelperFunction , getPointerTy ( ) ) ; +JumpTarget = getAddrGlobal ( JumpTarget , DAG , PULPII :: MO_GOT ) ; +} +if ( ! needPULP16Helper ) { +RegsToPass . push_front ( std :: make_pair ( T9Reg , Callee ) ) ; +JumpTarget = SDValue ( ) ; +} +} +if ( ! GlobalOrExternal ) { +unsigned T9Reg = IsN64 ? PULP :: T9_64 : PULP :: T9 ; +unsigned V0Reg = PULP :: V0 ; +if ( needPULP16Helper ) { +RegsToPass . push_front ( std :: make_pair ( V0Reg , Callee ) ) ; +JumpTarget = DAG . getExternalSymbol ( PULP16HelperFunction , getPointerTy ( ) ) ; +JumpTarget = getAddrGlobal ( JumpTarget , DAG , PULPII :: MO_GOT ) ; +} +if ( ! needPULP16Helper ) { +RegsToPass . push_front ( std :: make_pair ( T9Reg , Callee ) ) ; +JumpTarget = SDValue ( ) ; +} +} +if ( IsPICCall ) { +if ( ! InternalLinkage ) { +unsigned GPReg = IsN64 ? PULP :: GP_64 : PULP :: GP ; +EVT Ty = IsN64 ? MVT :: i64 : MVT :: i32 ; +RegsToPass . push_back ( std :: make_pair ( GPReg , GetGlobalReg ( DAG , Ty ) ) ) ; +} +} +SDValue InFlag ; +for ( auto Reg : RegsToPass ) { +unsigned Reg = RegsToPass [ i ] . first ; +Reg = Reg - PULP :: I0 + PULP :: O0 ; +Chain = DAG . getCALLSEQ_END ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DAG . getIntPtrConstant ( 0 , DL , true ) , InFlag , DL ) ; +InFlag = Chain . getValue ( 1 ) ; +} +unsigned SRetArgSize = ( hasStructRetAttr ) ? getSRetArgSize ( DAG , Callee ) : 0 ; +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +Callee = DAG . getTargetGlobalAddress ( G -> getGlobal ( ) , dl , MVT :: i32 ) ; +} +if ( ExternalSymbolSDNode * E = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +Callee = DAG . getTargetExternalSymbol ( E -> getSymbol ( ) , MVT :: i32 ) ; +} +SDVTList NodeTys = DAG . getVTList ( MVT :: Other , MVT :: Glue ) ; +SmallVector < SDValue , 8 > Ops ; +Ops . push_back ( Chain ) ; +Ops . push_back ( Callee ) ; +SmallVector < SDValue , 8 > Ops ( 1 , Chain ) ; +if ( JumpTarget . getNode ( ) ) { +Ops . push_back ( JumpTarget ) ; +} +if ( hasStructRetAttr ) { +Ops . push_back ( DAG . getTargetConstant ( SRetArgSize , MVT :: i32 ) ) ; +} +for ( auto Reg : RegsToPass ) { +Ops . push_back ( DAG . getRegister ( Reg . first , Reg . second . getValueType ( ) ) ) ; +Ops . push_back ( DAG . getRegister ( RegsToPass [ i ] . first , RegsToPass [ i ] . second . getValueType ( ) ) ) ; +unsigned Reg = RegsToPass [ i ] . first ; +Reg = Reg - PULP :: I0 + PULP :: O0 ; +Ops . push_back ( DAG . getRegister ( Reg , RegsToPass [ i ] . second . getValueType ( ) ) ) ; +} +const PULPTargetMachine & TM = ( const PULPTargetMachine & ) getTargetMachine ( ) ; +const TargetRegisterInfo * TRI = TM . getSubtargetImpl ( ) -> getRegisterInfo ( ) ; +const uint32_t * Mask = TRI -> getCallPreservedMask ( DAG . getMachineFunction ( ) , CallConv ) ; +assert ( Mask && "Missing call preserved mask for calling convention" ) ; +Ops . push_back ( DAG . getRegisterMask ( Mask ) ) ; +if ( InFlag . getNode ( ) ) { +Ops . push_back ( InFlag ) ; +} +if ( isTailCall ) { +return DAG . getNode ( PULPISD :: TailCall , dl , MVT :: Other , & Ops [ 0 ] , Ops . size ( ) ) ; +} +Chain = DAG . getNode ( PULPISD :: CALL , DL , NodeTys , Ops ) ; +InFlag = Chain . getValue ( 1 ) ; +Chain = DAG . getCALLSEQ_END ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DAG . getIntPtrConstant ( 0 , DL , true ) , InFlag , DL ) ; +if ( ! Ins . empty ( ) ) { +InFlag = Chain . getValue ( 1 ) ; +} +InFlag = Chain . getValue ( 1 ) ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState RVInfo ( CallConv , isVarArg , DAG . getTarget ( ) , RVLocs , * DAG . getContext ( ) ) ; +RVInfo . AnalyzeCallResult ( Ins , RetCC_PULP32 ) ; +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +unsigned Reg = RVLocs [ i ] . getLocReg ( ) ; +Reg = Reg - PULP :: I0 + PULP :: O0 ; +Chain = DAG . getCopyFromReg ( Chain , dl , Reg , RVLocs [ i ] . getValVT ( ) , InFlag ) . getValue ( 1 ) ; +InFlag = Chain . getValue ( 2 ) ; +InVals . push_back ( Chain . getValue ( 0 ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b28c64377364169881fa109e093226d61a4a224 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,4 @@ +SDValue PULPTargetLowering :: lowerConstantPool ( SDValue Op , SelectionDAG & DAG ) const { +ConstantPoolSDNode * N = cast < ConstantPoolSDNode > ( Op ) ; +return getAddr ( N , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..063f553d01ac4989c93016ae18c3c3153ed55702 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,19 @@ +SDValue PULPTargetLowering :: lowerFRAMEADDR ( SDValue Op , SelectionDAG & DAG ) const { +const PULPRegisterInfo & RI = * Subtarget . getRegisterInfo ( ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MFI . setFrameAddressIsTaken ( true ) ; +Register FrameReg = RI . getFrameRegister ( MF ) ; +int XLenInBytes = Subtarget . getZLen ( ) / 8 ; +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +SDValue FrameAddr = DAG . getCopyFromReg ( DAG . getEntryNode ( ) , DL , FrameReg , VT ) ; +unsigned Depth = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +for ( ; Depth > 0 ; ) { +int Offset = - ( XLenInBytes * 2 ) ; +SDValue Ptr = DAG . getNode ( ISD :: ADD , DL , VT , FrameAddr , DAG . getIntPtrConstant ( Offset , DL ) ) ; +FrameAddr = DAG . getLoad ( VT , DL , DAG . getEntryNode ( ) , Ptr , MachinePointerInfo ( ) ) ; +Depth = Depth - 1 ; +} +return FrameAddr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e448d1aa48b6eb3bd7f9d0cffb9f93cf01856041 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,149 @@ +SDValue PULPTargetLowering :: LowerFormalArguments ( SDValue Chain , CallingConv :: ID CallConv , bool IsVarArg , const SmallVectorImpl < ISD :: InputArg > & Ins , const SDLoc & DL , SelectionDAG & DAG , SmallVectorImpl < SDValue > & InVals ) const { +if ( CallCConv != CallingConv :: C ) { +if ( CallCConv != CallingConv :: Fast ) { +report_fatal_error ( "Unsupported calling convention" ) ; +} +} +LLVM_DEBUG ( dbgs ( ) << "ISelDAG: Lowering formal arguments\n" ) ; +if ( isVarArg ) { +LLVM_DEBUG ( dbgs ( ) << "ISelDAG: Can't lower variadic arguments\n" ) ; +return SDValue ( ) ; +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +std :: vector < SDValue > OutChains ; +unsigned ArgsBaseOffset = 176 ; +unsigned ArgsPreserved = 64 ; +PULPMachineFunctionInfo * FuncInfo = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +SmallVector < CCValAssign , 16 > ArgLocs ; +CCState CCInfo ( CallConv , IsVarArg , MF , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CCAssignFnForCall ( CallConv , IsVarArg ) ) ; +CCState CCInfo ( CallConv , IsVarArg , DAG . getMachineFunction ( ) , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AllocateStack ( ArgsPreserved , Align ( 8 ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CC_PULP ) ; +CCState CCInfo ( CallConv , isVarArg , MF , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CCAssignFnForCall ( CallConv , isVarArg ) ) ; +Chain = DAG . getNode ( PULPISD :: ENTRY_FLAG , DL , MVT :: Other , { Chain , DAG . getRegister ( PULP :: a1 , MVT :: i32 ) , DAG . getTargetConstant ( 4 , DL , MVT :: i32 ) } ) ; +CCInfo . AnalyzeFormalArguments ( Ins , getCCAssignFn ( CallConv ) ) ; +if ( MFI . hasVAStart ( ) ) { +FuncInfo -> setVarArgsFrameIndex ( MFI . CreateFixedObject ( 1 , CCInfo . getNextStackOffset ( ) , true ) ) ; +} +SDValue ArgValue ; +for ( unsigned i = 0 , e = ArgLocs . size ( ) ; i != e ; ++ i ) { +CCValAssign & VA = ArgLocs [ i ] ; +SDValue ArgValue ; +bool IsF64OnPULP = VA . getLocVT ( ) == MVT :: i32 && VA . getValVT ( ) == MVT :: f64 ; +if ( IsF64OnPULP ) { +ArgValue = unpack64 ( DAG , Chain , VA , DL ) ; +} +if ( ! IsF64OnPULP ) { +if ( VA . isRegLoc ( ) ) { +ArgValue = unpackFromRegLoc ( Subtarget , DAG , Chain , VA , DL ) ; +} +} +if ( ! IsF64OnPULP ) { +if ( ! VA . isRegLoc ( ) ) { +ArgValue = unpackFromMemLoc ( DAG , Chain , VA , DL ) ; +} +} +InVals . push_back ( ArgValue ) ; +if ( VA . isRegLoc ( ) ) { +unsigned VReg = MF . addLiveIn ( VA . getLocReg ( ) , getRegClassFor ( VA . getLocVT ( ) ) ) ; +SDValue Arg = DAG . getCopyFromReg ( Chain , DL , VReg , VA . getLocVT ( ) ) ; +if ( VA . getValVT ( ) == MVT :: i32 ) { +if ( VA . needsCustom ( ) ) { +Arg = DAG . getNode ( ISD :: SRL , DL , VA . getLocVT ( ) , Arg , DAG . getConstant ( 32 , DL , MVT :: i32 ) ) ; +} +} +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +Arg = DAG . getNode ( ISD :: AssertSext , DL , VA . getLocVT ( ) , Arg , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +Arg = DAG . getNode ( ISD :: AssertZext , DL , VA . getLocVT ( ) , Arg , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . isExtInLoc ( ) ) { +Arg = DAG . getNode ( ISD :: TRUNCATE , DL , VA . getValVT ( ) , Arg ) ; +} +InVals . push_back ( Arg ) ; +continue ; +} +unsigned Offset = VA . getLocMemOffset ( ) + ArgsBaseOffset ; +unsigned ValSize = VA . getValVT ( ) . getSizeInBits ( ) / 8 ; +int FI = MF . getFrameInfo ( ) . CreateFixedObject ( ValSize , Offset , true ) ; +InVals . push_back ( DAG . getLoad ( VA . getValVT ( ) , DL , Chain , DAG . getFrameIndex ( FI , getPointerTy ( MF . getDataLayout ( ) ) ) , MachinePointerInfo :: getFixedStack ( MF , FI ) ) ) ; +if ( VA . isRegLoc ( ) ) { +EVT RegVT = VA . getLocVT ( ) ; +const TargetRegisterClass * RC ; +if ( RegVT == MVT :: i32 ) { +RC = & PULP :: GPRRegClass ; +} +if ( RegVT == MVT :: f32 ) { +RC = & PULP :: FPRRegClass ; +} +unsigned Reg = MF . addLiveIn ( VA . getLocReg ( ) , RC ) ; +SDValue ArgValue = DAG . getCopyFromReg ( Chain , DL , Reg , RegVT ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: Full ) { +InVals . push_back ( ArgValue ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: BCvt ) { +ArgValue = DAG . getNode ( ISD :: BITCAST , DL , VA . getValVT ( ) , ArgValue ) ; +InVals . push_back ( ArgValue ) ; +} +} +SDValue Val = DAG . getLoad ( VA . getLocInfo ( ) == CCValAssign :: AExt ? VA . getValVT ( ) : VA . getLocVT ( ) , DL , Chain , DAG . getFrameIndex ( FI , getPointerTy ( DAG . getDataLayout ( ) ) ) , MachinePointerInfo :: getFixedStack ( DAG . getMachineFunction ( ) , FI ) ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +MFI . setObjectZExt ( FI , true ) ; +Val = DAG . getNode ( ISD :: AssertZext , DL , VA . getLocVT ( ) , Val , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +MFI . setObjectSExt ( FI , true ) ; +Val = DAG . getNode ( ISD :: AssertSext , DL , VA . getLocVT ( ) , Val , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +InVals . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VA . getValVT ( ) , Val ) ) ; +} +if ( IsVarArg ) { +const unsigned XLenInBytes = 4 ; +const MVT XLenVT = MVT :: i32 ; +ArrayRef < MCPhysReg > ArgRegs = makeArrayRef ( GPRArgRegs ) ; +unsigned Idx = CCInfo . getFirstUnallocated ( ArgRegs ) ; +const TargetRegisterClass * RC = & PULP :: GPRRegClass ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineRegisterInfo & RegInfo = MF . getRegInfo ( ) ; +PULPMachineFunctionInfo * PULPFI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +int VaArgOffset ; +int VarArgsSaveSize ; +if ( ArgRegs . size ( ) == Idx ) { +VaArgOffset = CCInfo . getNextStackOffset ( ) ; +VarArgsSaveSize = 0 ; +} +if ( ArgRegs . size ( ) != Idx ) { +VarArgsSaveSize = XLenInBytes * ( ArgRegs . size ( ) - Idx ) ; +VaArgOffset = - VarArgsSaveSize ; +} +int FI = MFI . CreateFixedObject ( XLenInBytes , VaArgOffset , true ) ; +PULPFI -> setVarArgsFrameIndex ( FI ) ; +for ( unsigned i = Idx ; i < ArgRegs . size ( ) ; ++ i , VaArgOffset += XLenInBytes ) { +const Register Reg = RegInfo . createVirtualRegister ( RC ) ; +RegInfo . addLiveIn ( ArgRegs [ i ] , Reg ) ; +SDValue ArgValue = DAG . getCopyFromReg ( Chain , DL , Reg , XLenVT ) ; +FI = MFI . CreateFixedObject ( XLenInBytes , VaArgOffset , true ) ; +SDValue PtrOff = DAG . getFrameIndex ( FI , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +SDValue Store = DAG . getStore ( Chain , DL , ArgValue , PtrOff , MachinePointerInfo :: getFixedStack ( MF , FI ) ) ; +cast < StoreSDNode > ( Store . getNode ( ) ) -> getMemOperand ( ) -> setValue ( ( Value * ) nullptr ) ; +OutChains . push_back ( Store ) ; +} +PULPFI -> setVarArgsSaveSize ( VarArgsSaveSize ) ; +} +if ( ! OutChains . empty ( ) ) { +OutChains . push_back ( Chain ) ; +Chain = DAG . getNode ( ISD :: TokenFactor , DL , MVT :: Other , OutChains ) ; +} +if ( ! IsVarArg ) { +return Chain ; +} +unsigned ArgOffset = ArgLocs . size ( ) * 8 ; +PULPMachineFunctionInfo * FuncInfo = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +FuncInfo -> setVarArgsFrameOffset ( ArgOffset + ArgsBaseOffset ) ; +return Chain ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5bfaf57e5f7ff0059e78e48f6528ea97330a9285 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,14 @@ +SDValue PULPTargetLowering :: lowerGlobalAddress ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +EVT Ty = Op . getValueType ( ) ; +GlobalAddressSDNode * N = cast < GlobalAddressSDNode > ( Op ) ; +int64_t Offset = N -> getOffset ( ) ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +const GlobalValue * GV = N -> getGlobal ( ) ; +bool IsLocal = getTargetMachine ( ) . shouldAssumeDSOLocal ( * GV -> getParent ( ) , GV ) ; +SDValue Addr = getAddr ( N , DAG , IsLocal ) ; +if ( Offset ) { +return DAG . getNode ( ISD :: ADD , DL , Ty , Addr , DAG . getConstant ( Offset , DL , XLenVT ) ) ; +} +return Addr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1c50fd6ac9d167adc5603667f9c2fc2ca03b2eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,28 @@ +SDValue PULPTargetLowering :: lowerGlobalTLSAddress ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +EVT Ty = Op . getValueType ( ) ; +GlobalAddressSDNode * N = cast < GlobalAddressSDNode > ( Op ) ; +int64_t Offset = N -> getOffset ( ) ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +TLSModel :: Model Model = getTargetMachine ( ) . getTLSModel ( N -> getGlobal ( ) ) ; +if ( DAG . getMachineFunction ( ) . getFunction ( ) . getCallingConv ( ) == CallingConv :: GHC ) { +report_fatal_error ( "In GHC calling convention TLS is not supported" ) ; +} +SDValue Addr ; +if ( Model == TLSModel :: LocalExec ) { +Addr = getStaticTLSAddr ( N , DAG , false ) ; +} +if ( Model == TLSModel :: InitialExec ) { +Addr = getStaticTLSAddr ( N , DAG , true ) ; +} +if ( Model == TLSModel :: LocalDynamic ) { +Addr = getDynamicTLSAddr ( N , DAG ) ; +} +if ( Model == TLSModel :: GeneralDynamic ) { +Addr = getDynamicTLSAddr ( N , DAG ) ; +} +if ( Offset != 0 ) { +return DAG . getNode ( ISD :: ADD , DL , Ty , Addr , DAG . getConstant ( Offset , DL , XLenVT ) ) ; +} +return Addr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d02699653bda3af654bacdd8ae228b7dfe41386c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,29 @@ +SDValue PULPTargetLowering :: LowerINTRINSIC_WO_CHAIN ( SDValue Op , SelectionDAG & DAG ) const { +MVT PtrVT = DAG . getTargetLoweringInfo ( ) . getPointerTy ( ) ; +unsigned IntNo = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +DebugLoc DL = Op . getDebugLoc ( ) ; +SDLoc DL ( Op ) ; +SmallVector < SDValue , 16 > Ops ( std :: next ( Op -> op_begin ( ) ) , Op -> op_end ( ) ) ; +unsigned Size = Ops . size ( ) ; +bool SmallTuple = Size <= PULPTargetMachine :: SmallTupleLimit ; +Ops . push_back ( DAG . getConstant ( Size , DL , MVT :: i257 , SmallTuple ) ) ; +unsigned Cmd = SmallTuple ? PULPISD :: TUPLE : PULPISD :: TUPLEVAR ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MVT VT = Op . getSimpleValueType ( ) ; +const PULPTargetMachine * TM = static_cast < const PULPTargetMachine * > ( & DAG . getTarget ( ) ) ; +TM -> getStrList ( ) -> push_back ( std :: string ( ( Twine ( "GCC_except_table" ) + Twine ( MF . getFunctionNumber ( ) ) ) . str ( ) ) ) ; +SDValue Addr = DAG . getTargetExternalSymbol ( TM -> getStrList ( ) -> back ( ) . c_str ( ) , VT , 0 ) ; +if ( isPositionIndependent ( ) ) { +Addr = makeHiLoPair ( Addr , PULPMCExpr :: VK_PULP_GOTOFF_HI32 , PULPMCExpr :: VK_PULP_GOTOFF_LO32 , DAG ) ; +SDValue GlobalBase = DAG . getNode ( PULPISD :: GLOBAL_BASE_REG , DL , VT ) ; +return DAG . getNode ( ISD :: ADD , DL , VT , GlobalBase , Addr ) ; +} +EVT VT = Op . getValueType ( ) ; +const PULPTargetLowering & TLI = DAG . getTargetLoweringInfo ( ) ; +MVT PtrVT = TLI . getPointerTy ( DAG . getDataLayout ( ) ) ; +auto & Context = MF . getMMI ( ) . getContext ( ) ; +MCSymbol * S = Context . getOrCreateSymbol ( Twine ( "GCC_except_table" ) + Twine ( MF . getFunctionNumber ( ) ) ) ; +EVT PtrVT = getPointerTy ( DAG . getDataLayout ( ) ) ; +return DAG . getRegister ( PULP :: G7 , PtrVT ) ; +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdfd9a6f88c88e9e63eb9203cb2cf584709d4232 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp @@ -0,0 +1,68 @@ +SDValue PULPTargetLowering :: LowerINTRINSIC_W_CHAIN ( SDValue Op , SelectionDAG & DAG ) const { +unsigned IntNo = Op . getConstantOperandVal ( 1 ) ; +if ( IntNo == Intrinsic :: PULP_vleff ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: EXTP ) ; +} +if ( IntNo == Intrinsic :: PULP_vleff_mask ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: EXTPDP ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg8ff ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: EXTR_W ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg7ff ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: EXTR_R_W ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg6ff ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: EXTR_RS_W ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg5ff ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: EXTR_S_H ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg4ff ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: MTHLIP ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg2ff ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: MULSAQ_S_W_PH ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg8ff_mask ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: MAQ_S_W_PHL ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg7ff_mask ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: MAQ_S_W_PHR ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg6ff_mask ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: MAQ_SA_W_PHL ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg5ff_mask ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: MAQ_SA_W_PHR ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg4ff_mask ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: DPAQ_S_W_PH ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg3ff_mask ) { +return lowerDSPIntr ( Op , DAG , PULPISD :: DPSQ_S_W_PH ) ; +} +if ( IntNo == Intrinsic :: PULP_vlseg2ff_mask ) { +auto Node = cast < MemIntrinsicSDNode > ( Op . getNode ( ) ) ; +SDLoc DL ( Op ) ; +SDValue Chain = Node -> getChain ( ) ; +SDValue Dst = Op . getOperand ( 2 ) ; +SDValue Val = Op . getOperand ( 3 ) ; +Val = DAG . getAnyExtOrTrunc ( Val , DL , MVT :: i64 ) ; +SDValue Size = Op . getOperand ( 4 ) ; +auto Alignment = Node -> getMemOperand ( ) -> getAlign ( ) ; +bool IsVol = Node -> isVolatile ( ) ; +auto DstPtrInfo = Node -> getPointerInfo ( ) ; +const auto & SDI = static_cast < const PULPSelectionDAGInfo & > ( DAG . getSelectionDAGInfo ( ) ) ; +SDValue MS = SDI . EmitMOPS ( PULPISD :: MOPS_MEMSET_TAGGING , DAG , DL , Chain , Dst , Val , Size , Alignment , IsVol , DstPtrInfo , MachinePointerInfo { } ) ; +} +unsigned Opcode ; +unsigned CCValid ; +if ( isIntrinsicWithCCAndChain ( Op , Opcode , CCValid ) ) { +SDNode * Node = emitIntrinsicWithCCAndChain ( DAG , Op , Opcode ) ; +SDValue CC = getCCResult ( DAG , SDValue ( Node , 0 ) ) ; +DAG . ReplaceAllUsesOfValueWith ( SDValue ( Op . getNode ( ) , 0 ) , CC ) ; +return SDValue ( ) ; +} +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..032d5f9b603800d7ea396c77063c034d185b6d18 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerJumpTable.cpp @@ -0,0 +1,4 @@ +SDValue PULPTargetLowering :: lowerJumpTable ( SDValue Op , SelectionDAG & DAG ) const { +JumpTableSDNode * N = cast < JumpTableSDNode > ( Op ) ; +return getAddr ( N , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1958cdc181adf57d058f17448108d0fbf973dba --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,60 @@ +SDValue PULPTargetLowering :: LowerOperation ( SDValue Op , SelectionDAG & DAG ) const { +if ( Op . getOpcode ( ) == ISD :: FRAMEADDR ) { +return LowerFrameIndex ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: GlobalAddress ) { +return LowerGlobalAddress ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: JumpTable ) { +return LowerJumpTable ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: BlockAddress ) { +return lowerBlockAddress ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: ConstantPool ) { +return lowerConstantPool ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: GlobalTLSAddress ) { +return lowerGlobalTLSAddress ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: SELECT ) { +return lowerSELECT ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: VASTART ) { +return lowerVASTART ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: RETURNADDR ) { +return lowerRETURNADDR ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: SHL_PARTS ) { +return lowerShiftLeftParts ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: SRA_PARTS ) { +return lowerShiftRightParts ( Op , DAG , true ) ; +} +if ( Op . getOpcode ( ) == ISD :: SRL_PARTS ) { +return lowerShiftRightParts ( Op , DAG , false ) ; +} +if ( Op . getOpcode ( ) == ISD :: INTRINSIC_WO_CHAIN ) { +return LowerINTRINSIC_WO_CHAIN ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: INTRINSIC_W_CHAIN ) { +return LowerINTRINSIC_W_CHAIN ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: ANY_EXTEND ) { +return lowerVectorMaskExt ( Op , DAG , 1 ) ; +} +if ( Op . getOpcode ( ) == ISD :: ZERO_EXTEND ) { +return lowerVectorMaskExt ( Op , DAG , 1 ) ; +} +if ( Op . getOpcode ( ) == ISD :: SIGN_EXTEND ) { +return lowerVectorMaskExt ( Op , DAG , - 1 ) ; +} +if ( Op . getOpcode ( ) == ISD :: SPLAT_VECTOR ) { +return lowerSPLATVECTOR ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: INSERT_VECTOR_ELT ) { +return lowerINSERT_VECTOR_ELT ( Op , DAG ) ; +} +report_fatal_error ( "unimplemented operand" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..876718e14358a48083a74ca770d5015b38da7b75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,20 @@ +SDValue PULPTargetLowering :: lowerRETURNADDR ( SDValue Op , SelectionDAG & DAG ) const { +const PULPRegisterInfo & RI = * Subtarget . getRegisterInfo ( ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MFI . setReturnAddressIsTaken ( true ) ; +int XLenInBytes = Subtarget . getZLen ( ) / 8 ; +if ( verifyReturnAddressArgumentIsConstant ( Op , DAG ) ) { +return SDValue ( ) ; +} +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +unsigned Depth = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +if ( Depth ) { +int Off = - XLenInBytes ; +SDValue FrameAddr = lowerFRAMEADDR ( Op , DAG ) ; +SDValue Offset = DAG . getConstant ( Off , DL , VT ) ; +return DAG . getLoad ( VT , DL , DAG . getEntryNode ( ) , DAG . getNode ( ISD :: ADD , DL , VT , FrameAddr , Offset ) , MachinePointerInfo ( ) ) ; +} +return DAG . getCopyFromReg ( DAG . getEntryNode ( ) , DL , Reg , XLenVT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..949e6f2081755023b49e6db44fbb5261c2b8a195 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,155 @@ +SDValue PULPTargetLowering :: LowerReturn ( SDValue Chain , CallingConv :: ID CallConv , bool IsVarArg , const SmallVectorImpl < ISD :: OutputArg > & Outs , const SmallVectorImpl < SDValue > & OutVals , const SDLoc & DL , SelectionDAG & DAG ) const { +report_fatal_error ( "VarArg not supported" ) ; +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState CCInfo ( CallConv , IsVarArg , DAG . getMachineFunction ( ) , RVLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeReturn ( Outs , RetCC_PULP ) ; +if ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_empty ( ) ) { +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) +if ( RVLocs [ i ] . isRegLoc ( ) ) { +DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( RVLocs [ i ] . getLocReg ( ) ) ; +} +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +if ( RVLocs [ i ] . isRegLoc ( ) ) { +DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( RVLocs [ i ] . getLocReg ( ) ) ; +} +} +} +if ( MF . getRegInfo ( ) . liveout_empty ( ) ) { +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +if ( RVLocs [ i ] . isRegLoc ( ) ) { +MF . getRegInfo ( ) . addLiveOut ( RVLocs [ i ] . getLocReg ( ) ) ; +} +} +} +SDValue Flag ; +analyzeOutputArgs ( CCInfo , Outs , CC_PULP ) ; +analyzeOutputArgs ( DAG . getMachineFunction ( ) , CCInfo , Outs , true , nullptr ) ; +SDValue Glue ; +SmallVector < SDValue , 4 > RetOps ( 1 , Chain ) ; +RetOps . push_back ( SDValue ( ) ) ; +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +SDValue Val = OutVals [ i ] ; +CCValAssign & VA = RVLocs [ i ] ; +SDValue ResValue = Outs [ i ] . Val ; +assert ( VA . isRegLoc ( ) && "Can only return in registers!" ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +ResValue = DAG . getNode ( ISD :: SIGN_EXTEND , dl , VA . getLocVT ( ) , ResValue ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +ResValue = DAG . getNode ( ISD :: ZERO_EXTEND , dl , VA . getLocVT ( ) , ResValue ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: AExt ) { +ResValue = DAG . getNode ( ISD :: ANY_EXTEND , dl , VA . getLocVT ( ) , ResValue ) ; +} +Chain = DAG . getCopyToReg ( Chain , DL , VA . getLocReg ( ) , OutVals [ i ] , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( VA . getLocReg ( ) , VA . getLocVT ( ) ) ) ; +bool IsF64OnPULP = VA . getLocVT ( ) == MVT :: i32 && VA . getValVT ( ) == MVT :: f64 ; +if ( IsF64OnPULP ) { +SDValue Split64 = DAG . getNode ( PULPISD :: BITCAST_TO_LOHI , DL , DAG . getVTList ( MVT :: i32 , MVT :: i32 ) , Val ) ; +SDValue Lo = Split64 . getValue ( 0 ) ; +SDValue Hi = Split64 . getValue ( 1 ) ; +Register RegLo = VA . getLocReg ( ) ; +assert ( RegLo < PULP :: R31 && "Invalid register pair" ) ; +Register RegHi = RegLo + 1 ; +Chain = DAG . getCopyToReg ( Chain , DL , RegLo , Lo , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( RegLo , MVT :: i32 ) ) ; +Chain = DAG . getCopyToReg ( Chain , DL , RegHi , Hi , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( RegHi , MVT :: i32 ) ) ; +} +if ( ! IsF64OnPULP ) { { +} +RetOps [ 0 ] = Chain ; +if ( Glue . getNode ( ) ) { +RetOps . push_back ( Glue ) ; +} +if ( DAG . getMachineFunction ( ) . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +return DAG . getNode ( PULPISD :: NIR , DL , MVT :: Other , RetOps ) ; +} +return DAG . getNode ( PULPISD :: RET , DL , MVT :: Other , RetOps ) ; +if ( VA . getLocVT ( ) != MVT :: i32 ) { +Val = convertValVTToLocVT ( DAG , Val , VA , DL ) ; +Chain = DAG . getCopyToReg ( Chain , DL , VA . getLocReg ( ) , Val , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( VA . getLocReg ( ) , VA . getLocVT ( ) ) ) ; +} +if ( VA . getValVT ( ) != MVT :: f64 ) { +Val = convertValVTToLocVT ( DAG , Val , VA , DL ) ; +Chain = DAG . getCopyToReg ( Chain , DL , VA . getLocReg ( ) , Val , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( VA . getLocReg ( ) , VA . getLocVT ( ) ) ) ; +} +} +if ( DAG . getMachineFunction ( ) . getFunction ( ) . hasStructRetAttr ( ) ) { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +PULPMachineFunctionInfo * PULPMFI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +Register Reg = PULPMFI -> getSRetReturnReg ( ) ; +Chain = DAG . getCopyToReg ( Chain , DL , PULP :: RV , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( PULP :: RV , getPointerTy ( DAG . getDataLayout ( ) ) ) ) ; +} +if ( MF . getFunction ( ) . hasStructRetAttr ( ) ) { +PULPMachineFunctionInfo * FuncInfo = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +unsigned Reg = FuncInfo -> getSRetReturnReg ( ) ; +if ( ! Reg ) { +llvm_unreachable ( "sret virtual register not created in entry block" ) ; +} +SDValue Val = DAG . getCopyFromReg ( Chain , dl , Reg , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +unsigned R12 = PULP :: R12 ; +Chain = DAG . getCopyToReg ( Chain , dl , R12 , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( R12 , getPointerTy ( DAG . getDataLayout ( ) ) ) ) ; +} +unsigned Opc = ( CallConv == CallingConv :: PULP_INTR ? PULPISD :: RETI_FLAG : PULPISD :: RET_FLAG ) ; +unsigned RetAddrOffset = 8 ; +if ( MF . getFunction ( ) -> hasStructRetAttr ( ) ) { +PULPMachineFunctionInfo * SFI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +PULPMachineFunctionInfo * FI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +if ( ! Reg ) { +llvm_unreachable ( "sret virtual register not created in the entry block" ) ; +} +Chain = DAG . getCopyToReg ( Chain , dl , PULP :: I0 , Val , Flag ) ; +Chain = DAG . getCopyToReg ( Chain , DL , PULP :: R0 , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( PULP :: I0 , getPointerTy ( ) ) ) ; +RetAddrOffset = 12 ; +if ( MF . getRegInfo ( ) . liveout_empty ( ) ) { +MF . getRegInfo ( ) . addLiveOut ( PULP :: R0 ) ; +} +} +RetOps [ 0 ] = Chain ; +unsigned Opc = PULPISD :: RET_FLAG ; +if ( DAG . getMachineFunction ( ) . getFunction ( ) -> hasStructRetAttr ( ) ) { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +PULPFunctionInfo * PULPFI = MF . getInfo < PULPFunctionInfo > ( ) ; +unsigned Reg = PULPFI -> getSRetReturnReg ( ) ; +if ( ! Reg ) { +llvm_unreachable ( "sret virtual register not created in the entry block" ) ; +} +SDValue Val = DAG . getCopyFromReg ( Chain , dl , Reg , getPointerTy ( ) ) ; +Chain = DAG . getCopyToReg ( Chain , dl , PULP :: V0 , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +} +RetOps [ 1 ] = DAG . getConstant ( RetAddrOffset , MVT :: i32 ) ; +SDValue LinkReg = DAG . getRegister ( PULP :: LinkRegister , getPointerTy ( ) ) ; +if ( Flag . getNode ( ) ) { +RetOps . push_back ( Flag ) ; +return DAG . getNode ( PULPISD :: Ret , dl , MVT :: Other , Chain , DAG . getRegister ( PULP :: RA , MVT :: i32 ) , Flag ) ; +} +if ( Glue . getNode ( ) ) { +RetOps . push_back ( Glue ) ; +} +const Function & Func = DAG . getMachineFunction ( ) . getFunction ( ) ; +if ( Func . hasFnAttribute ( "interrupt" ) ) { +llvm_unreachable ( "interrupts not supported" ) ; +} +if ( ! Flag . getNode ( ) ) { +return DAG . getNode ( PULPISD :: Ret , dl , MVT :: Other , Chain , DAG . getRegister ( PULP :: RA , MVT :: i32 ) ) ; +return DAG . getNode ( T64ISD :: JRP , DL , MVT :: Other , Chain , LinkReg ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dad3b3a138bcc4a400def849bfaf4bad94186f7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,8 @@ +SDValue PULPTargetLowering :: lowerVASTART ( SDValue Op , SelectionDAG & DAG ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +const PULPMachineFunctionInfo * FuncInfo = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +SDLoc DL ( Op ) ; +SDValue FI = DAG . getFrameIndex ( FuncInfo -> getVarArgsFrameIndex ( ) , getPointerTy ( MF . getDataLayout ( ) ) ) ; +const Value * SV = cast < SrcValueSDNode > ( Op . getOperand ( 2 ) ) -> getValue ( ) ; +return DAG . getStore ( Op . getOperand ( 0 ) , DL , FI , Op . getOperand ( 1 ) , MachinePointerInfo ( SV ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16f1222fb7662f8a978a0205d7d36b3d76930d7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,43 @@ +enum NodeType : unsigned { +FIRST_NUMBER = ISD :: BUILTIN_OP_END , +RET_FLAG , +URET_FLAG , +SRET_FLAG , +MRET_FLAG , +CALL , +SELECT_CC , +BuildPairF64 , +SplitF64 , +TAIL , +SLLW , +SRAW , +SRLW , +DIVW , +DIVUW , +REMUW , +ROLW , +RORW , +FSRW , +FSLW , +FMV_H_X , +FMV_X_ANYEXTH , +FMV_W_X_RV64 , +FMV_X_ANYEXTW_RV64 , +READ_CYCLE_WIDE , +GREVI , +GREVIW , +GORCI , +GORCIW , +VMV_X_S , +SPLAT_VECTOR_I64 , +READ_VLENB , +TRUNCATE_VECTOR , +VLEFF , +VLEFF_MASK , +VLSEGFF , +VLSEGFF_MASK , +READ_VL , +VSLIDEUP , +VSLIDEDOWN , +VID , +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f851f61a473ef9fecef8944582258da8eead320 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,42 @@ +SDValue PULPTargetLowering :: PerformDAGCombine ( SDNode * N , DAGCombinerInfo & DCI ) const { +if ( N -> getOpcode ( ) == PULPISD :: SplitF64 ) { +} +if ( N -> getOpcode ( ) == PULPISD :: SLLW ) { +} +if ( N -> getOpcode ( ) == PULPISD :: SRAW ) { +} +if ( N -> getOpcode ( ) == PULPISD :: SRLW ) { +} +if ( N -> getOpcode ( ) == PULPISD :: ROLW ) { +} +SelectionDAG & DAG = DCI . DAG ; +SDValue Val ; +if ( N -> getOpcode ( ) == PULPISD :: RORW ) { +} +if ( N -> getOpcode ( ) == PULPISD :: FSLW ) { +} +if ( N -> getOpcode ( ) == PULPISD :: FSRW ) { +} +if ( N -> getOpcode ( ) == PULPISD::GREVIW ) { +} +if ( N -> getOpcode ( ) == PULPISD :: GORCIW ) { +} +if ( N -> getOpcode ( ) == PULPISD::FMV_X_ANYEXTW_RV64 ) { +} +if ( N -> getOpcode ( ) == PULPISD::GREVI ) { +Val = performSETCCCombine ( N , DAG ) ; +} +if ( Val . getNode ( ) ) { +return Val ; +} +if ( N -> getOpcode ( ) == PULPISD :: GORCI ) { +return combineBSWAP ( N , DCI ) ; +} +if ( N -> getOpcode ( ) == PULPISD :: OR ) { +} +if ( N -> getOpcode ( ) == PULPISD :: SELECT_CC ) { +} +if ( N -> getOpcode ( ) == PULPISD :: SETCC ) { +} +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2580d701217217868ac91bb37c7ad4d800ad447e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,211 @@ +void PULPTargetLowering :: ReplaceNodeResults ( SDNode * N , SmallVectorImpl < SDValue > & Results , SelectionDAG & DAG ) const { +SDValue Res ; +if ( N -> getOpcode ( ) == ISD :: STRICT_FP_TO_SINT ) { +ExpandREAD_REGISTER ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: STRICT_FP_TO_UINT ) { +Res = ExpandBITCAST ( N , DAG , Subtarget ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FP_TO_SINT ) { +ReplaceBITCASTResults ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FP_TO_UINT ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: READCYCLECOUNTER ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: ADD ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerREM ( N , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: SUB ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerREM ( N , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FSHL ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerDivRem ( SDValue ( N , 0 ) , DAG ) ; +Results . push_back ( Res . getValue ( 0 ) ) ; +Results . push_back ( Res . getValue ( 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: MUL ) { +Results . push_back ( LowerCTPOP ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerDivRem ( SDValue ( N , 0 ) , DAG ) ; +Results . push_back ( Res . getValue ( 0 ) ) ; +Results . push_back ( Res . getValue ( 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: SHL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: ADD , PULPISD :: SADDV ) ; +Res = LowerSADDSUBSAT ( SDValue ( N , 0 ) , DAG , Subtarget ) ; +Results . push_back ( Res ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: SRA ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: ADD , PULPISD :: UADDV ) ; +Res = LowerSADDSUBSAT ( SDValue ( N , 0 ) , DAG , Subtarget ) ; +Results . push_back ( Res ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: SRL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: SMIN , PULPISD :: SMINVV ) ; +ReplaceREADCYCLECOUNTER ( N , Results , DAG , Subtarget ) ; +Results . push_back ( Res ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: ROTL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: UMINV , PULPISD :: UMINV ) ; +return ; +return ExpandDIV_Windows ( SDValue ( N , 0 ) , DAG , N -> getOpcode ( ) == ISD :: SDIV , Results ) ; +} +if ( N -> getOpcode ( ) == ISD :: ROTR ) { +return ; +} +if ( N -> getOpcode ( ) == ISD :: SDIV ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: UMAX , PULPISD :: UMAXVV ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: UDIV ) { +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: f128 ) { +return ; +} +if ( N -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: FPTOSINT_F128_I64 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: UREM ) { +if ( ! LoadNode -> isVolatile ( ) ) { +return ; +} +if ( LoadNode -> getMemoryVT ( ) != MVT :: i128 ) { +return ; +} +SDValue Result = DAG . getMemIntrinsicNode ( PULPISD :: LDP , SDLoc ( N ) , DAG . getVTList ( { MVT :: i64 , MVT :: i64 , MVT :: Other } ) , { LoadNode -> getChain ( ) , LoadNode -> getBasePtr ( ) } , LoadNode -> getMemoryVT ( ) , LoadNode -> getMemOperand ( ) ) ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , SDLoc ( N ) , MVT :: i128 , Result . getValue ( 0 ) , Result . getValue ( 1 ) ) ; +Results . append ( { Pair , Result . getValue ( 2 ) } ) ; +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: f128 ) { +return ; +} +if ( N -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: FPTOUINT_F128_I64 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: BITCAST ) { +ReplaceCMP_SWAP_128Results ( N , Results , DAG , Subtarget ) ; +ReplaceExtractSubVectorResults ( N , Results , DAG ) ; +SDValue Lo = DAG . getCopyFromReg ( N -> getOperand ( 0 ) , DL , PULP :: ASR23 , MVT :: i32 ) ; +SDValue Hi = DAG . getCopyFromReg ( Lo , DL , PULP :: G0 , MVT :: i32 ) ; +SDValue Ops [ ] = { Lo , Hi } ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , DL , MVT :: i64 , Ops ) ; +Results . push_back ( Pair ) ; +return ; +} +if ( N -> getOpcode ( ) == PULPISD::GREVI ) { +LoadSDNode * LoadNode = cast < LoadSDNode > ( N ) ; +if ( ! LoadNode -> isVolatile ( ) ) { +return ; +} +if ( LoadNode -> getMemoryVT ( ) != MVT :: i128 ) { +return ; +} +SDValue Result = DAG . getMemIntrinsicNode ( PULPISD :: LDP , SDLoc ( N ) , DAG . getVTList ( { MVT :: i64 , MVT :: i64 , MVT :: Other } ) , { LoadNode -> getChain ( ) , LoadNode -> getBasePtr ( ) } , LoadNode -> getMemoryVT ( ) , LoadNode -> getMemOperand ( ) ) ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , SDLoc ( N ) , MVT :: i128 , Result . getValue ( 0 ) , Result . getValue ( 1 ) ) ; +Results . append ( { Pair , Result . getValue ( 2 ) } ) ; +if ( N -> getValueType ( 0 ) != MVT :: f128 ) { +return ; +} +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: SINTTOFP_I64_F128 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +return ReplaceLongIntrinsic ( N , Results , DAG ) ; +} +if ( N -> getOpcode ( ) == PULPISD :: GORCI ) { +ReplaceExtractSubVectorResults ( N , Results , DAG ) ; +ReplaceLongIntrinsic ( N , Results , DAG ) ; +if ( N -> getValueType ( 0 ) != MVT :: f128 ) { +return ; +} +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: UINTTOFP_I64_F128 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: BSWAP ) { +EVT VT = N -> getValueType ( 0 ) ; +ConstantSDNode * CN = cast < ConstantSDNode > ( N -> getOperand ( 0 ) ) ; +Intrinsic :: ID IntID = static_cast < Intrinsic :: ID > ( CN -> getZExtValue ( ) ) ; +if ( IntID == Intrinsic :: aarch64_sve_clasta_n ) { +SDLoc DL ( N ) ; +auto Op2 = DAG . getNode ( ISD :: ANY_EXTEND , DL , MVT :: i32 , N -> getOperand ( 2 ) ) ; +auto V = DAG . getNode ( PULPISD :: CLASTA_N , DL , MVT :: i32 , N -> getOperand ( 1 ) , Op2 , N -> getOperand ( 3 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +} +SDLoc DL ( N ) ; +auto V = DAG . getNode ( PULPISD :: LASTA , DL , MVT :: i32 , N -> getOperand ( 1 ) , N -> getOperand ( 2 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +SDLoc DL ( N ) ; +auto V = DAG . getNode ( PULPISD :: LASTB , DL , MVT :: i32 , N -> getOperand ( 1 ) , N -> getOperand ( 2 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +LowerLOAD ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +LoadSDNode * Ld = cast < LoadSDNode > ( N ) ; +if ( Ld -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +if ( Ld -> getMemoryVT ( ) != MVT :: i64 ) { +return ; +} +SDLoc DL ( N ) ; +SDValue LoadRes = DAG . getExtLoad ( Ld -> getExtensionType ( ) , DL , MVT :: v2i32 , Ld -> getChain ( ) , Ld -> getBasePtr ( ) , Ld -> getPointerInfo ( ) , MVT :: v2i32 , Ld -> getAlignment ( ) , Ld -> getMemOperand ( ) -> getFlags ( ) , Ld -> getAAInfo ( ) ) ; +SDValue Res = DAG . getNode ( ISD :: BITCAST , DL , MVT :: i64 , LoadRes ) ; +Results . push_back ( Res ) ; +Results . push_back ( LoadRes . getValue ( 1 ) ) ; +return ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7411187ad154c0288f403b11ece3e58842fe129 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,42 @@ +PULPTargetLowering :: PULPTargetLowering ( const TargetMachine & TM , const PULPSubtarget & STI ) : TargetLowering ( TM ) , Subtarget ( STI ) { +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setStackPointerRegisterToSaveRestore ( PULP :: X1 ) ; +for ( auto N : { ISD :: EXTLOAD , ISD :: SEXTLOAD , ISD :: ZEXTLOAD } ) { +} +setBooleanContents ( ZeroOrOneBooleanContent ) ; +addRegisterClass ( MVT :: i32 , & PULP :: GPRRegClass ) ; +TRI = STI . getRegisterInfo ( ) ; +computeRegisterProperties ( TRI ) ; +auto * RegInfo = Subtarget . getRegisterInfo ( ) ; +setBooleanVectorContents ( ZeroOrNegativeOneBooleanContent ) ; +setBooleanContents ( ZeroOrOneBooleanContent , ZeroOrNegativeOneBooleanContent ) ; +} +} +for ( auto CC : FPCCToExtend ) { +setLoadExtAction ( ISD :: SEXTLOAD , VT , MVT :: i1 , Promote ) ; +setLoadExtAction ( ISD :: ZEXTLOAD , VT , MVT :: i1 , Promote ) ; +if ( F16VT . isValid ( ) ) { +} +} +if ( Subtarget . atLeastM68020 ( ) ) { +} +setBooleanContents ( ZeroOrOneBooleanContent ) ; +setMinimumJumpTableEntries ( INT_MAX ) ; +setCondCodeAction ( CC , VT , Expand ) ; +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setBooleanContents ( UndefinedBooleanContent ) ; +setBooleanVectorContents ( ZeroOrNegativeOneBooleanContent ) ; +setMaxAtomicSizeInBitsSupported ( 0 ) ; +setStackPointerRegisterToSaveRestore ( PULP :: R14 ) ; +const Align FunctionAlignment ( 2 ) ; +setStackPointerRegisterToSaveRestore ( PULP :: R3 ) ; +setMinFunctionAlignment ( FunctionAlignment ) ; +setSchedulingPreference ( Sched :: Source ) ; +setJumpIsExpensive ( true ) ; +setLibcallCallingConv ( static_cast < RTLIB :: Libcall > ( I ) , CallingConv :: Fast ) ; +setBooleanContents ( ZeroOrOneBooleanContent ) ; +computeRegisterProperties ( ) ; +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setMinFunctionAlignment ( Align :: Constant < 2 > ( ) ) ; +setStackPointerRegisterToSaveRestore ( ABI . IsN64 ( ) ? PULP :: SP_64 : PULP :: SP ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e5adec0ac0cfdef9a2c0cd4f5dfb2a7a871f2b87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/allowsMisalignedMemoryAccesses.cpp @@ -0,0 +1,9 @@ +bool PULPTargetLowering :: allowsMisalignedMemoryAccesses ( EVT VT , unsigned AddrSpace = 0 , unsigned Align = 1 , MachineMemOperand :: Flags Flags = MachineMemOperand :: MONone , bool * Fast = nullptr ) const { +if ( Subtarget . hasPULPExtV2 ( ) ) { +if ( Fast ) { +* Fast = false ; +} +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ede24b6a0b7177a524e4ae524b7fd78f4ab04f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/analyzeInputArgs.cpp @@ -0,0 +1,16 @@ +void PULPTargetLowering :: analyzeInputArgs ( MachineFunction & MF , CCState & CCInfo , const SmallVectorImpl < ISD :: InputArg > & Ins , bool IsRet ) const { +unsigned NumArgs = Ins . size ( ) ; +FunctionType * FType = MF . getFunction ( ) . getFunctionType ( ) ; +for ( unsigned i = 0 ; i != NumArgs ; ++ i ) { +MVT ArgVT = Ins [ i ] . VT ; +ISD :: ArgFlagsTy ArgFlags = Ins [ i ] . Flags ; +if ( IsRet ) { +} +if ( ! IsRet ) { +if ( CC_ ( i , ArgVT , ArgVT , CCValAssign :: Full , ArgFlags , CCInfo ) ) { +} +} +if ( Fn ( i , ArgVT , CCValAssign :: Full , CCInfo ) ) { +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca0e3c66bc1bab448f440282a348fa1eb7a9db07 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/analyzeOutputArgs.cpp @@ -0,0 +1,15 @@ +void PULPTargetLowering :: analyzeOutputArgs ( MachineFunction & MF , CCState & CCInfo , const SmallVectorImpl < ISD :: OutputArg > & Outs , bool IsRet , CallLoweringInfo * CLI ) const { +unsigned NumArgs = Outs . size ( ) ; +for ( unsigned i = 0 ; i != NumArgs ; i ++ ) { +MVT ArgVT = Outs [ i ] . VT ; +ISD :: ArgFlagsTy ArgFlags = Outs [ i ] . Flags ; +if ( IsRet ) { +if ( RetCC_ ( i , ArgVT , ArgVT , CCValAssign :: Full , ArgFlags , CCInfo ) ) { +} +} +if ( ! IsRet ) { +if ( CC_ ( i , ArgVT , ArgVT , CCValAssign :: Full , ArgFlags , CCInfo ) ) { +} +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c952ca87093d5b444e1b852127d1527f83cf2767 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp @@ -0,0 +1,26 @@ +void PULPTargetLowering :: computeKnownBitsForTargetNode ( const SDValue Op , KnownBits & Known , const APInt & DemandedElts , const SelectionDAG & DAG , unsigned Depth ) const { +KnownZero = KnownOne = APInt ( KnownOne . getBitWidth ( ) , 0 ) ; +APInt KnownZero2 ; +APInt KnownOne2 ; +unsigned BitWidth = Known . getBitWidth ( ) ; +unsigned Opc = Op . getOpcode ( ) ; +EVT VT = Op . getValueType ( ) ; +Known . resetAll ( ) ; +if ( Op . getOpcode ( ) == PULPISD :: REMUW ) { +Known . Zero . setBitsFrom ( 1 ) ; +} +if ( Op . getOpcode ( ) == PULPISD :: DIVUW ) { +KnownBits Known2 ; +DAG . computeKnownBits ( Op . getOperand ( 0 ) , Known , Depth + 1 ) ; +DAG . computeKnownBits ( Op . getOperand ( 1 ) , Known2 , Depth + 1 ) ; +Known . Zero = Known . Zero & Known2 . Zero ; +Known . One = Known . One & Known2 . One ; +Known . Zero . setBitsFrom ( 1 ) ; +} +if ( Op . getOpcode ( ) == PULPISD :: READ_VLENB ) { +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp new file mode 100644 index 0000000000000000000000000000000000000000..51269f50ce2e5fc7c824cfa4100384d706db162c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp @@ -0,0 +1,3 @@ +bool convertSelectOfConstantsToMath ( EVT VT ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3178e743bf8e6612f2326e0390c95e0ed53bbb73 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp @@ -0,0 +1,3 @@ +bool convertSetCCLogicToBitwiseLogic ( EVT VT ) const override { +return VT . isScalarInteger ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8bfb242c00aa2d97a251bd7e786de70ab66c5eb2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/decomposeMulByConstant.cpp @@ -0,0 +1,18 @@ +bool PULPTargetLowering :: decomposeMulByConstant ( LLVMContext & Context , EVT VT , SDValue C ) const { +if ( ! VT . isScalarInteger ( ) ) { +return false ; +} +if ( auto * ConstNode = dyn_cast < ConstantSDNode > ( C . getNode ( ) ) ) { +if ( ! ConstNode -> getAPIntValue ( ) . isSignedIntN ( 64 ) ) { +return false ; +} +int64_t Imm = ConstNode -> getSExtValue ( ) ; +unsigned Shift = countTrailingZeros < uint64_t > ( Imm ) ; +Imm = Imm >> Shift ; +if ( isInt < 16 > ( Imm ) ) { +return false ; +} +uint64_t UImm = static_cast < uint64_t > ( Imm ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82fd66d2e78b6bdb5284b3af82a5cc398902fe36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitLeadingFence.cpp @@ -0,0 +1,20 @@ +Instruction * PULPTargetLowering :: emitLeadingFence ( IRBuilder < > & Builder , Instruction * Inst , AtomicOrdering Ord ) const { +return nullptr ; +return nullptr ; +if ( Ord == AtomicOrdering :: SequentiallyConsistent ) { +if ( ! Inst -> hasAtomicStore ( ) ) { +return nullptr ; +} +} +if ( Ord == AtomicOrdering :: Release ) { +return makeDMB ( Builder , PULP_MB :: ISHST ) ; +return makeDMB ( Builder , PULP_MB :: ISH ) ; +} +return makeDMB ( Builder , PULP_MB :: ISHST ) ; +return makeDMB ( Builder , PULP_MB :: ISH ) ; +return callIntrinsic ( Builder , Intrinsic :: ppc_sync ) ; +if ( isAtLeastRelease ( Ord ) ) { +return callIntrinsic ( Builder , Intrinsic :: ppc_lwsync ) ; +} +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a97c828a558f2787940a9716a5aba05e155b3f5b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp @@ -0,0 +1,19 @@ +Value * PULPTargetLowering :: emitMaskedAtomicCmpXchgIntrinsic ( IRBuilder < > & Builder , AtomicCmpXchgInst * CI , Value * AlignedAddr , Value * CmpVal , Value * NewVal , Value * Mask , AtomicOrdering Ord ) const { +Module * M = Builder . GetInsertBlock ( ) -> getParent ( ) -> getParent ( ) ; +Type * ValTy = CmpVal -> getType ( ) ; +Function * IntCmpXchg = Intrinsic :: getDeclaration ( M , Intrinsic :: ppc_cmpxchg_i128 ) ; +Type * Int64Ty = Type :: getInt64Ty ( M -> getContext ( ) ) ; +Value * CmpLo = Builder . CreateTrunc ( CmpVal , Int64Ty , "cmp_lo" ) ; +Value * CmpHi = Builder . CreateTrunc ( Builder . CreateLShr ( CmpVal , 64 ) , Int64Ty , "cmp_hi" ) ; +Value * NewLo = Builder . CreateTrunc ( NewVal , Int64Ty , "new_lo" ) ; +Value * NewHi = Builder . CreateTrunc ( Builder . CreateLShr ( NewVal , 64 ) , Int64Ty , "new_hi" ) ; +Value * Addr = Builder . CreateBitCast ( AlignedAddr , Type :: getInt8PtrTy ( M -> getContext ( ) ) ) ; +emitLeadingFence ( Builder , CI , Ord ) ; +Value * LoHi = Builder . CreateCall ( IntCmpXchg , { Addr , CmpLo , CmpHi , NewLo , NewHi } ) ; +emitTrailingFence ( Builder , CI , Ord ) ; +Value * Lo = Builder . CreateExtractValue ( LoHi , 0 , "lo" ) ; +Value * Hi = Builder . CreateExtractValue ( LoHi , 1 , "hi" ) ; +Lo = Builder . CreateZExt ( Lo , ValTy , "lo64" ) ; +Hi = Builder . CreateZExt ( Hi , ValTy , "hi64" ) ; +return Builder . CreateOr ( Lo , Builder . CreateShl ( Hi , ConstantInt :: get ( ValTy , 64 ) ) , "val64" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b26de04093385e3d926768f24e72b36c50b1ce4e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp @@ -0,0 +1,15 @@ +Value * PULPTargetLowering :: emitMaskedAtomicRMWIntrinsic ( IRBuilder < > & Builder , AtomicRMWInst * AI , Value * AlignedAddr , Value * Incr , Value * Mask , Value * ShiftAmt , AtomicOrdering Ord ) const { +Module * M = Builder . GetInsertBlock ( ) -> getParent ( ) -> getParent ( ) ; +Type * ValTy = AlignedAddr -> getType ( ) -> getPointerElementType ( ) ; +Function * RMW = Intrinsic :: getDeclaration ( M , getIntrinsicForAtomicRMWBinOp128 ( AI -> getOperation ( ) ) ) ; +Type * Int64Ty = Type :: getInt64Ty ( M -> getContext ( ) ) ; +Value * IncrLo = Builder . CreateTrunc ( Incr , Int64Ty , "incr_lo" ) ; +Value * IncrHi = Builder . CreateTrunc ( Builder . CreateLShr ( Incr , 64 ) , Int64Ty , "incr_hi" ) ; +Value * Addr = Builder . CreateBitCast ( AlignedAddr , Type :: getInt8PtrTy ( M -> getContext ( ) ) ) ; +Value * LoHi = Builder . CreateCall ( RMW , { Addr , IncrLo , IncrHi } ) ; +Value * Lo = Builder . CreateExtractValue ( LoHi , 0 , "lo" ) ; +Value * Hi = Builder . CreateExtractValue ( LoHi , 1 , "hi" ) ; +Lo = Builder . CreateZExt ( Lo , ValTy , "lo64" ) ; +Hi = Builder . CreateZExt ( Hi , ValTy , "hi64" ) ; +return Builder . CreateOr ( Lo , Builder . CreateShl ( Hi , ConstantInt :: get ( ValTy , 64 ) ) , "val64" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..996a8872d79d74a075d6821698276a10fab9b465 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/emitTrailingFence.cpp @@ -0,0 +1,14 @@ +Instruction * PULPTargetLowering :: emitTrailingFence ( IRBuilder < > & Builder , Instruction * Inst , AtomicOrdering Ord ) const { +if ( Ord == AtomicOrdering :: AcquireRelease ) { +if ( Ord == AtomicOrdering :: SequentiallyConsistent ) { +if ( Ord == AtomicOrdering :: Monotonic ) { +return nullptr ; +return nullptr ; +if ( isAcquireOrStronger ( Ord ) ) { +if ( isa < LoadInst > ( Inst ) ) { +return Builder . CreateCall ( Intrinsic :: getDeclaration ( Builder . GetInsertBlock ( ) -> getParent ( ) -> getParent ( ) , Intrinsic :: ppc_cfence , { Inst -> getType ( ) } ) , { Inst } ) ; +} +} +return callIntrinsic ( Builder , Intrinsic :: ppc_lwsync ) ; +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getAddr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ccf6f5e31521de6add25f9beddcadca47c2a2e53 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getAddr.cpp @@ -0,0 +1,20 @@ +template < class NodeTy > SDValue PULPTargetLowering :: getAddr ( NodeTy * N , SelectionDAG & DAG , bool IsLocal ) const { +SDLoc DL ( N ) ; +EVT Ty = getPointerTy ( DAG . getDataLayout ( ) ) ; +unsigned Flag = PULPII :: MO_None ; +if ( isPositionIndependent ( ) ) { +SDValue GPReg = DAG . getRegister ( PULP :: GP_REG , MVT :: i32 ) ; +SDValue Wrapper = DAG . getNode ( PULPISD :: GOT_ADDR , DL , Ty , GPReg , getTargetNode ( N , Ty , DAG , PULP :: MO_GOT ) ) ; +return DAG . getLoad ( Ty , DL , DAG . getEntryNode ( ) , Wrapper , MachinePointerInfo :: getGOT ( DAG . getMachineFunction ( ) ) ) ; +} +SDValue TV = getTargetNode ( N , DL , Ty , DAG , Flag ) ; +if ( ! isPositionIndependent ( ) ) { +SDValue Hi = getTargetNode ( N , Ty , DAG , PULP :: MO_ABS_HI ) ; +SDValue Lo = getTargetNode ( N , Ty , DAG , PULP :: MO_ABS_LO ) ; +SDValue MoveHi = DAG . getNode ( PULPISD :: MOVEHI , DL , MVT :: i32 , Hi ) ; +} +if ( IsLocal ) { +DAG . getNode ( ISD :: ADD , DL , Ty , { DAG . getGLOBAL_OFFSET_TABLE ( Ty ) , Addr } ) ; +} +return DAG . getLoad ( Ty , DL , DAG . getEntryNode ( ) , Result , MachinePointerInfo :: getGOT ( DAG . getMachineFunction ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getConstraintType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ed4dbe58daa41ec565f9a05e745f22c291e7f69 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getConstraintType.cpp @@ -0,0 +1,20 @@ +PULPTargetLowering :: ConstraintType PULPTargetLowering :: getConstraintType ( StringRef Constraint ) const { +if ( Constraint . size ( ) == 1 ) { +if ( Constraint [ 0 ] == 'f' ) { +return C_RegisterClass ; +} +if ( Constraint [ 0 ] == 'I' ) { +return C_Immediate ; +} +if ( Constraint [ 0 ] == 'J' ) { +return C_Immediate ; +} +if ( Constraint [ 0 ] == 'K' ) { +return C_Immediate ; +} +if ( Constraint [ 0 ] == 'A' ) { +return C_Memory ; +} +} +return TargetLowering :: getConstraintType ( Constraint ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..90e5bb50f8b4ba50d9d99116a50cefd9b24f7ebf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getDynamicTLSAddr.cpp @@ -0,0 +1,19 @@ +SDValue PULPTargetLowering :: getDynamicTLSAddr ( GlobalAddressSDNode * N , SelectionDAG & DAG ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +PULPMachineFunctionInfo * CFI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +unsigned PULPPCLabelIndex = CFI -> createPICLabelUId ( ) ; +SDLoc DL ( N ) ; +EVT Ty = getPointerTy ( DAG . getDataLayout ( ) ) ; +IntegerType * CallTy = Type :: getIntNTy ( * DAG . getContext ( ) , Ty . getSizeInBits ( ) ) ; +SDValue PICLabel = DAG . getTargetConstant ( PULPPCLabelIndex , DL , MVT :: i32 ) ; +SDValue Addr = DAG . getTargetGlobalAddress ( GV , DL , Ty , 0 , 0 ) ; +SDValue Load = SDValue ( DAG . getMachineNode ( PULP :: PseudoLA_TLS_GD , DL , Ty , Addr ) , 0 ) ; +ArgListTy Args ; +ArgListEntry Entry ; +Entry . Node = Load ; +Entry . Ty = CallTy ; +Args . push_back ( Entry ) ; +TargetLowering :: CallLoweringInfo CLI ( DAG ) ; +CLI . setDebugLoc ( DL ) . setChain ( DAG . getEntryNode ( ) ) . setLibCallee ( CallingConv :: C , CallTy , DAG . getExternalSymbol ( "__tls_get_addr" , Ty ) , std :: move ( Args ) ) ; +return LowerCallTo ( CLI ) . first ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..11862fe12810c0835ec468000a37f5a56f96e7d6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExceptionPointerRegister.cpp @@ -0,0 +1,3 @@ +Register PULPTargetLowering :: getExceptionPointerRegister ( const Constant * PersonalityFn ) const { +return PULP :: X10 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1c77af1175724813214262e456457fae52384678 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExceptionSelectorRegister.cpp @@ -0,0 +1,3 @@ +Register PULPTargetLowering :: getExceptionSelectorRegister ( const Constant * PersonalityFn ) const { +return PULP :: X11 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38de26de656308f961676867af71fc387570f00a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp @@ -0,0 +1,3 @@ +ISD :: NodeType getExtendForAtomicCmpSwapArg ( ) const override { +return ISD :: SIGN_EXTEND ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b9c2d6c3acd41ab5253583248f7de9c051d4481b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getExtendForAtomicOps.cpp @@ -0,0 +1,3 @@ +ISD :: NodeType getExtendForAtomicOps ( ) const override { +return ISD :: SIGN_EXTEND ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0a3fed08cef4df7c751a7bb65a19c3f91d597d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getInlineAsmMemConstraint.cpp @@ -0,0 +1,8 @@ +unsigned PULPTargetLowering :: getInlineAsmMemConstraint ( StringRef ConstraintCode ) const { +if ( ConstraintCode . size ( ) == 1 ) { +if ( ConstraintCode [ 0 ] == 'A' ) { +return InlineAsm :: Constraint_A ; +} +} +return TargetLowering :: getInlineAsmMemConstraint ( ConstraintCode ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae1e522b40bc5ebbd0e271791e66de2e803983d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPointerMemTy.cpp @@ -0,0 +1,6 @@ +MVT PULPTargetLowering :: getPointerMemTy ( const DataLayout & DL , uint32_t AS ) const { +if ( AS == UINT32_MAX ) { +AS = 0 ; +} +return MVT :: getIntegerVT ( AS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPointerTy.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPointerTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..76ae0fbe4ae7e037459a193b12d6016c4812e9b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPointerTy.cpp @@ -0,0 +1,6 @@ +MVT PULPTargetLowering :: getPointerTy ( const DataLayout & DL , uint32_t AS ) const { +if ( AS == UINT32_MAX ) { +AS = 0 ; +} +return MVT :: getIntegerVT ( AS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b11f1ef3981c52124fa7515356887f1f2c6aa30 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getPostIndexedAddressParts.cpp @@ -0,0 +1,103 @@ +bool PULPTargetLowering :: getPostIndexedAddressParts ( SDNode * N , SDNode * Op , SDValue & Base , SDValue & Offset , ISD :: MemIndexedMode & AM , SelectionDAG & DAG ) const { +EVT VT ; +SDValue Ptr ; +if ( LoadSDNode * LD = dyn_cast < LoadSDNode > ( N ) ) { +VT = LD -> getMemoryVT ( ) ; +Ptr = LD -> getBasePtr ( ) ; +bool IsInc ; +if ( ! getIndexedAddressParts ( Op , Base , Offset , AM , IsInc , DAG ) ) { +return false ; +} +if ( Ptr != Base ) { +return false ; +} +AM = IsInc ? ISD :: POST_INC : ISD :: POST_DEC ; +return true ; +} +if ( StoreSDNode * ST = dyn_cast < StoreSDNode > ( N ) ) { +VT = ST -> getMemoryVT ( ) ; +Ptr = ST -> getBasePtr ( ) ; +bool IsInc ; +if ( ! getIndexedAddressParts ( Op , Base , Offset , AM , IsInc , DAG ) ) { +return false ; +} +if ( Ptr != Base ) { +return false ; +} +AM = IsInc ? ISD :: POST_INC : ISD :: POST_DEC ; +return true ; +} +VT = LD -> getMemoryVT ( ) ; +if ( LD -> getExtensionType ( ) != ISD :: NON_EXTLOAD ) { +return false ; +} +if ( VT != MVT :: i8 && VT != MVT :: i16 ) { +return false ; +} +if ( Op -> getOpcode ( ) != ISD :: ADD && Op -> getOpcode ( ) != ISD :: SUB ) { +return false ; +} +if ( const ConstantSDNode * RHS = dyn_cast < ConstantSDNode > ( Op -> getOperand ( 1 ) ) ) { +int RHSC = RHS -> getSExtValue ( ) ; +if ( Op -> getOpcode ( ) == ISD :: SUB ) { +RHSC = - RHSC ; +} +if ( ( VT == MVT :: i16 && RHSC != 2 ) || ( VT == MVT :: i8 && RHSC != 1 ) ) { +return false ; +} +Base = Op -> getOperand ( 0 ) ; +AM = ISD :: POST_INC ; +return true ; +} +} +if ( const StoreSDNode * ST = dyn_cast < StoreSDNode > ( N ) ) { +VT = ST -> getMemoryVT ( ) ; +if ( PULP :: isProgramMemoryAccess ( ST ) ) { +return false ; +} +if ( VT != MVT :: i8 && VT != MVT :: i16 ) { +return false ; +} +if ( Op -> getOpcode ( ) != ISD :: ADD && Op -> getOpcode ( ) != ISD :: SUB ) { +return false ; +} +if ( const ConstantSDNode * RHS = dyn_cast < ConstantSDNode > ( Op -> getOperand ( 1 ) ) ) { +int RHSC = RHS -> getSExtValue ( ) ; +if ( Op -> getOpcode ( ) == ISD :: SUB ) { +RHSC = - RHSC ; +} +if ( ( VT == MVT :: i16 && RHSC != 2 ) || ( VT == MVT :: i8 && RHSC != 1 ) ) { +return false ; +} +Base = Op -> getOperand ( 0 ) ; +AM = ISD :: POST_INC ; +return true ; +} +} +LoadSDNode * LD = cast < LoadSDNode > ( N ) ; +if ( LD -> getExtensionType ( ) != ISD :: NON_EXTLOAD ) { +return false ; +} +EVT VT = LD -> getMemoryVT ( ) ; +if ( VT != MVT :: i8 && VT != MVT :: i16 ) { +return false ; +} +if ( Op -> getOpcode ( ) == ISD :: ADD ) { +AM = ISD :: POST_INC ; +Base = Op -> getOperand ( 0 ) ; +Offset = DAG . getConstant ( RHSC , VT ) ; +if ( ConstantSDNode * RHS = dyn_cast < ConstantSDNode > ( Op -> getOperand ( 1 ) ) ) { +uint64_t RHSC = RHS -> getZExtValue ( ) ; +if ( VT == MVT :: i16 ) { +if ( RHSC != 2 ) { +return false ; +} +} +return false ; +} +} +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4981bc936dd3c96c80cbadc102f1442d24acfc6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,326 @@ +std :: pair < unsigned , const TargetRegisterClass * > PULPTargetLowering :: getRegForInlineAsmConstraint ( const TargetRegisterInfo * TRI , StringRef Constraint , MVT VT ) const { +if ( Constraint . size ( ) == 1 ) { +if ( Constraint [ 0 ] == 'r' ) { +return std :: make_pair ( 0U , & PULP :: GPRRegClass ) ; +} +if ( Constraint [ 0 ] == 'f' ) { +if ( Subtarget . hasStdExtF ( ) ) { +if ( VT == MVT :: f32 ) { +return std :: make_pair ( 0U , & PULP :: FPR32RegClass ) ; +} +} +if ( Subtarget . hasStdExtD ( ) ) { +if ( VT == MVT :: f64 ) { +return std :: make_pair ( 0U , & PULP :: FPR64RegClass ) ; +} +} +} +} +return TargetLowering :: getRegForInlineAsmConstraint ( Constraint , VT ) ; +unsigned XRegFromAlias = PULP :: NoRegister ; +if ( Constraint . lower ( ) == "{zero}" ) { +XRegFromAlias = PULP :: X0 ; +} +if ( Constraint . lower ( ) == "{ra}" ) { +XRegFromAlias = PULP :: X1 ; +} +if ( Constraint . lower ( ) == "{sp}" ) { +XRegFromAlias = PULP :: X2 ; +} +if ( Constraint . lower ( ) == "{gp}" ) { +XRegFromAlias = PULP :: X3 ; +} +if ( Constraint . lower ( ) == "{tp}" ) { +XRegFromAlias = PULP :: X4 ; +} +if ( Constraint . lower ( ) == "{t0}" ) { +XRegFromAlias = PULP :: X5 ; +} +if ( Constraint . lower ( ) == "{t1}" ) { +XRegFromAlias = PULP :: X6 ; +} +if ( Constraint . lower ( ) == "{t2}" ) { +XRegFromAlias = PULP :: X7 ; +} +if ( Constraint . lower ( ) == "{s0}" ) { +XRegFromAlias = PULP :: X8 ; +} +if ( Constraint . lower ( ) == "{fp}" ) { +XRegFromAlias = PULP :: X8 ; +} +if ( Constraint . lower ( ) == "{s1}" ) { +XRegFromAlias = PULP :: X9 ; +} +if ( Constraint . lower ( ) == "{a0}" ) { +XRegFromAlias = PULP :: X10 ; +} +if ( Constraint . lower ( ) == "{a1}" ) { +XRegFromAlias = PULP :: X11 ; +} +if ( Constraint . lower ( ) == "{a2}" ) { +XRegFromAlias = PULP :: X12 ; +} +if ( Constraint . lower ( ) == "{a3}" ) { +XRegFromAlias = PULP :: X13 ; +} +if ( Constraint . lower ( ) == "{a4}" ) { +XRegFromAlias = PULP :: X14 ; +} +if ( Constraint . lower ( ) == "{a5}" ) { +XRegFromAlias = PULP :: X15 ; +} +if ( Constraint . lower ( ) == "{a6}" ) { +XRegFromAlias = PULP :: X16 ; +} +if ( Constraint . lower ( ) == "{a7}" ) { +XRegFromAlias = PULP :: X17 ; +} +if ( Constraint . lower ( ) == "{s2}" ) { +XRegFromAlias = PULP :: X18 ; +} +if ( Constraint . lower ( ) == "{s3}" ) { +XRegFromAlias = PULP :: X19 ; +} +if ( Constraint . lower ( ) == "{s4}" ) { +XRegFromAlias = PULP :: X20 ; +} +if ( Constraint . lower ( ) == "{s5}" ) { +XRegFromAlias = PULP :: X21 ; +} +if ( Constraint . lower ( ) == "{s6}" ) { +XRegFromAlias = PULP :: X22 ; +} +if ( Constraint . lower ( ) == "{s7}" ) { +XRegFromAlias = PULP :: X23 ; +} +if ( Constraint . lower ( ) == "{s8}" ) { +XRegFromAlias = PULP :: X24 ; +} +if ( Constraint . lower ( ) == "{s9}" ) { +XRegFromAlias = PULP :: X25 ; +} +if ( Constraint . lower ( ) == "{s10}" ) { +XRegFromAlias = PULP :: X26 ; +} +if ( Constraint . lower ( ) == "{s11}" ) { +XRegFromAlias = PULP :: X27 ; +} +if ( Constraint . lower ( ) == "{t3}" ) { +XRegFromAlias = PULP :: X28 ; +} +if ( Constraint . lower ( ) == "{t4}" ) { +XRegFromAlias = PULP :: X29 ; +} +if ( Constraint . lower ( ) == "{t5}" ) { +XRegFromAlias = PULP :: X30 ; +} +if ( Constraint . lower ( ) == "{t6}" ) { +XRegFromAlias = PULP :: X31 ; +} +if ( XRegFromAlias != PULP :: NoRegister ) { +return std :: make_pair ( XRegFromAlias , & PULP :: GPRRegClass ) ; +} +if ( Subtarget . hasStdExtF ( ) ) { +unsigned FReg = PULP :: NoRegister ; +if ( Constraint . lower ( ) == "{f0}" ) { +FReg = PULP :: F0_F ; +} +if ( Constraint . lower ( ) == "{ft0}" ) { +FReg = PULP :: F0_F ; +} +if ( Constraint . lower ( ) == "{f1}" ) { +FReg = PULP :: F1_F ; +} +if ( Constraint . lower ( ) == "{ft1}" ) { +FReg = PULP :: F1_F ; +} +if ( Constraint . lower ( ) == "{f2}" ) { +FReg = PULP :: F2_F ; +} +if ( Constraint . lower ( ) == "{ft2}" ) { +FReg = PULP :: F2_F ; +} +if ( Constraint . lower ( ) == "{f3}" ) { +FReg = PULP :: F3_F ; +} +if ( Constraint . lower ( ) == "{ft3}" ) { +FReg = PULP :: F3_F ; +} +if ( Constraint . lower ( ) == "{f4}" ) { +FReg = PULP :: F4_F ; +} +if ( Constraint . lower ( ) == "{ft4}" ) { +FReg = PULP :: F4_F ; +} +if ( Constraint . lower ( ) == "{f5}" ) { +FReg = PULP :: F5_F ; +} +if ( Constraint . lower ( ) == "{ft5}" ) { +FReg = PULP :: F5_F ; +} +if ( Constraint . lower ( ) == "{f6}" ) { +FReg = PULP :: F6_F ; +} +if ( Constraint . lower ( ) == "{ft6}" ) { +FReg = PULP :: F6_F ; +} +if ( Constraint . lower ( ) == "{f7}" ) { +FReg = PULP :: F7_F ; +} +if ( Constraint . lower ( ) == "{ft7}" ) { +FReg = PULP :: F7_F ; +} +if ( Constraint . lower ( ) == "{f8}" ) { +FReg = PULP :: F8_F ; +} +if ( Constraint . lower ( ) == "{ft8}" ) { +FReg = PULP :: F8_F ; +} +if ( Constraint . lower ( ) == "{f9}" ) { +FReg = PULP :: F9_F ; +} +if ( Constraint . lower ( ) == "{ft9}" ) { +FReg = PULP :: F9_F ; +} +if ( Constraint . lower ( ) == "{f10}" ) { +FReg = PULP :: F10_F ; +} +if ( Constraint . lower ( ) == "{ft10}" ) { +FReg = PULP :: F10_F ; +} +if ( Constraint . lower ( ) == "{f11}" ) { +FReg = PULP :: F11_F ; +} +if ( Constraint . lower ( ) == "{ft11}" ) { +FReg = PULP :: F11_F ; +} +if ( Constraint . lower ( ) == "{f12}" ) { +FReg = PULP :: F12_F ; +} +if ( Constraint . lower ( ) == "{ft12}" ) { +FReg = PULP :: F12_F ; +} +if ( Constraint . lower ( ) == "{f13}" ) { +FReg = PULP :: F13_F ; +} +if ( Constraint . lower ( ) == "{ft13}" ) { +FReg = PULP :: F13_F ; +} +if ( Constraint . lower ( ) == "{f14}" ) { +FReg = PULP :: F14_F ; +} +if ( Constraint . lower ( ) == "{ft14}" ) { +FReg = PULP :: F14_F ; +} +if ( Constraint . lower ( ) == "{f15}" ) { +FReg = PULP :: F15_F ; +} +if ( Constraint . lower ( ) == "{ft15}" ) { +FReg = PULP :: F15_F ; +} +if ( Constraint . lower ( ) == "{f16}" ) { +FReg = PULP :: F16_F ; +} +if ( Constraint . lower ( ) == "{ft16}" ) { +FReg = PULP :: F16_F ; +} +if ( Constraint . lower ( ) == "{f17}" ) { +FReg = PULP :: F17_F ; +} +if ( Constraint . lower ( ) == "{ft17}" ) { +FReg = PULP :: F17_F ; +} +if ( Constraint . lower ( ) == "{f18}" ) { +FReg = PULP :: F18_F ; +} +if ( Constraint . lower ( ) == "{ft18}" ) { +FReg = PULP :: F18_F ; +} +if ( Constraint . lower ( ) == "{f19}" ) { +FReg = PULP :: F19_F ; +} +if ( Constraint . lower ( ) == "{ft19}" ) { +FReg = PULP :: F19_F ; +} +if ( Constraint . lower ( ) == "{f20}" ) { +FReg = PULP :: F20_F ; +} +if ( Constraint . lower ( ) == "{ft20}" ) { +FReg = PULP :: F20_F ; +} +if ( Constraint . lower ( ) == "{f21}" ) { +FReg = PULP :: F21_F ; +} +if ( Constraint . lower ( ) == "{ft21}" ) { +FReg = PULP :: F21_F ; +} +if ( Constraint . lower ( ) == "{f22}" ) { +FReg = PULP :: F22_F ; +} +if ( Constraint . lower ( ) == "{ft22}" ) { +FReg = PULP :: F22_F ; +} +if ( Constraint . lower ( ) == "{f23}" ) { +FReg = PULP :: F23_F ; +} +if ( Constraint . lower ( ) == "{ft23}" ) { +FReg = PULP :: F23_F ; +} +if ( Constraint . lower ( ) == "{f24}" ) { +FReg = PULP :: F24_F ; +} +if ( Constraint . lower ( ) == "{ft24}" ) { +FReg = PULP :: F24_F ; +} +if ( Constraint . lower ( ) == "{f25}" ) { +FReg = PULP :: F25_F ; +} +if ( Constraint . lower ( ) == "{ft25}" ) { +FReg = PULP :: F25_F ; +} +if ( Constraint . lower ( ) == "{f26}" ) { +FReg = PULP :: F26_F ; +} +if ( Constraint . lower ( ) == "{ft26}" ) { +FReg = PULP :: F26_F ; +} +if ( Constraint . lower ( ) == "{f27}" ) { +FReg = PULP :: F27_F ; +} +if ( Constraint . lower ( ) == "{ft27}" ) { +FReg = PULP :: F27_F ; +} +if ( Constraint . lower ( ) == "{f28}" ) { +FReg = PULP :: F28_F ; +} +if ( Constraint . lower ( ) == "{ft28}" ) { +FReg = PULP :: F28_F ; +} +if ( Constraint . lower ( ) == "{f29}" ) { +FReg = PULP :: F29_F ; +} +if ( Constraint . lower ( ) == "{ft29}" ) { +FReg = PULP :: F29_F ; +} +if ( Constraint . lower ( ) == "{f30}" ) { +FReg = PULP :: F30_F ; +} +if ( Constraint . lower ( ) == "{ft30}" ) { +FReg = PULP :: F30_F ; +} +if ( Constraint . lower ( ) == "{f31}" ) { +FReg = PULP :: F31_F ; +} +if ( Constraint . lower ( ) == "{ft31}" ) { +FReg = PULP :: F31_F ; +} +if ( FReg != PULP :: NoRegister ) { +assert ( PULP :: F0_32 <= FReg && FReg <= PULP :: F31_32 && "Unknown fp-reg" ) ; +if ( Subtarget . hasStdExtD ( ) ) { +unsigned RegNo = FReg - PULP :: F0_32 ; +unsigned DReg = PULP :: F0_64 + RegNo ; +} +} +} +return TargetLowering :: getRegForInlineAsmConstraint ( TRI , Constraint , VT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9208c63ec4ea6627a79fe878b86793de0a2c3c59 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getRegisterByName.cpp @@ -0,0 +1,6 @@ +Register PULPTargetLowering :: getRegisterByName ( const char * RegName , LLT VT , const MachineFunction & MF ) const { +Register Reg = MatchRegisterAltName ( RegName ) ; +if ( Reg ) { +return Reg ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff6e60c22622cb8d354ac3e5e548f0162db96cbd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getScalarShiftAmountTy.cpp @@ -0,0 +1,3 @@ +MVT PULPTargetLowering :: getScalarShiftAmountTy ( const DataLayout & DL , EVT ) const { +return Subtarget . getXLenVT ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ca67544380671d3d5b917b5c4df6ea4cc7323ca --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getSetCCResultType.cpp @@ -0,0 +1,8 @@ +EVT PULPTargetLowering :: getSetCCResultType ( const DataLayout & DL , LLVMContext & , EVT VT ) const { +if ( ! VT . isVector ( ) ) { +return getPointerTy ( DL ) ; +} +if ( Subtarget . hasStdExtV ( ) ) { +return MVT :: getVectorVT ( MVT :: i1 , VT . getVectorElementCount ( ) ) ; +return VT . changeVectorElementTypeToInteger ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fb2533d06f5c7940c0c93d33cdf5da0426cd63d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getStaticTLSAddr.cpp @@ -0,0 +1,24 @@ +SDValue PULPTargetLowering :: getStaticTLSAddr ( GlobalAddressSDNode * N , SelectionDAG & DAG , bool UseGOT ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +PULPMachineFunctionInfo * CFI = MF . getInfo < PULPMachineFunctionInfo > ( ) ; +unsigned PULPPCLabelIndex = CFI -> createPICLabelUId ( ) ; +SDLoc DL ( N ) ; +EVT Ty = getPointerTy ( DAG . getDataLayout ( ) ) ; +PULPCP :: PULPCPModifier Flag = UseGOT ? PULPCP :: TLSIE : PULPCP :: TLSLE ; +bool AddCurrentAddr = UseGOT ? true : false ; +unsigned char PCAjust = UseGOT ? 4 : 0 ; +PULPConstantPoolValue * CPV = PULPConstantPoolConstant :: Create ( N -> getGlobal ( ) , PULPCP :: CPValue , PCAjust , Flag , AddCurrentAddr , PULPPCLabelIndex ) ; +SDValue CAddr = DAG . getTargetConstantPool ( CPV , Ty ) ; +SDValue Load ; +if ( UseGOT ) { +SDValue PICLabel = DAG . getTargetConstant ( PULPPCLabelIndex , DL , MVT :: i32 ) ; +auto * LRWGRS = DAG . getMachineNode ( PULP :: PseudoTLSLA32 , DL , { Ty , Ty } , { CAddr , PICLabel } ) ; +auto LRWADDGRS = DAG . getNode ( ISD :: ADD , DL , Ty , SDValue ( LRWGRS , 0 ) , SDValue ( LRWGRS , 1 ) ) ; +Load = DAG . getLoad ( Ty , DL , DAG . getEntryNode ( ) , LRWADDGRS , MachinePointerInfo ( N -> getGlobal ( ) ) ) ; +} +if ( ! UseGOT ) { +Load = SDValue ( DAG . getMachineNode ( PULP :: LRW32 , DL , Ty , CAddr ) , 0 ) ; +} +SDValue TPReg = DAG . getRegister ( PULP :: R31 , MVT :: i32 ) ; +return DAG . getNode ( ISD :: ADD , DL , Ty , Load , TPReg ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getSubtarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getSubtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed71f24d87e162c3480ec8d3d77679b6e84ff410 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getSubtarget.cpp @@ -0,0 +1,3 @@ +const PULPSubtarget & getSubtarget ( ) const { +return Subtarget ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6c7d1ffde7e428d618ee5a7ab3b90ab9e679864 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,123 @@ +const char * PULPTargetLowering :: getTargetNodeName ( unsigned Opcode ) const { +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: RET_FLAG ) { +return "PULPISD::RET_FLAG" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD::URET_FLAG ) { +return "PULPISD::URET_FLAG" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: SRET_FLAG ) { +return "PULPISD::SRET_FLAG" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: MRET_FLAG ) { +return "PULPISD::MRET_FLAG" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: CALL ) { +return "PULPISD::CALL" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: SELECT_CC ) { +return "PULPISD::SELECT_CC" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: BuildPairF64 ) { +return "PULPISD::BuildPairF64" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: SplitF64 ) { +return "PULPISD::SplitF64" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD ::TAIL ) { +return "PULPISD::TAIL" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: FMV_X_ANYEXTH ) { +return "PULPISD::FMV_X_ANYEXTH" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: FMV_W_X_RV64 ) { +return "PULPISD::FMV_W_X_RV64" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: FMV_X_ANYEXTW_RV64 ) { +return "PULPISD::FMV_X_ANYEXTW_RV64" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: READ_CYCLE_WIDE ) { +return "PULPISD::READ_CYCLE_WIDE" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD::GREVI ) { +return "PULPISD::GREVI" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD::GREVIW ) { +return "PULPISD::GREVIW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: GORCI ) { +return "PULPISD::GORCI" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: GORCIW ) { +return "PULPISD::GORCIW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD::VMV_X_S ) { +return "PULPISD::VMV_X_S" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: SPLAT_VECTOR_I64 ) { +return "PULPISD::SPLAT_VECTOR_I64" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: READ_VLENB ) { +return "PULPISD::READ_VLENB" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: TRUNCATE_VECTOR ) { +return "PULPISD::TRUNCATE_VECTOR" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: VLEFF ) { +return "PULPISD::VLEFF" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: VLEFF_MASK ) { +return "PULPISD::VLEFF_MASK" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD::VLSEGFF ) { +return "PULPISD::VLSEGFF" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: VLSEGFF_MASK ) { +return "PULPISD::VLSEGFF_MASK" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: READ_VL ) { +return "PULPISD::READ_VL" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: VSLIDEUP ) { +return "PULPISD::VSLIDEUP" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: VSLIDEDOWN ) { +return "PULPISD::VSLIDEDOWN" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: VID ) { +return "PULPISD::VID" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: FMV_H_X ) { +return "PULPISD::FMV_H_X" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: FSRW ) { +return "PULPISD::FSRW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: FSLW ) { +return "PULPISD::FSLW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: RORW ) { +return "PULPISD::RORW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: ROLW ) { +return "PULPISD::ROLW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: REMUW ) { +return "PULPISD::REMUW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: DIVUW ) { +return "PULPISD::DIVUW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: DIVW ) { +return "PULPISD::DIVW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: SRLW ) { +return "PULPISD::SRLW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: SRAW ) { +return "PULPISD::SRAW" ; +} +if ( ( PULPISD :: NodeType ) Opcode == PULPISD :: SLLW ) { +return "PULPISD::SLLW" ; +} +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e35236f2f4ebbb1cd7c1877b715e6f0491508d4d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/getTgtMemIntrinsic.cpp @@ -0,0 +1,111 @@ +bool PULPTargetLowering :: getTgtMemIntrinsic ( IntrinsicInfo & Info , const CallInst & I , MachineFunction & MF , unsigned Intrinsic ) const { +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_xchg_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_add_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_sub_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_nand_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_max_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 1 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 1 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = false ; +Info . writeMem = true ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_min_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 1 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 1 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = false ; +Info . writeMem = true ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_umax_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_atomicrmw_umin_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: PULP_masked_cmpxchg_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4552dcf7c1a160c396098bcd09fbe790334b593 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/hasBitPreservingFPLogic.cpp @@ -0,0 +1,3 @@ +bool PULPTargetLowering :: hasBitPreservingFPLogic ( EVT VT ) const { +return ( VT == MVT :: f16 && Subtarget . hasStdExtZfh ( ) ) || ( VT == MVT :: f32 && Subtarget . hasStdExtF ( ) ) || ( VT == MVT :: f64 && Subtarget . hasStdExtD ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ab97cf8e870b7659c51864fb3f0d20219773d9a6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp @@ -0,0 +1,3 @@ +bool PULPTargetLowering :: isCheapToSpeculateCtlz ( ) const { +return Subtarget . hasStdExtZbb ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e010f3676b5d999508058ceff64c57c200ab5702 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isCheapToSpeculateCttz.cpp @@ -0,0 +1,3 @@ +bool PULPTargetLowering :: isCheapToSpeculateCttz ( ) const { +return Subtarget . hasStdExtZbb ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb72dd49b6acc869b803c7c1671e2ccdea8c96b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp @@ -0,0 +1,8 @@ +bool PULPTargetLowering :: isDesirableToCommuteWithShift ( const SDNode * N , CombineLevel Level ) const { +if ( Level == BeforeLegalizeTypes ) { +return true ; +return true ; +if ( N -> getOpcode ( ) != ISD :: SHL ) { +return true ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ba886ad6db60a9ac25891e5911cdd9f8b55c363d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp @@ -0,0 +1,23 @@ +bool PULPTargetLowering :: isEligibleForTailCallOptimization ( CCState & CCInfo , CallLoweringInfo & CLI , MachineFunction & MF , const SmallVector < CCValAssign , 16 > & ArgLocs ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +const Function & CallerF = MF . getFunction ( ) ; +CallingConv :: ID CallerCC = CallerF . getCallingConv ( ) ; +bool CCMatch = CallerCC == CalleeCC ; +for ( Function :: const_arg_iterator i = CallerF . arg_begin ( ) , e = CallerF . arg_end ( ) ; i != e ; ++ i ) { +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +const GlobalValue * GV = G -> getGlobal ( ) ; +if ( GV -> hasExternalWeakLinkage ( ) ) { +return false ; +} +if ( GV -> hasExternalWeakLinkage ( ) ) { +if ( TT . isOSBinFormatELF ( ) ) { +return false ; +} +if ( GV -> hasExternalWeakLinkage ( ) ) { +return false ; +} +} +assert ( ( ! isVarArg || CalleeCC == CallingConv :: C ) && "Unexpected variadic calling convention" ) ; +for ( const CCValAssign & ArgLoc : ArgLocs ) { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bca1724a727e44fe609587b697e8f176cf656c31 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp @@ -0,0 +1,16 @@ +bool PULPTargetLowering :: isFMAFasterThanFMulAndFAdd ( const MachineFunction & MF , EVT VT ) const { +VT = VT . getScalarType ( ) ; +if ( ! VT . isSimple ( ) ) { +return false ; +} +if ( VT . getSimpleVT ( ) . SimpleTy == MVT :: f16 ) { +return Subtarget . hasStdExtZfh ( ) ; +} +if ( VT . getSimpleVT ( ) . SimpleTy == MVT :: f32 ) { +return Subtarget . hasStdExtF ( ) ; +} +if ( VT . getSimpleVT ( ) . SimpleTy == MVT :: f64 ) { +return Subtarget . hasStdExtD ( ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3555f387699cdb2ba5f50921f63b45fb9801425b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isFPImmLegal.cpp @@ -0,0 +1,24 @@ +bool PULPTargetLowering :: isFPImmLegal ( const APFloat & Imm , EVT VT , bool ForCodeSize ) const { +if ( VT == MVT :: f16 ) { +if ( Subtarget . hasFullFP16 ( ) ) { +return PULP_AM :: getFP16Imm ( Imm ) != - 1 ; +} +} +if ( VT == MVT :: f32 ) { +return PULP_AM :: getFP32Imm ( Imm ) != - 1 ; +} +if ( VT == MVT :: f64 ) { +if ( Subtarget . isFPOnlySP ( ) ) { +return PULP_AM :: getFP64Imm ( Imm ) != - 1 ; +} +} +if ( VT != MVT :: f32 ) { +if ( VT != MVT :: f64 ) { +return false ; +} +} +if ( Imm . isNegZero ( ) ) { +return false ; +} +return Imm . isZero ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3bc18af81d1121bb2570363f02f0a239d0104fe --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1,3 @@ +bool PULPTargetLowering :: isLegalAddImmediate ( int64_t Imm ) const { +return isInt < 12 > ( Imm ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c2d8472817232e72f9cfee58f83e5c0f252c0e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,17 @@ +bool PULPTargetLowering :: isLegalAddressingMode ( const DataLayout & DL , const AddrMode & AM , Type * Ty , unsigned AS , Instruction * I ) const { +if ( AM . BaseGV ) { +return false ; +} +if ( ! isInt < 12 > ( AM . BaseOffs ) ) { +return false ; +} +if ( AM . Scale == 0 ) { +return true ; +} +if ( AM . Scale == 1 ) { +if ( ! AM . HasBaseReg ) { +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6927605b4aa0fb7c3767a056a900c1e84835f908 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1,3 @@ +bool PULPTargetLowering :: isLegalICmpImmediate ( int64_t Imm ) const { +return isInt < 12 > ( Imm ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5becfee2532fbb11c3b12c5ace7d7646abae1e5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isSExtCheaperThanZExt.cpp @@ -0,0 +1,3 @@ +bool PULPTargetLowering :: isSExtCheaperThanZExt ( EVT VT1 , EVT VT2 ) const { +return Subtarget . is64Bit ( ) && VT1 == MVT :: i32 && VT2 == MVT :: i64 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3abd186c4e148834917d153558cc3396ea915fd5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isTruncateFree.cpp @@ -0,0 +1,14 @@ +bool PULPTargetLowering :: isTruncateFree ( Type * SrcTy , Type * DstTy ) const { +if ( Subtarget . is64Bit ( ) ) { +return false ; +} +if ( ! SrcTy -> isIntegerTy ( ) ) { +return false ; +} +if ( ! DstTy -> isIntegerTy ( ) ) { +return false ; +} +unsigned NumBits1 = SrcTy -> getPrimitiveSizeInBits ( ) ; +unsigned NumBits2 = DstTy -> getPrimitiveSizeInBits ( ) ; +return NumBits1 == 64 && NumBits2 == 32 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d46fa6aaca7d0f9fad8f18e7988d63c31685219 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isTruncateFree2.cpp @@ -0,0 +1,20 @@ +bool PULPTargetLowering :: isTruncateFree ( EVT SrcVT , EVT DstVT ) const { +if ( Subtarget . is64Bit ( ) ) { +return false ; +} +if ( SrcVT . isVector ( ) ) { +return false ; +} +if ( DstVT . isVector ( ) ) { +return false ; +} +if ( ! SrcVT . isInteger ( ) ) { +return false ; +} +if ( ! DstVT . isInteger ( ) ) { +return false ; +} +unsigned SrcBits = SrcVT . getSizeInBits ( ) ; +unsigned DestBits = DstVT . getSizeInBits ( ) ; +return ( SrcBits == 64 && DestBits == 32 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isZExtFree.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isZExtFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a2a6620bfc6c3f84fcd715277073d7ea639dd0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/isZExtFree.cpp @@ -0,0 +1,37 @@ +bool PULPTargetLowering :: isZExtFree ( SDValue Val , EVT VT2 ) const { +if ( auto * LD = dyn_cast < LoadSDNode > ( Val ) ) { +EVT MemVT = LD -> getMemoryVT ( ) ; +if ( MemVT == MVT :: i1 ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +if ( MemVT == MVT :: i8 ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +} +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +} +} +if ( MemVT == MVT :: i16 ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +} +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +} +} +if ( MemVT == MVT :: i32 ) { +if ( Subtarget . is64Bit ( ) ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +} +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +} +} +} +} +return TargetLowering :: isZExtFree ( Val , VT2 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..558362a3fcb73fba37e6ab7f39660684b0398c1a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp @@ -0,0 +1,15 @@ +SDValue PULPTargetLowering :: lowerEXTRACT_VECTOR_ELT ( SDValue Op , SelectionDAG & DAG ) const { +return Op ; +return Op ; +return Op ; +return Op ; +return Op ; +return Op ; +SDLoc DL ( Op ) ; +SDValue Idx = Op . getOperand ( 1 ) ; +Result = DAG . getNode ( ISD :: TRUNCATE , SL , MVT :: i16 , Result ) ; +MVT VecTy = ty ( Vec ) ; +return Op ; +return Op ; +SDValue Res = DAG . getNode ( ISD :: EXTRACT_VECTOR_ELT , DL , IntVT , DAG . getNode ( ISD :: BITCAST , DL , IntVecVT , Op0 ) , Op1 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a248cf3b8692c79d2d6fb934268b9bf206cd240c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp @@ -0,0 +1,10 @@ +SDValue PULPTargetLowering :: lowerINSERT_VECTOR_ELT ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc dl ( Op ) ; +SDValue V1 = Op . getOperand ( 0 ) ; +SDValue V2 = Op . getOperand ( 1 ) ; +SDLoc SL ( Op ) ; +SDValue Vec = Op . getOperand ( 0 ) ; +SDValue Val = DAG . getNode ( ISD :: BITCAST , SL , MVT :: i16 , Op . getOperand ( 1 ) ) ; +SDValue BCVec = DAG . getNode ( ISD :: BITCAST , SL , MVT :: i32 , Vec ) ; +SDValue Res = DAG . getNode ( ISD :: INSERT_VECTOR_ELT , DL , IntVecVT , DAG . getNode ( ISD :: BITCAST , DL , IntVecVT , Op0 ) , DAG . getNode ( ISD :: BITCAST , DL , IntVT , Op1 ) , Op2 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23149df7b3294e491f553c82310777dad7f6c246 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerSELECT.cpp @@ -0,0 +1,27 @@ +SDValue PULPTargetLowering :: lowerSELECT ( SDValue Op , SelectionDAG & DAG ) const { +SDValue CondV = Op . getOperand ( 0 ) ; +SDValue TrueV = Op . getOperand ( 1 ) ; +SDValue FalseV = Op . getOperand ( 2 ) ; +SDLoc DL ( Op ) ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +if ( Op . getSimpleValueType ( ) == XLenVT ) { +if ( CondV . getOperand ( 0 ) . getSimpleValueType ( ) == XLenVT ) { +if ( CondV . getOpcode ( ) == ISD :: SETCC ) { +SDValue LHS = CondV . getOperand ( 0 ) ; +SDValue RHS = CondV . getOperand ( 1 ) ; +auto CC = cast < CondCodeSDNode > ( CondV . getOperand ( 2 ) ) ; +ISD :: CondCode CCVal = CC -> get ( ) ; +normaliseSetCC ( LHS , RHS , CCVal ) ; +SDValue TargetCC = DAG . getConstant ( CCVal , DL , XLenVT ) ; +auto VTs = Op . getValueType ( ) ; +SDValue Ops [ ] = { LHS , RHS , TargetCC , TrueV , FalseV } ; +return DAG . getNode ( PULPISD :: SELECT_CC , DL , VTs , Ops ) ; +} +} +} +SDValue Zero = DAG . getConstant ( 0 , DL , XLenVT ) ; +SDValue SetNE = DAG . getConstant ( ISD :: SETNE , DL , XLenVT ) ; +auto VTs = Op . getValueType ( ) ; +SDValue Ops [ ] = { CondV , Zero , SetNE , TrueV , FalseV } ; +return DAG . getNode ( PULPISD :: SELECT_CC , DL , VTs , Ops ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c18daff9957439f0afcef3d1ac14bb62e999bd81 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerSPLATVECTOR.cpp @@ -0,0 +1,19 @@ +SDValue PULPTargetLowering :: lowerSPLATVECTOR ( SDValue Op , SelectionDAG & DAG ) const { +assert ( ! Subtarget . is64Bit ( ) && VecVT . getVectorElementType ( ) == MVT :: i64 && "Unexpected SPLAT_VECTOR lowering" ) ; +SDLoc DL ( Op ) ; +SDValue N1 = Op . getOperand ( 0 ) ; +unsigned SrcSize = N1 . getValueType ( ) . getSizeInBits ( ) ; +SDValue WideSrc = SrcSize == 128 ? N1 : widenVec ( DAG , N1 , DL ) ; +unsigned TrgNumElts = TrgVT . getVectorNumElements ( ) ; +SmallVector < int , 16 > ShuffV ; +if ( Subtarget . isLittleEndian ( ) ) { +for ( unsigned i = 0 ; i < TrgNumElts ; ++ i ) { +ShuffV . push_back ( i * SizeMult ) ; +if ( Subtarget . isBigEndian ( ) ) { +for ( unsigned i = 1 ; i < TrgNumElts ; ++ i ) { +ShuffV . push_back ( i * SizeMult - 1 ) ; +for ( unsigned i = TrgNumElts ; i < WideNumElts ; ++ i ) { +ShuffV . push_back ( WideNumElts + 1 ) ; +SDValue Conv = DAG . getNode ( ISD :: BITCAST , DL , WideVT , WideSrc ) ; +return DAG . getVectorShuffle ( WideVT , DL , Conv , DAG . getUNDEF ( WideVT ) , ShuffV ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32efafbbde1b3fa427f3f608dae8cf3e5d10fbaa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerShiftLeftParts.cpp @@ -0,0 +1,40 @@ +SDValue PULPTargetLowering :: lowerShiftLeftParts ( SDValue Op , SelectionDAG & DAG ) const { +EVT VT = Op . getValueType ( ) ; +unsigned VTBits = VT . getSizeInBits ( ) ; +SDLoc DL ( Op ) ; +MVT VT = Subtarget . isGP64bit ( ) ? MVT :: i64 : MVT :: i32 ; +SDValue Lo = Op . getOperand ( 0 ) ; +SDValue Hi = Op . getOperand ( 1 ) ; +SDValue Shamt = Op . getOperand ( 2 ) ; +SDValue RevShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , DAG . getConstant ( VTBits , MVT :: i64 ) , Shamt ) ; +SDValue Tmp1 = DAG . getNode ( ISD :: SRL , DL , VT , Lo , RevShAmt ) ; +SDValue ExtraShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , Shamt , DAG . getConstant ( VTBits , MVT :: i64 ) ) ; +SDValue Tmp2 = DAG . getNode ( ISD :: SHL , DL , VT , Hi , Shamt ) ; +SDValue Tmp3 = DAG . getNode ( ISD :: SHL , DL , VT , Lo , ExtraShAmt ) ; +SDValue FalseVal = DAG . getNode ( ISD :: OR , DL , VT , Tmp1 , Tmp2 ) ; +SDValue Tmp4 = DAG . getNode ( ISD :: SHL , DL , VT , Lo , Shamt ) ; +SDValue CmpOp = getSelectableIntSetCC ( ExtraShAmt , DAG . getConstant ( 0 , MVT :: i64 ) , ISD :: SETGE , A64cc , DAG , DL ) ; +SDValue CCR = DAG . getRegister ( PULP :: CPSR , MVT :: i32 ) ; +SDValue Cmp = getPULPCmp ( ExtraShAmt , DAG . getConstant ( 0 , MVT :: i32 ) , ISD :: SETGE , PULPcc , DAG , DL ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +EVT VT = Lo . getValueType ( ) ; +SDValue Zero = DAG . getConstant ( 0 , DL , VT ) ; +SDValue One = DAG . getConstant ( 1 , DL , VT ) ; +SDValue MinusRegisterSize = DAG . getConstant ( - 32 , DL , VT ) ; +SDValue RegisterSizeMinus1 = DAG . getConstant ( 32 - 1 , DL , VT ) ; +SDValue ShamtMinusRegisterSize = DAG . getNode ( ISD :: ADD , DL , VT , Shamt , MinusRegisterSize ) ; +SDValue RegisterSizeMinus1Shamt = DAG . getNode ( ISD :: XOR , DL , VT , RegisterSizeMinus1 , Shamt ) ; +SDValue LoTrue = DAG . getNode ( ISD :: SHL , DL , VT , Lo , Shamt ) ; +SDValue Not = DAG . getNode ( ISD :: XOR , DL , MVT :: i32 , Shamt , DAG . getConstant ( - 1 , MVT :: i32 ) ) ; +SDValue ShiftLeftHi = DAG . getNode ( ISD :: SHL , DL , VT , Hi , Shamt ) ; +SDValue HiTrue = DAG . getNode ( ISD :: OR , DL , VT , ShiftLeftHi , ShiftRightLo ) ; +SDValue HiFalse = DAG . getNode ( ISD :: SHL , DL , VT , Lo , ShamtMinusRegisterSize ) ; +SDValue CC = DAG . getSetCC ( DL , MVT :: i8 , ShamtMinusRegisterSize , Zero , ISD :: SETLT ) ; +SDValue Or = DAG . getNode ( ISD :: OR , DL , VT , ShiftLeftHi , ShiftRightLo ) ; +SDValue ShiftLeftLo = DAG . getNode ( ISD :: SHL , DL , VT , Lo , Shamt ) ; +SDValue Cond = DAG . getNode ( ISD :: AND , DL , MVT :: i32 , Shamt , DAG . getConstant ( VT . getSizeInBits ( ) , MVT :: i32 ) ) ; +Lo = DAG . getNode ( ISD :: SELECT , DL , VT , CC , LoTrue , Zero ) ; +Hi = DAG . getNode ( ISD :: SELECT , DL , VT , CC , HiTrue , HiFalse ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +return DAG . getMergeValues (Parts , DL ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..695328e40a05a6181a5f5029293851e757041c0d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerShiftRightParts.cpp @@ -0,0 +1,56 @@ +SDValue PULPTargetLowering :: lowerShiftRightParts ( SDValue Op , SelectionDAG & DAG , bool IsSRA ) const { +EVT VT = Op . getValueType ( ) ; +unsigned VTBits = VT . getSizeInBits ( ) ; +SDLoc DL ( Op ) ; +SDValue ShOpLo = Op . getOperand ( 0 ) ; +SDValue ShOpHi = Op . getOperand ( 1 ) ; +SDValue ShAmt = Op . getOperand ( 2 ) ; +unsigned Opc = ( Op . getOpcode ( ) == ISD :: SRA_PARTS ) ? ISD :: SRA : ISD :: SRL ; +SDValue RevShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , DAG . getConstant ( VTBits , DL , MVT :: i64 ) , ShAmt ) ; +SDValue Tmp1 = DAG . getNode ( ISD :: SRL , DL , VT , ShOpLo , ShAmt ) ; +SDValue ExtraShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , ShAmt , DAG . getConstant ( VTBits , DL , MVT :: i64 ) ) ; +SDValue Tmp2 = DAG . getNode ( ISD :: SHL , DL , VT , ShOpHi , RevShAmt ) ; +SDValue FalseVal = DAG . getNode ( ISD :: OR , DL , VT , Tmp1 , Tmp2 ) ; +SDValue TrueVal = DAG . getNode ( Opc , DL , VT , ShOpHi , ExtraShAmt ) ; +SDValue CCR = DAG . getRegister ( PULP :: CPSR , MVT :: i32 ) ; +SDValue Cmp = emitComparison ( ExtraShAmt , DAG . getConstant ( 0 , DL , MVT :: i64 ) , ISD :: SETGE , DL , DAG ) ; +SDValue CCVal = DAG . getConstant ( PULPCC :: GE , DL , MVT :: i32 ) ; +SDValue FalseValLo = DAG . getNode ( ISD :: OR , DL , VT , Tmp1 , Tmp2 ) ; +SDValue TrueValLo = DAG . getNode ( Opc , DL , VT , ShOpHi , ExtraShAmt ) ; +SDValue Lo = Op . getOperand ( 0 ) ; +SDValue FalseValHi = DAG . getNode ( Opc , DL , VT , ShOpHi , ShAmt ) ; +SDValue TrueValHi = Opc == ISD :: SRA ? DAG . getNode ( Opc , DL , VT , ShOpHi , DAG . getConstant ( VTBits - 1 , DL , MVT :: i64 ) ) : DAG . getConstant ( 0 , DL , VT ) ; +SDValue Hi = Op . getOperand ( 1 ) ; +SDValue Lo = DAG . getNode ( PULPISD :: CMOV , DL , VT , FalseVal , TrueVal , PULPcc , CCR , Cmp ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +SDValue Lo = Op . getOperand ( 0 ) , Hi = Op . getOperand ( 1 ) ; +SDValue Shamt = Op . getOperand ( 2 ) ; +EVT VT = Lo . getValueType ( ) ; +unsigned ShiftRightOp = IsSRA ? ISD :: SRA : ISD :: SRL ; +SDValue Zero = DAG . getConstant ( 0 , DL , VT ) ; +SDValue One = DAG . getConstant ( 1 , DL , VT ) ; +SDValue MinusRegisterSize = DAG . getConstant ( - 32 , DL , VT ) ; +SDValue RegisterSizeMinus1 = DAG . getConstant ( 32 - 1 , DL , VT ) ; +SDValue ShamtMinusRegisterSize = DAG . getNode ( ISD :: ADD , DL , VT , Shamt , MinusRegisterSize ) ; +SDValue RegisterSizeMinus1Shamt = DAG . getNode ( ISD :: XOR , DL , VT , RegisterSizeMinus1 , Shamt ) ; +SDValue ShiftRightLo = DAG . getNode ( ISD :: SRL , DL , VT , Lo , Shamt ) ; +SDValue ShiftLeftHi1 = DAG . getNode ( ISD :: SHL , DL , VT , Hi , One ) ; +MVT VT = Subtarget . isGP64bit ( ) ? MVT :: i64 : MVT :: i32 ; +SDValue Not = DAG . getNode ( ISD :: XOR , DL , MVT :: i32 , Shamt , DAG . getConstant ( - 1 , MVT :: i32 ) ) ; +SDValue ShiftLeft1Hi = DAG . getNode ( ISD :: SHL , DL , VT , Hi , DAG . getConstant ( 1 , VT ) ) ; +SDValue ShiftLeftHi = DAG . getNode ( ISD :: SHL , DL , VT , ShiftLeftHi1 , RegisterSizeMinus1Shamt ) ; +SDValue LoTrue = DAG . getNode ( ISD :: OR , DL , VT , ShiftRightLo , ShiftLeftHi ) ; +SDValue HiTrue = DAG . getNode ( ShiftRightOp , DL , VT , Hi , Shamt ) ; +SDValue LoFalse = DAG . getNode ( ShiftRightOp , DL , VT , Hi , ShamtMinusRegisterSize ) ; +SDValue HiFalse = IsSRA ? DAG . getNode ( ISD :: SRA , DL , VT , Hi , RegisterSizeMinus1 ) : Zero ; +SDValue CC = DAG . getSetCC ( DL , MVT :: i8 , ShamtMinusRegisterSize , Zero , ISD :: SETLT ) ; +SDValue ShiftRightLo = DAG . getNode ( ISD :: SRL , DL , VT , Lo , Shamt ) ; +SDValue Or = DAG . getNode ( ISD :: OR , DL , VT , ShiftLeftHi , ShiftRightLo ) ; +SDValue ShiftRightHi = DAG . getNode ( IsSRA ? ISD :: SRA : ISD :: SRL , DL , VT , Hi , Shamt ) ; +SDValue Cond = DAG . getNode ( ISD :: AND , DL , MVT :: i32 , Shamt , DAG . getConstant ( VT . getSizeInBits ( ) , MVT :: i32 ) ) ; +SDValue Ext = DAG . getNode ( ISD :: SRA , DL , VT , Hi , DAG . getConstant ( VT . getSizeInBits ( ) - 1 , VT ) ) ; +Lo = DAG . getNode ( ISD :: SELECT , DL , VT , CC , LoTrue , LoFalse ) ; +Hi = DAG . getNode ( ISD :: SELECT , DL , VT , CC , HiTrue , HiFalse ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +return DAG . getMergeValues (Parts , DL ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64bb770e60ba8a1e654383a2649754db51f0a552 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerVectorMaskExt.cpp @@ -0,0 +1,15 @@ +static SDValue PULPTargetLowering :: lowerVectorMaskExt ( SDValue Op , SelectionDAG & DAG , int64_t ExtTrueVal ) const { +SDLoc DL ( N ) ; +EVT VT = N -> getValueType ( 0 ) ; +if ( VT . getSizeInBits ( ) . getKnownMinSize ( ) != PULP :: SVEBitsPerBlock ) { +return SDValue ( ) ; +} +unsigned ElemSize = VT . getVectorElementType ( ) . getSizeInBits ( ) / 8 ; +unsigned ByteSize = VT . getSizeInBits ( ) . getKnownMinSize ( ) / 8 ; +EVT ByteVT = EVT :: getVectorVT ( Ctx , MVT :: i8 , { ByteSize , true } ) ; +if ( ! ST -> hasMVEFloatOps ( ) ) { +return SDValue ( ) ; +} +SDLoc DL ( BV ) ; +EVT VT = BV . getValueType ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..800493cf3c473611d53360e63c9b301b46c032f5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/lowerVectorMaskTrunc.cpp @@ -0,0 +1,33 @@ +SDValue PULPTargetLowering :: lowerVectorMaskTrunc ( SDValue Op , SelectionDAG & DAG ) const { +assert ( MaskVT . isVector ( ) && MaskVT . getVectorElementType ( ) == MVT :: i1 ) && "Unexpected type for vector mask lowering" ) ; +if ( ! ST -> hasMVEFloatOps ( ) ) { +return SDValue ( ) ; +SDLoc dl ( BV ) ; +if ( VT != MVT :: v8f16 ) { +return SDValue ( ) ; +if ( BV . getOperand ( 0 ) . getOpcode ( ) != ISD :: FP_ROUND ) { +return SDValue ( ) ; +if ( BV . getOperand ( 0 ) . getOperand ( 0 ) . getOpcode ( ) != ISD :: EXTRACT_VECTOR_ELT ) { +return SDValue ( ) ; +if ( BV . getOperand ( 0 ) . getOperand ( 0 ) . getConstantOperandVal ( 1 ) != 0 ) { +return SDValue ( ) ; +if ( BV . getOperand ( 1 ) . getOpcode ( ) != ISD :: FP_ROUND ) { +return SDValue ( ) ; +if ( BV . getOperand ( 1 ) . getOperand ( 0 ) . getOpcode ( ) != ISD :: EXTRACT_VECTOR_ELT ) { +return SDValue ( ) ; +if ( BV . getOperand ( 1 ) . getOperand ( 0 ) . getConstantOperandVal ( 1 ) != 0 ) { +return SDValue ( ) ; +SDValue Op0 = BV . getOperand ( 0 ) . getOperand ( 0 ) . getOperand ( 0 ) ; +SDValue Op1 = BV . getOperand ( 1 ) . getOperand ( 0 ) . getOperand ( 0 ) ; +if ( Op0 . getValueType ( ) != MVT :: v4f32 ) { +return SDValue ( ) ; +if ( Op1 . getValueType ( ) != MVT :: v4f32 ) { +return SDValue ( ) ; +for ( unsigned i = 1 ; i < 4 ; i ++ ) { +if ( ! Check ( BV . getOperand ( i * 2 + 0 ) , Op0 , i ) ) { +return SDValue ( ) ; +if ( ! Check ( BV . getOperand ( i * 2 + 1 ) , Op1 , i ) ) { +return SDValue ( ) ; +SDValue N1 = DAG . getNode ( PULPISD :: VCVTN , dl , VT , DAG . getUNDEF ( VT ) , Op0 , DAG . getConstant ( 0 , dl , MVT :: i32 ) ) ; +return DAG . getNode ( PULPISD :: VCVTN , dl , VT , N1 , Op1 , DAG . getConstant ( 1 , dl , MVT :: i32 ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b3ca378221a4d1b65e734cd3e2d93978dfe980ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp @@ -0,0 +1,6 @@ +bool PULPTargetLowering :: mayBeEmittedAsTailCall ( const CallInst * CI ) const { +if ( CI -> isTailCall ( ) ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5e8ca14d17c2c96e01f50cf003b660fd552090a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/normaliseSetCC.cpp @@ -0,0 +1,22 @@ +static void normaliseSetCC ( SDValue & LHS , SDValue & RHS , ISD :: CondCode & CC ) { +if ( CC == ISD :: SETGT ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +if ( CC == ISD :: SETLE ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +if ( CC == ISD :: SETUGT ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +if ( CC == ISD :: SETULE ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f68f25a787d6d9d179404a12f57ee6bc55abf05a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/normalizeSetCC.cpp @@ -0,0 +1,2 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aea7b13466bda38ef605e932c0424e464e006d3c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp @@ -0,0 +1,3 @@ +bool shouldConsiderGEPOffsetSplit ( ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6c4f52e649ae4b4b1a72eabf7992953c6c65f9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp @@ -0,0 +1,3 @@ +bool shouldConvertConstantLoadToIntImm ( const APInt & Imm , Type * Ty ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2aa225c436b3855dea54fb39ad09e7c595f7fad3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp @@ -0,0 +1,10 @@ +TargetLowering :: AtomicExpansionKind PULPTargetLowering :: shouldExpandAtomicCmpXchgInIR ( AtomicCmpXchgInst * AI ) const { +unsigned Size = AI -> getCompareOperand ( ) -> getType ( ) -> getPrimitiveSizeInBits ( ) ; +if ( Size == 8 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +if ( Size == 16 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +return AtomicExpansionKind :: None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbd97b79bfb91e98e96322d3133ca9ec2266d436 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp @@ -0,0 +1,13 @@ +TargetLowering :: AtomicExpansionKind PULPTargetLowering :: shouldExpandAtomicRMWInIR ( AtomicRMWInst * AI ) const { +if ( AI -> isFloatingPointOperation ( ) ) { +return AtomicExpansionKind :: CmpXChg ; +} +unsigned Size = AI -> getType ( ) -> getPrimitiveSizeInBits ( ) ; +if ( Size == 8 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +if ( Size == 16 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +return AtomicExpansionKind :: None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c810809a86725d91ae1c0fa0178381f6acebb69a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExpandShift.cpp @@ -0,0 +1,7 @@ +bool shouldExpandShift ( SelectionDAG & DAG , SDNode * N ) const override { +if ( DAG . getMachineFunction ( ) . getFunction ( ) . hasMinSize ( ) ) { +return false ; +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7a858a420453d330b766ad05a378a95a9c1fc8e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp @@ -0,0 +1,8 @@ +bool PULPTargetLowering :: shouldExtendTypeInLibCall ( EVT Type ) const { +if ( Subtarget . abiUsesSoftFloat ( ) ) { +if ( Type == MVT :: i32 ) { +return true ; +} +} +return IsSigned ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1428347bf80aab4226352f9fbf46158c4494c134 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp @@ -0,0 +1,3 @@ +bool shouldInsertFencesForAtomic ( const Instruction * I ) const override { +return isa < LoadInst > ( I ) || isa < StoreInst > ( I ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a2a0eea6065fa55bd62c7709f95648468f727949 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp @@ -0,0 +1,8 @@ +bool PULPTargetLowering :: shouldSignExtendTypeInLibCall ( EVT Type , bool IsSigned ) const { +if ( Subtarget . is64Bit ( ) ) { +if ( Type == MVT :: i32 ) { +return true ; +} +} +return IsSigned ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b7e8870f5dd0101633fd2ee54f9175ead8b7e19d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/targetShrinkDemandedConstant.cpp @@ -0,0 +1,33 @@ +bool PULPTargetLowering :: targetShrinkDemandedConstant ( SDValue Op , const APInt & DemandedBits , const APInt & DemandedElts , TargetLoweringOpt & TLO ) const { +if ( ! TLO . LegalOps ) { +return false ; +} +EVT VT = Op . getValueType ( ) ; +if ( VT . isVector ( ) ) { +return false ; +} +if ( Op . getOpcode ( ) != ISD :: AND ) { +return false ; +} +unsigned Size = VT . getSizeInBits ( ) ; +ConstantSDNode * C = dyn_cast < ConstantSDNode > ( Op . getOperand ( 1 ) ) ; +if ( ! C ) { +return false ; +} +const APInt & Mask = C -> getAPIntValue ( ) ; +APInt ExpandedMask = Mask | ~ Demanded ; +if ( ShrunkMask == 0 ) { +return false ; +} +if ( ExpandedMask == ~ 0U ) { +return TLO . CombineTo ( Op , Op . getOperand ( 0 ) ) ; +} +if ( NewMask == Mask ) { +return true ; +} +return false ; +return false ; +SDLoc DL ( Op ) ; +SDValue NewOp = TLO . DAG . getNode ( ISD :: AND , DL , VT , Op . getOperand ( 0 ) , NewC ) ; +return TLO . CombineTo ( Op , NewOp ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fafa5f6a2b05130d924fdb210802fe1676afd061 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/ISelLowering/validateCCReservedRegs.cpp @@ -0,0 +1,11 @@ +void PULPTargetLowering :: validateCCReservedRegs ( const SmallVectorImpl < std :: pair < llvm :: Register , llvm :: SDValue >> & Regs , MachineFunction & MF ) const { +auto * CA = dyn_cast < ConstantSDNode > ( Ptr ) ; +if ( ! CA ) { +return true ; +unsigned Addr = CA -> getZExtValue ( ) ; +return true ; +std :: string ErrMsg ; +raw_string_ostream O ( ErrMsg ) ; +if ( DebugLoc DL = dl . getDebugLoc ( ) ) { +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53cc2835a41ac58f713da3322777b6baeda2bb12 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/InstructionSelector.cpp @@ -0,0 +1,9 @@ +RISCVInstructionSelector::RISCVInstructionSelector(const RISCVTargetMachine &TM, const RISCVSubtarget &STI,const RISCVRegisterBankInfo &RBI) : InstructionSelector(), STI(STI), TII(*STI.getInstrInfo()), TRI(*STI.getRegisterInfo()), RBI(RBI), +#define GET_GLOBALISEL_PREDICATES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_PREDICATES_INIT +#define GET_GLOBALISEL_TEMPORARIES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_TEMPORARIES_INIT +{ +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36a916d86a6c0dd8d478ddf77801efb086d2d5d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/createInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector * createPULPInstructionSelector ( const PULPTargetMachine & TM , PULPSubtarget & Subtarget , PULPRegisterBankInfo & RBI ) { +return new PULPInstructionSelector ( TM , Subtarget , RBI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/getName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/getName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..740b6f1fbb4a3afc4ded45f1aa79d0fb35ce8a43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/getName.cpp @@ -0,0 +1,3 @@ +static const char * getName ( ) { +return DEBUG_TYPE ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/select.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..723dc3af215037e113da03fe158966f459da7741 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/InstructionSelector/select.cpp @@ -0,0 +1,9 @@ +bool PULPInstructionSelector :: select ( MachineInstr & I ) { +if ( ! isPreISelGenericOpcode ( I . getOpcode ( ) ) ) { +return true ; +} +if ( selectImpl ( I , * CoverageInfo ) ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..785229528175cfa66168fa509b605449a41d45d4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/LegalizeInfo/LegalizerInfo.cpp @@ -0,0 +1,3 @@ +PULPLegalizerInfo :: PULPLegalizerInfo ( const PULPSubtarget & ST ) { +computeTables ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7c5990a18b07e178c2bbb5817ccee060a72bfb7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp @@ -0,0 +1,13 @@ +void llvm :: LowerMachineInstrToMCInst ( const MachineInstr * MI , MCInst & OutMI , const AsmPrinter & AP ) { +OutMI . setOpcode ( MI -> getOpcode ( ) ) ; +for ( const MachineOperand & MO : MI -> operands ( ) ) { +MCOperand MCOp ; +if ( MCOp . isValid ( ) ) { +OutMI . addOperand ( LowerOperand ( MI , MO , AP ) ) ; +} +LowerMachineOperandToMCOperand ( MO , MCOp , AP ) ; +if ( LowerMachineOperandToMCOperand ( MO , MCOp , AP ) ) { +OutMI . addOperand ( MCOp ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f0533765f5ac434785b9d1a7a84045a27a59004 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp @@ -0,0 +1,41 @@ +bool llvm :: LowerPULPMachineOperandToMCOperand ( const MachineOperand & MO , MCOperand & MCOp , const AsmPrinter & AP ) { +if ( MO . getType ( ) == MachineOperand :: MO_ConstantPoolIndex ) { +MCOp = lowerSymbolOperand ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_JumpTableIndex ) { +MCOp = lowerSymbolOperand ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_Register ) { +if ( MO . isImplicit ( ) ) { +return false ; +} +MCOp = MCOperand :: createReg ( MO . getReg ( ) ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_Immediate ) { +MCOp = MCOperand :: createImm ( MO . getImm ( ) ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_RegisterMask ) { +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_MachineBasicBlock ) { +MCOp = lowerSymbolOperand ( MO , MO . getMBB ( ) -> getSymbol ( ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_GlobalAddress ) { +MCOp = lowerSymbolOperand ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_BlockAddress ) { +MCOp = lowerSymbolOperand ( MO , AP . GetBlockAddressSymbol ( MO . getBlockAddress ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_ExternalSymbol ) { +MCOp = lowerSymbolOperand ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP ) ; +return true ; +} +report_fatal_error ( "LowerPULPMachineInstrToMCInst: unknown operand type" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47b4acba43b53387df33f0c6a777c8b529f855a4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/PULP/Selection/MCInstLower/lowerSymbolOperand.cpp @@ -0,0 +1,65 @@ +static MCOperand lowerSymbolOperand ( const MachineOperand & MO , MCSymbol * Sym , const AsmPrinter & AP ) { +MCContext & Ctx = AP . OutContext ; +const MCExpr * Expr = nullptr ; +Expr = MCSymbolRefExpr :: create ( Sym , MCSymbolRefExpr :: VK_PULP_None , Ctx ) ; +if ( ! MO . isJTI ( ) ) { +if ( ! MO . isMBB ( ) ) { +if ( MO . getOffset ( ) ) { +Expr = MCBinaryExpr :: createAdd ( Expr , MCConstantExpr :: create ( MO . getOffset ( ) , Ctx ) , Ctx ) ; +} +} +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_CALL ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_CALL , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_PLT ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_CALL_PLT , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_LO ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_PULP_LO , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_HI ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_PCREL_LO ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_PCREL_LO , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_PCREL_HI ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_PCREL_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_GOT_HI ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_GOT_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_TPREL_LO ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_TPREL_LO , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_TPREL_HI ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_TPREL_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_TPREL_ADD ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_TPREL_ADD , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_TLS_GOT_HI ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_TLS_GOT_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_TLS_GD_HI ) { +Expr = PULPMCExpr :: create ( Expr , PULPMCExpr :: VK_TLS_GD_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == PULPII :: MO_None ) { +return MCOperand :: createExpr ( Expr ) ; +} +llvm_unreachable ( "Unknown target flag on GV operand" ) ; +return MCOperand :: createExpr ( Expr ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1add09d08880f2db739eefe2393f190a9eaca8a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterBankInfo/RegisterBankInfo.cpp @@ -0,0 +1,2 @@ +RISCVRegisterBankInfo :: RISCVRegisterBankInfo ( const TargetRegisterInfo & TRI ) : RISCVGenRegisterBankInfo ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f79fc08b171f29239f4cd187430f5f1dc491d328 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +RISCVRegisterInfo :: RISCVRegisterInfo ( unsigned HwMode ) : RISCVGenRegisterInfo ( RISCV :: X1 , 0 , 0 , 0 , HwMode ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6e71132e0611a4fc2affa7eb3d92dcdc248ece51 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,23 @@ +void RISCVRegisterInfo :: eliminateFrameIndex ( MachineBasicBlock :: iterator II , int SPAdj , unsigned FIOperandNum , RegScavenger * RS ) const { +assert ( SPAdj == 0 && "Unexpected non-zero SPAdj value" ) ; +MachineInstr & MI = * II ; +MachineFunction & MF = * MI . getParent ( ) -> getParent ( ) ; +MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; +DebugLoc DL = MI . getDebugLoc ( ) ; +const TargetFrameLowering * TFI = MF . getTarget ( ) . getFrameLowering ( ) ; +DebugLoc dl = MI . getDebugLoc ( ) ; +int FrameIndex = MI . getOperand ( FIOperandNum ) . getIndex ( ) ; +Register FrameReg ; +int Offset = getFrameLowering ( MF ) -> getFrameIndexReference ( MF , FrameIndex , FrameReg ) + MI . getOperand ( FIOperandNum + 1 ) . getImm ( ) ; +if ( ! isInt < 16 > ( Offset ) ) { +report_fatal_error ( "Frame offsets outside of the signed 16-bit range not supported" ) ; +} +MachineBasicBlock & MBB = * MI . getParent ( ) ; +unsigned DstReg = MI . getOperand ( 0 ) . getReg ( ) ; +int64_t spOffset = MF . getFrameInfo ( ) -> getObjectOffset ( frameIndex ) ; +bool FrameRegIsKill = true ; +int64_t Offset = spOffset + ( int64_t ) stackSize ; +MI . getOperand ( FIOperandNum ) . ChangeToRegister ( FrameReg , false , false , FrameRegIsKill ) ; +MI . getOperand ( FIOperandNum + 1 ) . ChangeToImmediate ( Offset ) ; +MI . getOperand ( OffsetOperandNo ) . ChangeToImmediate ( Offset ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7240a6a9dab8ad35a7b79f780aa47e7babe7008 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getCallPreservedMask.cpp @@ -0,0 +1,24 @@ +const uint32_t * RISCVRegisterInfo :: getCallPreservedMask ( const MachineFunction & MF , CallingConv :: ID CC ) const { +if ( CC == CallingConv :: GHC ) { +return CSR_NoRegs_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_ILP32 ) { +return CSR_ILP32_LP64_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_LP64 ) { +return CSR_ILP32_LP64_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_ILP32F ) { +return CSR_ILP32F_LP64F_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_LP64F ) { +return CSR_ILP32F_LP64F_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_ILP32D ) { +return CSR_ILP32D_LP64D_RegMask ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_LP64D ) { +return CSR_ILP32D_LP64D_RegMask ; +} +llvm_unreachable ( "Unrecognized ABI" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4ec26207993da3434ec1d081707da2360dd52b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,34 @@ +const MCPhysReg * RISCVRegisterInfo :: getCalleeSavedRegs ( const MachineFunction * MF ) const { +auto & Subtarget = MF -> getSubtarget < RISCVSubtarget > ( ) ; +if ( MF -> getFunction ( ) . getCallingConv ( ) == CallingConv :: GHC ) { +return CSR_NoRegs_SaveList ; +} +if ( MF -> getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +if ( Subtarget . hasStdExtD ( ) ) { +return CSR_XLEN_F64_Interrupt_SaveList ; +} +if ( Subtarget . hasStdExtF ( ) ) { +return CSR_XLEN_F32_Interrupt_SaveList ; +} +return CSR_Interrupt_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_ILP32 ) { +return CSR_ILP32_LP64_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_LP64 ) { +return CSR_ILP32_LP64_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_ILP32F ) { +return CSR_ILP32F_LP64F_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_LP64F ) { +return CSR_ILP32F_LP64F_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_ILP32D ) { +return CSR_ILP32D_LP64D_SaveList ; +} +if ( Subtarget . getTargetABI ( ) == RISCVABI :: ABI_LP64D ) { +return CSR_ILP32D_LP64D_SaveList ; +} +llvm_unreachable ( "Unrecognized ABI" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0d1da0f9acab65b2533040e7a58d12abada064ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,4 @@ +Register RISCVRegisterInfo :: getFrameRegister ( const MachineFunction & MF ) const { +const TargetFrameLowering * TFI = getFrameLowering ( MF ) ; +return TFI -> hasFP ( MF ) ? RISCV :: X8 : RISCV :: X2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed18e1e23c8b7323a731c98382757d9b66fe6247 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getNoPreservedMask.cpp @@ -0,0 +1,3 @@ +const uint32_t * RISCVRegisterInfo :: getNoPreservedMask ( ) const { +return CSR_NoRegs_RegMask ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..742e55bdbc0ddd13dd295ae57342172fec5ebf79 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getPointerRegClass.cpp @@ -0,0 +1,3 @@ +const TargetRegisterClass * getPointerRegClass ( const MachineFunction & MF , unsigned Kind = 0 ) const override { +return & RISCV :: GPRRegClass ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cd8a250163b184f365310dbb6fc8ef74ac264527 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,25 @@ +BitVector RISCVRegisterInfo :: getReservedRegs ( const MachineFunction & MF ) const { +const RISCVFrameLowering * TFI = getFrameLowering ( MF ) ; +BitVector Reserved ( getNumRegs ( ) ) ; +for ( size_t Reg = 0 ; Reg < getNumRegs ( ) ; Reg ++ ) { +if ( MF . getSubtarget < RISCVSubtarget > ( ) . isRegisterReservedByUser ( Reg ) ) { +markSuperRegs ( Reserved , Reg ) ; +} +} +if ( TFI -> hasBP ( MF ) ) { +markSuperRegs ( Reserved , RISCV :: X9 ) ; +} +if ( TFI -> hasFP ( MF ) ) { +markSuperRegs ( Reserved , RISCV :: X8 ) ; +} +markSuperRegs ( Reserved , RISCV :: X0 ) ; +markSuperRegs ( Reserved , RISCV :: X2 ) ; +markSuperRegs ( Reserved , RISCV :: X3 ) ; +markSuperRegs ( Reserved , RISCV :: X4 ) ; +markSuperRegs ( Reserved , RISCV :: VL ) ; +markSuperRegs ( Reserved , RISCV :: VTYPE ) ; +markSuperRegs ( Reserved , RISCV :: VXSAT ) ; +markSuperRegs ( Reserved , RISCV :: VXRM ) ; +assert ( checkAllSuperRegsMarked ( Reserved ) ) ; +return Reserved ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e77772edeb88ec5519eda06ec4fa73fdb724b462 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/hasReservedSpillSlot.cpp @@ -0,0 +1,6 @@ +bool RISCVRegisterInfo :: hasReservedSpillSlot ( const MachineFunction & MF , Register Reg , int & FrameIdx ) const { +const auto * FI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +FrameIdx = FI -> getCRSpillFrameIndex ( ) ; +return true ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..beafac1ae15d09ff2d6444f0795e271d38248a08 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/isAsmClobberable.cpp @@ -0,0 +1,3 @@ +bool RISCVRegisterInfo :: isAsmClobberable ( const MachineFunction & MF , MCRegister PhysReg ) const { +return ! MF . getSubtarget < RISCVSubtarget > ( ) . isRegisterReservedByUser ( PhysReg ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f311d54adc36039b21a9a9e4c68202d764756e8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/isConstantPhysReg.cpp @@ -0,0 +1,5 @@ +bool RISCVRegisterInfo :: isConstantPhysReg ( MCRegister PhysReg ) const { +if ( PhysReg == RISCV :: X0 ) { +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91452a8e068d51b582b56820d11be174835fb85a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/requiresFrameIndexScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresFrameIndexScavenging ( const MachineFunction & MF ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be9254bdaf75d4ec168e9353281ffdaf92a1c0f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,3 @@ +bool requiresRegisterScavenging ( const MachineFunction & MF ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/AsmParser.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/AsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a86c5a557236794fde26bd984c155fdd246cc4f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/AsmParser.cpp @@ -0,0 +1,7 @@ +RISCVAsmParser ( const MCSubtargetInfo & STI , MCAsmParser & Parser , const MCInstrInfo & MII , const MCTargetOptions & Options ) : MCTargetAsmParser ( Options , STI , MII ) { +Parser . addAliasForDirective ( ".half" , ".2byte" ) ; +Parser . addAliasForDirective ( ".hword" , ".2byte" ) ; +Parser . addAliasForDirective ( ".word" , ".4byte" ) ; +Parser . addAliasForDirective ( ".dword" , ".8byte" ) ; +setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/KindTy.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/KindTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..26577a75b88d8eaab0fd8482d40f85ef7b9af5c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/KindTy.cpp @@ -0,0 +1,7 @@ +enum class KindTy { +Token , +Register , +Immediate , +SystemRegister , +VType , +} Kind ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..192e316f9c13c0a47d1c73e87fb4cde3ecc85f5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/LLVMInitializeAsmParser.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmParser ( ) { +RegisterMCAsmParser < RISCVAsmParser > X ( getTheRISCV32Target ( ) ) ; +RegisterMCAsmParser < RISCVAsmParser > Y ( getTheRISCV64Target ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f57f3b02768f7166fc1eda00735ec9416eeb2930 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/MatchAndEmitInstruction.cpp @@ -0,0 +1,166 @@ +bool RISCVAsmParser :: MatchAndEmitInstruction ( SMLoc IDLoc , unsigned & Opcode , OperandVector & Operands , MCStreamer & Out , uint64_t & ErrorInfo , bool MatchingInlineAsm ) { +MCInst Inst ; +FeatureBitset MissingFeatures ; +auto Result = MatchInstructionImpl ( Operands , Inst , ErrorInfo , MissingFeatures , MatchingInlineAsm ) ; +if ( Result == Match_Success ) { +if ( validateInstruction ( Inst , Operands ) ) { +return true ; +} +return processInstruction ( Inst , IDLoc , Operands , Out ) ; +} +if ( Result == Match_MissingFeature ) { +assert ( MissingFeatures . any ( ) && "Unknown missing features!" ) ; +bool FirstFeature = true ; +std :: string Msg = "instruction requires the following:" ; +for ( unsigned i = 0 , e = MissingFeatures . size ( ) ; i != e ; ++ i ) { +if ( MissingFeatures [ i ] ) { +Msg = Msg + FirstFeature ? " " : ", " ; +Msg = Msg + getSubtargetFeatureName ( i ) ; +FirstFeature = false ; +} +} +return Error ( IDLoc , Msg ) ; +} +if ( Result == Match_MnemonicFail ) { +FeatureBitset FBS = ComputeAvailableFeatures ( getSTI ( ) . getFeatureBits ( ) ) ; +std :: string Suggestion = RISCVMnemonicSpellCheck ( ( ( RISCVOperand & ) * Operands [ 0 ] ) . getToken ( ) , FBS ) ; +return Error ( IDLoc , "unrecognized instruction mnemonic" + Suggestion ) ; +} +if ( Result == Match_InvalidOperand ) { +SMLoc ErrorLoc = IDLoc ; +if ( ErrorInfo != ~ 0ULL ) { +if ( ErrorInfo >= Operands . size ( ) ) { +return Error ( ErrorLoc , "too few operands for instruction" ) ; +} +ErrorLoc = ( ( RISCVOperand & ) * Operands [ ErrorInfo ] ) . getStartLoc ( ) ; +if ( ErrorLoc == SMLoc ( ) ) { +ErrorLoc = IDLoc ; +} +} +return Error ( ErrorLoc , "invalid operand for instruction" ) ; +} +if ( Result > FIRST_TARGET_MATCH_RESULT_TY ) { +SMLoc ErrorLoc = IDLoc ; +if ( ErrorInfo != ~ 0ULL ) { +if ( ErrorInfo >= Operands . size ( ) ) { +return Error ( ErrorLoc , "too few operands for instruction" ) ; +} +} +} +if ( Result == Match_RequiresMsbNotLessThanLsb ) { +SMLoc ErrorStart = Operands [ 3 ] -> getStartLoc ( ) ; +return Error ( ErrorStart , "msb is less than lsb" , SMRange ( ErrorStart , Operands [ 4 ] -> getEndLoc ( ) ) ) ; +} +if ( Result == Match_RequiresOpnd2NotR0R1 ) { +return Error ( Operands [ 2 ] -> getStartLoc ( ) , "must not be $r0 or $r1" ) ; +} +if ( Result == Match_InvalidUImm2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 2 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm2plus1 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 1 , ( 1 << 2 ) ) ; +} +if ( Result == Match_InvalidUImm3 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 3 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm5 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 5 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm6 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 6 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 12 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidUImm15 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , 0 , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm12 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 11 ) , ( 1 << 11 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm14lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 15 ) , ( 1 << 15 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 15 ) , ( 1 << 15 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm16lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 17 ) , ( 1 << 17 ) - 1 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm20 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 19 ) , ( 1 << 19 ) - 1 ) ; +} +if ( Result == Match_InvalidSImm21lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 22 ) , ( 1 << 22 ) - 4 , "immediate must be a multiple of 4 in the range" ) +} +if ( Result == Match_InvalidSImm21lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 22 ) , ( 1 << 22 ) - 4 , "immediate must be a multiple of 4 in the range" ) +} +if ( Result == Match_InvalidSImm21lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 22 ) , ( 1 << 22 ) - 4 , "immediate must be a multiple of 4 in the range" ) +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +if ( Result == Match_InvalidSImm26lsl2 ) { +return generateImmOutOfRangeError ( Operands , ErrorInfo , - ( 1 << 27 ) , ( 1 << 27 ) - 4 , "immediate must be a multiple of 4 in the range" ) ; +} +llvm_unreachable ( "Unknown match type detected!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/Operand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/Operand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa4acadd0b0b5bf6a3b5c36a8fee02f45e28be93 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/Operand.cpp @@ -0,0 +1,2 @@ +RISCVOperand ( KindTy K ) : MCParsedAsmOperand ( ) , Kind ( K ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/Operand2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/Operand2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..086baba405c7dc571781a34231424e8f88aec36f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/Operand2.cpp @@ -0,0 +1,16 @@ +RISCVOperand ( const RISCVOperand & o ) : MCParsedAsmOperand ( ) { +Kind = o . Kind ; +StartLoc = o . StartLoc ; +EndLoc = o . EndLoc ; +if ( Kind == KindTy :: Register ) { +Reg = o . Reg ; +} +if ( Kind == KindTy :: Immediate ) { +} +if ( Kind == KindTy :: Token ) { +} +if ( Kind == KindTy :: SystemRegister ) { +} +if ( Kind == KindTy :: VType ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3db3fed1932a2e522de573f811c2594bfc35e130 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseDirective.cpp @@ -0,0 +1,10 @@ +bool RISCVAsmParser :: ParseDirective ( AsmToken DirectiveID ) { +StringRef IDVal = DirectiveID . getString ( ) ; +if ( IDVal == ".option" ) { +return ParseDirectiveHSACodeObjectVersion ( ) ; +} +if ( IDVal == ".attribute" ) { +return ParseDirectiveHSACodeObjectISA ( ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39de644cbfebfa23c47161c1c06301a1b733d382 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseInstruction.cpp @@ -0,0 +1,22 @@ +bool RISCVAsmParser :: ParseInstruction ( ParseInstructionInfo & Info , StringRef Name , SMLoc NameLoc , OperandVector & Operands ) { +Operands . push_back ( RISCVOperand :: createToken ( Name , NameLoc ) ) ; +if ( getLexer ( ) . is ( AsmToken :: EndOfStatement ) ) { +return false ; +} +if ( parseOperand ( Operands ) ) { +return true ; +} +for ( ; getLexer ( ) . is ( AsmToken :: Comma ) ; ) { +getLexer ( ) . Lex ( ) ; +if ( parseOperand ( Operands ) ) { +return true ; +} +} +if ( getLexer ( ) . isNot ( AsmToken :: EndOfStatement ) ) { +SMLoc Loc = getLexer ( ) . getLoc ( ) ; +getParser ( ) . eatToEndOfStatement ( ) ; +return Error ( Loc , "unexpected token" ) ; +} +getParser ( ) . Lex ( ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f2f165eeb5dd80092bfd0eac08bd4ba9f623891c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/ParseRegister.cpp @@ -0,0 +1,6 @@ +bool RISCVAsmParser :: ParseRegister ( unsigned & RegNo , SMLoc & StartLoc , SMLoc & EndLoc ) { +if ( tryParseRegister ( RegNo , StartLoc , EndLoc ) != MatchOperand_Success ) { +return Error ( StartLoc , "invalid register name" ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b014312f9d2f313df503bedb185eeb4e023460b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addCSRSystemRegisterOperands.cpp @@ -0,0 +1,4 @@ +void addCSRSystemRegisterOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createImm ( SysReg . Encoding ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d49a50577b415d6d67804de0d5a2e050afd3b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addExpr.cpp @@ -0,0 +1,12 @@ +void addExpr ( MCInst & Inst , const MCExpr * Expr ) const { +assert ( Expr && "Expr shouldn't be null!" ) ; +int64_t Imm = 0 ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +bool IsConstant = evaluateConstantImm ( Expr , Imm , VK ) ; +if ( IsConstant ) { +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +} +if ( ! IsConstant ) { +Inst . addOperand ( MCOperand :: createExpr ( Expr ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1c7cefcbc2a13fab240d8157c57ba776c7be3f75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addFRMArgOperands.cpp @@ -0,0 +1,4 @@ +void addFRMArgOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createImm ( getRoundingMode ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4568edfef1f2d1cd993ef7944449029b211f1b7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addFenceArgOperands.cpp @@ -0,0 +1,6 @@ +void addFenceArgOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +const MCConstantExpr * CE = cast < MCConstantExpr > ( getImm ( ) ) ; +unsigned RegNum = getCondCode ( ) == RISCVCC :: AL ? 0 : RISCV :: CPSR ; +Inst . addOperand ( MCOperand :: createReg ( RegNum ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8eba21454fa5e4a4bfc9ff898d4e04daf6f0ea8b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addImmOperands.cpp @@ -0,0 +1,4 @@ +void addImmOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +addExpr ( Inst , getImm ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b214ebb9cbbf9f71b9975893c8d9359e39b9d067 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addRegOperands.cpp @@ -0,0 +1,4 @@ +void addRegOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createReg ( getReg ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3348483b699c85655a59ab63bb64559976801bd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/addVTypeIOperands.cpp @@ -0,0 +1,4 @@ +void addVTypeIOperands ( MCInst & Inst , unsigned N ) const { +assert ( N == 1 && "Invalid number of operands!" ) ; +Inst . addOperand ( MCOperand :: createImm ( getVType ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0835d389c5c6c3d548376d2dc2f280d2e4eb1bae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/classifySymbolRef.cpp @@ -0,0 +1,20 @@ +bool RISCVAsmParser :: classifySymbolRef ( const MCExpr * Expr , MCExpr :: VariantKind & Kind , ) { +Addend = 0 ; +if ( const RISCVMCExpr * AE = dyn_cast < RISCVMCExpr > ( Expr ) ) { +ELFRefKind = AE -> getKind ( ) ; +Expr = AE -> getSubExpr ( ) ; +} +if ( SE ) { +return true ; +MCValue Res ; +bool Relocatable = Expr -> evaluateAsRelocatable ( Res , nullptr , nullptr ) ; +if ( ! Relocatable ) { +return false ; +} +if ( ! Res . getSymA ( ) ) { +return false ; +if ( Res . getSymB ( ) ) { +return false ; +Addend = Res . getConstant ( ) ; +return ELFRefKind == RISCVMCExpr :: VK_INVALID || DarwinRefKind == MCSymbolRefExpr :: VK_RISCV_None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24169e0ef75323e8421848c07cc538db6e6b6abd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR16.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR16 ( MCRegister Reg ) { +assert ( Reg >= RISCV :: F0_D && Reg <= RISCV :: F31_D && "Invalid register" ) ; +return Reg - RISCV :: F0_D + RISCV :: F0_H ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f96b5202f11ef1aa8cc90197f2434f6b414ebae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/convertFPR64ToFPR32.cpp @@ -0,0 +1,4 @@ +static MCRegister convertFPR64ToFPR32 ( MCRegister Reg ) { +assert ( Reg >= RISCV :: F0_D && Reg <= RISCV :: F31_D && "Invalid register" ) ; +return Reg - RISCV :: F0_D + RISCV :: F0_F ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c49656e851eb59e931c7d01366afdae9f3149dd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createImm.cpp @@ -0,0 +1,8 @@ +static std :: unique_ptr < RISCVOperand > createImm ( const MCExpr * Val , SMLoc S , SMLoc E , bool IsRV64 ) { +auto Op = std :: make_unique < RISCVOperand > ( KindTy :: Immediate ) ; +Op -> Imm . Val = Val ; +Op -> StartLoc = S ; +Op -> EndLoc = E ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d347bc39004e628b6ecde6295ee09a1f58e4dc6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createReg.cpp @@ -0,0 +1,8 @@ +static std :: unique_ptr < RISCVOperand > createReg ( unsigned RegNo , SMLoc S , SMLoc E , bool IsRV64 ) { +auto Op = std :: make_unique < RISCVOperand > ( KindTy :: Register ) ; +Op -> Reg . RegNum = RegNo ; +Op -> StartLoc = S ; +Op -> EndLoc = E ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createSysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cb45636e0f1c1175181524b450aa3f9b5609c970 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createSysReg.cpp @@ -0,0 +1,10 @@ +static std :: unique_ptr < RISCVOperand > createSysReg ( StringRef Str , SMLoc S , unsigned Encoding , bool IsRV64 ) { +auto Op = std :: make_unique < RISCVOperand > ( KindTy :: SystemRegister ) ; +Op -> SysReg . Data = Str . data ( ) ; +Op -> SysReg . Length = Str . size ( ) ; +Op -> SysReg . Encoding = Encoding ; +Op -> StartLoc = S ; +Op -> EndLoc = S ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createToken.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..555bd8bf39d3e50bfcb4f014482b733a55d09896 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createToken.cpp @@ -0,0 +1,8 @@ +static std :: unique_ptr < RISCVOperand > createToken ( StringRef Str , SMLoc S , bool IsRV64 ) { +auto Op = std :: make_unique < RISCVOperand > ( KindTy :: Token ) ; +Op -> Tok = Str ; +Op -> StartLoc = S ; +Op -> EndLoc = S ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createVType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05acc68d6da5e321fcab471e59a7d688ea5817fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/createVType.cpp @@ -0,0 +1,7 @@ +static std :: unique_ptr < RISCVOperand > createVType ( unsigned VTypeI , SMLoc S , bool IsRV64 ) { +auto Op = std :: make_unique < RISCVOperand > ( KindTy :: VType ) ; +Op -> VType . Val = VTypeI ; +Op -> StartLoc = S ; +Op -> IsRV64 = IsRV64 ; +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e89b565eaea9d2767590dd9e99669173f3f03dfa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/defaultMaskRegOp.cpp @@ -0,0 +1,3 @@ +std :: unique_ptr < RISCVOperand > RISCVAsmParser :: defaultMaskRegOp ( ) const { +return RISCVOperand :: createImm ( this , 0 , SMLoc ( ) , RISCVOperand :: ImmTyDLC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d2ffe597ac05b9d91576ef723a462e4cb99122a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/emitToStreamer.cpp @@ -0,0 +1,9 @@ +void RISCVAsmParser :: emitToStreamer ( MCStreamer & S , const MCInst & Inst ) { +MCInst CInst ; +bool Res = false ; +Res = compressInst ( CInst , Inst , getSTI ( ) , S . getContext ( ) ) ; +if ( Res ) { +RISCVNumInstrsCompressed = RISCVNumInstrsCompressed + 1 ; +} +S . emitInstruction ( ( Res ? CInst : Inst ) , getSTI ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d3a2a265507019314316ce57f872d67180347fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/evaluateConstantImm.cpp @@ -0,0 +1,12 @@ +static bool evaluateConstantImm ( const MCExpr * Expr , int64_t & Imm , RISCVMCExpr :: VariantKind & VK ) const { +if ( auto * RE = dyn_cast < RISCVMCExpr > ( Expr ) ) { +VK = RE -> getKind ( ) ; +return RE -> evaluateAsConstant ( Imm ) ; +} +if ( auto CE = dyn_cast < MCConstantExpr > ( Expr ) ) { +VK = RISCVMCExpr :: VK_RISCV_None ; +Imm = CE -> getValue ( ) ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp new file mode 100644 index 0000000000000000000000000000000000000000..001aedf0e0b037067d6361233363876127444c7d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/generateImmOutOfRangeError.cpp @@ -0,0 +1,4 @@ +bool RISCVAsmParser :: generateImmOutOfRangeError ( OperandVector & Operands , uint64_t ErrorInfo , int64_t Lower , int64_t Upper , Twine Msg = "immediate must be an integer in the range" ) { +SMLoc ErrorLoc = ( ( RISCVOperand & ) * Operands [ ErrorInfo ] ) . getStartLoc ( ) ; +return Error ( ErrorLoc , Msg + " [" + Twine ( Lower ) + ", " + Twine ( Upper ) + "]" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e37ce2784f719036de35e1f8d8504cae1121c2bc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getEndLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getEndLoc ( ) const override { +return EndLoc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..080034f18946182156ba430e043bdb8f9e5689a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getFeatureBits.cpp @@ -0,0 +1,3 @@ +bool getFeatureBits ( uint64_t Feature ) { +return getSTI ( ) . getFeatureBits ( ) [ Feature ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a295b3267dd5db0827725099e6a0db869691db64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getImm.cpp @@ -0,0 +1,4 @@ +const MCExpr * getImm ( ) const { +assert ( Kind == KindTy :: Immediate && "Invalid type access!" ) ; +return Imm . Val ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getLoc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35c966acc0c7ad3f7a0e321c17de19bd2ea70c74 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getLoc ( ) const { +return getParser ( ) . getTok ( ) . getLoc ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..462f8d464a8e61f2fabbd74202b7d383d8eb9362 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getReg.cpp @@ -0,0 +1,4 @@ +unsigned getReg ( ) const override { +assert ( Kind == KindTy :: Register && "Invalid type access!" ) ; +return Reg . RegNum . id ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de24b7fc6b7408ca24cd1ebfe5d1ca9723fbe819 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getRoundingMode.cpp @@ -0,0 +1,3 @@ +RISCVFPRndMode :: RoundingMode getRoundingMode ( ) const { +return ( MI . getDesc ( ) . TSFlags >> RISCVII :: AddrModePos ) & RISCVII :: AddrModeMask ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..07cb9bb6e768b7938b667280b2a7b15561f5e6a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getStartLoc.cpp @@ -0,0 +1,3 @@ +SMLoc getStartLoc ( ) const override { +return StartLoc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getSysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getSysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a1ebf9426b9608f4137ea7501f3b08bfab0d3808 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getSysReg.cpp @@ -0,0 +1,4 @@ +StringRef getSysReg ( ) const { +assert ( Kind == KindTy :: SystemRegister && "Invalid type access!" ) ; +return StringRef ( SysReg . Data , SysReg . Length ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2299ed2126abc10e946f1e7b5279458e8ba1702b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getTargetStreamer.cpp @@ -0,0 +1,4 @@ +RISCVTargetStreamer & getTargetStreamer ( ) { +MCTargetStreamer & TS = * getParser ( ) . getStreamer ( ) . getTargetStreamer ( ) ; +return static_cast < RISCVTargetStreamer & > ( TS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getToken.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ac25596a2291a838d72813f271e931ccf4073a7d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getToken.cpp @@ -0,0 +1,4 @@ +StringRef getToken ( ) const { +assert ( Kind == KindTy :: Token && "Invalid type access!" ) ; +return Tok ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getVType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f576808a24bb8b7dbf54d64605d91a3963ced115 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/getVType.cpp @@ -0,0 +1,4 @@ +unsigned getVType ( ) const { +assert ( Kind == KindTy :: VType && "Invalid type access!" ) ; +return VType . Val ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ec73ffd582eed6cca1c17ecafb95eaf880334dc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isBareSimmNLsb0.cpp @@ -0,0 +1,13 @@ +template < int N > bool isBareSimmNLsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +int64_t Imm ; +bool IsValid ; +IsValid = isShiftedInt < N - 1 , 1 > ( Imm ) ; +} +IsValid = RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) ; +} +return IsValid && VK == RISCVMCExpr :: VK_RISCV_None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2aad3be461d6eace2f023d2bf3eca117e37e57d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isBareSymbol.cpp @@ -0,0 +1,14 @@ +bool isBareSymbol ( ) const { +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91dae47ea7fee123dc58b56fce1e03eb8a399dcf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCLUIImm.cpp @@ -0,0 +1,11 @@ +bool isCLUIImm ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return ( Imm != 0 ) && ( isUInt < 5 > ( Imm ) || ( Imm >= 0xfffe0 && Imm <= 0xfffff ) ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79a474c7b17dcd11436567b0a61bfa51e62dc75f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCSRSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isCSRSystemRegister ( ) const { +return Kind == KindTy :: SystemRegister ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fdf3ffb54a06c01710ac46d8b30186f47136d891 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isCallSymbol.cpp @@ -0,0 +1,11 @@ +bool isCallSymbol ( ) const { +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == RISCVMCExpr :: VK_RISCV_CALL || VK == RISCVMCExpr :: VK_RISCV_CALL_PLT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31a6c3beb5eae984e9dce91f643307e2a26d6593 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isFRMArg.cpp @@ -0,0 +1,5 @@ +bool isFRMArg ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2677e25f34f570a7edeae8b7b906179ea9295293 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isFenceArg.cpp @@ -0,0 +1,5 @@ +bool isFenceArg ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isGPR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isGPR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..787bd50e91ed60f013f12074fdc474208365e761 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isGPR.cpp @@ -0,0 +1,3 @@ +bool isGPR ( ) const { +return Kind == KindTy :: Register && RISCVMCRegisterClasses [ RISCV :: GPRRegClassID ] . contains ( Reg . RegNum ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64ea89f602caa02e1bd59a59834d9a28d2bb6af7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isImm.cpp @@ -0,0 +1,3 @@ +bool isImm ( ) const override { +return Kind == KindTy :: Immediate ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..096bdbe2352ebf980f84d58886ea67b223baf081 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isImmXLenLI.cpp @@ -0,0 +1,11 @@ +bool isImmXLenLI ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == RISCVMCExpr::VK_RISCV_LO || VK == RISCVMCExpr::VK_RISCV_PCREL_LO || VK == RISCVMCExpr::VK_RISCV_None && (isRV64() || (isInt<32>(Imm) || isUInt<32>(Imm))) ; +} +return VK == RISCVMCExpr :: VK_RISCV_LO || VK == RISCVMCExpr :: VK_RISCV_PCREL_LO ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isMem.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isMem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbe89a41bb139dfc739a67a4bac398d6d354d13e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isMem.cpp @@ -0,0 +1,3 @@ +bool isMem ( ) const override { +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e6d5f388818dc3fa82defda1d6a7bab6dfc3a85 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isPseudoJumpSymbol.cpp @@ -0,0 +1,11 @@ +bool isPseudoJumpSymbol ( ) const { +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_CALL ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV32E.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36b04b2740c389d1272dddb7081aff3306a4d29b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E ( ) const { +return getSTI ( ) . hasFeature ( RISCV :: FeatureRV32E ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4c9963cb5cfcc788a16b2e5a4174572ea86ebab --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV64-2.cpp @@ -0,0 +1,3 @@ +bool isRV64 ( ) const { +return getSTI ( ) . hasFeature ( RISCV :: Feature64Bit ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV64.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b8327f239930562cfd20ff962aeefd2b2c8d911 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isRV64.cpp @@ -0,0 +1,3 @@ +bool isRV64 ( ) const { +return IsRV64 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..574f31b9597b3a47ea097df3635d56d107ec07ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isReg.cpp @@ -0,0 +1,3 @@ +bool isReg ( ) const override { +return Kind == KindTy :: Register ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce65543183c407964fc4cb1f70d43bb3f74ce823 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm10Lsb0000NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm10Lsb0000NonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return ( Imm != 0 ) && isShiftedInt < 6 , 4 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm12.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f499477f292a10bae67d14fa6f8fda19d864451 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm12.cpp @@ -0,0 +1,14 @@ +bool isSImm12 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt<12>(Imm) && (VK == RISCVMCExpr::VK_RISCV_None || VK == RISCVMCExpr::VK_RISCV_LO || VK == RISCVMCExpr::VK_RISCV_PCREL_LO || VK == RISCVMCExpr::VK_RISCV_TPREL_LO) ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == RISCVMCExpr :: VK_RISCV_LO || VK == RISCVMCExpr :: VK_RISCV_PCREL_LO || VK == RISCVMCExpr :: VK_RISCV_TPREL_LO ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a20346ee23a2c1a4c0e83d3d185aa648e3f5b909 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm12Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm12Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 11 , 1 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..847dabb3f59066c7129e3aed3c543462b1437ae3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm13Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm13Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 12 , 1 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..467c562fffb3f6c9778bf32aead8d41d9ab95b44 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm21Lsb0JAL.cpp @@ -0,0 +1,14 @@ +bool isSImm21Lsb0JAL ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 20 , 1 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f0a1a807774cc7eb36d5f3881828e5721e83a89f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm5.cpp @@ -0,0 +1,11 @@ +bool isSImm5 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt < 5 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f1a73a5d4d7796abed063e73b1ebdd6cdadd4d47 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm5Plus1.cpp @@ -0,0 +1,11 @@ +bool isSImm5Plus1 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt < 5 > ( Imm - 1 ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm6.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm6.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c39e40102920ed529fccc0a1fd06995b18691898 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm6.cpp @@ -0,0 +1,11 @@ +bool isSImm6 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt < 6 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46457438d4851d77ee1c69b1ea96e34006d91936 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm6NonZero.cpp @@ -0,0 +1,11 @@ +bool isSImm6NonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isInt<6>(Imm) && (Imm != 0) && VK == RISCVMCExpr::VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de5c79dd364671ac04324387dbd67ea515aadfc3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSImm9Lsb0.cpp @@ -0,0 +1,14 @@ +bool isSImm9Lsb0 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedInt < 8 , 1 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2b5c274c624fa3378b43fcdd1feb3fd91cc3ce4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isSystemRegister.cpp @@ -0,0 +1,3 @@ +bool isSystemRegister ( ) const { +return Kind == KindTy :: SystemRegister ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e9559676426c90045b5599ca30e9a6464af1829 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isTPRelAddSymbol.cpp @@ -0,0 +1,14 @@ +bool isTPRelAddSymbol ( ) const { +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return false ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && VK == RISCVMCExpr :: VK_RISCV_TPREL_ADD ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isToken.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isToken.cpp new file mode 100644 index 0000000000000000000000000000000000000000..765ad841fd47a89abdd004cc3850313674615334 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isToken.cpp @@ -0,0 +1,3 @@ +bool isToken ( ) const override { +return Kind == KindTy :: Token ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..43eca991b15a3c62b9805fd1a4bbcf5a1e5cb543 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm10Lsb00NonZero.cpp @@ -0,0 +1,11 @@ +bool isUImm10Lsb00NonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 8 , 2 > ( Imm ) && ( Imm != 0 ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea45806aaf5369ff93cc6d54cbe6a930c2128af8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm20AUIPC.cpp @@ -0,0 +1,14 @@ +bool isUImm20AUIPC ( ) const { +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt<20>(Imm) && (VK == RISCVMCExpr::VK_RISCV_None || VK == RISCVMCExpr::VK_RISCV_PCREL_HI || VK == RISCVMCExpr::VK_RISCV_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GOT_HI || VK == RISCVMCExpr::VK_RISCV_TLS_GD_HI) ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == RISCVMCExpr :: VK_RISCV_PCREL_HI || VK == RISCVMCExpr :: VK_RISCV_GOT_HI || VK == RISCVMCExpr :: VK_RISCV_TLS_GOT_HI || VK == RISCVMCExpr :: VK_RISCV_TLS_GD_HI ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..477fda5e65cd14715a59f28945e312eba9fd2713 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm20LUI.cpp @@ -0,0 +1,14 @@ +bool isUImm20LUI ( ) const { +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( ! isImm ( ) ) { +return false ; +} +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 20 > ( Imm ) && ( VK == RISCVMCExpr :: VK_RISCV_None || VK == RISCVMCExpr :: VK_RISCV_HI || VK == RISCVMCExpr :: VK_RISCV_TPREL_HI ) ; +} +if ( ! evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return RISCVAsmParser :: classifySymbolRef ( getImm ( ) , VK ) && ( VK == RISCVMCExpr :: VK_RISCV_HI || VK == RISCVMCExpr :: VK_RISCV_TPREL_HI ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2c3a2dfa2068ac84c7ba9238b70d2b6ca5907d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm5.cpp @@ -0,0 +1,11 @@ +bool isUImm5 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isUInt < 5 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f46e5d90c0f0ae1ba4cb1d4dcf08bcf9fa1fcc1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm7Lsb00.cpp @@ -0,0 +1,11 @@ +bool isUImm7Lsb00 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 5 , 2 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp new file mode 100644 index 0000000000000000000000000000000000000000..beb1b5a5774dde0fef0aacb5d9290c3318b49a06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm8Lsb00.cpp @@ -0,0 +1,11 @@ +bool isUImm8Lsb00 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 6 , 2 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3da771073a66c7847a8188c4d1bdc2bfa6daae3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm8Lsb000.cpp @@ -0,0 +1,11 @@ +bool isUImm8Lsb000 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 5 , 3 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f19dc0df26f186737e1afb1b8455d20a6c40dc95 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImm9Lsb000.cpp @@ -0,0 +1,11 @@ +bool isUImm9Lsb000 ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return isShiftedUInt < 6 , 3 > ( Imm ) && VK == RISCVMCExpr :: VK_RISCV_None ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20aa6e9f965b6377569fd23c932904800fd5d220 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLen.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLen ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == RISCVMCExpr :: VK_RISCV_None && ( ( isRV64 ( ) && isUInt < 6 > ( Imm ) ) || isUInt < 5 > ( Imm ) ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6b2472887895d47c6cf1e822e58a3eac3ccf124 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenHalf.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenHalf ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == RISCVMCExpr :: VK_RISCV_None && ( ( isRV64 ( ) && isUInt < 5 > ( Imm ) ) || isUInt < 4 > ( Imm ) ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e9183f91d4ba6a9794d5d7f134b9b4945cb0a228 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isUImmLog2XLenNonZero.cpp @@ -0,0 +1,11 @@ +bool isUImmLog2XLenNonZero ( ) const { +if ( ! isImm ( ) ) { +return false ; +} +int64_t Imm ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: VK_RISCV_None ; +if ( evaluateConstantImm ( getImm ( ) , Imm , VK ) ) { +return VK == RISCVMCExpr :: VK_RISCV_None && Imm && ( ( isRV64 ( ) && isUInt < 6 > ( Imm ) ) || isUInt < 5 > ( Imm ) ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a92c8791c349da4f026754dae3ec38d1193d9d7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isV0Reg.cpp @@ -0,0 +1,3 @@ +bool isV0Reg ( ) const override { +return Kind == KindTy :: Register && Reg . RegNum == RISCV :: V0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isVType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isVType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..858133aed67c3eb7ce07c8f10dc3ca4fb5309a37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isVType.cpp @@ -0,0 +1,3 @@ +bool isVType ( ) const { +return Kind == KindTy :: VType ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2514871342beee8b97897aa604e92fab3063408a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/isVTypeI.cpp @@ -0,0 +1,3 @@ +bool isVTypeI ( ) const { +return Kind == KindTy :: VType ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5004edcd18a3fb0ddadbc6dcaa383cc595c4d952 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/matchRegisterNameHelper.cpp @@ -0,0 +1,7 @@ +static bool matchRegisterNameHelper ( bool IsRV32E , MCRegister & RegNo , StringRef Name ) { +RegNo = MatchRegisterName ( Name ) ; +if ( RegNo == RISCV :: NoRegister ) { +RegNo = MatchRegisterAltName ( Name ) ; +} +return RegNo == RISCV :: NoRegister ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6591e7c9aa5c818786ab79e1a3bcd8470211792 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseAtomicMemOp.cpp @@ -0,0 +1,19 @@ +OperandMatchResultTy RISCVAsmParser :: parseAtomicMemOp ( OperandVector & Operands ) { +if ( getLexer ( ) . isNot ( AsmToken :: LParen ) ) { +Error ( getLoc ( ) , "expected '('" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( RISCVOperand :: createToken ( "(" , getLoc ( ) ) ) ; +if ( parseRegister ( Operands ) != MatchOperand_Success ) { +Error ( getLoc ( ) , "expected register" ) ; +return MatchOperand_ParseFail ; +} +if ( getLexer ( ) . isNot ( AsmToken :: RParen ) ) { +Error ( getLoc ( ) , "expected ')'" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( RISCVOperand :: createToken ( ")" , getLoc ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c24b1e25320352042226b0fd9d0dddcd1d63bd91 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseBareSymbol.cpp @@ -0,0 +1,56 @@ +OperandMatchResultTy RISCVAsmParser :: parseBareSymbol ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +return MatchOperand_ParseFail ; +} +MCExpr :: VariantKind Kind = RISCVMCExpr :: VK_RISCV_None ; +if ( Identifier . consume_back ( "@plt" ) ) { +Error ( getLoc ( ) , "'@plt' operand not valid for instruction" ) ; +return MatchOperand_ParseFail ; +} +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +return MatchOperand_NoMatch ; +} +Res = V ; +} +if ( ! Sym -> isVariable ( ) ) { +} +MCBinaryExpr :: Opcode Opcode ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +Opcode = MCBinaryExpr :: Add ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +} +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +Opcode = MCBinaryExpr :: Sub ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +} +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( Kind != RISCVMCExpr :: VK_RISCV_Invalid ) { +Res = RISCVMCExpr :: create ( Res , Kind , getContext ( ) ) ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..059c1b534b6c01d6277e0c1b118b5e06c63dd6ba --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseCSRSyestemRegister.cpp @@ -0,0 +1,4 @@ +OperandMatchResultTy RISCVAsmParser :: parseCSRSystemRegister ( OperandVector & Operands , bool AllowParens ) { +SMLoc S = getLoc ( ) ; +return MatchOperand_NoMatch ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3c140063e49a7ebbf204cb3fbd292f003a9ddeb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseCallSymbol.cpp @@ -0,0 +1,46 @@ +OperandMatchResultTy RISCVAsmParser :: parseCallSymbol ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +return MatchOperand_ParseFail ; +} +MCExpr :: VariantKind Kind = RISCVMCExpr :: VK_RISCV_None ; +if ( Identifier . consume_back ( "@plt" ) ) { +Kind = RISCVMCExpr :: VK_CALL_PLT ; +} +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +return MatchOperand_ParseFail ; +if ( ! Sym -> isVariable ( ) ) { +MCBinaryExpr :: Opcode Opcode ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +Opcode = MCBinaryExpr :: Add ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +Opcode = MCBinaryExpr :: Sub ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( Kind != RISCVMCExpr :: VK_RISCV_None ) { +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62afeeb9658dad4d9fa7f134cdfb883d77ea53bf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseImmediate.cpp @@ -0,0 +1,72 @@ +OperandMatchResultTy RISCVAsmParser :: parseImmediate ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: LParen ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Integer ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: String ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Identifier ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Dot ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Tilde ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Exclaim ) { +if ( getParser ( ) . parseExpression ( Res ) ) { +return MatchOperand_ParseFail ; +} +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} +if ( getLexer ( ) . getKind ( ) == AsmToken :: Percent ) { +return parseOperandWithModifier ( Operands ) ; +} +return MatchOperand_NoMatch ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e9ac8c17b8e92448e526b1f456f328e85bd9df01 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseJALOffset.cpp @@ -0,0 +1,31 @@ +OperandMatchResultTy RISCVAsmParser :: parseJALOffset ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +return MatchOperand_ParseFail ; +if ( Sym -> isVariable ( ) ) { +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +return MatchOperand_ParseFail ; +if ( ! Sym -> isVariable ( ) ) { +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +return MatchOperand_ParseFail ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..37d07db50fc1f55972abfa0142398b880d70a8c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseMaskReg.cpp @@ -0,0 +1,16 @@ +OperandMatchResultTy RISCVAsmParser :: parseMaskReg ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Name = getLexer ( ) . getTok ( ) . getIdentifier ( ) ; +MCRegister RegNo ; +matchRegisterNameHelper ( RegNo , Name ) ; +if ( RegNo == RISCV :: NoRegister ) { +return MatchOperand_NoMatch ; +} +getLexer ( ) . Lex ( ) ; +Operands . push_back ( RISCVOperand :: createReg ( RegNo , S , E ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57a16411610f177fb51e4937d2c79c0980f53667 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseMemOpBaseReg.cpp @@ -0,0 +1,19 @@ +OperandMatchResultTy RISCVAsmParser :: parseMemOpBaseReg ( OperandVector & Operands ) { +if ( getLexer ( ) . isNot ( AsmToken :: LParen ) ) { +Error ( getLoc ( ) , "expected '('" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( RISCVOperand :: createToken ( "(" , getLoc ( ) , isRV64 ( ) ) ) ; +if ( parseRegister ( Operands ) != MatchOperand_Success ) { +Error ( getLoc ( ) , "expected register" ) ; +return MatchOperand_ParseFail ; +} +if ( getLexer ( ) . isNot ( AsmToken :: RParen ) ) { +Error ( getLoc ( ) , "expected ')'" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +Operands . push_back ( RISCVOperand :: createToken ( ")" , getLoc ( ) , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2fa93104ba95d2a88e11d695b47e7d9c90d860eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseOperand.cpp @@ -0,0 +1,20 @@ +bool RISCVAsmParser :: parseOperand ( OperandVector & Operands , StringRef Mnemonic ) { +OperandMatchResultTy Result = MatchOperandParserImpl ( Operands , Mnemonic , true ) ; +if ( Result == MatchOperand_Success ) { +return false ; +} +if ( Result == MatchOperand_ParseFail ) { +return true ; +} +if ( parseRegister ( Operands , true ) == MatchOperand_Success ) { +return false ; +} +if ( parseImmediate ( Operands ) == MatchOperand_Success ) { +if ( getLexer ( ) . is ( AsmToken :: LParen ) ) { +return parseMemOpBaseReg ( Operands ) != MatchOperand_Success ; +} +return false ; +} +Error ( getLoc ( ) , "unknown operand" ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b00d17f0926f8e5e0df9dad63b4769dcfa6027cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseOperandWithModifier.cpp @@ -0,0 +1,32 @@ +OperandMatchResultTy RISCVAsmParser :: parseOperandWithModifier ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Percent ) { +Error ( getLoc ( ) , "expected '%' for operand modifier" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +Error ( getLoc ( ) , "expected valid identifier for operand modifier" ) ; +return MatchOperand_ParseFail ; +} +StringRef Identifier = getParser ( ) . getTok ( ) . getIdentifier ( ) ; +RISCVMCExpr :: VariantKind VK = RISCVMCExpr :: getVariantKindForName ( Identifier ) ; +if ( VK == RISCVMCExpr :: VK_RISCV_Invalid ) { +Error ( getLoc ( ) , "unrecognized operand modifier" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: LParen ) { +Error ( getLoc ( ) , "expected '('" ) ; +return MatchOperand_ParseFail ; +} +getParser ( ) . Lex ( ) ; +const MCExpr * SubExpr ; +if ( getParser ( ) . parseParenExpression ( SubExpr , E ) ) { +return MatchOperand_ParseFail ; +} +const MCExpr * ModExpr = RISCVMCExpr :: create ( VK , SubExpr , getContext ( ) ) ; +Operands . push_back ( RISCVOperand :: createImm ( ModExpr , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28089435ce97510894a6db4b5ae109cb4c6c572e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parsePseudoJumpSymbol.cpp @@ -0,0 +1,43 @@ +OperandMatchResultTy RISCVAsmParser :: parsePseudoJumpSymbol ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +Error ( getLoc ( ) , "unknown identifier" ) ; +return MatchOperand_ParseFail ; +} +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +Error ( getLoc ( ) , "unknown symbol" ) ; +return MatchOperand_ParseFail ; +Res = V ; +if ( ! Sym -> isVariable ( ) ) { +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +Opcode = MCBinaryExpr :: Add ; +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Res = MCBinaryExpr :: create ( Opcode , Res , Expr , getContext ( ) ) ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( Kind != RISCVMCExpr :: VK_RISCV_None ) { +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da461c3e070254982b71f830c0cda81a74b58bca --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseRegister2.cpp @@ -0,0 +1,12 @@ +OperandMatchResultTy RISCVAsmParser :: parseRegister ( OperandVector & Operands , bool AllowParens ) { +getLexer ( ) . Lex ( ) ; +SMLoc S = getLoc ( ) ; +StringRef Name = getLexer ( ) . getTok ( ) . getIdentifier ( ) ; +unsigned RegNo = MatchRegisterName ( Name ) ; +if ( RegNo == 0 ) { +} +Operands . push_back ( RISCVOperand :: createReg ( RegNo , S , E ) ) ; +getLexer ( ) . Lex ( ) ; +Operands . push_back ( RISCVOperand :: createReg ( RegNo , S , E ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f9453627863d856327ea039c34b85fb4a8fff9df --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/parseVTypeI.cpp @@ -0,0 +1,42 @@ +OperandMatchResultTy RISCVAsmParser :: parseVTypeI ( OperandVector & Operands ) { +SMLoc S = getLoc ( ) ; +SMLoc E = SMLoc :: getFromPointer ( S . getPointer ( ) - 1 ) ; +const MCExpr * Res ; +if ( getLexer ( ) . getKind ( ) != AsmToken :: Identifier ) { +return MatchOperand_NoMatch ; +} +StringRef Identifier ; +AsmToken Tok = getLexer ( ) . getTok ( ) ; +if ( getParser ( ) . parseIdentifier ( Identifier ) ) { +Error ( getLoc ( ) , "unknown identifier" ) ; +return MatchOperand_ParseFail ; +MCSymbol * Sym = getContext ( ) . getOrCreateSymbol ( Identifier ) ; +if ( Sym -> isVariable ( ) ) { +const MCExpr * V = Sym -> getVariableValue ( false ) ; +if ( ! isa < MCSymbolRefExpr > ( V ) ) { +getLexer ( ) . UnLex ( Tok ) ; +Error ( getLoc ( ) , "unknown symbol" ) ; +return MatchOperand_ParseFail ; +Res = V ; +if ( ! Sym -> isVariable ( ) ) { +MCBinaryExpr :: Opcode Opcode ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Plus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( getLexer ( ) . getKind ( ) == AsmToken :: Minus ) { +getLexer ( ) . Lex ( ) ; +const MCExpr * Expr ; +if ( getParser ( ) . parseExpression ( Expr ) ) { +Error ( getLoc ( ) , "unknown expression" ) ; +return MatchOperand_ParseFail ; +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +if ( Kind != RISCVMCExpr :: VK_RISCV_None ) { +Operands . push_back ( RISCVOperand :: createImm ( Res , S , E , isRV64 ( ) ) ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/print.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/print.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5f3c376b1ff726cf240aa6395af8524515c9140 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/print.cpp @@ -0,0 +1,14 @@ +void print ( raw_ostream & OS ) const override { +if ( Kind == KindTy :: Token ) { +} +if ( Kind == KindTy :: Register ) { +} +if ( Kind == KindTy :: Immediate ) { +OS << getImm ( ) ; +} +if ( Kind == KindTy :: SystemRegister ) { +OS << "Register<" << Reg . RegNum << ">" ; +} +if ( Kind == KindTy :: VType ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e3842effdce3debb109d5ef4f747e2c8306b202a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/setFeatureBits.cpp @@ -0,0 +1,6 @@ +void setFeatureBits ( uint64_t Feature , StringRef FeatureString ) { +if ( ! ( getSTI ( ) . getFeatureBits ( ) [ Feature ] ) ) { +MCSubtargetInfo & STI = copySTI ( ) ; +setAvailableFeatures ( ComputeAvailableFeatures ( STI . ToggleFeature ( FeatureString ) ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c9e404b088afc46ccfbcd9337b714eaa8f83f69c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/tryParseRegister.cpp @@ -0,0 +1,12 @@ +OperandMatchResultTy RISCVAsmParser :: tryParseRegister ( unsigned & RegNo , SMLoc & StartLoc , SMLoc & EndLoc ) { +const AsmToken & Tok = getParser ( ) . getTok ( ) ; +StartLoc = Tok . getLoc ( ) ; +EndLoc = Tok . getEndLoc ( ) ; +RegNo = 0 ; +StringRef Name = getLexer ( ) . getTok ( ) . getIdentifier ( ) ; +if ( matchRegisterNameHelper ( isRV32E ( ) , ( MCRegister & ) RegNo , Name ) ) { +return MatchOperand_NoMatch ; +} +getParser ( ) . Lex ( ) ; +return MatchOperand_Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a172a68df22f4035b1504f173213c8778d78942 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmParser/validateTargetOperandClass.cpp @@ -0,0 +1,26 @@ +unsigned RISCVAsmParser :: validateTargetOperandClass ( MCParsedAsmOperand & AsmOp , unsigned Kind ) { +RISCVOperand & Op = static_cast < RISCVOperand & > ( AsmOp ) ; +if ( ! Op . isReg ( ) ) { +return Match_InvalidOperand ; +} +MCRegister Reg = Op . getReg ( ) ; +if ( RISCVMCRegisterClasses [ RISCV :: FPR64RegClassID ] . contains ( Reg ) ) { +if ( Kind == MCK_FPR32 ) { +Op . Reg . RegNum = convertFPR64ToFPR32 ( Reg ) ; +return Match_Success ; +} +} +if ( RISCVMCRegisterClasses [ RISCV :: FPR64CRegClassID ] . contains ( Reg ) ) { +if ( Kind == MCK_FPR32C ) { +Op . Reg . RegNum = convertFPR64ToFPR32 ( Reg ) ; +return Match_Success ; +} +} +if ( RISCVMCRegisterClasses [ RISCV :: FPR64RegClassID ] . contains ( Reg ) ) { +if ( Kind == MCK_FPR16 ) { +Op . Reg . RegNum = convertFPR64ToFPR16 ( Reg ) ; +return Match_Success ; +} +} +return Match_InvalidOperand ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16f537e752720d289295cf8da9cab4006ae1998d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit RISCVAsmPrinter ( TargetMachine & TM , std :: unique_ptr < MCStreamer > Streamer ) : AsmPrinter ( TM , std :: move ( Streamer ) ) , STI ( TM . getMCSubtargetInfo ( ) ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..646c88cbb09fd6dce5d8fa32492e94516c01b61d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/EmitToStreamer.cpp @@ -0,0 +1,8 @@ +void RISCVAsmPrinter :: EmitToStreamer ( MCStreamer & S , const MCInst & Inst ) { +MCInst CInst ; +bool Res = compressInst ( CInst , Inst , * STI , OutStreamer -> getContext ( ) ) ; +if ( Res ) { +RISCVNumInstrsCompressed = RISCVNumInstrsCompressed + 1 ; +} +AsmPrinter :: EmitToStreamer ( * OutStreamer , Res ? CInst : Inst ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b24e72e9d94a1dfbcc584f27efc95ca49dbaeacd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVAsmPrinter ( ) { +RegisterAsmPrinter < RISCVAsmPrinter > X ( getTheRISCV32Target ( ) ) ; +RegisterAsmPrinter < RISCVAsmPrinter > Y ( getTheRISCV64Target ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b370b61cf848ad846739f5b74af65bf0c582f85 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,11 @@ +bool RISCVAsmPrinter :: PrintAsmMemoryOperand ( const MachineInstr * MI , unsigned OpNo , const char * ExtraCode , raw_ostream & OS ) { +if ( ! ExtraCode ) { +const MachineOperand & MO = MI -> getOperand ( OpNo ) ; +if ( ! MO . isReg ( ) ) { +return true ; +} +OS << "0(" << RISCVInstPrinter :: getRegisterName ( MO . getReg ( ) ) << ")" ; +return false ; +} +return AsmPrinter :: PrintAsmMemoryOperand ( MI , OpNo , ExtraCode , OS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dec09de81efbe7a48a4cb6201d6caa443a7e39cd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,47 @@ +bool RISCVAsmPrinter :: PrintAsmOperand ( const MachineInstr * MI , unsigned OpNo , const char * ExtraCode , raw_ostream & OS ) { +if ( ! AsmPrinter :: PrintAsmOperand ( MI , OpNo , ExtraCode , OS ) ) { +return false ; +} +const MachineOperand & MO = MI -> getOperand ( OpNo ) ; +if ( ExtraCode ) { +if ( ExtraCode [ 0 ] ) { +if ( ExtraCode [ 1 ] != 0 ) { +return true ; +} +if ( ExtraCode [ 0 ] == 'z' ) { +if ( MO . isImm ( ) ) { +if ( MO . getImm ( ) == 0 ) { +OS << RISCVInstPrinter :: getRegisterName ( RISCV::X0 ) ; +return false ; +} +} +} +if ( ExtraCode [ 0 ] == 'i' ) { +return false ; +if ( ! MO . isReg ( ) ) { +OS << 'i' ; +} +return false ; +} +return true ; +} +} +if ( MO . getType ( ) == MachineOperand :: MO_Immediate ) { +OS << MO . getImm ( ) ; +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_Register ) { +OS << RISCVInstPrinter :: getRegisterName ( MO . getReg ( ) ) ; +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_GlobalAddress ) { +PrintSymbolOperand ( MO , OS ) ; +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_BlockAddress ) { +MCSymbol * Sym = GetBlockAddressSymbol ( MO . getBlockAddress ( ) ) ; +Sym -> print ( OS , MAI ) ; +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c99bad1d08c8201d92c0ef5b3c190e59513a5ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitAttributes.cpp @@ -0,0 +1,9 @@ +void RISCVAsmPrinter :: emitAttributes ( ) { +RISCVTargetStreamer & CTS = static_cast < RISCVTargetStreamer & > ( * OutStreamer -> getTargetStreamer ( ) ) ; +const Triple & TT = TM . getTargetTriple ( ) ; +StringRef CPU = TM . getTargetCPU ( ) ; +StringRef FS = TM . getTargetFeatureString ( ) ; +const RISCVTargetMachine & CTM = static_cast < const RISCVTargetMachine & > ( TM ) ; +const RISCVSubtarget STI ( TT , CPU , CPU , FS , "" , CTM ) ; +CTS . emitTargetAttributes ( STI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e06f058109d00ca5001bc10d865daae2c4b41c6f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,6 @@ +void RISCVAsmPrinter :: emitEndOfAsmFile ( Module & M ) { +RISCVTargetStreamer & CTS = static_cast < RISCVTargetStreamer & > ( * OutStreamer -> getTargetStreamer ( ) ) ; +if ( TM . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +CTS . finishAttributeSection ( ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b47b09669bf20c8919d0e1a57ee54bd5d20b8904 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitInstruction.cpp @@ -0,0 +1,8 @@ +void RISCVAsmPrinter :: emitInstruction ( const MachineInstr * MI ) { +if ( emitPseudoExpansionLowering ( * OutStreamer , MI ) ) { +return ; +} +MCInst TmpInst ; +LowerRISCVMachineInstrToMCInst ( MI , TmpInst , * this ) ; +EmitToStreamer ( * OutStreamer , TmpInst ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0d36026aab81bf16ac6a460144e015eb3624e364 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,5 @@ +void RISCVAsmPrinter :: emitStartOfAsmFile ( Module & M ) { +if ( TM . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +emitAttributes ( ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b50c92eaed08ada36e5d2710491c498e29eb559 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return "RISCV Assembly Printer" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cd0179bbd2efa82b653523e52ed6180f781702d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/lowerOperand.cpp @@ -0,0 +1,3 @@ +bool lowerOperand ( const MachineOperand & MO , MCOperand & MCOp ) const { +return LowerRISCVMachineOperandToMCOperand ( MO , MCOp , * this ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a0aec73549b527596768d6913e6804b300d261b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVAsmPrinter :: runOnMachineFunction ( MachineFunction & MF ) { +MCSubtargetInfo & NewSTI = OutStreamer -> getContext ( ) . getSubtargetCopy ( * TM . getMCSubtargetInfo ( ) ) ; +NewSTI . setFeatureBits ( MF . getSubtarget ( ) . getFeatureBits ( ) ) ; +STI = & NewSTI ; +SetupMachineFunction ( MF ) ; +emitFunctionBody ( ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..438ed8eb4fa7b43dcc12846335d3f240cfd037a6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR16RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR16RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = RISCV :: F0_H + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c586c67826896e027b66fee36e0690d8a61a43d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR32CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32CRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 8 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = RISCV :: F8_F + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d0ea3c7ef976150683c0d854bec296f02c68066a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR32RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR32RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = RISCV :: F0_F + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38418f32892bf605a6524b1314e101fc126eea43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR64CRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64CRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 8 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = RISCV :: F8_D + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ab271487b79b35ef83f33318b1cc7bd7b2aca17e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeFPR64RegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeFPR64RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = RISCV :: F0_D + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d3f7831de2c4b62d12a9fa5e980962d44681dfed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRCRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeGPRCRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 8 ) { +return MCDisassembler :: Fail ; +} +MCRegister Reg = RISCV :: X8 + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56ff4ef117332d294d29a991c66a0c16ddc875eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo == 0 ) { +return MCDisassembler :: Fail ; +} +return DecodeGPRRegisterClass ( Inst , RegNo , Address , Decoder ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8457ffe1102124e0dd4741d2b73b167a715d018 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRNoX0X2RegisterClass.cpp @@ -0,0 +1,6 @@ +static DecodeStatus DecodeGPRNoX0X2RegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo == 2 ) { +return MCDisassembler :: Fail ; +} +return DecodeGPRNoX0RegisterClass ( Inst , RegNo , Address , Decoder ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65cd7f3b2c491ff9143a9b0365b2ccea182c366a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeGPRRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeGPRRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Register = RISCV :: X0 + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ffdf5bac4f0d26ee10fdda324016a778bf92f8f5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/DecodeVRRegisterClass.cpp @@ -0,0 +1,8 @@ +static DecodeStatus DecodeVRRegisterClass ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +if ( RegNo >= 32 ) { +return MCDisassembler :: Fail ; +} +MCRegister Register = RISCV :: V0 + RegNo ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aaf52b15eb2b9451e7ae90324881988a0d52dd4c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/Disassembler.cpp @@ -0,0 +1,2 @@ +RISCVDisassembler ( const MCSubtargetInfo & STI , MCContext & Ctx , MCInstrInfo const * MCII ) : MCDisassembler ( STI , Ctx ) , MCII ( MCII ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69876f765610d0dc2d475e4c602703f8c8640aca --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/LLVMInitializeDisassembler.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVDisassembler ( ) { +TargetRegistry :: RegisterMCDisassembler ( getTheRISCV32Target ( ) , createRISCVDisassembler ) ; +TargetRegistry :: RegisterMCDisassembler ( getTheRISCV64Target ( ) , createRISCVDisassembler ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5277347cfb4d3050b42af9cbc68e6e485a862cba --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/addImplySP.cpp @@ -0,0 +1,43 @@ +static void addImplySP ( MCInst & Inst , int64_t Address , const void * Decoder ) { +if ( Inst . getOpcode ( ) == RISCV :: C_LWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_LDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_SWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_SDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_FLWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_FLDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_FSWSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_FSDSP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_ADDI4SPN ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_ADDI16SP ) { +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +DecodeGPRRegisterClass ( Inst , 2 , Address , Decoder ) ; +return ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..429c0843517943db25dd2e35cbc21449bd692d0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/createDisassembler.cpp @@ -0,0 +1,3 @@ +static MCDisassembler * createRISCVDisassembler ( const Target & T , const MCSubtargetInfo & STI , MCContext & Ctx ) { +return new RISCVDisassembler ( STI , Ctx , T . createMCInstrInfo ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5c57b9b63caf407ad7192aaed4e2f2f0915396be --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeCLUIImmOperand.cpp @@ -0,0 +1,5 @@ +static DecodeStatus decodeCLUIImmOperand ( MCInst & Inst , uint64_t Imm , uint64_t Address , const void * Decoder ) { +assert ( isUInt < 6 > ( Imm ) ) && "Invalid immediate" ) ; +Inst . addOperand ( MCOperand :: createImm ( Imm > 31 ? ( SignExtend64 < 6 > ( Imm ) & 0xfffff ) : Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee39fe41a1d7a2989ce659dd881e764ff20b9bb2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeFRMArg.cpp @@ -0,0 +1,8 @@ +static DecodeStatus decodeFRMArg ( MCInst & Inst , uint64_t Imm , uint64_t Address , const void * Decoder ) { +assert ( isUInt < 3 > ( Imm ) ) ; +if ( ! A64Imms :: isLogicalImmBits ( RegWidth , Bits , Imm ) ) { +return MCDisassembler :: Fail ; +} +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ccc40a6af115452415a83ccf45a94001eba8130 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1Rs2.cpp @@ -0,0 +1,13 @@ +static DecodeStatus decodeRVCInstrRdRs1Rs2 ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned d = fieldFromInstruction ( Insn , 7 , 5 ) ; +unsigned const9 = 0 ; +unsigned s1 = fieldFromInstruction ( Insn , 2 , 5 ) ; +DecodeStatus status = DecodeGPRRegisterClass ( Inst , d , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +Inst . addOperand ( MCOperand :: createImm ( const9 ) ) ; +status = DecodeGPRRegisterClass ( Inst , s1 , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da13f76689fe7263b763ab73458ee0c884ae8fab --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs1UImm.cpp @@ -0,0 +1,10 @@ +static DecodeStatus decodeRVCInstrRdRs1UImm ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned char op = ( insn >> 5 ) & 1 ; +unsigned char cmode = ( insn >> 8 ) & 0xF ; +unsigned char Imm8 = ( ( insn >> 24 ) & 1 ) << 7 | ( ( insn >> 16 ) & 7 ) << 4 | ( insn & 0xF ) ; +unsigned Offset = ( Insn & 0xffff ) ; +if ( Bits >= 16 ) { +return MCDisassembler :: Fail ; +} +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6fe70e90426d71fb0e173b67252d7ff580dda1d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdRs2.cpp @@ -0,0 +1,13 @@ +static DecodeStatus decodeRVCInstrRdRs2 ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned Rd = fieldFromInstruction ( Insn , 7 , 5 ) ; +unsigned Rs2 = fieldFromInstruction ( Insn , 2 , 5 ) ; +DecodeStatus status = DecodeGPRRegisterClass ( Inst , Rd , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +} +status = DecodeGPRRegisterClass ( Inst , Rs2 , Address , Decoder ) ; +if ( status != MCDisassembler :: Success ) { +return status ; +} +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7c00f52c104a5b6628597191543ac6cf4dc8106 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrRdSImm.cpp @@ -0,0 +1,18 @@ +static DecodeStatus decodeRVCInstrRdSImm ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned char op = ( insn >> 5 ) & 1 ; +unsigned char cmode = ( insn >> 8 ) & 0xF ; +unsigned char Imm8 = ( ( insn >> 24 ) & 1 ) << 7 | ( ( insn >> 16 ) & 7 ) << 4 | ( insn & 0xF ) ; +unsigned Offset = ( Insn & 0xffff ) ; +if ( Bits >= 16 ) { +return MCDisassembler :: Fail ; +} +int64_t Imm = Bits + 1 ; +const JmpExtraValues * extra = ( reinterpret_cast < const JmpExtraValues * > ( Addr ) ) ; +uint64_t address = extra -> Address + extra -> Imm ; +if ( ! tryAddingSymbolicOperand ( address , 0 , true , 0 , Inst , Decoder ) ) { +Inst . addOperand ( MCOperand :: createImm ( extra -> Imm ) ) ; +} +unsigned Register = PredicateTable [ extra -> Predicate ] ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b3b7efb37c77265cefc5bea79aaf992cdecdb90 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeRVCInstrSImm.cpp @@ -0,0 +1,18 @@ +static DecodeStatus decodeRVCInstrSImm ( MCInst & Inst , unsigned Insn , uint64_t Address , const void * Decoder ) { +unsigned char op = ( insn >> 5 ) & 1 ; +unsigned char cmode = ( insn >> 8 ) & 0xF ; +unsigned char Imm8 = ( ( insn >> 24 ) & 1 ) << 7 | ( ( insn >> 16 ) & 7 ) << 4 | ( insn & 0xF ) ; +unsigned Offset = ( Insn & 0xffff ) ; +if ( Bits >= 16 ) { +return MCDisassembler :: Fail ; +} +int64_t Imm = Bits + 1 ; +const JmpExtraValues * extra = ( reinterpret_cast < const JmpExtraValues * > ( Addr ) ) ; +uint64_t address = extra -> Address + extra -> Imm ; +if ( ! tryAddingSymbolicOperand ( address , 0 , true , 0 , Inst , Decoder ) ) { +Inst . addOperand ( MCOperand :: createImm ( extra -> Imm ) ) ; +} +unsigned Register = PredicateTable [ extra -> Predicate ] ; +Inst . addOperand ( MCOperand :: createReg ( Register ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..992cc6c7a54db0d62e19897ac2e09341bf7660d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmNonZeroOperand.cpp @@ -0,0 +1,9 @@ +template < unsigned N > static DecodeStatus decodeSImmNonZeroOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +if ( Imm == 0 ) { +return MCDisassembler :: Fail ; +} +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( SignExtend64 < N > ( Imm ) ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c89f4af3b6e532a7cc8a1dd52b006ba415a839ec --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmOperand.cpp @@ -0,0 +1,6 @@ +template < unsigned N > static DecodeStatus decodeSImmOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( SignExtend64 < N > ( Imm ) ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..15963ce120e841adbc2f7e17ae57d854431f5c0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeSImmOperandAndLsl1.cpp @@ -0,0 +1,5 @@ +template < unsigned N > static DecodeStatus decodeSImmOperandAndLsl1 ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +Inst . addOperand ( MCOperand :: createImm ( SignExtend64 < N > ( Imm << 1 ) ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..886faa3bb851945909f1de7e3c6d8b33d9176807 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeUImmNonZeroOperand.cpp @@ -0,0 +1,9 @@ +template < unsigned N > static DecodeStatus decodeUImmNonZeroOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +if ( Imm == 0 ) { +return MCDisassembler :: Fail ; +} +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..202289bb54a00b03168ee8c05ae14e224c690da1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeUImmOperand.cpp @@ -0,0 +1,6 @@ +template < unsigned N > static DecodeStatus decodeUImmOperand ( MCInst & Inst , uint64_t Imm , int64_t Address , const void * Decoder ) { +assert ( isUInt < N > ( Imm ) && "Invalid immediate" ) ; +addImplySP ( Inst , Address , Decoder ) ; +Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ; +return MCDisassembler :: Success ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..618789d584de399cdb9b44593e652bdcadbed945 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/decodeVMaskReg.cpp @@ -0,0 +1,14 @@ +static DecodeStatus decodeVMaskReg ( MCInst & Inst , uint64_t RegNo , uint64_t Address , const void * Decoder ) { +MCRegister Reg = RISCV :: NoRegister ; +return MCDisassembler :: Success ; +return MCDisassembler :: Success ; +if ( RegNo == 0 ) { +Inst . addOperand ( MCOperand :: createReg ( RISCV :: V0 ) ) ; +return MCDisassembler :: Success ; +} +if ( RegNo == 1 ) { +Inst . addOperand ( MCOperand :: createReg ( RISCV :: NoRegister ) ) ; +return MCDisassembler :: Success ; +} +return MCDisassembler :: Fail ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..74ff7e3b6cf9a344c5ce073b2fd8a390bcc46284 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Disassembler/Disassembler/getInstruction.cpp @@ -0,0 +1,69 @@ +DecodeStatus RISCVDisassembler :: getInstruction ( MCInst & MI , uint64_t & Size , ArrayRef < uint8_t > Bytes , uint64_t Address , raw_ostream & CS ) const { +DecodeStatus Result ; +if ( Bytes . size ( ) < 2 ) { +Size = 0 ; +return Fail ; +} +if ( ( Bytes [ 1 ] & 0xF7 ) >> 3 < 0x08 ) { +if ( Bytes . size ( ) < 4 ) { +Size = 0 ; +return Fail ; +} +if ( Bytes . size ( ) >= 8 ) { +uint64_t Insn64 ; +if ( ! readInstruction64 ( Bytes , Address , Size , Insn64 ) ) { +return Fail ; +} +Result = decodeInstruction ( DecoderTable64 , Instr , Insn64 , Address , this , STI ) ; +if ( Success == Result ) { +LLVM_DEBUG ( dbgs ( ) << "Successfully decoded 64-bit instruction." ) ; +return Result ; +} +LLVM_DEBUG ( dbgs ( ) << "Not a 64-bit instruction, falling back to 32-bit." ) ; +} +uint32_t Insn32 ; +if ( ! readInstruction32 ( Bytes , Address , Size , Insn32 ) ) { +return Fail ; +} +return decodeInstruction ( DecoderTable32 , Instr , Insn32 , Address , this , STI ) ; +} +if ( ( Bytes [ 1 ] & 0xF7 ) >> 3 >= 0x08 ) { +if ( Bytes . size ( ) >= 6 ) { +uint64_t Insn48 ; +if ( ! readInstruction48 ( Bytes , Address , Size , Insn48 ) ) { +return Fail ; +} +Result = decodeInstruction ( DecoderTable48 , Instr , Insn48 , Address , this , STI ) ; +if ( Success == Result ) { +LLVM_DEBUG ( dbgs ( ) << "Successfully decoded 16-bit instruction with limm." ) ; +return Result ; +} +LLVM_DEBUG ( dbgs ( ) << "Not a 16-bit instruction with limm, try without it." ) ; +} +uint32_t Insn16 ; +if ( ! readInstruction16 ( Bytes , Address , Size , Insn16 ) ) { +return Fail ; +} +return decodeInstruction ( DecoderTable16 , Instr , Insn16 , Address , this , STI ) ; +} +uint32_t Inst ; +if ( Bytes [ 0 ] & 1 == 1 ) { +if ( Bytes . size ( ) < 3 ) { +Size = 0 ; +return MCDisassembler :: Fail ; +} +Inst = Bytes [ 0 ] | ( Bytes [ 1 ] << 8 ) | ( Bytes [ 2 ] << 16 ) ; +LLVM_DEBUG ( dbgs ( ) << "Trying RISCV 24bit table :\n" ) ; +Result = decodeInstruction ( DecoderTable24 , MI , Inst , Address , this , STI ) ; +} +if ( Bytes [ 0 ] & 1 != 1 ) { +if ( Bytes . size ( ) < 2 ) { +Size = 0 ; +return MCDisassembler :: Fail ; +} +Inst = support :: endian :: read16le ( Bytes . data ( ) ) ; +LLVM_DEBUG ( dbgs ( ) << "Trying RISCV 16bit table :\n" ) ; +Result = decodeInstruction ( DecoderTable16 , MI , Inst , Address , this , STI ) ; +} +return Result ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f3ccad163ecc1f7ba6605caf2a1e494c8d965401 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/AsmBackend.cpp @@ -0,0 +1,2 @@ +RISCVAsmBackend ( const MCSubtargetInfo & STI , uint8_t OSABI , bool Is64Bit , const MCTargetOptions & Options ) : MCAsmBackend ( support :: little ) , STI ( STI ) , OSABI ( OSABI ) , Is64Bit ( Is64Bit ) , TargetOptions ( Options ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4fbaab906d82133cff812ce8b9b5fd7d29ee3573 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/adjustFixupValue.cpp @@ -0,0 +1,82 @@ +static uint64_t adjustFixupValue ( const MCFixup & Fixup , uint64_t Value , MCContext & Ctx ) { +unsigned Kind ; +Kind = Fixup . getTargetKind ( ) ; +if ( Kind == FK_Data_1 ) { +return Value ; +} +if ( Kind == FK_Data_2 ) { +return Value ; +} +if ( Kind == FK_Data_4 ) { +return Value ; +} +if ( Kind == FK_Data_8 ) { +return Value ; +} +if ( Kind == FK_Data_6b ) { +return Value ; +} +if ( Kind == RISCV :: fixup_RISCV_lo12_i ) { +return Value & 0xfff ; +} +if ( Kind == RISCV :: fixup_RISCV_pcrel_lo12_i ) { +return Value & 0xfff ; +} +if ( Kind == RISCV :: fixup_RISCV_tprel_lo12_i ) { +return Value & 0xfff ; +} +if ( Kind == RISCV :: fixup_RISCV_lo12_s ) { +return ( ( ( Value >> 5 ) & 0x7f ) << 25 ) | ( ( Value & 0x1f ) << 7 ) ; +if ( Kind == RISCV :: fixup_RISCV_pcrel_lo12_s ) { +return ( ( ( Value >> 5 ) & 0x7f ) << 25 ) | ( ( Value & 0x1f ) << 7 ) ; +} +if ( Kind == RISCV :: fixup_RISCV_tprel_lo12_s ) { +return ( ( ( Value >> 5 ) & 0x7f ) << 25 ) | ( ( Value & 0x1f ) << 7 ) ; +} +if ( Kind == RISCV :: fixup_RISCV_hi20 ) { +return ( ( Value + 0x800 ) >> 12 ) & 0xfffff ; +} +if ( Kind == RISCV :: fixup_RISCV_pcrel_hi20 ) { +return ( ( Value + 0x800 ) >> 12 ) & 0xfffff ; +} +if ( Kind == RISCV :: fixup_RISCV_tprel_hi20 ) { +return ( ( Value + 0x800 ) >> 12 ) & 0xfffff ; +} +if ( Kind == RISCV :: fixup_RISCV_call ) { +return ( ( Value + 0x800ULL ) & 0xfffff000ULL ) | ( ( ( Value & 0xfffULL ) << 20 ) << 32 ) ; +} +if ( Kind == RISCV :: fixup_RISCV_call_plt ) { +return ( ( Value + 0x800ULL ) & 0xfffff000ULL ) | ( ( ( Value & 0xfffULL ) << 20 ) << 32 ) ; +} +if ( Kind == RISCV :: fixup_RISCV_rvc_jump ) { +return ( ( ( Value >> 11 ) & 0x1 ) << 10 ) | ( ( ( Value >> 4 ) & 0x1 ) << 9 ) | ( ( ( Value >> 8 ) & 0x3 ) << 7 ) | ( ( Value >> 10 ) & 0x1 ) << 6 ) | ( ( Value >> 6 ) & 0x1 ) << 5 ) | ( ( Value >> 7 ) & 0x1 ) << 4 ) | ( ( Value >> 1 ) & 0x7 ) << 1 ) ; +} +if ( Kind == RISCV :: fixup_RISCV_rvc_branch ) { +return ( ( ( Value >> 8 ) & 0x1 ) << 12 ) | ( ( ( Value >> 3 ) & 0x3 ) << 5 ) | ( ( ( Value >> 6 ) & 0x3 ) << 3 ) ; +} +if ( Kind == RISCV :: fixup_RISCV_tls_got_hi20 ) { +} +if ( Kind == RISCV :: fixup_RISCV_tls_gd_hi20 ) { +} +if ( Kind == RISCV :: fixup_RISCV_got_hi20 ) { +} +if ( Kind == RISCV :: fixup_RISCV_branch ) { +if ( ! isInt < 13 > ( Value ) ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value out of range" ) ; +} +if ( Value & 0x1 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value must be 2-byte aligned." ) ; +} +return ( ( ( Value >> 12 ) & 0x1 ) << 31 ) | ( ( ( Value >> 5 ) & 0x3f ) << 25 ) | ( ( ( Value >> 1 ) & 0x1 ) << 7 ) ; +} +if ( Kind == RISCV :: fixup_RISCV_jal ) { +if ( ! isInt < 21 > ( Value ) ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value out of range" ) ; +} +if ( Value & 0x1 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "fixup value must be 2-byte aligned." ) ; +} +return ( ( ( Value >> 20 ) & 0x1 ) << 19 ) | ( ( ( Value >> 11 ) & 0x1 ) << 8 ) ; +} +llvm_unreachable ( "Unknown fixup kind!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/applyFixup.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/applyFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef1791179287245f5d5790048f77538bb0544142 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/applyFixup.cpp @@ -0,0 +1,25 @@ +void RISCVAsmBackend :: applyFixup ( const MCAssembler & Asm , const MCFixup & Fixup , const MCValue & Target , MutableArrayRef < char > Data , uint64_t Value , bool IsResolved , const MCSubtargetInfo * STI ) const { +MCFixupKind Kind ; +Kind = Fixup . getKind ( ) ; +if ( Kind >= FirstLiteralRelocationKind ) { +return ; +} +MCContext & Ctx = Asm . getContext ( ) ; +if ( ! Value ) { +return ; +} +MCFixupKindInfo Info ; +Info = getFixupKindInfo ( Kind ) ; +Value = adjustFixupValue ( Fixup , Value , Ctx ) << Info . TargetOffset ; +unsigned Offset ; +Offset = Fixup . getOffset ( ) ; +unsigned NumBytes ; +NumBytes = alignTo ( Info . TargetSize + Info . TargetOffset , 8 ) / 8 ; +assert ( Offset + NumBytes <= Data . size ( ) && "Invalid fixup offset!" ) ; +if ( MCAsmBackend :: Endian == support :: little ) { +unsigned i ; +for ( i = 0 ; i != NumBytes ; ++ i ) { +Data [ Offset + i ] = Data [ Offset + i ] | uint8_t ( ( Value >> ( i * 8 ) ) & 0xff ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a02ecfbf52f1df5a0ecc4b8c126cb96cea2139d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/createAsmBackend.cpp @@ -0,0 +1,5 @@ +MCAsmBackend * llvm :: createRISCVAsmBackend ( const Target & T , const MCSubtargetInfo & STI , const MCRegisterInfo & MRI , const MCTargetOptions & Options ) { +const Triple & TT = STI . getTargetTriple ( ) ; +uint8_t OSABI = MCELFObjectTargetWriter :: getOSABI ( TT . getOS ( ) ) ; +return new RISCVAsmBackend ( STI , OSABI , TT . isArch64Bit ( ) , Options ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e5a626f4079ae4a47f94b480285452f41ce66146 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/createObjectTargetWriter.cpp @@ -0,0 +1,4 @@ +std :: unique_ptr < MCObjectTargetWriter > RISCVAsmBackend :: createObjectTargetWriter ( ) const { +StringRef CPU ( "Default" ) ; +return createRISCVELFObjectWriter ( OSABI , Is64Bit ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a28a0b16ce7a196c9c530a8fb7ee36b719ebad42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/evaluateTargetFixup.cpp @@ -0,0 +1,2 @@ +bool RISCVAsmBackend :: evaluateTargetFixup ( const MCAssembler & Asm , const MCAsmLayout & Layout , const MCFixup & Fixup , const MCFragment * DF , const MCValue & Target , uint64_t & Value , bool & WasForced ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6824221f10a156ddf44d2dae960a7bc794ab14c1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxation.cpp @@ -0,0 +1,3 @@ +bool fixupNeedsRelaxation ( const MCFixup & Fixup , uint64_t Value , const MCRelaxableFragment * DF , const MCAsmLayout & Layout ) const override { +llvm_unreachable ( "Handled by fixupNeedsRelaxationAdvanced" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b687e7d7b0e0dcd5058c1fa9a94a4087b72e5d73 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/fixupNeedsRelaxationAdvanced.cpp @@ -0,0 +1,16 @@ +bool RISCVAsmBackend :: fixupNeedsRelaxationAdvanced ( const MCFixup & Fixup , bool Resolved , uint64_t Value , const MCRelaxableFragment * DF , const MCAsmLayout & Layout , const bool WasForced ) const { +if ( ! Resolved ) { +if ( ! WasForced ) { +return true ; +} +} +int64_t Offset ; +Offset = int64_t ( Value ) ; +if ( Fixup . getTargetKind ( ) == RISCV :: fixup_RISCV_rvc_branch ) { +return Offset > 254 || Offset < - 256 ; +} +if ( Fixup . getTargetKind ( ) == RISCV :: fixup_RISCV_rvc_jump ) { +return Offset > 2046 || Offset < -2048 ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0cc5ce29f9ae415aa8ef91f87dcdb22a8cbc67cb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getFixupKind.cpp @@ -0,0 +1,11 @@ +Optional < MCFixupKind > RISCVAsmBackend :: getFixupKind ( StringRef Name ) const { +if ( STI . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +unsigned Type ; +Type = llvm :: StringSwitch < unsigned > ( Name ) +. Default ( - 1u ) ; +if ( Type != - 1u ) { +return static_cast < MCFixupKind > ( FirstLiteralRelocationKind + Type ) ; +} +} +return None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5c6c142f38f5d2e3016ed2d6002331a469f3414 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getFixupKindInfo.cpp @@ -0,0 +1,33 @@ +const MCFixupKindInfo & RISCVAsmBackend :: getFixupKindInfo ( MCFixupKind Kind ) const { +const static MCFixupKindInfo Infos [ RISCV :: NumTargetFixupKinds ] = { +{ "fixup_RISCV_hi20" , 12 , 20 , 0 } , +{ "fixup_RISCV_lo12_i" , 20 , 12 , 0 } , +{ "fixup_RISCV_lo12_s" , 0 , 32 , 0 } , +{ "fixup_RISCV_pcrel_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_pcrel_lo12_i" , 20 , 12 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_pcrel_lo12_s" , 0 , 32 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_got_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_tprel_hi20" , 12 , 20 , 0 } , +{ "fixup_RISCV_tprel_lo12_i" , 20 , 12 , 0 } , +{ "fixup_RISCV_tprel_lo12_s" , 0 , 32 , 0 } , +{ "fixup_RISCV_tprel_add" , 0 , 0 , 0 } , +{ "fixup_RISCV_tls_got_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_tls_gd_hi20" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_jal" , 12 , 20 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_branch" , 0 , 32 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_rvc_jump" , 2 , 11 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_rvc_branch" , 0 , 16 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_call" , 0 , 64 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_call_plt" , 0 , 64 , MCFixupKindInfo :: FKF_IsPCRel } , +{ "fixup_RISCV_relax" , 0 , 0 , 0 } , +{ "fixup_RISCV_align" , 0 , 0 , 0 } +} ; +if ( Kind >= FirstLiteralRelocationKind ) { +return MCAsmBackend :: getFixupKindInfo ( FK_NONE ) ; +} +if ( Kind < FirstTargetFixupKind ) { +return MCAsmBackend :: getFixupKindInfo ( Kind ) ; +} +assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && "Invalid kind!" ) ; +return Infos [ Kind - FirstTargetFixupKind ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e384712e31f1224918b8164a855d6593c11d35f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getNumFixupKinds.cpp @@ -0,0 +1,3 @@ +unsigned getNumFixupKinds ( ) const override { +return RISCV :: NumTargetFixupKinds ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c7458d9fc88972746f70e586856a9a018c2c189 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getRelaxedOpcode.cpp @@ -0,0 +1,15 @@ +unsigned RISCVAsmBackend :: getRelaxedOpcode ( unsigned Op ) const { +if ( Op == RISCV :: C_BEQZ ) { +return RISCV :: BEQ ; +} +if ( Op == RISCV :: C_BNEZ ) { +return RISCV :: BNE ; +} +if ( Op == RISCV :: C_J ) { +return RISCV :: JAL ; +} +if ( Op == RISCV :: C_JAL ) { +return RISCV :: JAL ; +} +return Op ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16ae15472632097d3075aff0875c283e8990edc2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getTargetABI.cpp @@ -0,0 +1,3 @@ +RISCVABI :: ABI getTargetABI ( ) const { +return TargetABI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05f473298a9cd8a5b183051967a9322c84a1a94b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/getTargetOptions.cpp @@ -0,0 +1,3 @@ +const MCTargetOptions & getTargetOptions ( ) const { +return TargetOptions ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d314eb6f86b70b1e6f50774e935a9ef84737203 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/mayNeedRelaxation.cpp @@ -0,0 +1,15 @@ +bool RISCVAsmBackend :: mayNeedRelaxation ( const MCInst & Inst , const MCSubtargetInfo & STI ) const { +if ( Inst . getOpcode ( ) == RISCV :: C_BEQZ ) { +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_BNEZ ) { +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_J ) { +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_JAL ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40dde0e565ddd30e63ddcb4942df4aa5a4b4ce0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/relaxInstruction.cpp @@ -0,0 +1,32 @@ +void RISCVAsmBackend :: relaxInstruction ( const MCInst & Inst , const MCSubtargetInfo & STI , MCInst & Res ) const { +MCInst Res ; +if ( Inst . getOpcode ( ) == RISCV :: C_BEQZ ) { +Res . setOpcode ( RISCV :: BEQ ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Res . addOperand ( Inst . getOperand ( 1 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_BNEZ ) { +Res . setOpcode ( RISCV :: BNE ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Res . addOperand ( Inst . getOperand ( 1 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_J ) { +Res . setOpcode ( RISCV :: JAL ) ; +Res . addOperand ( MCOperand :: createReg ( RISCV :: X0 ) ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_JAL ) { +Res . setOpcode ( RISCV :: JAL ) ; +Res . addOperand ( MCOperand :: createReg ( RISCV :: X1 ) ) ; +Res . addOperand ( Inst . getOperand ( 0 ) ) ; +Inst = std :: move ( Res ) ; +return ; +} +llvm_unreachable ( "Opcode not expected!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70b0bfdc43c4485cd0e1c2f2d81a025929be3415 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/requiresDiffExpressionRelocations.cpp @@ -0,0 +1,3 @@ +bool requiresDiffExpressionRelocations ( ) const override { +return STI . getFeatureBits ( ) [ RISCV :: FeatureRelax ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b44816c017c6bd035ed1453ab624e78566974b0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/setForceRelocs.cpp @@ -0,0 +1,3 @@ +void setForceRelocs ( ) { +ForceRelocs = true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dcb6104e7c19c2dc80342346e6d6f8f51d27f869 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldForceRelocation.cpp @@ -0,0 +1,22 @@ +bool RISCVAsmBackend :: shouldForceRelocation ( const MCAssembler & Asm , const MCFixup & Fixup , const MCValue & Target ) { +if ( Fixup . getTargetKind ( ) >= FirstLiteralRelocationKind ) { +return true ; +} +if ( Fixup . getTargetKind ( ) == FK_Data_1 ) { +} +if ( Fixup . getTargetKind ( ) == FK_Data_2 ) { +} +if ( Fixup . getTargetKind ( ) == FK_Data_4 ) { +} +if ( Fixup . getTargetKind ( ) == FK_Data_8 ) { +} +if ( Fixup . getTargetKind ( ) == RISCV :: fixup_RISCV_got_hi20 ) { +return true ; +} +if ( Fixup . getTargetKind ( ) == RISCV :: fixup_RISCV_tls_got_hi20 ) { +return true ; +} +if ( Fixup . getTargetKind ( ) == RISCV :: fixup_RISCV_tls_gd_hi20 ) { +return true ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..42eb8482a306174c0d6de48ca59f669d887a152e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldInsertExtraNopBytesForCodeAlign.cpp @@ -0,0 +1,2 @@ +bool RISCVAsmBackend :: shouldInsertExtraNopBytesForCodeAlign ( MCAssembler & Asm , const MCAsmLayout & Layout , MCAlignFragment & AF ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bbaa8a8cef726ec33ab224b5ec9eb1ee20e30791 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/shouldInsertFixupForCodeAlign.cpp @@ -0,0 +1,2 @@ +bool RISCVAsmBackend :: shouldInsertFixupForCodeAlign ( MCAssembler & Asm , const MCAsmLayout & Layout , MCAlignFragment & AF ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea95b54b2648866cf36a85d4fbc49f76091a9e35 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/willForceRelocations.cpp @@ -0,0 +1,3 @@ +bool willForceRelocations ( ) const { +return STI . getFeatureBits ( ) [ RISCV :: FeatureRelax ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/writeNopData.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/writeNopData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..07ba71c0e99b3fc21ff907fa36e4a982d4b34be0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/writeNopData.cpp @@ -0,0 +1,14 @@ +bool RISCVAsmBackend :: writeNopData ( raw_ostream & OS , uint64_t Count ) const { +if ( Count % 2 != 0 ) { +return false ; +} +uint64_t NopCount = Count / 4 ; +uint64_t i ; +for ( i = 0 ; i < NopCount ; ++ i ) { +OS . write ( "\x13\0\0\0" , 4 ) ; +} +if ( Count % 4 == 2 ) { +OS . write ( "\x01\0" , 2 ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e505164f0c43be83f2076dbdb87f868bffa3c7fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmBackend/~AsmBackend.cpp @@ -0,0 +1,2 @@ +~ RISCVAsmBackend ( ) override { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09ec79aa5652e41d9c97fdd975557b6633e9c38b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,10 @@ +RISCVMCAsmInfo :: RISCVMCAsmInfo ( const Triple & TT ) { +CodePointerSize = TT . isArch64Bit ( ) ? 8 : 4 ; +CalleeSaveStackSlotSize = TT . isArch64Bit ( ) ? 8 : 4 ; +CommentString = "#" ; +AlignmentIsInBytes = false ; +SupportsDebugInformation = true ; +ExceptionsType = ExceptionHandling :: DwarfCFI ; +Data16bitsDirective = "\t.half\t" ; +Data32bitsDirective = "\t.word\t" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/anchor.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96bc88165c00542f48dd672a1d987b5a47b732d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/anchor.cpp @@ -0,0 +1,2 @@ +void RISCVMCAsmInfo :: anchor ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..759b43e0954d2bb35a82f614cea5d58a28769b52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/AsmInfo/getExprForFDESymbol.cpp @@ -0,0 +1,7 @@ +const MCExpr * RISCVMCAsmInfo :: getExprForFDESymbol ( const MCSymbol * Sym , unsigned Encoding , MCStreamer & Streamer ) const { +if ( Encoding & dwarf :: DW_EH_PE_pcrel ) { +MCContext & Ctx = Streamer . getContext ( ) ; +return RISCVMCExpr :: create ( MCSymbolRefExpr :: create ( Sym , MCSymbolRefExpr :: VK_RISCV_None , Ctx ) , RISCVMCExpr :: VK_32_PCREL , Ctx ) ; +} +return MCAsmInfo :: getExprForFDESymbol ( Sym , Encoding , Streamer ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/ABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/ABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..344e5390354582b3fcc0654dedcf88d18f31172b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/ABI.cpp @@ -0,0 +1,10 @@ +enum ABI { +ABI_ILP32 , +ABI_ILP32F , +ABI_ILP32D , +ABI_ILP32E , +ABI_LP64 , +ABI_LP64F , +ABI_LP64D , +ABI_Unknown +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/FenceField.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/FenceField.cpp new file mode 100644 index 0000000000000000000000000000000000000000..951b42ade0ebffe40b0910851cdb0d179096c57e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/FenceField.cpp @@ -0,0 +1,6 @@ +enum FenceField { +I = 8 , +O = 4 , +R = 2 , +W = 1 +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/II.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/II.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ae6a489bc110aa986382c2d5a8cdb90626bcd11 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/II.cpp @@ -0,0 +1,53 @@ +namespace RISCVII { +enum { +InstFormatPseudo = 0 , +InstFormatR = 1 , +InstFormatR4 = 2 , +InstFormatI = 3 , +InstFormatS = 4 , +InstFormatB = 5 , +InstFormatU = 6 , +InstFormatJ = 7 , +InstFormatCR = 8 , +InstFormatCI = 9 , +InstFormatCSS = 10 , +InstFormatCIW = 11 , +InstFormatCL = 12 , +InstFormatCS = 13 , +InstFormatCA = 14 , +InstFormatCB = 15 , +InstFormatCJ = 16 , +InstFormatOther = 17 , +InstFormatMask = 31 , +ConstraintShift = 5 , +ConstraintMask = 0b111 << ConstraintShift , +VLMulSh ConstraintShift = 3 , +VLMulMask = 0b111 << VLMulShift , +HasDummyMaskOpShift = VLMulShift + 3 , +HasDummyMaskOpMask = 1 << HasDummyMaskOpShift , +WritesElement0Shift HasDummyMaskOpShift + 1 , +WritesElement0Mask = 1 << WritesElement0Shift , +HasMergeOpShift = WritesElement0Shift + 1 , +HasMergeOpMask = 1 << HasMergeOpShift , +HasSEWOpShift = HasSEWOpShift + 1 , +HasSEWOpMask = 1 << HasSEWOpShift , +HasVLOpShift = HasSEWOpShift + 1 , +HasVLOpMask = 1 << HasVLOpShift , +} ; +enum { +MO_None = 0 , +MO_CALL = 1 , +MO_PLT = 2 , +MO_LO = 3 , +MO_HI = 4 , +MO_PCREL_LO = 5 , +MO_PCREL_HI = 6 , +MO_GOT_HI = 7 , +MO_TPREL_LO = 8 , +MO_TPREL_HI = 9 , +MO_TPREL_ADD = 10 , +MO_TLS_GOT_HI = 11 , +MO_TLS_GD_HI = 12 , +MO_DIRECT_FLAG_MASK = 15 +} ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/OperandType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/OperandType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..983a9fbcced1c3b9f1bcf68032806605ed8aedd0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/OperandType.cpp @@ -0,0 +1,8 @@ +enum OperandType : unsigned { +OPERAND_FIRST_RISCV_IMM = MCOI :: OPERAND_FIRST_TARGET , +OPERAND_UIMM4 = OPERAND_FIRST_RISCV_IMM , +OPERAND_UIMM5 , +OPERAND_UIMM12 , +OPERAND_UIMMLOG2XLEN , +OPERAND_LAST_RISCV_IMM OPERAND_UIMMLOG2XLEN +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6fd82173267ffe1a141a4ccf55b89e4cae9ba1b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RISCVVSEW.cpp @@ -0,0 +1,10 @@ +enum class RISCVVSEW { +SEW_8 = 0 , +SEW_16 , +SEW_32 , +SEW_64 , +SEW_128 , +SEW_256 , +SEW_512 , +SEW_1024 , +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..04397cb26419a3b482dac55f78f74f9f2246284c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RVVConstraintType.cpp @@ -0,0 +1,6 @@ +enum RVVConstraintType { +NoConstraint = 0 , +VS2Constraint = 0b001 , +VS1Constraint = 0b010 , +VMConstraint = 0b100 +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cea4c4f62e6b6477a15b997dfeb3942a5b63578a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/RoundingMode.cpp @@ -0,0 +1,9 @@ +enum RoundingMode { +RNE = 0 , +RTZ = 1 , +RDN = 2 , +RUP = 3 , +RMM = 4 , +DYN = 7 , +Invalid +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/VLMUL.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/VLMUL.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97cedb5d2821dadb7b2885640b07b3950e394658 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/VLMUL.cpp @@ -0,0 +1,10 @@ +enum class RISCVVLMUL { +LMUL_1 = 0 , +LMUL_2 , +LMUL_4 , +LMUL_8 , +LMUL_RESERVED , +LMUL_F8 , +LMUL_F4 , +LMUL_F2 +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/VMTs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/VMTs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..508a687e2d6c50092cfbbbf2c693aacd4a16482d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/VMTs.cpp @@ -0,0 +1,37 @@ +enum RISCVVMVTs { +vint8mf8_t = MVT :: nxv1i8 , +vint8mf4_t = MVT :: nxv2i8 , +vint8mf2_t = MVT :: nxv4i8 , +vint8m1_t = MVT :: nxv8i8 , +vint8m2_t = MVT :: nxv16i8 , +vint8m4_t = MVT :: nxv32i8 , +vint8m8_t = MVT :: nxv64i8 , +vint16mf4_t = MVT :: nxv1i16 , +vint16mf2_t = MVT :: nxv2i16 , +vint16m1_t = MVT :: nxv4i16 , +vint16m2_t = MVT :: nxv8i16 , +vint16m4_t = MVT :: nxv16i16 , +vint16m8_t = MVT :: nxv32i16 , +vint32mf2_t = MVT :: nxv1i32 , +vint32m1_t = MVT :: nxv2i32 , +vint32m2_t = MVT :: nxv4i32 , +vint32m4_t = MVT :: nxv8i32 , +vint32m8_t = MVT :: nxv16i32 , +vint64m1_t = MVT :: nxv1i64 , +vint64m2_t = MVT :: nxv2i64 , +vint64m4_t = MVT :: nxv4i64 , +vint64m8_t = MVT :: nxv8i64 , +vfloat16mf4_t = MVT :: nxv1f16 , +vfloat16mf2_t = MVT :: nxv2f16 , +vfloat16m1_t = MVT :: nxv4f16 , +vfloat16m2_t = MVT :: nxv8f16 , +vfloat16m4_t = MVT :: nxv16f16 , +vfloat16m8_t = MVT :: nxv32f16 , +vfloat32mf2_t = MVT :: nxv1f32 , +vfloat32m1_t = MVT :: nxv2f32 , +vfloat32m2_t = MVT :: nxv4f32 , +vfloat32m4_t = MVT :: nxv8f32 , +vfloat32m8_t = MVT :: nxv16f32 , +vfloat64m1_t = MVT :: nxv1f64 , +vfloat64m2_t = +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56ee11a8c5a4fc5157f8a49121c5cd3de26b08ec --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/computeTargetABI.cpp @@ -0,0 +1,14 @@ +ABI computeTargetABI ( const Triple & TT , FeatureBitset FeatureBits , StringRef ABIName ) { +auto TargetABI = getTargetABI ( ABIName ) ; +if ( ! ABIName . empty ( ) ) { +if ( TT . isRISCV64 ( ) ) { +TargetABI = RISCVABIInfo :: N64 ( ) ; +} +} +if ( ! ABIName . empty ( ) ) { +if ( ! TT . isRISCV64 ( ) ) { +TargetABI = RISCVABIInfo :: O32 ( ) ; +} +} +return TargetABI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2a6bf078a014887a1743d788e548c67a7b2b39c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/getTargetABI.cpp @@ -0,0 +1,24 @@ +ABI getTargetABI ( StringRef Str ) { +if ( Str == "ilp32" ) { +return ABI_ILP32 ; +} +if ( Str == "ilp32f" ) { +return ABI_ILP32F ; +} +if ( Str == "ilp32d" ) { +return ABI_ILP32D ; +} +if ( Str == "ilp32e" ) { +return ABI_ILP32E ; +} +if ( Str == "lp64" ) { +return ABI_LP64 ; +} +if ( Str == "lp64f" ) { +return ABI_LP64F ; +} +if ( Str == "lp64d" ) { +return ABI_LP64D ; +} +return ABI_Unknown ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7fad2b0de6d6e1503cbd283b5003e0ab6da3a42 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/roundingModeToString.cpp @@ -0,0 +1,21 @@ +inline static StringRef roundingModeToString ( RoundingMode RndMod ) { +if ( RndMod == RISCVFPRndMode::RNE ) { +return "rne" ; +} +if ( RndMod == RISCVFPRndMode::RTZ ) { +return "rtz" ; +} +if ( RndMod == RISCVFPRndMode::RDN ) { +return "rdn" ; +} +if ( RndMod == RISCVFPRndMode::RUP ) { +return "rup" ; +} +if ( RndMod == RISCVFPRndMode::RMM ) { +return "rmm" ; +} +if ( RndMod == RISCVFPRndMode::DYN ) { +return "dyn" ; +} +llvm_unreachable ( "Unknown floating point rounding mode" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58c60f6342330ee237368718c3e54cfee614f7ce --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/stringToRoundingMode.cpp @@ -0,0 +1,21 @@ +inline static RoundingMode stringToRoundingMode ( StringRef Str ) { +if ( Str == "rne" ) { +return RISCVFPRndMode::RNE ; +} +if ( Str == "rtz" ) { +return RISCVFPRndMode::RTZ ; +} +if ( Str == "rdn" ) { +return RISCVFPRndMode::RDN ; +} +if ( Str == "rup" ) { +return RISCVFPRndMode::RUP ; +} +if ( Str == "rmm" ) { +return RISCVFPRndMode::RMM ; +} +if ( Str == "dyn" ) { +return RISCVFPRndMode::DYN ; +} +return RISCVFPRndMode::Invalid ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/validate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/validate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f87f8d9df4e6e209200b63471299274b467fe694 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/BaseInfo/validate.cpp @@ -0,0 +1,7 @@ +void validate ( const Triple & TT , const FeatureBitset & FeatureBits ) { +if ( ! isABI_O32 ( ) ) { +if ( ! useOddSPReg ( ) ) { +report_fatal_error ( "RV32E can't be enabled for an RV64 target" ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f59b3cb6e8893de00e9e8dd359ecf960dab21710 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +RISCVELFObjectWriter :: RISCVELFObjectWriter ( uint8_t OSABI , bool Is64Bit ) : MCELFObjectTargetWriter ( Is64Bit , OSABI , EM_RISCV , true ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ceb74bbf8dcf76925d64be0135800a6901b3e80 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/createELFObjectWriter.cpp @@ -0,0 +1,3 @@ +std :: unique_ptr < MCObjectTargetWriter > llvm :: createRISCVELFObjectWriter ( uint8_t OSABI , bool Is64Bit ) { +return std :: make_unique < RISCVELFObjectWriter > ( OSABI , Is64Bit ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e320521f0ce7649704031005ff44f9cbafcc7d06 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/getRelocType.cpp @@ -0,0 +1,134 @@ +unsigned RISCVELFObjectWriter :: getRelocType ( MCContext & Ctx , const MCValue & Target , const MCFixup & Fixup , bool IsPCRel ) const { +const RISCVMCExpr * SExpr ; +if ( SExpr = dyn_cast < RISCVMCExpr > ( Fixup . getValue ( ) ) ) { +if ( SExpr -> getKind ( ) == RISCVMCExpr :: VK_32_PCREL ) { +return ELF :: R_RISCV_32_PCREL ; +} +} +const MCExpr * Expr ; +Expr = Fixup . getValue ( ) ; +unsigned Kind ; +Kind = Fixup . getTargetKind ( ) ; +if ( Kind >= FirstLiteralRelocationKind ) { +return Kind - FirstLiteralRelocationKind ; +} +if ( IsPCRel ) { +if ( Kind == FK_PCRel_4 ) { +return ELF :: R_RISCV_32_PCREL ; +} +if ( Kind == RISCV :: fixup_RISCV_pcrel_hi20 ) { +return ELF :: R_RISCV_PCREL_HI20 ; +} +if ( Kind == RISCV :: fixup_RISCV_pcrel_lo12_i ) { +return ELF :: R_RISCV_PCREL_LO12_I ; +} +if ( Kind == RISCV :: fixup_RISCV_pcrel_lo12_s ) { +return ELF :: R_RISCV_PCREL_LO12_S ; +} +if ( Kind == FK_Data_4 ) { +return ELF :: R_RISCV_32_PCREL ; +} +if ( Kind == RISCV :: fixup_RISCV_got_hi20 ) { +return ELF :: R_RISCV_GOT_HI20 ; +} +if ( Kind == RISCV :: fixup_RISCV_tls_got_hi20 ) { +return ELF :: R_RISCV_TLS_GOT_HI20 ; +} +if ( Kind == RISCV :: fixup_RISCV_tls_gd_hi20 ) { +return ELF :: R_RISCV_TLS_GD_HI20 ; +} +if ( Kind == RISCV :: fixup_RISCV_jal ) { +return ELF :: R_RISCV_JAL ; +} +if ( Kind == RISCV :: fixup_RISCV_branch ) { +return ELF :: R_RISCV_BRANCH ; +} +if ( Kind == RISCV :: fixup_RISCV_rvc_jump ) { +return ELF :: R_RISCV_RVC_JUMP ; +} +if ( Kind == RISCV :: fixup_RISCV_rvc_branch ) { +return ELF :: R_RISCV_RVC_BRANCH ; +} +if ( Kind == RISCV :: fixup_RISCV_call ) { +return ELF :: R_RISCV_CALL ; +} +if ( Kind == RISCV :: fixup_RISCV_call_plt ) { +return ELF :: R_RISCV_CALL_PLT ; +} +Ctx . reportError ( Fixup . getLoc ( ) , "Unsupported relocation type" ) ; +return ELF :: R_RISCV_NONE ; +} +if ( Kind == FK_Data_4 ) { +return ELF :: R_RISCV_32 ; +} +if ( Kind == FK_Data_8 ) { +return ELF :: R_RISCV_64 ; +} +if ( Kind == FK_Data_Add_1 ) { +return ELF :: R_RISCV_ADD8 ; +} +if ( Kind == FK_Data_Add_2 ) { +return ELF :: R_RISCV_ADD16 ; +} +if ( Kind == FK_Data_Add_4 ) { +return ELF :: R_RISCV_ADD32 ; +} +if ( Kind == FK_Data_Add_8 ) { +return ELF :: R_RISCV_ADD64 ; +} +if ( Kind == FK_Data_1 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "1-byte data relocations not supported" ) ; +return ELF :: R_RISCV_NONE ; +} +if ( Kind == FK_Data_2 ) { +Ctx . reportError ( Fixup . getLoc ( ) , "2-byte data relocations not supported" ) ; +return ELF :: R_RISCV_NONE ; +} +if ( Kind == FK_Data_Add_6b ) { +return ELF :: R_RISCV_SET6 ; +} +if ( Kind == FK_Data_Sub_1 ) { +return ELF :: R_RISCV_SUB8 ; +} +if ( Kind == FK_Data_Sub_2 ) { +return ELF :: R_RISCV_SUB16 ; +} +if ( Kind == FK_Data_Sub_4 ) { +return ELF :: R_RISCV_SUB32 ; +} +if ( Kind == FK_Data_Sub_8 ) { +return ELF :: R_RISCV_SUB64 ; +} +if ( Kind == FK_Data_Sub_6b ) { +return ELF :: R_RISCV_SUB6 ; +} +if ( Kind == RISCV :: fixup_RISCV_hi20 ) { +return ELF :: R_RISCV_HI20 ; +} +if ( Kind == RISCV :: fixup_RISCV_lo12_i ) { +return ELF :: R_RISCV_LO12_I ; +} +if ( Kind == RISCV :: fixup_RISCV_lo12_s ) { +return ELF :: R_RISCV_LO12_S ; +} +if ( Kind == RISCV :: fixup_RISCV_tprel_hi20 ) { +return ELF :: R_RISCV_TPREL_HI20 ; +} +if ( Kind == RISCV :: fixup_RISCV_tprel_lo12_i ) { +return ELF :: R_RISCV_TPREL_LO12_I ; +} +if ( Kind == RISCV :: fixup_RISCV_tprel_lo12_s ) { +return ELF :: R_RISCV_TPREL_LO12_S ; +} +if ( Kind == RISCV :: fixup_RISCV_tprel_add ) { +return ELF :: R_RISCV_TPREL_ADD ; +} +if ( Kind == RISCV :: fixup_RISCV_relax ) { +return ELF :: R_RISCV_RELAX ; +} +if ( Kind == RISCV :: fixup_RISCV_align ) { +return ELF :: R_RISCV_ALIGN ; +} +Ctx . reportError ( Fixup . getLoc ( ) , "Unsupported relocation type" ) ; +return ELF :: R_RISCV_NONE ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d32e5d47cdf21c903c9c0bba5ef56efc3a118a62 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/needsRelocateWithSymbol.cpp @@ -0,0 +1,3 @@ +bool needsRelocateWithSymbol ( const MCSymbol & Sym , unsigned Type ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff04c0f4361cc2216f531f31de770817c1973c32 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFObjectWriter/~ELFObjectWriter.cpp @@ -0,0 +1,2 @@ +RISCVELFObjectWriter :: ~ RISCVELFObjectWriter ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d4a8b8d43739a9660b269fe60e4c13f60b08b9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/AttributeItem.cpp @@ -0,0 +1,6 @@ +struct AttributeItem { +AttributeType Type ; +unsigned Tag ; +unsigned IntValue ; +std :: string StringValue ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..11e84b4eac2ba89f7bac001f476bce2df9b96af0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/AttributeType.cpp @@ -0,0 +1,6 @@ +enum class AttributeType { +Hidden , +Numeric , +Text , +NumericAndText +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6e12429a45a353e00b78ac06140a37e2f380364 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/TargetELFStreamer.cpp @@ -0,0 +1,21 @@ +RISCVTargetELFStreamer :: RISCVTargetELFStreamer ( MCStreamer & S , const MCSubtargetInfo & STI ) : RISCVTargetStreamer ( S ) , CurrentVendor ( "RISCV" ) { +MCAssembler & MCA ; +MCA = getStreamer ( ) . getAssembler ( ) ; +const FeatureBitset & Features ; +Features = STI . getFeatureBits ( ) ; +RISCVMCAsmBackend & MAB ; +MAB = static_cast < RISCVMCAsmBackend & > ( MCA . getBackend ( ) ) ; +unsigned EFlags ; +EFlags = MCA . getELFHeaderEFlags ( ) ; +RISCVABI :: ABI ABI ; +ABI = MAB . getTargetABI ( ) ; +if ( Features [ RISCV :: FeatureStdExtC ] ) { +EFlags = EFlags | ELF :: EF_RISCV_RVC ; +} +EFlags = EFlags | ELF :: EF_RISCV_FLOAT_ABI_SINGLE ; +EFlags = EFlags | ELF :: EF_RISCV_FLOAT_ABI_SINGLE ; +EFlags = EFlags | ELF :: EF_RISCV_FLOAT_ABI_DOUBLE ; +EFlags = EFlags | ELF :: EF_RISCV_FLOAT_ABI_DOUBLE ; +EFlags = EFlags | ELF :: EF_RISCV_RVE ; +MCA . setELFHeaderEFlags ( EFlags ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..223eb9cec883b2156a786b7ea36eaa0a955d8f7f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/calculateContentSize.cpp @@ -0,0 +1,29 @@ +size_t RISCVTargetELFStreamer :: calculateContentSize ( ) const { +size_t Result ; +Result = 0 ; +size_t i ; +for ( i = 0 ; i < Contents . size ( ) ; ++ i ) { +AttributeItem item ; +item = Contents [ i ] ; +if ( item . Type == AttributeType :: Hidden ) { +continue ; +} +if ( item . Type == AttributeType :: Numeric ) { +Result = Result + getULEB128Size ( item . Tag ) ; +Result = Result + getULEB128Size ( item . IntValue ) ; +continue ; +} +if ( item . Type == AttributeType :: Text ) { +Result = Result + getULEB128Size ( item . Tag ) ; +Result = Result + item . StringValue . size ( ) + 1 ; +continue ; +} +if ( item . Type == AttributeType :: NumericAndText ) { +Result = Result + getULEB128Size ( item . Tag ) ; +Result = Result + getULEB128Size ( item . IntValue ) ; +Result = Result + item . StringValue . size ( ) + 1 ; +continue ; +} +} +return Result ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f741530d375c3cbf0363365222dd8bda3a0c8411 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer :: emitAttribute ( unsigned Attribute , unsigned Value ) { +setAttributeItem ( Attribute , Value , true ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..07f53856a0f83f3f5d85bb7eb1eba3d943c81cf3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionNoPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7bc1941da3c7983e3aae98aa1e217fd2e505b73 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionNoRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..432808af0bf195674ccb6456bbd734c3f0c2e030 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionNoRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..221d2413d391623adaf82613647e6d2a62160f5b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7801d7a5bfb8715cc3a8519097a296c207a9cdfd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionPop ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..15fef759efa24f392ad24c09a68450eef41b0a54 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionPush ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39cd0aac779cb60dc47ba36e533136e981c4c7df --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e4a732ca57a30667c7149a2099611993919d44d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,2 @@ +void RISCVTargetELFStreamer :: emitDirectiveOptionRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22d67c49f25f2c40c9462c67be2f74a6c68393d8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer :: emitIntTextAttribute ( unsigned Attribute , unsigned IntValue , StringRef StringValue ) { +setAttributeItems ( Attribute , IntValue , StringValue , true ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5e987c047ba1af38369070668127c9f1b87b0b4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/emitTextAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetELFStreamer :: emitTextAttribute ( unsigned Attribute , StringRef String ) { +setAttributeItem ( Attribute , String , true ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7adeebfc9e9d262fb5020554a13040f8a04c336 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/finishAttributeSection.cpp @@ -0,0 +1,45 @@ +void RISCVTargetELFStreamer :: finishAttributeSection ( ) { +if ( Contents . empty ( ) ) { +return ; +} +MCELFStreamer & Streamer = getStreamer ( ) ; +if ( AttributeSection ) { +Streamer . SwitchSection ( AttributeSection ) ; +} +if ( ! AttributeSection ) { +AttributeSection = Streamer . getContext ( ) . getELFSection ( ".RISCV_lower.attributes" , ELF :: SHT_RISCV_ATTRIBUTES , 0 ) ; +Streamer . SwitchSection ( AttributeSection ) ; +Streamer . emitInt8 ( ELFAttrs :: Format_Version ) ; +} +const size_t VendorHeaderSize = 4 + CurrentVendor . size ( ) + 1 ; +const size_t TagHeaderSize = 1 + 4 ; +const size_t ContentsSize = calculateContentSize ( ) ; +Streamer . emitInt32 ( VendorHeaderSize + TagHeaderSize + ContentsSize ) ; +Streamer . emitBytes ( CurrentVendor ) ; +Streamer . emitInt8 ( 0 ) ; +Streamer . emitInt8 ( ELFAttrs :: File ) ; +Streamer . emitInt32 ( TagHeaderSize + ContentsSize ) ; +size_t i ; +for ( i = 0 ; i < Contents . size ( ) ; ++ i ) { +AttributeItem item ; +item = Contents [ i ] ; +Streamer . emitULEB128IntValue ( item . Tag ) ; +if ( item . Type == AttributeType :: Numeric ) { +Streamer . emitULEB128IntValue ( item . IntValue ) ; +continue ; +} +if ( item . Type == AttributeType :: Text ) { +Streamer . emitBytes ( item . StringValue ) ; +Streamer . emitInt8 ( 0 ) ; +continue ; +} +if ( item . Type == AttributeType :: NumericAndText ) { +Streamer . emitULEB128IntValue ( item . IntValue ) ; +Streamer . emitBytes ( item . StringValue ) ; +Streamer . emitInt8 ( 0 ) ; +continue ; +} +llvm_unreachable ( "Invalid attribute type" ) ; +} +Contents . clear ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4c4f3a04f8aff4a632364d2dd166a8131e8ce0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/getAttributeItem.cpp @@ -0,0 +1,9 @@ +AttributeItem * getAttributeItem ( unsigned Attribute ) { +size_t i ; +for ( i = 0 ; i < Contents . size ( ) ; ++ i ) { +if ( Contents [ i ] . Tag == Attribute ) { +return & Contents [ i ] ; +} +} +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de4607b8b5b09fac89677943345a853723f8fbe5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/getStreamer.cpp @@ -0,0 +1,3 @@ +MCELFStreamer & RISCVTargetELFStreamer :: getStreamer ( ) { +return static_cast < MCELFStreamer & > ( Streamer ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4226193c148e049fab7718f81ce0f0309e9557d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItem1.cpp @@ -0,0 +1,12 @@ +void setAttributeItem ( unsigned Attribute , unsigned Value , bool OverwriteExisting ) { +AttributeItem * Item ; +if ( Item = getAttributeItem ( Attribute ) ) { +if ( ! OverwriteExisting ) { +return ; +} +Item -> Type = AttributeType :: Numeric ; +Item -> IntValue = Value ; +return ; +} +Contents . push_back ( { AttributeType :: Numeric , Attribute , Value , "" } ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b05a1b3223da60321ec2a64b1c6e99126cbe4e0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItem2.cpp @@ -0,0 +1,12 @@ +void setAttributeItem ( unsigned Attribute , StringRef Value , bool OverwriteExisting ) { +AttributeItem * Item ; +if ( Item = getAttributeItem ( Attribute ) ) { +if ( ! OverwriteExisting ) { +return ; +} +Item -> Type = AttributeType :: Text ; +Item -> StringValue = std :: string ( Value ) ; +return ; +} +Contents . push_back ( { AttributeType :: Text , Attribute , 0 , std :: string ( Value ) } ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52f682e8808f82b0ac277c275f668b743d449d66 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/ELFStreamer/setAttributeItems.cpp @@ -0,0 +1,13 @@ +void setAttributeItems ( unsigned Attribute , unsigned IntValue , StringRef StringValue , bool OverwriteExisting ) { +AttributeItem * Item ; +if ( Item = getAttributeItem ( Attribute ) ) { +if ( ! OverwriteExisting ) { +return ; +} +Item -> Type = AttributeType :: NumericAndText ; +Item -> IntValue = IntValue ; +Item -> StringValue = std :: string ( StringValue ) ; +return ; +} +Contents . push_back ( { AttributeType :: NumericAndText , Attribute , IntValue , std :: string ( StringValue ) } ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/FixupKind/enumFixups.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/FixupKind/enumFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..db37e8df1e60ff64c601e16ed87caeade2b8381b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/FixupKind/enumFixups.cpp @@ -0,0 +1,25 @@ +enum Fixups { +fixup_RISCV_hi20 = FirstTargetFixupKind , +fixup_RISCV_lo12_i , +fixup_RISCV_lo12_s , +fixup_RISCV_pcrel_hi20 , +fixup_RISCV_pcrel_lo12_i , +fixup_RISCV_pcrel_lo12_s , +fixup_RISCV_got_hi20 , +fixup_RISCV_tprel_hi20 , +fixup_RISCV_tprel_lo12_i , +fixup_RISCV_tprel_lo12_s , +fixup_RISCV_tprel_add , +fixup_RISCV_tls_got_hi20 , +fixup_RISCV_tls_gd_hi20 , +fixup_RISCV_jal , +fixup_RISCV_branch , +fixup_RISCV_rvc_jump , +fixup_RISCV_rvc_branch , +fixup_RISCV_call , +fixup_RISCV_call_plt , +fixup_RISCV_relax , +fixup_RISCV_align , +fixup_RISCV_invalid , +NumTargetFixupKinds = fixup_RISCV_invalid - FirstTargetFixupKind +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03a6f9a80a02f24cd41edcabd9292eba3dc4bd47 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/InstPrinter.cpp @@ -0,0 +1,2 @@ +RISCVInstPrinter ( const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI ) : MCInstPrinter ( MAI , MII , MRI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c405ea7e972c44d59814982604638618bba03a6a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/applyTargetSpecificCLOption.cpp @@ -0,0 +1,11 @@ +bool RISCVInstPrinter :: applyTargetSpecificCLOption ( StringRef Opt ) { +if ( Opt == "numeric" ) { +ArchRegNames = true ; +return true ; +} +if ( Opt == "no-aliases" ) { +NoAliases = true ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16f9a93427519381712835e6c00ec73754042e56 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/getRegisterName.cpp @@ -0,0 +1,3 @@ +const char * RISCVInstPrinter :: getRegisterName ( unsigned RegNo ) { +return getRegisterName ( RegNo , ArchRegNames ? RISCV :: NoRegAltName : RISCV :: ABIRegAltName ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..14bfb76e67751e7652cdbe3aa2da7d48bd797ecb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printAtomicMemOp.cpp @@ -0,0 +1,10 @@ +void RISCVInstPrinter :: printAtomicMemOp ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +const MCOperand & Op1 ; +Op1 = MI -> getOperand ( OpNo ) ; +const MCOperand & Op2 ; +Op2 = MI -> getOperand ( OpNo + 1 ) ; +OS << ")" ; +printRegName ( O , Op1 . getReg ( ) ) ; +unsigned Offset ; +OS << ")" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7734627aef205882093bc642208d07a76f0ab3b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printBranchOperand.cpp @@ -0,0 +1,17 @@ +void RISCVInstPrinter :: printBranchOperand ( const MCInst * MI , uint64_t Address , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & OS ) { +const MCOperand & MO = MI -> getOperand ( OpNo ) ; +if ( ! MO . isImm ( ) ) { +return printOperand ( MI , OpNo , STI , OS ) ; +} +if ( PrintBranchImmAsAddress ) { +uint64_t Target ; +Target = Address + MO . getImm ( ) ; +if ( ! STI . hasFeature ( RISCV :: Feature64Bit ) ) { +Target = Target & 0xffffffff ; +} +OS << formatHex ( Target ) ; +} +if ( ! PrintBranchImmAsAddress ) { +OS << MO . getImm ( ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e2b7cc822366a4a57165cd9980ee1fc32395d13 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printCSRSystemRegister.cpp @@ -0,0 +1,16 @@ +void RISCVInstPrinter :: printCSRSystemRegister ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +unsigned Val ; +Val = MI -> getOperand ( OpNo ) . getImm ( ) ; +return ; +const SysReg :: SysReg * Reg ; +Reg = SysReg :: lookupSysRegByEncoding ( Val ) ; +if ( Reg ) { +if ( Reg -> haveRequiredFeatures ( STI . getFeatureBits ( ) ) ) { +OS << Reg -> Name ; +} +} +if ( ! Reg ) { +return ; +if ( ! Reg -> haveRequiredFeatures ( STI . getFeatureBits ( ) ) ) { +return ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec50ac32da1905f2d50100a94432ba69b071e958 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printFRMArg.cpp @@ -0,0 +1,4 @@ +void RISCVInstPrinter :: printFRMArg ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +auto FRMArg = MI -> getOperand ( OpNo ) . getImm ( ) ; +OS << FPRndMode :: roundingModeToString ( MO . getImm ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d71d61a78dd1ca1f479a6ce346e8138bc6098a9a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printFenceArg.cpp @@ -0,0 +1,11 @@ +void RISCVInstPrinter :: printFenceArg ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +unsigned FenceArg = MI -> getOperand ( OpNo ) . getImm ( ) ; +assert ( ( FenceArg >> 4 ) == 0 ) && "Invalid immediate in printFenceArg!" ) ; +OS << 'i' ; +OS << 'o' ; +OS << 'r' ; +OS << 'w' ; +if ( FenceArg == 0 ) { +OS << "unknown" ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de8dd9b0d62309b6d04f18522701890f656d7481 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printInst.cpp @@ -0,0 +1,22 @@ +void RISCVInstPrinter :: printInst ( const MCInst * MI , uint64_t Address , StringRef Annot , const MCSubtargetInfo & STI , raw_ostream & O ) { +bool Res ; +Res = false ; +const MCInst * NewMI ; +MCInst UncompressedMI ; +if ( ! printAliasInstr ( MI , STI , O ) ) { +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +return ; +} +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +return ; +} +if ( ! printAliasInstr ( NewMI , Address , STI , O ) ) { +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +return ; +} +printInstruction ( NewMI , Address , STI , O ) ; +printAnnotation ( O , Annot ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a9e827c04ab195840f49a22f931c46a7a0ff36a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printOperand.cpp @@ -0,0 +1,14 @@ +void RISCVInstPrinter :: printOperand ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & OS , const char * Modifier ) { +assert ( ( Modifier == 0 || Modifier [ 0 ] == 0 ) && "No modifiers supported" ) ; +const MCOperand & Op = MI -> getOperand ( OpNo ) ; +if ( Op . isReg ( ) ) { +OS << getRegisterName ( Op . getReg ( ) ) ; +return ; +} +if ( Op . isImm ( ) ) { +OS << Op . getImm ( ) ; +return ; +} +assert ( Op . isExpr ( ) && "Unknown operand kind in printOperand" ) ; +Op . getExpr ( ) -> print ( OS , & MAI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printRegName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printRegName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3872b5d15950fcf2abb0abe7e5ba43aaa200d695 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printRegName.cpp @@ -0,0 +1,3 @@ +void RISCVInstPrinter :: printRegName ( raw_ostream & OS , unsigned RegNo ) const { +OS << getRegisterName ( RegNo ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..153e43ff1c490952d24e15ee86d401bb0195617f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printVMaskReg.cpp @@ -0,0 +1,9 @@ +void RISCVInstPrinter :: printVMaskReg ( const MCInst * MI , unsigned OpNo , const MCSubtargetInfo & STI , raw_ostream & O ) { +const MCOperand & Op1 ; +Op1 = MI -> getOperand ( OpNo ) ; +const MCOperand & Op2 ; +Op2 = MI -> getOperand ( OpNo + 1 ) ; +OS << ", " ; +printRegName ( O , Op1 . getReg ( ) ) ; +OS << ".t" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f6634da035e2d3267361cf4afcea7cc660407a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/InstPrinter/printVTypeI.cpp @@ -0,0 +1,5 @@ +void RISCVInstPrinter :: printVTypeI ( const MCInst * MI , unsigned OpNo , raw_ostream & O ) { +unsigned Imm ; +Imm = MI -> getOperand ( OpNo ) . getImm ( ) ; +RISCVVType :: printVType ( Imm , O ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91e70b43e2bd64ca7b4a3b6bba93fe842b01a9c6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +RISCVMCCodeEmitter ( MCContext & ctx , MCInstrInfo const & MCII ) : Ctx ( ctx ) , MCII ( MCII ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0bc1dd8240e3d519882ac752d968f2a5de249c52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/createMCCodeEmitter.cpp @@ -0,0 +1,3 @@ +MCCodeEmitter * llvm :: createRISCVMCCodeEmitter ( const MCInstrInfo & MCII , const MCRegisterInfo & MRI , MCContext & Ctx ) { +return new RISCVMCCodeEmitter ( Ctx , MCII ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b4558db02096e21988ad2489892b6e2849bfa92a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/encodeInstruction.cpp @@ -0,0 +1,50 @@ +void RISCVMCCodeEmitter :: encodeInstruction ( const MCInst & MI , raw_ostream & OS , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +verifyInstructionPredicates ( MI , computeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; +Desc = MCII . get ( MI . getOpcode ( ) ) ; +unsigned Size ; +Size = Desc . getSize ( ) ; +if ( MI . getOpcode ( ) == RISCV :: PseudoCALLReg ) { +expand_TLSDESCCALL ( MI , OS , Fixups , STI ) ; +MCNumEmitted = MCNumEmitted + 0 ; +return ; +} +if ( MI . getOpcode ( ) == RISCV :: PseudoCALL ) { +expand_CompilerBarrier ( MI , OS , Fixups , STI ) ; +MCNumEmitted = MCNumEmitted + 0 ; +return ; +} +if ( MI . getOpcode ( ) == RISCV :: PseudoTAIL ) { +expand_SPACE ( MI , OS , Fixups , STI ) ; +MCNumEmitted = MCNumEmitted + 0 ; +return ; +} +if ( MI . getOpcode ( ) == RISCV :: PseudoJump ) { +expand_EH_SjLj_Setup ( MI , OS , Fixups , STI ) ; +MCInst TmpInst ; +uint16_t Binary ; +uint32_t Binary ; +const MCExpr * CallExpr ; +CallExpr = MI . getOperand ( 0 ) . getExpr ( ) ; +TmpInst = MCInstBuilder ( RISCV :: JS ) . addImm ( 0 ) ; +TmpInst = MCInstBuilder ( RISCV :: J ) . addImm ( - 2 ) ; +Binary = getBinaryCodeForInstr ( TmpInst , Fixups , STI ) ; +expand_COPY_TO_REGCLASS ( MI , OS , Fixups , STI ) ; +return ; +} +if ( Size == 2 ) { +uint16_t Bits ; +Bits = getBinaryCodeForInstr ( MI , Fixups , STI ) ; +support :: endian :: write < uint16_t > ( OS , Bits , support :: little ) ; +MCNumEmitted = MCNumEmitted + 1 ; +return ; +} +if ( Size == 4 ) { +uint32_t Bits ; +Bits = getBinaryCodeForInstr ( MI , Fixups , STI ) ; +support :: endian :: write < uint32_t > ( OS , Bits , support :: little ) ; +MCNumEmitted = MCNumEmitted + 1 ; +return ; +} +llvm_unreachable ( "Unhandled encodeInstruction length!" ) ; +MCNumEmitted = MCNumEmitted + 1 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..557abd8f4ab4b387e040a0a1b71a39bb6d7954ac --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getImmOpValue.cpp @@ -0,0 +1,72 @@ +unsigned RISCVMCCodeEmitter :: getImmOpValue ( const MCInst & MI , unsigned OpIdx , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +const MCOperand & MO ; +MO = MI . getOperand ( OpIdx ) ; +if ( MO . isReg ( ) ) { +return Ctx . getRegisterInfo ( ) -> getEncodingValue ( MO . getReg ( ) ) ; +} +if ( MO . isImm ( ) ) { +return static_cast < unsigned > ( MO . getImm ( ) ) ; +} +RISCV :: Fixups FixupKind ; +FixupKind = RISCV :: Fixups ( 0 ) ; +MCExpr :: ExprKind Kind ; +if ( Kind == MCExpr :: Constant ) { +return cast < MCConstantExpr > ( Expr ) -> getValue ( ) ; +} +if ( Kind == MCExpr :: Binary ) { +} +assert ( Kind == MCExpr :: SymbolRef && "unknown MCExpr kind" ) ; +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_LO ) { +FixupKind = RISCV :: fixup_RISCV_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_HI ) { +FixupKind = RISCV :: fixup_RISCV_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_PCREL_LO ) { +FixupKind = RISCV :: fixup_RISCV_pcrel_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_PCREL_HI ) { +FixupKind = RISCV :: fixup_RISCV_pcrel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_GOT_HI ) { +FixupKind = RISCV :: fixup_RISCV_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_LO ) { +FixupKind = RISCV :: fixup_RISCV_tprel_lo12_s ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_HI ) { +FixupKind = RISCV :: fixup_RISCV_tprel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GOT_HI ) { +FixupKind = RISCV :: fixup_RISCV_tls_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GD_HI ) { +FixupKind = RISCV :: fixup_RISCV_tls_gd_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_CALL ) { +FixupKind = RISCV :: fixup_RISCV_call ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +llvm_unreachable ( "Unknown fixup kind!" ) ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc087f34b1ae45d65d7ae6d8948ebb00f7d9ac75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getImmOpValueAsr1.cpp @@ -0,0 +1,72 @@ +unsigned RISCVMCCodeEmitter :: getImmOpValueAsr1 ( const MCInst & MI , unsigned OpIdx , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +const MCOperand & MO ; +MO = MI . getOperand ( OpIdx ) ; +if ( MO . isReg ( ) ) { +return Ctx . getRegisterInfo ( ) -> getEncodingValue ( MO . getReg ( ) ) ; +} +if ( MO . isImm ( ) ) { +return static_cast < unsigned > ( MO . getImm ( ) ) ; +} +RISCV :: Fixups FixupKind ; +FixupKind = RISCV :: Fixups ( 0 ) ; +MCExpr :: ExprKind Kind ; +if ( Kind == MCExpr :: Constant ) { +return cast < MCConstantExpr > ( Expr ) -> getValue ( ) ; +} +if ( Kind == MCExpr :: Binary ) { +} +assert ( Kind == MCExpr :: SymbolRef && "unknown MCExpr kind" ) ; +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_LO ) { +FixupKind = RISCV :: fixup_RISCV_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_HI ) { +FixupKind = RISCV :: fixup_RISCV_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_PCREL_LO ) { +FixupKind = RISCV :: fixup_RISCV_pcrel_lo12_i ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_PCREL_HI ) { +FixupKind = RISCV :: fixup_RISCV_pcrel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_GOT_HI ) { +FixupKind = RISCV :: fixup_RISCV_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_LO ) { +FixupKind = RISCV :: fixup_RISCV_tprel_lo12_s ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_HI ) { +FixupKind = RISCV :: fixup_RISCV_tprel_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GOT_HI ) { +FixupKind = RISCV :: fixup_RISCV_tls_got_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GD_HI ) { +FixupKind = RISCV :: fixup_RISCV_tls_gd_hi20 ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +if ( cast < MCSymbolRefExpr > ( Expr ) -> getKind ( ) == RISCVMCExpr :: VK_RISCV_CALL ) { +FixupKind = RISCV :: fixup_RISCV_call ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} +llvm_unreachable ( "Unknown fixup kind!" ) ; +Fixups . push_back ( MCFixup :: create ( 0 , MO . getExpr ( ) , MCFixupKind ( FixupKind ) , MI . getLoc ( ) ) ) ; +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f4e4b8f49492851005796a7a1079058bd2b9a37 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getMachineOpValue.cpp @@ -0,0 +1,10 @@ +unsigned RISCVMCCodeEmitter :: getMachineOpValue ( const MCInst & MI , const MCOperand & MO , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +if ( MO . isReg ( ) ) { +return Ctx . getRegisterInfo ( ) -> getEncodingValue ( MO . getReg ( ) ) ; +} +if ( MO . isImm ( ) ) { +return static_cast < unsigned > ( MO . getImm ( ) ) ; +} +llvm_unreachable ( "Unhandled expression!" ) ; +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1dc996a036c4b2da1019fd7acc6d204733e727b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/getVMaskReg.cpp @@ -0,0 +1,11 @@ +unsigned RISCVMCCodeEmitter :: getVMaskReg ( const MCInst & MI , unsigned OpNo , SmallVectorImpl < MCFixup > & Fixups , const MCSubtargetInfo & STI ) const { +auto MO = MI . getOperand ( OpNo ) ; +assert ( MO . isReg ( ) && "Expected a register." ) ; +if ( MO . getReg ( ) == RISCV :: V0 ) { +return 0x00 ; +} +if ( MO . getReg ( ) == RISCV :: NoRegister ) { +return 1 ; +} +llvm_unreachable ( "Invalid mask register." ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57285bc5a63128bbc884fa05d89c94e01e749b17 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCCodeEmitter/~MCCodeEmitter.cpp @@ -0,0 +1,2 @@ +~ RISCVMCCodeEmitter ( ) override { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/MCExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/MCExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..74f5e60780169fc028698eef8dc158ccc2a8db40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/MCExpr.cpp @@ -0,0 +1,2 @@ +explicit RISCVMCExpr ( const MCExpr * Expr , VariantKind Kind ) : Expr ( Expr ) , Kind ( Kind ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/classof1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b052897719aaca60ef09baece651fd4286e607f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/classof1.cpp @@ -0,0 +1,3 @@ +static bool classof ( const MCExpr * E ) { +return E -> getKind ( ) == MCExpr :: Target ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/classof2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..93cd72fefe4b02085f454f52c4bf2f5a49f24e98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/classof2.cpp @@ -0,0 +1,3 @@ +static bool classof ( const RISCVMCExpr * ) { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/create.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/create.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a51ee50f0d3ca2586fb2c47480f8c2643d58c4d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/create.cpp @@ -0,0 +1,3 @@ +const RISCVMCExpr * RISCVMCExpr :: create ( const MCExpr * Expr , VariantKind Kind , MCContext & Ctx ) { +return new ( Ctx ) RISCVMCExpr ( Expr , Kind ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ce966d7803ce1640f58b8ba22ec83ff8348f03b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/enumVariantKind.cpp @@ -0,0 +1,17 @@ +enum VariantKind { +VK_RISCV_None , +VK_RISCV_LO , +VK_RISCV_HI , +VK_RISCV_PCREL_LO , +VK_RISCV_PCREL_HI , +VK_RISCV_GOT_HI , +VK_RISCV_TPREL_LO , +VK_RISCV_TPREL_HI , +VK_RISCV_TPREL_ADD , +VK_RISCV_TLS_GOT_HI , +VK_RISCV_TLS_GD_HI , +VK_RISCV_CALL , +VK_RISCV_CALL_PLT , +VK_RISCV_32_PCREL , +VK_RISCV_Invalid , +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2c9260a3a6e5c4971230a8404128ebf2b47fe589 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsConstant.cpp @@ -0,0 +1,9 @@ +bool RISCVMCExpr :: evaluateAsConstant ( int64_t & Res ) const { +MCValue Value ; +return false ; +} +if ( ! Value . isAbsolute ( ) ) { +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp new file mode 100644 index 0000000000000000000000000000000000000000..af7a4bab966adc0b94128d2c35a08817b6d38863 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsInt64.cpp @@ -0,0 +1,11 @@ +int64_t RISCVMCExpr :: evaluateAsInt64 ( int64_t Value ) const { +if ( Kind == RISCVMCExpr :: VK_RISCV_LO ) { +Value = static_cast < uint64_t > ( ( Value << 52 ) >> 52 ) ; +return Value ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_HI ) { +Value = static_cast < uint64_t > ( ( Value + 0x800 ) >> 12 ) ; +return Value ; +} +llvm_unreachable ( "Invalid kind" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21d47913f73595e285cec77f5494ac51d58e77b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/evaluateAsRelocatableImpl.cpp @@ -0,0 +1,41 @@ +bool RISCVMCExpr :: evaluateAsRelocatableImpl ( MCValue & Res , const MCAsmLayout * Layout , const MCFixup * Fixup ) const { +MCValue Value ; +if ( ! getSubExpr ( ) -> evaluateAsRelocatable ( Res , Layout , Fixup ) ) { +return false ; +} +if ( Res . getSymA ( ) ) { +if ( Res . getSymB ( ) ) { +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_LO ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_HI ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_PCREL_LO ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_PCREL_HI ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_GOT_HI ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_LO ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_HI ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_ADD ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GOT_HI ) { +return false ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GD_HI ) { +return false ; +} +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..00a5c41996b4821d7075c77e4ac4311bbd9c40e3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/findAssociatedFragment.cpp @@ -0,0 +1,3 @@ +MCFragment * findAssociatedFragment ( ) const override { +return getSubExpr ( ) -> findAssociatedFragment ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1dd0c3c0369c870425307c557b40dfd78f60bfcf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixups.cpp @@ -0,0 +1,11 @@ +void RISCVMCExpr :: fixELFSymbolsInTLSFixups ( MCAssembler & Asm ) const { +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TPREL_HI ) { +fixELFSymbolsInTLSFixupsImpl ( getSubExpr ( ) , Asm ) ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GOT_HI ) { +fixELFSymbolsInTLSFixupsImpl ( getSubExpr ( ) , Asm ) ; +} +if ( getKind ( ) == RISCVMCExpr :: VK_RISCV_TLS_GD_HI ) { +fixELFSymbolsInTLSFixupsImpl ( getSubExpr ( ) , Asm ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..09abc3a6f4c60e0906522ecfba24bdbe49a286fd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/fixELFSymbolsInTLSFixupsImpl.cpp @@ -0,0 +1,20 @@ +static void fixELFSymbolsInTLSFixupsImpl ( const MCExpr * Expr , MCAssembler & Asm ) { +if ( Expr -> getKind ( ) == MCExpr :: Target ) { +llvm_unreachable ( "Can't handle nested target expression" ) ; +} +if ( Expr -> getKind ( ) == MCExpr :: Constant ) { +} +if ( Expr -> getKind ( ) == MCExpr :: Binary ) { +const MCBinaryExpr * BE ; +BE = cast < MCBinaryExpr > ( Expr ) ; +fixELFSymbolsInTLSFixupsImpl ( BE -> getLHS ( ) , Asm ) ; +fixELFSymbolsInTLSFixupsImpl ( BE -> getRHS ( ) , Asm ) ; +} +if ( Expr -> getKind ( ) == MCExpr :: SymbolRef ) { +const MCSymbolRefExpr & SymRef = * cast < MCSymbolRefExpr > ( Expr ) ; +cast < MCSymbolELF > ( SymRef . getSymbol ( ) ) . setType ( ELF :: STT_TLS ) ; +} +if ( Expr -> getKind ( ) == MCExpr :: Unary ) { +fixELFSymbolsInTLSFixupsImpl ( cast < MCUnaryExpr > ( Expr ) -> getSubExpr ( ) , Asm ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getKind.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getKind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d711002a252a9dd02f4cfd37981b41932cfcd805 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getKind.cpp @@ -0,0 +1,3 @@ +VariantKind getKind ( ) const { +return Kind ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp new file mode 100644 index 0000000000000000000000000000000000000000..81eb96a0f825e508a60d46709bf9a0a7e5d9b8e9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getPCRelHiFixup.cpp @@ -0,0 +1,2 @@ +const MCFixup * RISCVMCExpr :: getPCRelHiFixup ( const MCFragment * * DFOut ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getSubExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getSubExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7e2553d1d84be4fd14ae6489f4304e9c6da6514 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getSubExpr.cpp @@ -0,0 +1,3 @@ +const MCExpr * getSubExpr ( ) const { +return Expr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a3adc41ddb642e655aeab7d1e1a20b610477920 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getVariantKindForName.cpp @@ -0,0 +1,33 @@ +RISCVMCExpr :: VariantKind RISCVMCExpr :: getVariantKindForName ( StringRef name ) { +if ( name == "lo" ) { +return RISCVMCExpr :: VK_RISCV_LO ; +} +if ( name == "hi" ) { +return RISCVMCExpr :: VK_RISCV_HI ; +} +if ( name == "pcrel_lo" ) { +return RISCVMCExpr :: VK_RISCV_PCREL_LO ; +} +if ( name == "pcrel_hi" ) { +return RISCVMCExpr :: VK_RISCV_PCREL_HI ; +} +if ( name == "got_pcrel_hi" ) { +return RISCVMCExpr :: VK_RISCV_GOT_HI ; +} +if ( name == "tprel_lo" ) { +return RISCVMCExpr :: VK_RISCV_TPREL_LO ; +} +if ( name == "tprel_hi" ) { +return RISCVMCExpr :: VK_RISCV_TPREL_HI ; +} +if ( name == "tprel_add" ) { +return RISCVMCExpr :: VK_RISCV_TPREL_ADD ; +} +if ( name == "tls_ie_pcrel_hi" ) { +return RISCVMCExpr :: VK_RISCV_TLS_GOT_HI ; +} +if ( name == "tls_gd_pcrel_hi" ) { +return RISCVMCExpr :: VK_RISCV_TLS_GD_HI ; +} +return RISCVMCExpr :: VK_RISCV_Invalid ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a14113780d7b4ef21b6a7e00220b3c88cf7af90 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/getVariantKindName.cpp @@ -0,0 +1,33 @@ +StringRef RISCVMCExpr :: getVariantKindName ( VariantKind Kind ) { +if ( Kind == RISCVMCExpr :: VK_RISCV_LO ) { +return "lo" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_HI ) { +return "hi" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_PCREL_LO ) { +return "pcrel_lo" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_PCREL_HI ) { +return "pcrel_hi" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_GOT_HI ) { +return "got_pcrel_hi" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TPREL_LO ) { +return "tprel_lo" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TPREL_HI ) { +return "tprel_hi" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TPREL_ADD ) { +return "tprel_add" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TLS_GOT_HI ) { +return "tls_ie_pcrel_hi" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TLS_GD_HI ) { +return "tls_gd_pcrel_hi" ; +} +llvm_unreachable ( "Invalid ELF symbol kind" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/printImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/printImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f9951d519591034af7b4a12ecb632ea0fa5c993 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/printImpl.cpp @@ -0,0 +1,70 @@ +void RISCVMCExpr :: printImpl ( raw_ostream & OS , const MCAsmInfo * MAI ) const { +VariantKind Kind ; +Kind = getKind ( ) ; +if ( Kind == RISCVMCExpr :: VK_RISCV_PCREL_LO ) { +OS << "%pcrel_lo(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_PCREL_HI ) { +OS << "%pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TPREL_LO ) { +OS << "%tprel_lo(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TPREL_HI ) { +OS << "%tprel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TPREL_ADD ) { +OS << "%tprel_add(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_LO ) { +OS << "%lo(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_HI ) { +OS << "%hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_GOT_HI ) { +OS << "%got_pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TLS_GOT_HI ) { +OS << "%tls_ie_pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_TLS_GD_HI ) { +OS << "%tls_gd_pcrel_hi(" ; +Expr -> print ( OS , MAI ) ; +OS << ")" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_CALL_PLT ) { +OS << "" ; +Expr -> print ( OS , MAI ) ; +OS << "@plt" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_CALL ) { +OS << "" ; +Expr -> print ( OS , MAI ) ; +OS << "" ; +} +if ( Kind == RISCVMCExpr :: VK_RISCV_None ) { +OS << "" ; +Expr -> print ( OS , MAI ) ; +OS << "" ; +} +llvm_unreachable ( "Invalid ELF symbol kind" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22979ea4ea4342aaffa71479dff1fe630575795a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCExpr/visitUsedExpr.cpp @@ -0,0 +1,3 @@ +void RISCVMCExpr :: visitUsedExpr ( MCStreamer & Streamer ) const { +Streamer . visitUsedExpr ( * getSubExpr ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c8d655ed90d0e535f23950705d6db8245250a2b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/InstrAnalysis.cpp @@ -0,0 +1,2 @@ +explicit RISCVMCInstrAnalysis ( const MCInstrInfo * Info ) : MCInstrAnalysis ( Info ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..350fce94db9142b9e84915918328fb5c9fd25d38 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,15 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetMC ( ) { +for ( Target * T : { & getTheRISCV32Target ( ) , & getTheRISCV64Target ( ) } ) { +TargetRegistry :: RegisterMCAsmInfo ( * T , createRISCVMCAsmInfo ) ; +TargetRegistry :: RegisterMCInstrInfo ( * T , createRISCVMCInstrInfo ) ; +TargetRegistry :: RegisterMCRegInfo ( * T , createRISCVMCRegisterInfo ) ; +TargetRegistry :: RegisterMCAsmBackend ( * T , createRISCVAsmBackend ) ; +TargetRegistry :: RegisterMCCodeEmitter ( * T , createRISCVMCCodeEmitter ) ; +TargetRegistry :: RegisterMCInstPrinter ( * T , createRISCVMCInstPrinter ) ; +TargetRegistry :: RegisterMCSubtargetInfo ( * T , createRISCVMCSubtargetInfo ) ; +TargetRegistry :: RegisterObjectTargetStreamer ( * T , createRISCVObjectTargetStreamer ) ; +TargetRegistry :: RegisterMCInstrAnalysis ( * T , createRISCVInstrAnalysis ) ; +TargetRegistry :: RegisterAsmTargetStreamer ( * T , createRISCVAsmTargetStreamer ) ; +TargetRegistry :: RegisterNullTargetStreamer ( * T , createRISCVNullTargetStreamer ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2d898066b8b3cc2f64eeeecdae05676d8f19797c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createAsmTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer * createRISCVAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS , MCInstPrinter * InstPrint , bool isVerboseAsm ) { +return new RISCVTargetAsmStreamer ( S , OS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cda392bd1fdfd168dc12e589990c1d182c310e46 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createInstrAnalysis.cpp @@ -0,0 +1,3 @@ +static MCInstrAnalysis * createRISCVInstrAnalysis ( const MCInstrInfo * Info ) { +return new RISCVMCInstrAnalysis ( Info ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ddd65210b53b415a0b8935692573e85d5ea1c18f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,9 @@ +static MCAsmInfo * createRISCVMCAsmInfo ( const MCRegisterInfo & MRI , const Triple & TT , const MCTargetOptions & Options ) { +MCAsmInfo * MAI ; +MAI = new RISCVMCAsmInfo ( TT ) ; +MCRegister Reg ; +Reg = MRI . getDwarfRegNum ( RISCV :: X2 , true ) ; +MCCFIInstruction Inst = MCCFIInstruction :: cfiDefCfa ( nullptr , Reg , 0 ) ; +MAI -> addInitialFrameState ( Inst ) ; +return MAI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e96cde3bf933e8ee2a2ef354886791ae9c7dfa46 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCInstPrinter.cpp @@ -0,0 +1,3 @@ +static MCInstPrinter * createRISCVMCInstPrinter ( const Triple & T , unsigned SyntaxVariant , const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI ) { +return new RISCVInstPrinter ( MAI , MII , MRI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e73ddd4733e04e1edf92cfda76290929b128a797 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,6 @@ +static MCInstrInfo * createRISCVMCInstrInfo ( ) { +MCInstrInfo * X ; +X = new MCInstrInfo ( ) ; +InitRISCVMCInstrInfo ( X ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..43946198a2b9b408d08306384d66ad3a9952b012 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,6 @@ +static MCRegisterInfo * createRISCVMCRegisterInfo ( const Triple & TT ) { +MCRegisterInfo * X ; +X = new MCRegisterInfo ( ) ; +InitRISCVMCRegisterInfo ( X , RISCV :: X1 ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..caf62c59f120532ecc9285ec5c993a973fa86956 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,13 @@ +static MCSubtargetInfo * createRISCVMCSubtargetInfo ( const Triple & TT , StringRef CPU , StringRef FS ) { +std :: string CPUName ; +CPUName = std :: string ( CPU ) ; +if ( CPUName . empty ( ) ) { +if ( TT . isArch64Bit ( ) ) { +CPUName = "generic-rv64" ; +} +if ( ! TT . isArch64Bit ( ) ) { +CPUName = "generic-rv32" ; +} +} +return createRISCVMCSubtargetInfoImpl ( TT , CPUName , CPUName , FS ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e8dbeff80846172342c350c0fba9b3cae972d7bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createNullTargetStreamer.cpp @@ -0,0 +1,3 @@ +static MCTargetStreamer * createRISCVNullTargetStreamer ( MCStreamer & S ) { +return new RISCVTargetStreamer ( S ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c2a8a86d36dbfd322b39e4fc65dbab41c24ab0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/createObjectTargetStreamer.cpp @@ -0,0 +1,7 @@ +static MCTargetStreamer * createRISCVObjectTargetStreamer ( MCStreamer & S , const MCSubtargetInfo & STI ) { +const Triple & TT = STI . getTargetTriple ( ) ; +if ( TT . isOSBinFormatELF ( ) ) { +return new RISCVTargetELFStreamer ( S , STI ) ; +} +return new RISCVTargetELFStreamer ( S , STI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d327bffc4c1702361f2deab6d326dbb8be885c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MCTargetDesc/evaluateBranch.cpp @@ -0,0 +1,47 @@ +bool evaluateBranch ( const MCInst & Inst , uint64_t Addr , uint64_t Size , uint64_t & Target ) const { +if ( Inst . getOpcode ( ) == RISCV :: BEQ ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: BNE ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: BLT ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: BGE ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: BLTU ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: BGEU ) { +Target = Addr + Inst . getOperand ( 2 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_BEQZ ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_BNEZ ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: JAL ) { +Target = Addr + Inst . getOperand ( 1 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_JAL ) { +Target = Addr + Inst . getOperand ( 0 ) . getImm ( ) ; +return true ; +} +if ( Inst . getOpcode ( ) == RISCV :: C_J ) { +Target = Addr + Inst . getOperand ( 0 ) . getImm ( ) ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/generateInstSeq.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/generateInstSeq.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7efac9c271d6fe90289ebbb66a0539c554440b7e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/generateInstSeq.cpp @@ -0,0 +1,32 @@ +MatInt :: InstSeq MatInt :: generateInstSeq ( int64_t Val ) { +InstSeq Insts ; +if ( Highest12 != 0 ) { +if ( SignExtend64 < 52 > ( Val ) == 0 ) { +Insts . push_back ( Inst ( RISCV :: LU52I_D , SignExtend64 < 12 > ( Highest12 ) ) ) ; +return Insts ; +} +} +if ( Hi20 == 0 ) { +Insts . push_back ( Inst ( RISCV :: ORI , Lo12 ) ) ; +} +if ( Hi20 != 0 ) { +if ( SignExtend32 < 1 > ( Lo12 >> 11 ) == SignExtend32 < 20 > ( Hi20 ) ) { +Insts . push_back ( Inst ( RISCV :: ADDI_W , SignExtend64 < 12 > ( Lo12 ) ) ) ; +} +} +if ( Hi20 != 0 ) { +if ( SignExtend32 < 1 > ( Lo12 >> 11 ) != SignExtend32 < 20 > ( Hi20 ) ) { +Insts . push_back ( Inst ( RISCV :: LU12I_W , SignExtend64 < 20 > ( Hi20 ) ) ) ; +if ( Lo12 != 0 ) { +Insts . push_back ( Inst ( RISCV :: ORI , Lo12 ) ) ; +} +} +} +if ( SignExtend32 < 1 > ( Hi20 >> 19 ) != SignExtend32 < 20 > ( Higher20 ) ) { +Insts . push_back ( Inst ( RISCV :: LU32I_D , SignExtend64 < 20 > ( Higher20 ) ) ) ; +} +if ( SignExtend32 < 1 > ( Higher20 >> 19 ) != SignExtend32 < 12 > ( Highest12 ) ) { +Insts . push_back ( Inst ( RISCV :: LU52I_D , SignExtend64 < 12 > ( Highest12 ) ) ) ; +} +return Insts ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/getIntMatCost.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/getIntMatCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98bcc8a891aab82616d0c0346d7724187bc88265 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/getIntMatCost.cpp @@ -0,0 +1,3 @@ +int getIntMatCost ( const APInt & Val , unsigned Size , bool IsRV64 ) { +return std :: max ( 1 , Cost ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/structInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/structInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f25780f5a7195e77e9196dea579a14a99922338c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/MatInt/structInst.cpp @@ -0,0 +1,6 @@ +struct Inst { +unsigned Opc ; +int64_t Imm ; +Inst ( unsigned Opc , int64_t Imm ) : Opc ( Opc ) , Imm ( Imm ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a721f8eb40daba11267b011e7fd009f7dc683b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/TargetAsmStreamer.cpp @@ -0,0 +1,2 @@ +RISCVTargetAsmStreamer :: RISCVTargetAsmStreamer ( MCStreamer & S , formatted_raw_ostream & OS ) : RISCVTargetStreamer ( S ) , OS ( OS ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d01f2e2668a2d3980c1d615b5dac7e34580f2c23 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/TargetStreamer.cpp @@ -0,0 +1,2 @@ +RISCVTargetStreamer :: RISCVTargetStreamer ( MCStreamer & S ) : MCTargetStreamer ( S ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d2f6bcc9f02c18f6dfffc45b2a441d5509bd2ac --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitAttribute ( unsigned Attribute , unsigned Value ) { +OS << "\t.attribute\t" << Attribute << ", " << Twine ( Value ) << "\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9c71365437e5525c859faf9ab85e96acff6ba2d9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitAttribute2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitAttribute ( unsigned Attribute , unsigned Value ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b5d1c922b2b3bea325aea8b6ac2de8f47be9f36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionNoPIC ( ) { +OS << "\t.option\tnopic\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ab3899bf418f58b7b4e5212c1af782177d55d9eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoPIC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionNoPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97cf2a0487cd3e7ae1f1596577ae00a35ad70ced --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionNoRVC ( ) { +OS << "\t.option\tnorvc\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..318d7a6a2fa4d048f0f13ae059f800ec2651f53b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRVC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionNoRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e87e33e49a8d077f34b1bd82bf9368d80af142b2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionNoRelax ( ) { +OS << "\t.option\tnorelax\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3efb5c42b15eb074468dcc86a759fd6410a3899e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionNoRelax2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionNoRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c92e7a1938cfaeb0a5b036d16b97165a972cf3b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionPIC ( ) { +OS << "\t.option\tpic\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e53655e8d3280f15d8414304d565f008fc6b68d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPIC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionPIC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06983911a87102c692fafb3c575746d0b45b9b54 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionPop ( ) { +OS << "\t.option\tpop\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e4e92d90e1cd1b98887606b7e0d0dc57234ab65 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPop2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionPop ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c9f9ac92a5170b85967cd1eb1b9244b2ef1cc9b2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionPush ( ) { +OS << "\t.option\tpush\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..580e02e74bb52568f1836dd485721b66dfdcd288 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionPush2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionPush ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bde69c4cf1ed35df3766850e0a99bcafda98c36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionRVC ( ) { +OS << "\t.option\trvc\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ffdc32e50a23b50114a69b3e291c7348a9b32a81 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRVC2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionRVC ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82ee65142c5a60213414a6da34836de1ba42ffa4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitDirectiveOptionRelax ( ) { +OS << "\t.option\trelax\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dab2eeb000df18a32573927e4d4c462920992b9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitDirectiveOptionRelax2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitDirectiveOptionRelax ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b45dbed89d26e0c9394a5ad2ff22d3d537fb7caa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute.cpp @@ -0,0 +1,2 @@ +void RISCVTargetAsmStreamer :: emitIntTextAttribute ( unsigned Attribute , unsigned IntValue , StringRef StringValue ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a250e433567ad1cbe4cd0e1d97123f578c098477 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitIntTextAttribute2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitIntTextAttribute ( unsigned Attribute , unsigned IntValue , StringRef StringValue ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96d011affc21bae9b3722521731b4f393d2b1a0d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTargetAttributes.cpp @@ -0,0 +1,123 @@ +void RISCVTargetStreamer :: emitTargetAttributes ( const MCSubtargetInfo & STI ) { +StringRef CPU ; +CPU = STI . getCPU ( ) ; +RISCV :: ArchKind ArchID ; +ArchID = RISCV :: parseCPUArch ( CPU ) ; +if ( ArchID == RISCV :: ArchKind :: CK804 ) { +ArchID = RISCV :: ArchKind :: CK803 ; +} +StringRef CPU_ARCH ; +CPU_ARCH = RISCV :: getArchName ( ArchID ) ; +if ( ArchID == RISCV :: ArchKind :: INVALID ) { +} +emitTextAttribute ( RISCVAttrs :: RISCV_ARCH_NAME | zm - split | CPU_ARCH , RISCVAttrs :: RISCV_ARCH_NAME | zm - split | CPU_ARCH ) ; +emitTextAttribute ( RISCVAttrs :: RISCV_CPU_NAME | zm - split | CPU , RISCVAttrs :: RISCV_CPU_NAME | zm - split | CPU ) ; +unsigned ISAFlag ; +ISAFlag = 0 ; +if ( STI . hasFeature ( RISCV :: Feature64Bit ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_E1 ; +} +if ( STI . hasFeature ( RISCV :: FeatureRV32E ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_1E2 ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtM ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_2E3 ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtA ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_MP ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtF ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_3E3R1 ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtD ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_3E3R2 ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtC ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_3E3R3 ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtB ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_3E7 ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtV ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_MP_1E2 ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZfh ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_7E10 ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZba ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_10E60 ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbb ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_TRUST ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbc ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_JAVA ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbe ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_CACHE ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbf ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_NVIC ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbm ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_DSP ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbp ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_DSP_1E2 ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbproposedc ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: V2_ISA_DSPE60 ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbr ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_DSP_ENHANCE ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbs ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_DSP_SILAN ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZbt ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_VDSP ; +} +if ( STI . hasFeature ( RISCV :: FeatureExtZvamo ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_VDSP_2 ; +} +if ( STI . hasFeature ( RISCV :: FeatureStdExtZvlsseg ) ) { +ISAFlag = ISAFlag | RISCVAttrs :: ISA_VDSP_2E3 ; +} +ISAFlag = ISAFlag | RISCVAttrs :: ISA_VDSP_2E60F ; +emitAttribute ( RISCVAttrs :: RISCV_ISA_FLAGS | zm - split | ISAFlag , RISCVAttrs :: RISCV_ISA_FLAGS | zm - split | ISAFlag ) ; +unsigned ISAExtFlag ; +ISAExtFlag = 0 ; +ISAExtFlag = ISAExtFlag | RISCVAttrs :: ISA_FLOAT_E1 ; +ISAExtFlag = ISAExtFlag | RISCVAttrs :: ISA_FLOAT_1E2 ; +ISAExtFlag = ISAExtFlag | RISCVAttrs :: ISA_FLOAT_1E3 ; +ISAExtFlag = ISAExtFlag | RISCVAttrs :: ISA_FLOAT_3E4 ; +ISAExtFlag = ISAExtFlag | RISCVAttrs :: ISA_FLOAT_7E60 ; +emitAttribute ( RISCVAttrs :: RISCV_ISA_EXT_FLAGS | zm - split | ISAExtFlag , RISCVAttrs :: RISCV_ISA_EXT_FLAGS | zm - split | ISAExtFlag ) ; +emitAttribute ( RISCVAttrs :: RISCV_DSP_VERSION | zm - split | RISCVAttrs :: DSP_VERSION_EXTENSION , RISCVAttrs :: RISCV_DSP_VERSION | zm - split | RISCVAttrs :: DSP_VERSION_EXTENSION ) ; +emitAttribute ( RISCVAttrs :: RISCV_DSP_VERSION | zm - split | RISCVAttrs :: DSP_VERSION_2 , RISCVAttrs :: RISCV_DSP_VERSION | zm - split | RISCVAttrs :: DSP_VERSION_2 ) ; +emitAttribute ( RISCVAttrs :: RISCV_VDSP_VERSION | zm - split | RISCVAttrs :: VDSP_VERSION_2 , RISCVAttrs :: RISCV_VDSP_VERSION | zm - split | RISCVAttrs :: VDSP_VERSION_2 ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_2 , RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_2 ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_2 , RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_2 ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_3 , RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_3 ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_3 , RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_3 ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_3 , RISCVAttrs :: RISCV_FPU_VERSION | zm - split | RISCVAttrs :: FPU_VERSION_3 ) ; +bool hasAnyFloatExt ; +hasAnyFloatExt = STI . hasFeature ( RISCV :: FeatureFPUV2_SF ) || STI . hasFeature ( RISCV :: FeatureFPUV2_DF ) || STI . hasFeature ( RISCV :: FeatureFPUV3_HF ) || STI . hasFeature ( RISCV :: FeatureFPUV3_SF ) || STI . hasFeature ( RISCV :: FeatureFPUV3_DF ) ; +if ( ! hasAnyFloatExt ) { +emitAttribute ( RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP , RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP , RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP , RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP , RISCVAttrs :: RISCV_FPU_ABI | zm - split | RISCVAttrs :: FPU_ABI_SOFTFP ) ; +unsigned HardFPFlag ; +HardFPFlag = 0 ; +HardFPFlag = HardFPFlag | RISCVAttrs :: FPU_HARDFP_HALF ; +HardFPFlag = HardFPFlag | RISCVAttrs :: FPU_HARDFP_SINGLE ; +HardFPFlag = HardFPFlag | RISCVAttrs :: FPU_HARDFP_SINGLE ; +HardFPFlag = HardFPFlag | RISCVAttrs :: FPU_HARDFP_DOUBLE ; +HardFPFlag = HardFPFlag | RISCVAttrs :: FPU_HARDFP_DOUBLE ; +if ( HardFPFlag != 0 ) { +emitAttribute ( RISCVAttrs :: RISCV_FPU_DENORMAL | zm - split | RISCVAttrs :: NEEDED , RISCVAttrs :: RISCV_FPU_DENORMAL | zm - split | RISCVAttrs :: NEEDED ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_EXCEPTION | zm - split | RISCVAttrs :: NEEDED , RISCVAttrs :: RISCV_FPU_EXCEPTION | zm - split | RISCVAttrs :: NEEDED ) ; +emitTextAttribute ( RISCVAttrs :: RISCV_FPU_NUMBER_MODULE | zm - split | "IEEE 754" , RISCVAttrs :: RISCV_FPU_NUMBER_MODULE | zm - split | "IEEE 754" ) ; +emitAttribute ( RISCVAttrs :: RISCV_FPU_HARDFP | zm - split | HardFPFlag , RISCVAttrs :: RISCV_FPU_HARDFP | zm - split | HardFPFlag ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92ee004c97a4bf17694b0bb8a2c12c5dd5041e60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTextAttribute.cpp @@ -0,0 +1,3 @@ +void RISCVTargetAsmStreamer :: emitTextAttribute ( unsigned Attribute , StringRef String ) { +OS << "\t.attribute\t" << Attribute << ", \"" << String << "\"\n" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ba4e0bd348672d887f8382b2578f1ea569ce4bb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/emitTextAttribute2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: emitTextAttribute ( unsigned Attribute , StringRef String ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finish.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finish.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72cc490e9bbd94a905f8c68774a3cc65d447ef4b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finish.cpp @@ -0,0 +1,3 @@ +void RISCVTargetStreamer :: finish ( ) { +finishAttributeSection ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4f715915b3d6c18c95ea010004be56e2e19741a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finishAttributeSection.cpp @@ -0,0 +1,2 @@ +void RISCVTargetAsmStreamer :: finishAttributeSection ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c90f26086748201705f11aa9c938ef1819e2c59b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Emission/TargetStreamer/finishAttributeSection2.cpp @@ -0,0 +1,2 @@ +void RISCVTargetStreamer :: finishAttributeSection ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b525c178c6f923232691e6d814fc580ef86432e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/CleanupVSETVLI.cpp @@ -0,0 +1,3 @@ +RISCVCleanupVSETVLI ( ) : MachineFunctionPass ( ID ) { +initializeRISCVCleanupVSETVLIPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13fce8ddd07f8e0cd3ef428aaba85bdf35a7b622 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createRISCVCleanupVSETVLIPass ( ) { +return new RISCVCleanupVSETVLI ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ead5f1a786d8e94c38aaeccf54e965a7633f1381 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . setPreservesCFG ( ) ; +MachineFunctionPass :: getAnalysisUsage ( AU ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e570a0bb69cec0e395a8a3d316efdccad3ed5c6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return RISCV_CLEANUP_VSETVLI_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0adda88e88df06602241df5ea12b1b2b61a75d55 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties ( ) const override { +return MachineFunctionProperties ( ) . set ( MachineFunctionProperties :: Property :: IsSSA ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..703cafe35cf8053a680632338c92037730fb0e44 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineBasicBlock.cpp @@ -0,0 +1,11 @@ +bool RISCVCleanupVSETVLI :: runOnMachineBasicBlock ( MachineBasicBlock & MBB ) { +bool Changed = false ; +for ( MachineBasicBlock :: iterator I = MBB . instr_begin ( ) ; I != MBB . instr_end ( ) ; ++ I ) { +Changed = true ; +Changed = true ; +continue ; +Changed = true ; +Changed = true ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c30191497c6520cdefb552547858a6a8a11f01f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/CleanupVSETVLI/runOnMachineFunction.cpp @@ -0,0 +1,14 @@ +bool RISCVCleanupVSETVLI :: runOnMachineFunction ( MachineFunction & MF ) { +if ( skipFunction ( MF . getFunction ( ) ) ) { +return false ; +} +bool Changed = false ; +const RISCVSubtarget & ST = MF . getSubtarget < RISCVSubtarget > ( ) ; +if ( ! ST . hasStdExtV ( ) ) { +return false ; +} +for ( MachineBasicBlock & MBB : MF ) { +Changed = Changed | runOnMachineBasicBlock ( MBB ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ccb2a3d2f20668a6992dfe3dc2a56cc3d8a5c610 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/ExpandAtomicPseudo.cpp @@ -0,0 +1,3 @@ +RISCVExpandAtomicPseudo ( ) : MachineFunctionPass ( ID ) { +initializeRISCVExpandAtomicPseudoPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c07969f15eea8992f254c7b271f732543960c352 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createRISCVExpandAtomicPseudoPass ( ) { +return new RISCVExpandAtomicPseudo ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1c19539b9d24e6a860f74c1effd36e178d46781 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandAtomicPseudo :: expandMBB ( MachineBasicBlock & MBB ) { +bool Modified = false ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) , E = MBB . end ( ) ; +for ( ; MBBI != E ; ) { +MachineBasicBlock :: iterator NMBBI = std :: next ( MBBI ) ; +Modified = Modified | expandMI ( MBB , MBBI , NMBBI ) ; +MBBI = NMBBI ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b873cd1c4b79d2018b95c38a0e6863dc8830f28 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/expandMI.cpp @@ -0,0 +1,42 @@ +bool RISCVExpandAtomicPseudo :: expandMI ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , MachineBasicBlock :: iterator & NextMBBI ) { +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoAtomicLoadNand32 ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoAtomicLoadNand64 ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicSwap32 ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicLoadAdd32 ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicLoadSub32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicLoadNand32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicLoadMax32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicLoadMin32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicLoadUMax32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedAtomicLoadUMin32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoCmpXchg32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoCmpXchg64 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoMaskedCmpXchg32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2413e2bc9448a25b28da3410dad9b03494900b3f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return RISCV_EXPAND_ATOMIC_PSEUDO_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4cf4944bdf584b37dc6db94217ea1c35871dd5dc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandAtomicPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVExpandAtomicPseudo :: runOnMachineFunction ( MachineFunction & MF ) { +TII = static_cast < const RISCVInstrInfo * > ( MF . getSubtarget ( ) . getInstrInfo ( ) ) ; +bool Modified = false ; +for ( auto & MBB : MF ) { +Modified = Modified | expandMBB ( MBB ) ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e43cd14a41cbb44f47d19556c517f698a73f8cc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/ExpandPseudo.cpp @@ -0,0 +1,3 @@ +RISCVExpandPseudo ( ) : MachineFunctionPass ( ID ) { +initializeRISCVExpandPseudoPass ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e56e1dfbefb3cebf300e0b1d10c62c98a900adc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * createRISCVExpandPseudoPass ( ) { +return new RISCVExpandPseudo ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ecaa4a746dfd38727c61ed5247656655279d2714 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/expandMBB.cpp @@ -0,0 +1,10 @@ +bool RISCVExpandPseudo :: expandMBB ( MachineBasicBlock & MBB ) { +bool Modified = false ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) , E = MBB . end ( ) ; +for ( ; MBBI != E ; ) { +MachineBasicBlock :: iterator NMBBI = std :: next ( MBBI ) ; +Modified = Modified | expandMI ( MBB , MBBI , NMBBI ) ; +MBBI = NMBBI ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..429e58a4dad9fa5d2168deb69d46d902c857572c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/expandMI.cpp @@ -0,0 +1,63 @@ +bool RISCVExpandPseudo :: expandMI ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , MachineBasicBlock :: iterator & NextMBBI ) { +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoLLA ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoLA ) { +return expandAtomicCmpSwap ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoLA_TLS_IE ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoLA_TLS_GD ) { +return expandAtomicCmpSwapSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVSETVLI ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVSETIVLI ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMCLR_M_B1 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMCLR_M_B2 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMCLR_M_B4 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMCLR_M_B8 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMCLR_M_B16 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMCLR_M_B32 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMCLR_M_B64 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMSET_M_B1 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMSET_M_B2 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMSET_M_B4 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMSET_M_B8 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMSET_M_B16 ) { +return expandAtomicBinOpSubword ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMSET_M_B32 ) { +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +} +if ( MBBI -> getOpcode ( ) == RISCV :: PseudoVMSET_M_B64 ) { +return expandAtomicBinOp ( MBB , MBBI , NMBB ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c671c393167571a385416e95d915917dae9816e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return RISCV_EXPAND_PSEUDO_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..34204fbabbd2c9931e0e54df2b0e3098d4540267 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/ExpandPseudoInsts/runOnMachineFunction.cpp @@ -0,0 +1,8 @@ +bool RISCVExpandPseudo :: runOnMachineFunction ( MachineFunction & MF ) { +TII = static_cast < const RISCVInstrInfo * > ( MF . getSubtarget ( ) . getInstrInfo ( ) ) ; +bool Modified = false ; +for ( auto & MBB : MF ) { +Modified = Modified | expandMBB ( MBB ) ; +} +return Modified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de8c6107b32968a9525c9d1fa2ec84a09f1cf018 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/MergeBaseOffsetOpt.cpp @@ -0,0 +1,2 @@ +RISCVMergeBaseOffsetOpt ( ) : MachineFunctionPass ( ID ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77da6b9cb17ab8540023b8642f6f52dd8bd87967 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createRISCVMergeBaseOffsetOptPass ( ) { +return new RISCVMergeBaseOffsetOpt ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a17e0aa37b03c42edddac90a94a3646c1d4e2458 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return RISCV_MERGE_BASE_OFFSET_NAME ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0adda88e88df06602241df5ea12b1b2b61a75d55 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/getRequiredProperties.cpp @@ -0,0 +1,3 @@ +MachineFunctionProperties getRequiredProperties ( ) const override { +return MachineFunctionProperties ( ) . set ( MachineFunctionProperties :: Property :: IsSSA ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4589212e731444dc028dfa66a42eb91fe547980 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Optimization/MergeBaseOffset/runOnMachineFunction.cpp @@ -0,0 +1,18 @@ +bool RISCVMergeBaseOffset :: runOnMachineFunction ( MachineFunction & MF ) { +if ( skipFunction ( * F . getFunction ( ) ) ) { +return false ; +} +bool Changed = false ; +const Subtarget & ST = MF . getSubtarget < Subtarget > ( ) ; +TII = ST . getInstrInfo ( ) ; +TRI = ST . getRegisterInfo ( ) ; +MRI = & MF . getRegInfo ( ) ; +ClobberedRegs . resize ( TRI -> getNumRegs ( ) ) ; +if ( ST . isV9 ( ) ) { +return false ; +} +for ( MachineBasicBlock & MBB : MF ) { +Changed = Changed | runOnMachineBasicBlock ( MBB ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..768f27c25f9b244976b0c9dec8e88b764b418225 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +RISCVInstrInfo :: RISCVInstrInfo ( RISCVSubtarget & STI ) : RISCVGenInstrInfo ( RISCV :: ADJCALLSTACKDOWN , RISCV :: ADJCALLSTACKUP ) , STI ( STI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f83f76a26a6c72bf841be133e3bb4afe2e42e887 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,60 @@ +bool RISCVInstrInfo :: analyzeBranch ( MachineBasicBlock & MBB , MachineBasicBlock * & TBB , MachineBasicBlock * & FBB , SmallVectorImpl < MachineOperand > & Cond , bool AllowModify ) const { +TBB = nullptr ; +FBB = nullptr ; +Cond . clear ( ) ; +MachineBasicBlock :: iterator I = MBB . getLastNonDebugInstr ( ) ; +if ( I == MBB . end ( ) ) { +return false ; +} +if ( ! isUnpredicatedTerminator ( * I ) ) { +return false ; +} +MachineBasicBlock :: iterator FirstUncondOrIndirectBr = MBB . end ( ) ; +int NumTerminators = 0 ; +for ( auto J = I . getReverse ( ) ; J != MBB . rend ( ) && isUnpredicatedTerminator ( * J ) ; J ++ ) { +NumTerminators = NumTerminators + 1 ; +if ( J -> getDesc ( ) . isUnconditionalBranch ( ) ) { +FirstUncondOrIndirectBr = J . getReverse ( ) ; +} +if ( J -> getDesc ( ) . isIndirectBranch ( ) ) { +FirstUncondOrIndirectBr = J . getReverse ( ) ; +} +} +if ( AllowModify ) { +if ( FirstUncondOrIndirectBr != MBB . end ( ) ) { +for ( ; std :: next ( FirstUncondOrIndirectBr ) != MBB . end ( ) ; ) { +std :: next ( FirstUncondOrIndirectBr ) -> eraseFromParent ( ) ; +NumTerminators = NumTerminators - 1 ; +} +I = FirstUncondOrIndirectBr ; +} +} +if ( I -> getDesc ( ) . isIndirectBranch ( ) ) { +return true ; +} +if ( NumTerminators > 2 ) { +return true ; +} +if ( NumTerminators == 1 ) { +if ( I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +TBB = getBranchDestBlock ( * I ) ; +return false ; +} +} +if ( NumTerminators == 1 ) { +if ( I -> getDesc ( ) . isConditionalBranch ( ) ) { +parseCondBranch ( * I , TBB , Cond ) ; +return false ; +} +} +if ( NumTerminators == 2 ) { +if ( I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +if ( std :: prev ( I ) -> getDesc ( ) . isConditionalBranch ( ) ) { +parseCondBranch ( * std :: prev ( I ) , TBB , Cond ) ; +FBB = getBranchDestBlock ( * I ) ; +return false ; +} +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..37c649e09a2117559073cce57410d67a1bfd02f9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/areMemAccessesTriviallyDisjoint.cpp @@ -0,0 +1,36 @@ +bool RISCVInstrInfo :: areMemAccessesTriviallyDisjoint ( const MachineInstr & MIa , const MachineInstr & MIb ) const { +assert ( MIa . mayLoadOrStore ( ) && "MIa must be a load or store." ) ; +assert ( MIb . mayLoadOrStore ( ) && "MIb must be a load or store." ) ; +if ( MIa . hasUnmodeledSideEffects ( ) ) { +return false ; +} +if ( MIb . hasUnmodeledSideEffects ( ) ) { +return false ; +} +if ( MIa . hasOrderedMemoryRef ( ) ) { +return false ; +} +if ( MIb . hasOrderedMemoryRef ( ) ) { +return false ; +} +const TargetRegisterInfo * TRI = STI . getRegisterInfo ( ) ; +const MachineOperand * BaseOpA = nullptr ; +const MachineOperand * BaseOpB = nullptr ; +int64_t OffsetA = 0 ; +int64_t OffsetB = 0 ; +unsigned WidthA = 0 ; +unsigned WidthB = 0 ; +if ( getMemOperandWithOffsetWidth ( MIa , BaseOpA , OffsetA , WidthA , TRI ) ) { +if ( getMemOperandWithOffsetWidth ( MIb , BaseOpB , OffsetB , WidthB , TRI ) ) { +if ( BaseOpA -> isIdenticalTo ( * BaseOpB ) ) { +int LowOffset = std :: min ( OffsetA , OffsetB ) ; +int HighOffset = std :: max ( OffsetA , OffsetB ) ; +int LowWidth = ( LowOffset == OffsetA ) ? WidthA : WidthB ; +if ( LowOffset + LowWidth <= HighOffset ) { +return true ; +} +} +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe3af7767cd950617fdf22b309054018bb5a752d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/buildOutlinedFrame.cpp @@ -0,0 +1,45 @@ +void RISCVInstrInfo :: buildOutlinedFrame ( MachineBasicBlock & MBB , MachineFunction & MF , const outliner :: OutlinedFunction & OF ) const { +if ( OF . FrameConstructionID == MachineOutlinerThunk ) { +MachineInstr * Call = & * -- MBB . instr_end ( ) ; +bool isThumb = Subtarget . isThumb ( ) ; +unsigned FuncOp = isThumb ? 2 : 0 ; +unsigned Opc = Call -> getOperand ( FuncOp ) . isReg ( ) ? isThumb ? RISCV :: tTAILJMPr : RISCV :: TAILJMPr : isThumb ? Subtarget . isTargetMachO ( ) ? RISCV :: tTAILJMPd : RISCV :: tTAILJMPdND : RISCV :: TAILJMPd ; +MachineInstrBuilder MIB = BuildMI ( MBB , MBB . end ( ) , DebugLoc ( ) , get ( Opc ) ) . add ( Call -> getOperand ( FuncOp ) ) ; +if ( isThumb ) { +if ( ! Call -> getOperand ( FuncOp ) . isReg ( ) ) { +MIB . add ( predOps ( RISCVCC :: AL ) ) ; +} +} +Call -> eraseFromParent ( ) ; +} +if ( llvm :: any_of ( MBB . instrs ( ) , IsNonTailCall ) ) { +MachineBasicBlock :: iterator It = MBB . begin ( ) ; +MachineBasicBlock :: iterator Et = MBB . end ( ) ; +if ( OF . FrameConstructionID == MachineOutlinerTailCall ) { +Et = std :: prev ( MBB . end ( ) ) ; +} +if ( OF . FrameConstructionID == MachineOutlinerThunk ) { +Et = std :: prev ( MBB . end ( ) ) ; +} +if ( ! MBB . isLiveIn ( RISCV :: LR ) ) { +MBB . addLiveIn ( RISCV :: LR ) ; +} +saveLROnStack ( MBB , It ) ; +emitCFIForLRSaveOnStack ( MBB , It ) ; +fixupPostOutline ( MBB ) ; +restoreLRFromStack ( MBB , Et ) ; +emitCFIForLRRestoreFromStack ( MBB , Et ) ; +} +if ( OF . FrameConstructionID == MachineOutlinerTailCall ) { +return ; +} +return ; +if ( OF . FrameConstructionID != MachineOutlinerDefault ) { +if ( OF . Candidates [ 0 ] . CallConstructionID != MachineOutlinerDefault ) { +return ; +} +} +fixupPostOutline ( MBB ) ; +MachineInstr * retq = BuildMI ( MF , DebugLoc ( ) , get ( RISCV :: RET64 ) ) ; +MBB . insert ( MBB . end ( ) , retq ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed05f46166492481d130ce758653a8c26c464b3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,31 @@ +void RISCVInstrInfo :: copyPhysReg ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , const DebugLoc & DL , MCRegister DstReg , MCRegister SrcReg , bool KillSrc ) const { +if ( RISCV :: GPRRegClass . contains ( DstReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( RISCV::ADDI ) , DstReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( RISCV :: R0 ) ; +return ; +} +if ( RISCV :: FPR16RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( RISCV :: FSGNJ_H ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( RISCV :: FPR32RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( RISCV :: FSGNJ_S ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( RISCV :: FPR64RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( RISCV :: FSGNJ_D ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( RISCV :: VRRegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( RISCV :: PseudoVMV1R_V ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( RISCV :: VRM2RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( RISCV :: PseudoVMV2R_V ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +if ( RISCV :: VRM4RegClass . contains ( DestReg , SrcReg ) ) { +BuildMI ( MBB , MBBI , DL , get ( RISCV :: PseudoVMV4R_V ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; +return ; +} +llvm_unreachable ( "Impossible reg-to-reg copy" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a62b94b90c324c21e98f368bc88a22456ff95aa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/decomposeMachineOperandsTargetFlags.cpp @@ -0,0 +1,4 @@ +std :: pair < unsigned , unsigned > RISCVInstrInfo :: decomposeMachineOperandsTargetFlags ( unsigned TF ) const { +const unsigned Mask = RISCVII :: MO_DIRECT_FLAG_MASK ; +return std :: make_pair ( TF & Mask , TF & ~ Mask ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52fa4119c4ff21d2bf1dd37a46d5304c08485741 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getBranchDestBlock.cpp @@ -0,0 +1,4 @@ +MachineBasicBlock * RISCVInstrInfo :: getBranchDestBlock ( const MachineInstr & MI ) const { +assert ( MI . getDesc ( ) . isBranch ( ) && "Unexpected opcode!" ) ; +return MI . getOperand ( MI . getNumExplicitOperands ( ) - 1 ) . getMBB ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4605e5bb04f011a86c3a2db5f58d2e2ba2960791 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getInstSizeInBytes.cpp @@ -0,0 +1,35 @@ +unsigned RISCVInstrInfo :: getInstSizeInBytes ( const MachineInstr & MI ) const { +const MachineBasicBlock & MBB = * MI . getParent ( ) ; +const MachineFunction * MF = MBB . getParent ( ) ; +const MCAsmInfo * MAI = MF -> getTarget ( ) . getMCAsmInfo ( ) ; +unsigned Opcode = MI . getOpcode ( ) ; +if ( Opcode == TargetOpcode :: INLINEASM ) { +const MachineFunction * MF = MI -> getParent ( ) -> getParent ( ) ; +const char * AsmStr = MI -> getOperand ( 0 ) . getSymbolName ( ) ; +return getInlineAsmLength ( AsmStr , * MF -> getTarget ( ) . getMCAsmInfo ( ) ) ; +return 0 ; +} +return MI -> getDesc ( ) . getSize ( ) ; +if ( Opcode == TargetOpcode :: EH_LABEL ) { +return 0 ; +} +if ( Opcode == TargetOpcode :: IMPLICIT_DEF ) { +return 0 ; +} +if ( Opcode == TargetOpcode :: KILL ) { +return 0 ; +} +if ( Opcode == RISCV :: PseudoCALLReg ) { +return 16 ; +} +if ( Opcode == TargetOpcode :: INLINEASM_BR ) { +return 12 ; +} +if ( Opcode == RISCV :: PseudoCALL ) { +return 12 ; +} +if ( Opcode == RISCV :: PseudoJump ) { +return 12 ; +} +return MI . getDesc ( ) . getSize ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce7277eb921adf2cda96474ad413f110ae55bf33 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getMemOperandWithOffsetWidth.cpp @@ -0,0 +1,21 @@ +bool RISCVInstrInfo :: getMemOperandWithOffsetWidth ( const MachineInstr & LdSt , const MachineOperand * & BaseReg , int64_t & Offset , unsigned & Width , const TargetRegisterInfo * TRI ) const { +if ( ! LdSt . mayLoadOrStore ( ) ) { +return false ; +} +if ( LdSt . getNumExplicitOperands ( ) != 3 ) { +return false ; +} +if ( ! LdSt . getOperand ( 2 ) . isImm ( ) ) { +return false ; +} +if ( ! LdSt . getOperand ( 1 ) . isReg ( ) ) { +return false ; +} +if ( ! LdSt . hasOneMemOperand ( ) ) { +return false ; +} +Width = ( * LdSt . memoperands_begin ( ) ) -> getSize ( ) ; +Offset = LdSt . getOperand ( 2 ) . getImm ( ) ; +BaseReg = & LdSt . getOperand ( 1 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..67de08b8c60bcc6cef6309c4457f8f40b20f5878 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getOutliningCandidateInfo.cpp @@ -0,0 +1,23 @@ +outliner :: OutlinedFunction RISCVInstrInfo :: getOutliningCandidateInfo ( std :: vector < outliner :: Candidate > & RepeatedSequenceLocs ) const { +unsigned CFICount = 0 ; +MachineBasicBlock :: iterator MBBI = RepeatedSequenceLocs [ 0 ] . front ( ) ; +for ( unsigned Loc = RepeatedSequenceLocs [ 0 ] . getStartIdx ( ) ; Loc < RepeatedSequenceLocs [ 0 ] . getEndIdx ( ) + 1 ; Loc ++ ) { +if ( MBBI -> isCFIInstruction ( ) ) { +MBBI = MBBI + 1 ; +for ( outliner :: Candidate & C : RepeatedSequenceLocs ) { +std :: vector < MCCFIInstruction > CFIInstructions = C . getMF ( ) -> getFrameInstructions ( ) ; +if ( CFICount > 0 ) { +if ( CFICount != CFIInstructions . size ( ) ) { +return outliner :: OutlinedFunction ( ) ; +if ( RepeatedSequenceLocs [ 0 ] . back ( ) -> isTerminator ( ) ) { +for ( outliner :: Candidate & C : RepeatedSequenceLocs ) { +C . setCallInfo ( MachineOutlinerTailCall , 1 ) ; +} +return outliner :: OutlinedFunction ( RepeatedSequenceLocs , SequenceSize , 0 , MachineOutlinerTailCall ) ; +if ( CFICount > 0 ) { +return outliner :: OutlinedFunction ( ) ; +for ( outliner :: Candidate & C : RepeatedSequenceLocs ) { +C . setCallInfo ( MachineOutlinerDefault , 1 ) ; +} +return outliner :: OutlinedFunction ( RepeatedSequenceLocs , SequenceSize , 1 , MachineOutlinerDefault ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fa3a813e2c39b0f4dfdc53db180b873adf8c8792 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getOutliningType.cpp @@ -0,0 +1,68 @@ +outliner :: InstrType RISCVInstrInfo :: getOutliningType ( MachineBasicBlock :: iterator & MBBI , unsigned Flags ) const { +achineInstr & MI = * MBBI ; +MachineBasicBlock * MBB = MI . getParent ( ) ; +const TargetRegisterInfo * TRI = MBB -> getParent ( ) -> getSubtarget ( ) . getRegisterInfo ( ) ; +if ( MI . isDebugValue ( ) ) { +return MachineOutlinerInstrType :: Invisible ; +} +if ( MI . isIndirectDebugValue ( ) ) { +return MachineOutlinerInstrType :: Invisible ; +} +if ( isTailCall ( MI ) ) { +return MachineOutlinerInstrType :: Legal ; +} +if ( MI . isTerminator ( ) ) { +if ( MI . getParent ( ) -> succ_empty ( ) ) { +return MachineOutlinerInstrType :: Legal ; +} +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . isReturn ( ) ) { +if ( MI . getParent ( ) -> succ_empty ( ) ) { +return MachineOutlinerInstrType :: Legal ; +} +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . modifiesRegister ( OpcodeRSP , & RI ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . readsRegister ( OpcodeRSP , & RI ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitUseOfPhysReg ( OpcodeRSP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitDefOfPhysReg ( OpcodeRSP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . readsRegister ( OpcodeRIP , & RI ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitUseOfPhysReg ( OpcodeRIP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . getDesc ( ) . hasImplicitDefOfPhysReg ( OpcodeRIP ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MI . isPosition ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +for ( const MachineOperand & MOP : MI . operands ( ) ) { +if ( MOP . isCPI ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isJTI ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isCFIIndex ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isFI ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +if ( MOP . isTargetIndex ( ) ) { +return MachineOutlinerInstrType :: Illegal ; +} +} +return MachineOutlinerInstrType :: Legal ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7ffb62665814ba3b1e0b8a0bc598bfddf8c8efc6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/getSerializableDirectMachineOperandTargetFlags.cpp @@ -0,0 +1,5 @@ +ArrayRef < std :: pair < unsigned , const char * >> RISCVInstrInfo :: getSerializableDirectMachineOperandTargetFlags ( ) const { +using namespace RISCVII ; +static const std :: pair < unsigned , const char * > TargetFlags [ ] = { { MO_CALL , "riscv-call" } , { MO_PLT , "riscv-call" } , { MO_LP , "riscv-plt" } , { MO_LO , "riscv-lo" } , { MO_HI , "riscv-hi" } , { MO_PCREL_LO , "riscv-pcrel-lo" } , { MO_PCREL_HI , "riscv-pcrel-hi" } , { MO_GOT_HI , "riscv-got-hi" } , { MO_TPREL_LO , "riscv-tls-got-hi" } , { MO_TLS_GD_HI , "riscv-tls-gd-hi" } , { MO_TLS_GD_HI , "riscv-tls-gd-hi" } , { MO_TPREL_ADD , "riscv-tprel-add" } , { MO_TLS_GOT_HI , "riscv-tls-got-hi" } , { MO +return makeArrayRef ( TargetFlags ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f3f7b5e24f54f233372031ea20daf9bd6d72282f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,27 @@ +unsigned RISCVInstrInfo :: insertBranch ( MachineBasicBlock & MBB , MachineBasicBlock * TBB , MachineBasicBlock * FBB , ArrayRef < MachineOperand > Cond , const DebugLoc & DL , int * BytesAdded ) const { +if ( BytesAdded ) { +* BytesAdded = 0 ; +} +assert ( TBB && "insertBranch must not be told to insert a fallthrough" ) ; +assert ( ( Cond . size ( ) == 3 || Cond . size ( ) == 0 ) && "RISCV branch conditions have two components!" ) ; +if ( Cond . empty ( ) ) { +MachineInstr & MI = * BuildMI ( & MBB , DL , get ( RISCV :: PseudoBR ) ) . addMBB ( TBB ) ; +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( MI ) ; +} +return 1 ; +} +unsigned Opc = Cond [ 0 ] . getImm ( ) ; +MachineInstr & CondMI = * BuildMI ( & MBB , DL , get ( Opc ) ) . add ( Cond [ 1 ] ) . add ( Cond [ 2 ] ) . addMBB ( TBB ) ; +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( CondMI ) ; +} +if ( ! FBB ) { +return 1 ; +} +MachineInstr & MI = * BuildMI ( & MBB , DL , get ( RISCV :: PseudoBR ) ) . addMBB ( FBB ) ; +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( MI ) ; +} +return 2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e66a6d10bc6090a0cc7aaf16fd3070b3bc961a30 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertIndirectBranch.cpp @@ -0,0 +1,23 @@ +unsigned RISCVInstrInfo :: insertIndirectBranch ( MachineBasicBlock & MBB , MachineBasicBlock & DestBB , const DebugLoc & DL , int64_t BrOffset , RegScavenger * RS ) const { +assert ( RS && "RegScavenger required for long branching" ) ; +assert ( MBB . empty ( ) && "new block should be inserted for expanding unconditional branch" ) ; +assert ( MBB . pred_size ( ) == 1 ) ; +MachineFunction * MF = MBB . getParent ( ) ; +MachineRegisterInfo & MRI = MF -> getRegInfo ( ) ; +unsigned PCReg = MRI . createVirtualRegister ( & RISCV :: SReg_64RegClass ) ; +Register ScratchReg = MRI . createVirtualRegister ( & RISCV :: GPRRCRegClass ) ; +auto I = MBB . end ( ) ; +MachineInstr * GetPC = BuildMI ( MBB , I , DL , get ( RISCV :: S_GETPC_B64 ) , PCReg ) ; +if ( BrOffset >= 0 ) { +BuildMI ( MBB , I , DL , get ( RISCV :: PseudoJump ) ) . addReg ( PCReg , RegState :: Define , RISCV :: sub0 ) . addReg ( PCReg , 0 , RISCV :: sub0 ) . addMBB ( & DestBB , RISCV :: TF_LONG_BRANCH_BACKWARD ) ; +MachineInstr * MI = BuildMI ( MBB , I , DL , get ( RISCV :: JMP ) ) . addReg ( ScratchReg ) ; +RS -> enterBasicBlockEnd ( MBB ) ; +unsigned Scav = RS -> scavengeRegisterBackwards ( RISCV :: SReg_64RegClass , MachineBasicBlock :: iterator ( GetPC ) , false , 0 ) ; +MRI . replaceRegWith ( PCReg , Scav ) ; +unsigned Scav = RS -> scavengeRegisterBackwards ( RISCV :: GPRRCRegClass , MI -> getIterator ( ) , false , 0 ) ; +assert ( Scav != RISCV :: NoRegister && "No register is scavenged!" ) ; +MRI . replaceRegWith ( ScratchReg , Scav ) ; +MRI . clearVirtRegs ( ) ; +RS -> setRegUsed ( Scav ) ; +return 20 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a37b95ab1c5e6a9663338aa5d5609853b390c55 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/insertOutlinedCall.cpp @@ -0,0 +1,6 @@ +MachineBasicBlock :: iterator RISCVInstrInfo :: insertOutlinedCall ( Module & M , MachineBasicBlock & MBB , MachineBasicBlock :: iterator & It , MachineFunction & MF , outliner :: Candidate & C ) const { +It = MBB . insert ( It , BuildMI ( MF , DebugLoc ( ) , get ( RISCV :: JMP_1 ) ) . addGlobalAddress ( M . getNamedValue ( MF . getName ( ) ) ) ) ; +return It ; +It = MBB . insert ( It , BuildMI ( MF , DebugLoc ( ) , get ( RISCV :: CALL64pcrel32 ) ) . addGlobalAddress ( M . getNamedValue ( MF . getName ( ) ) ) ) ; +return It ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e933e02560d15a148e849a60ff0a666a7b34e09a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isAsCheapAsAMove.cpp @@ -0,0 +1,19 @@ +bool RISCVInstrInfo :: isAsCheapAsAMove ( const MachineInstr & MI ) const { +const unsigned Opcode = MI . getOpcode ( ) ; +if ( Opcode == RISCV :: FSGNJ_D ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == RISCV :: ZERO ) ; +} +if ( Opcode == RISCV :: FSGNJ_S ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == RISCV :: ZERO ) ; +} +if ( Opcode == RISCV :: ADDI ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == RISCV :: ZERO ) ; +} +if ( Opcode == RISCV :: ORI ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == RISCV :: ZERO ) ; +} +if ( Opcode == RISCV :: XORI ) { +return ( MI . getOperand ( 1 ) . isReg ( ) && MI . getOperand ( 1 ) . getReg ( ) == RISCV :: ZERO ) ; +} +return MI . isAsCheapAsAMove ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp new file mode 100644 index 0000000000000000000000000000000000000000..34e8ce3ca26c449684b6b2a2b7bf80cc3b944e21 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isBranchOffsetInRange.cpp @@ -0,0 +1,30 @@ +bool RISCVInstrInfo :: isBranchOffsetInRange ( unsigned BranchOpc , int64_t BrOffset ) const { +if ( BranchOpc == RISCV :: BEQ ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: BNE ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: BLT ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: BGE ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: BLTU ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: BGEU ) { +return isIntN ( 13 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: JAL ) { +return isIntN ( 21 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: PseudoBR ) { +return isIntN ( 21 , BrOffset ) ; +} +if ( BranchOpc == RISCV :: PseudoJump ) { +return isIntN ( 32 , SignExtend64 ( BrOffset + 0x800 , STI . getZLen ( ) ) ) ; +} +llvm_unreachable ( "Unexpected opcode!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e1fbfa9c588b921f4012b1ef276bd484d2528f8a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isCopyInstrImpl.cpp @@ -0,0 +1,25 @@ +Optional < DestSourcePair > RISCVInstrInfo :: isCopyInstrImpl ( const MachineInstr & MI ) const { +if ( MI . isMoveReg ( ) ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 1 ) } ; +} +if ( MI . getOpcode ( ) == RISCV :: ADDI ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0x0 ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 1 ) } ; +} +} +if ( MI . getOpcode ( ) == RISCV::FSGNJ_D ) { +if ( MI . getOperand ( 1 ) . getReg ( ) == RISCV :: WZR ) { +if ( MI . getOperand ( 3 ) . getImm ( ) == 0x0 ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 2 ) } ; +} +} +} +if ( MI . getOpcode ( ) == RISCV::FSGNJ_S ) { +if ( MI . getOperand ( 1 ) . getReg ( ) == RISCV :: XZR ) { +if ( MI . getOperand ( 3 ) . getImm ( ) == 0x0 ) { +return DestSourcePair { MI . getOperand ( 0 ) , MI . getOperand ( 2 ) } ; +} +} +} +return None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..50780de21fe11cc2afb37299befcc62fbaaaebe3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isFunctionSafeToOutlineFrom.cpp @@ -0,0 +1,12 @@ +bool RISCVInstrInfo :: isFunctionSafeToOutlineFrom ( MachineFunction & MF , bool OutlineFromLinkOnceODRs ) const { +const Function & F = MF . getFunction ( ) ; +if ( ! OutlineFromLinkOnceODRs ) { +if ( F . hasLinkOnceODRLinkage ( ) ) { +return false ; +} +} +if ( F . hasSection ( ) ) { +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cbeb1ee9a6c9be525daa8f32ec64a9979d3d0e62 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,103 @@ +unsigned RISCVInstrInfo :: isLoadFromStackSlot ( const MachineInstr & MI , int & FrameIndex ) const { +if ( MI . getOpcode ( ) == RISCV::LB ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: LBU ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: LH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: LHU ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV::FLH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: LW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV::FLW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: LWU ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: LD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: FLD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aee339a3722b4eb2050feb4b0939229071c5ac5e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isMBBSafeToOutlineFrom.cpp @@ -0,0 +1,3 @@ +bool RISCVInstrInfo :: isMBBSafeToOutlineFrom ( MachineBasicBlock & MBB , unsigned & Flags ) const { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..700d97a2b4e59d8f5044a6e8f3f48863429bae75 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,73 @@ +unsigned RISCVInstrInfo :: isStoreToStackSlot ( const MachineInstr & MI , int & FrameIndex ) const { +if ( MI . getOpcode ( ) == RISCV :: SB ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: SH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: SW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: FSH ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: FSW ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: SD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +if ( MI . getOpcode ( ) == RISCV :: FSD ) { +if ( MI . getOperand ( 1 ) . isFI ( ) ) { +if ( MI . getOperand ( 2 ) . isImm ( ) ) { +if ( MI . getOperand ( 2 ) . getImm ( ) == 0 ) { +FrameIndex = MI . getOperand ( 1 ) . getIndex ( ) ; +return MI . getOperand ( 0 ) . getReg ( ) ; +} +} +} +} +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a5c1cda1a6a4d49914f65fafcd5b80f033045e6c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,31 @@ +void RISCVInstrInfo :: loadRegFromStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator I , Register DstReg , int FI , const TargetRegisterClass * RC , const TargetRegisterInfo * TRI ) const { +DebugLoc DL ; +if ( I != MBB . end ( ) ) { +DL = I -> getDebugLoc ( ) ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const MachineFrameInfo & MFI = MF -> getFrameInfo ( ) ; +MachineMemOperand * MMO = MF -> getMachineMemOperand ( MachinePointerInfo :: getFixedStack ( * MF , FI ) , MachineMemOperand :: MOLoad , MFI . getObjectSize ( FI ) , MFI . getObjectAlign ( FI ) ) ; +unsigned Opcode ; +if ( RISCV :: GPRRegClass . hasSubClassEq ( RC ) ) { +Opcode = TRI -> getRegSizeInBits ( RISCV :: GPRRegClass ) == 32 ? RISCV :: LW : RISCV :: LD ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( RISCV :: FPR16RegClass . hasSubClassEq ( RC ) ) { +Opcode = RISCV::FLH ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( RISCV :: FPR32RegClass . hasSubClassEq ( RC ) ) { +Opcode = RISCV::FLW ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( RISCV :: FPR64RegClass . hasSubClassEq ( RC ) ) { +Opcode = RISCV :: FLD ; +BuildMI ( MBB , I , DL , get ( Opcode ) , DstReg ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +llvm_unreachable ( "Can't load this register from stack slot" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/movImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/movImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..591e98d833c054f89c0a93f005769c4670215455 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/movImm.cpp @@ -0,0 +1,21 @@ +void RISCVInstrInfo :: movImm ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , const DebugLoc & DL , Register DstReg , uint64_t Val , MachineInstr :: MIFlag Flag ) const { +assert ( ( Seq . size ( ) > 0 ) ? "movImm" : "movImm" ) ) ; +MachineRegisterInfo & MRI = MBB . getParent ( ) -> getRegInfo ( ) ; +DstReg = MRI . createVirtualRegister ( & RISCV :: GPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , get ( RISCV :: MOVI32 ) , DstReg ) . addImm ( Val & 0xFFFF ) . setMIFlags ( Flag ) ; +BuildMI ( MBB , MBBI , DL , get ( RISCV :: MOVIH32 ) , DstReg ) . addImm ( ( Val >> 16 ) & 0xFFFF ) . setMIFlags ( Flag ) ; +if ( ! STI . hasE2 ( ) ) { +DstReg = MRI . createVirtualRegister ( & RISCV :: mGPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , get ( RISCV :: MOVI16 ) , DstReg ) . addImm ( Val & 0xFF ) . setMIFlags ( Flag ) ; +return DstReg ; +BuildMI ( MBB , MBBI , DL , get ( RISCV :: MOVI16 ) , DstReg ) . addImm ( ( Val >> 8 ) & 0xFF ) . setMIFlags ( Flag ) ; +if ( ( Val & 0xFF ) != 0 ) { +return DstReg ; +BuildMI ( MBB , MBBI , DL , get ( RISCV :: MOVI16 ) , DstReg ) . addImm ( ( Val >> 16 ) & 0xFF ) . setMIFlags ( Flag ) ; +if ( ( Val & 0xFF ) != 0 ) { +return DstReg ; +BuildMI ( MBB , MBBI , DL , get ( RISCV :: MOVI16 ) , DstReg ) . addImm ( ( Val >> 24 ) & 0xFF ) . setMIFlags ( Flag ) ; +if ( ( Val & 0xFF ) != 0 ) { +return DstReg ; +return DstReg ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee61a6f99c524feca29f0c4363a86c730ce1069a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/parseCondBranch.cpp @@ -0,0 +1,7 @@ +static void parseCondBranch ( MachineInstr & LastInst , MachineBasicBlock * & Target , SmallVectorImpl < MachineOperand > & Cond ) { +assert ( LastInst . getDesc ( ) . isConditionalBranch ( ) && "Unknown conditional branch" ) ; +Target = LastInst . getOperand ( 2 ) . getMBB ( ) ; +Cond . push_back ( MachineOperand :: CreateImm ( LastInst . getOpcode ( ) ) ) ; +Cond . push_back ( LastInst . getOperand ( 0 ) ) ; +Cond . push_back ( LastInst . getOperand ( 1 ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18629294555cbcbcd233d7c6a91e2214736fd780 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,31 @@ +unsigned RISCVInstrInfo :: removeBranch ( MachineBasicBlock & MBB , int * BytesRemoved ) const { +if ( BytesRemoved ) { +* BytesRemoved = 0 ; +} +MachineBasicBlock :: iterator I = MBB . getLastNonDebugInstr ( ) ; +if ( I == MBB . end ( ) ) { +return 0 ; +} +if ( ! I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +if ( ! I -> getDesc ( ) . isConditionalBranch ( ) ) { +return 0 ; +} +} +if ( BytesRemoved ) { +* BytesRemoved = * BytesRemoved + getInstSizeInBytes ( * I ) ; +} +I -> eraseFromParent ( ) ; +I = MBB . end ( ) ; +if ( I == MBB . begin ( ) ) { +return 1 ; +} +I -- ; +if ( ! I -> getDesc ( ) . isConditionalBranch ( ) ) { +return 1 ; +} +if ( BytesRemoved ) { +* BytesRemoved = * BytesRemoved + getInstSizeInBytes ( * I ) ; +} +I -> eraseFromParent ( ) ; +return 2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fb697f11f1b2898111a2dc7c49488a2e68c1bb0b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,29 @@ +bool RISCVInstrInfo :: reverseBranchCondition ( SmallVectorImpl < MachineOperand > & Cond ) const { +assert ( ( Cond . size ( ) == 3 ) && "Invalid branch condition!" ) ; +if ( Cond [ 0 ] . getImm ( ) == RISCV :: BEQ ) { +Cond [ 0 ] . setImm ( RISCV :: BNE ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == RISCV :: BNE ) { +Cond [ 0 ] . setImm ( RISCV :: BEQ ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == RISCV :: BLT ) { +Cond [ 0 ] . setImm ( RISCV :: BGE ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == RISCV :: BGE ) { +Cond [ 0 ] . setImm ( RISCV :: BLT ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == RISCV :: BLTU ) { +Cond [ 0 ] . setImm ( RISCV :: BGEU ) ; +return false ; +} +if ( Cond [ 0 ] . getImm ( ) == RISCV :: BGEU ) { +Cond [ 0 ] . setImm ( RISCV :: BLTU ) ; +return false ; +} +llvm_unreachable ( "Unrecognized conditional branch" ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f65952d8363ffb25778ce56c2fed9ffe82970d1c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,32 @@ +void RISCVInstrInfo :: storeRegToStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator I , Register SrcReg , bool IsKill , int FI , const TargetRegisterClass * RC , const TargetRegisterInfo * TRI ) const { +DebugLoc DL ; +if ( I != MBB . end ( ) ) { +DL = I -> getDebugLoc ( ) ; +} +MachineFunction & MF = * MBB . getParent ( ) ; +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineMemOperand * MMO = MF . getMachineMemOperand ( MachinePointerInfo :: getFixedStack ( MF , FI ) , MachineMemOperand :: MOStore , MFI . getObjectSize ( FI ) , MFI . getObjectAlign ( FI ) ) ; +MachineFunctionInfo * CFI = MF . getInfo < MachineFunctionInfo > ( ) ; +unsigned Opcode ; +if ( RISCV :: GPRRegClass . hasSubClassEq ( RC ) ) { +Opcode = TRI -> getRegSizeInBits ( RISCV :: GPRRegClass ) == 32 ? RISCV :: SW : RISCV :: SD ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( RISCV :: FPR16RegClass . hasSubClassEq ( RC ) ) { +Opcode = RISCV :: FSH ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( RISCV :: FPR32RegClass . hasSubClassEq ( RC ) ) { +Opcode = RISCV :: FSW ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +if ( RISCV :: FPR64RegClass . hasSubClassEq ( RC ) ) { +Opcode = RISCV :: FSD ; +BuildMI ( MBB , I , DL , get ( Opcode ) ) . addReg ( SrcReg , getKillRegState ( IsKill ) ) . addFrameIndex ( FI ) . addImm ( 0 ) . addMemOperand ( MMO ) ; +return ; +} +llvm_unreachable ( "Can't store this register to stack slot" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcc10dbebee6a317646b16a7267e491c9f33c58c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/InstrInfo/verifyInstruction.cpp @@ -0,0 +1,26 @@ +bool zmntarzmInstrInfo :: verifyInstruction ( const MachineInstr & MI , StringRef & ErrInfo ) const { +return false ; +return false ; +for ( const MachineOperand & MO : llvm :: drop_begin ( MI . operands ( ) , 2 ) ) { +continue ; +if ( ! MO . isReg ( ) ) { +continue ; +return false ; +return false ; +} +for ( const MachineOperand & MO : llvm :: drop_begin ( MI . operands ( ) , 2 ) ) { +continue ; +if ( ! MO . isReg ( ) ) { +continue ; +return false ; +return false ; +for ( const MachineOperand & MO : llvm :: drop_begin ( MI . operands ( ) , 2 ) ) { +continue ; +if ( ! MO . isReg ( ) ) { +continue ; +return false ; +return false ; +ErrInfo = "Incorrect array index for MVE_VMOV_q_rr" ; +return false ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70c39853ae6a9b6d82505b38a3ae4fe5234aa81f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/MachineFunctionInfo.cpp @@ -0,0 +1,2 @@ +RISCVMachineFunctionInfo ( const MachineFunction & MF ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dd76ab5ba3323d65a4477bccc65534dc7962a22e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getLibCallStackSize.cpp @@ -0,0 +1,3 @@ +unsigned getLibCallStackSize ( ) const { +return LibCallStackSize ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1506385c39ba129264d05e3aeef80f525f072626 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getMoveF64FrameIndex.cpp @@ -0,0 +1,3 @@ +int getMoveF64FrameIndex ( MachineFunction & MF ) { +return VarArgsFrameIndex ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc86317bf4ffdb2157afe0cc9f496c3f8454b58d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex ( ) const { +return VarArgsFrameIndex ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..984c1825c54e81864add7c3ce18abcc8f75abfb1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/getVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +unsigned getVarArgsSaveSize ( ) const { +return VarArgsSaveSize ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5abdcaac1a49937450075b01349b77aad5cba33e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setLibCallStackSize.cpp @@ -0,0 +1,3 @@ +void setLibCallStackSize ( unsigned Size ) { +LibCallStackSize = Size ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66ec61362627179d015c191feff7e83b189ae468 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex ( int Index ) { +VarArgsFrameIndex = Index ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65028936eed662052285bdc438536ed2db9e126d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/setVarArgsSaveSize.cpp @@ -0,0 +1,3 @@ +void setVarArgsSaveSize ( int Size ) { +VarArgsSaveSize = Size ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7bf2af87f47f7fccd53a9869143ed96dbc2a7d2b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/MachineFunctionInfo/useSaveRestoreLibCalls.cpp @@ -0,0 +1,4 @@ +bool useSaveRestoreLibCalls ( const MachineFunction & MF ) const { +return UseLongCalls ; +return UseRetpolineIndirectCalls ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d1dc79fe0dc01959ea6ab571f4edab9a7abef5a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,7 @@ +RISCVSubtarget :: RISCVSubtarget ( const Triple & TT , StringRef CPU , StringRef TuneCPU , StringRef FS , StringRef ABIName , const TargetMachine & TM ) : RISCVGenSubtargetInfo ( TT , CPU , TuneCPU , FS ) , UserReservedRegister ( RISCV :: NUM_TARGET_REGS ) , FrameLowering ( initializeSubtargetDependencies ( TT , CPU , TuneCPU , FS , ABIName ) ) , InstrInfo ( * this ) , RegInfo ( getHwMode ( ) ) , TLInfo ( TM , * this ) { +CallLoweringInfo . reset ( new RISCVCallLowering ( * getTargetLowering ( ) ) ) ; +Legalizer . reset ( new RISCVLegalizerInfo ( * this ) ) ; +auto * RBI = new RISCVRegisterBankInfo ( * getRegisterInfo ( ) ) ; +RegBankInfo . reset ( RBI ) ; +InstSelector . reset ( createRISCVInstructionSelector ( * static_cast < const RISCVTargetMachine * > ( & TM ) , * this , * RBI ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/anchor.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/anchor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae9ce16457c37f0e5c1b75e7cc393283c26a9ae0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/anchor.cpp @@ -0,0 +1,2 @@ +void RISCVSubtarget :: anchor ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70a8d18a0f4959c58f34faee220172dc3452205e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableLinkerRelax.cpp @@ -0,0 +1,3 @@ +bool enableLinkerRelax ( ) const { +return EnableLinkerRelax ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..51af53569dda58106126bb9616c9b0e228522932 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableMachineScheduler.cpp @@ -0,0 +1,3 @@ +bool enableMachineScheduler ( ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88c4f2c9ef4b883b0ff22bc15363b377cf8c1e96 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableRVCHintInstrs.cpp @@ -0,0 +1,3 @@ +bool enableRVCHintInstrs ( ) const { +return EnableRVCHintInstrs ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5523878c63a3fec5d0d102911de8a2fb644c25da --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/enableSaveRestore.cpp @@ -0,0 +1,3 @@ +bool enableSaveRestore ( ) const { +return EnableSaveRestore ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b724fe04d39457a9b6eaa0d79fc3d7f02691138 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getCallLowering.cpp @@ -0,0 +1,3 @@ +const CallLowering * RISCVSubtarget :: getCallLowering ( ) const { +return CallLoweringInfo . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cab0e842d362aace40f7d61a1f90b345034c9dd6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getFrameLowering.cpp @@ -0,0 +1,3 @@ +const RISCVFrameLowering * getFrameLowering ( ) const override { +return & FrameLowering ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e91b785b00b51558d5668733ac8afefab832dd92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getInstrInfo.cpp @@ -0,0 +1,3 @@ +const RISCVInstrInfo * getInstrInfo ( ) const override { +return & InstrInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f460305e71338c6528f589ba22d7eeb84cd2ee14 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector * RISCVSubtarget :: getInstructionSelector ( ) const { +return InstSelector . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66ce70fff116dbbaee5054316733b2a198e87e05 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getLegalizerInfo.cpp @@ -0,0 +1,3 @@ +const LegalizerInfo * RISCVSubtarget :: getLegalizerInfo ( ) const { +return Legalizer . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e8e02b3531d675c9106059eb4807c192cd7017f3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getRegBankInfo.cpp @@ -0,0 +1,3 @@ +const RegisterBankInfo * RISCVSubtarget :: getRegBankInfo ( ) const { +return RegBankInfo . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3e2c75dd6ddf98c738cd915f765c59fa13f026a7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +const RISCVRegisterInfo * getRegisterInfo ( ) const override { +return & RegInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83c31a22c7236b0e11e56881d95a0f360d309ab2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +const SelectionDAGTargetInfo * getSelectionDAGInfo ( ) const override { +return & TSInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16ae15472632097d3075aff0875c283e8990edc2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getTargetABI.cpp @@ -0,0 +1,3 @@ +RISCVABI :: ABI getTargetABI ( ) const { +return TargetABI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6af3413c26e7aa716d9ba96ddcf154389b8210eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getTargetLowering.cpp @@ -0,0 +1,3 @@ +const RISCVTargetLowering * getTargetLowering ( ) const override { +return & TLInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getXLen.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getXLen.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a6e3bde5f9b6b485447a8bce8a0091f1a0340c94 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getXLen.cpp @@ -0,0 +1,3 @@ +unsigned getXLen ( ) const { +return XLen ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d4f4a2499c523fc8594ec194a1d030d0dad1e92 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/getXLenVT.cpp @@ -0,0 +1,3 @@ +MVT getXLenVT ( ) const { +return XLenVT ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f2e661f51d43203396d1e225cbc8278eace7b4df --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtA.cpp @@ -0,0 +1,3 @@ +bool hasStdExtA ( ) const { +return HasStdExtA ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce5e9fb80677325f4d15acae0c205541ba3f0a86 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtB.cpp @@ -0,0 +1,3 @@ +bool hasStdExtB ( ) const { +return HasStdExtB ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6afa2dea62227c40e77b1d809e422cc828634c13 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtC.cpp @@ -0,0 +1,3 @@ +bool hasStdExtC ( ) const { +return HasStdExtC ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e777c791d438d140046213757adc02b4ad72943b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtD.cpp @@ -0,0 +1,3 @@ +bool hasStdExtD ( ) const { +return HasStdExtD ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6604f1a6d0b9bd50209386800e4b95b032d791ad --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtF.cpp @@ -0,0 +1,3 @@ +bool hasStdExtF ( ) const { +return HasStdExtF ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21ed588c30fce8b938d0734277487193cd84c592 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtM.cpp @@ -0,0 +1,3 @@ +bool hasStdExtM ( ) const { +return HasStdExtM ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a73c0d3f407b71b90ca2ba8539d287063ccf6f3e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtV.cpp @@ -0,0 +1,3 @@ +bool hasStdExtV ( ) const { +return HasStdExtV ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5a9225770f654fcd514c1da5ab6e925fd96804a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZba.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZba ( ) const { +return HasStdExtZba ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28a3678f936fee5641edcb5075f2abf9fdfe7335 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbb.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbb ( ) const { +return HasStdExtZbb ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d024a63261d9fb21603c6b130f22b925d50b933 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbc ( ) const { +return HasStdExtZbc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ebad6fe9769e6edcc5bc81d781126d04df82694e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbe.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbe ( ) const { +return HasStdExtZbe ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dbc5d68d500b25105271947368d1a77de4d31b40 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbf.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbf ( ) const { +return HasStdExtZbf ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..efaa1d7da6ca38abca75b0da6b48aced6cd1696d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbm.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbm ( ) const { +return HasStdExtZbm ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b5396d1bb87eb10eee1d64fb4d8315b808898b02 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbp.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbp ( ) const { +return HasStdExtZbp ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c12b3ad22e06eb29ebda5ab08e3dddda0e9f320 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbproposedc.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbproposedc ( ) const { +return HasStdExtZbproposedc ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65e76b1debf4bcd1997f16adfa040bb88faf6617 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbr.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbr ( ) const { +return HasStdExtZbr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98ab2c86bcc3ffd2a227696236b28d03e20fe466 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbs.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbs ( ) const { +return HasStdExtZbs ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10ad75e226f3fc188a0b8134df8a8284a1ed10b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZbt.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZbt ( ) const { +return HasStdExtZbt ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a754f5f42aa332191c6959d7b43fe6e6657d2d1a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZfh.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZfh ( ) const { +return HasStdExtZfh ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe9c8a54a357a1f5f9686c085c4f28943257ae0f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZvamo.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvamo ( ) const { +return HasStdExtZvamo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9740e1eb0dce59980aa951a67fca0ad5a27ad003 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/hasStdExtZvlsseg.cpp @@ -0,0 +1,3 @@ +bool hasStdExtZvlsseg ( ) const { +return HasStdExtZvlsseg ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52096e26ec43e76faa0f8612d36d5b26cafd8b03 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/initializeSubtargetDependencies.cpp @@ -0,0 +1,17 @@ +RISCVSubtarget & RISCVSubtarget :: initializeSubtargetDependencies ( const Triple & TT , StringRef CPU , StringRef TuneCPU , StringRef FS , StringRef ABIName ) { +std :: string CPUName = CPU ; +bool Is64Bit = TT . isArch64Bit ( ) ; +if ( CPU . empty ( ) ) { +CPUName = Is64Bit ? "generic-la64" : "generic-la32" ; +} +if ( TuneCPU . empty ( ) ) { +TuneCPU = CPUName ; +} +ParseSubtargetFeatures ( CPUName , TuneCPU , FS ) ; +if ( Is64Bit ) { +GRLenVT = MVT :: i64 ; +GRLen = 64 ; +} +TargetABI = Is64Bit ? RISCVABI :: ABI_LP64D : RISCVABI :: ABI_ILP32D ; +return * this ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..44cd572e277dadcf0f1bd6ba82d9e10c25d718c0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/is64Bit.cpp @@ -0,0 +1,3 @@ +bool is64Bit ( ) const { +return HasRV64 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d3e892bba6b18878664cc247c83bf009dbe49640 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/isRV32E.cpp @@ -0,0 +1,3 @@ +bool isRV32E ( ) const { +return IsRV32E ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca947ceba26408c2cc34b668c9e12caf8e1257ec --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/Subtarget/isRegisterReservedByUser.cpp @@ -0,0 +1,4 @@ +bool isRegisterReservedByUser ( Register R ) const { +assert ( R < RISCV :: NUM_TARGET_REGS && "Register out of range" ) ; +return UserReservedRegister [ R ] ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..618aa0427a33252d781d2a6b1906e7ce894b0983 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,4 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetInfo ( ) { +RegisterTarget < Triple :: RISCV32 > X ( getTheRISCV32Target ( ) , "RISCV32" , "32-bit RISCV" , "RISCV" ) ; +RegisterTarget < Triple :: RISCV64 > Y ( getTheRISCV64Target ( ) , "RISCV64" , "64-bit RISCV" , "RISCV" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0b143de30a76b7ff8951b7a8d8065917c6adfc1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/getThe32Target.cpp @@ -0,0 +1,4 @@ +Target & llvm :: getTheRISCV32Target ( ) { +static Target TheRISCV32Target ; +return TheRISCV32Target ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0856efac4c09662f6774e0e56866af6b8a844333 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetInfo/getThe64Target.cpp @@ -0,0 +1,4 @@ +Target & llvm :: getTheRISCV64Target ( ) { +static Target TheRISCV64Target ; +return TheRISCV64Target ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e95bb4c3064161277deab9f3e90e87296fa6ca9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,9 @@ +extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget ( ) { +RegisterTargetMachine < RISCVTargetMachine > X ( getTheRISCV32Target ( ) ) ; +RegisterTargetMachine < RISCVTargetMachine > Y ( getTheRISCV64Target ( ) ) ; +auto * PR = PassRegistry :: getPassRegistry ( ) ; +initializeGlobalISel ( * PR ) ; +initializeRISCVMergeBaseOffsetOptPass ( * PR ) ; +initializeRISCVExpandPseudoPass ( * PR ) ; +initializeRISCVCleanupVSETVLIPass ( * PR ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19f2c233a79154ad7f7b65f1256d72be0007a3d4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/PassConfig.cpp @@ -0,0 +1,2 @@ +RISCVPassConfig ( RISCVTargetMachine & TM , PassManagerBase & PM ) : TargetPassConfig ( TM , PM ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..171e06f32aad02b237c050cd5847656b6f03797b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,3 @@ +RISCVTargetMachine :: RISCVTargetMachine ( const Target & T , const Triple & TT , StringRef CPU , StringRef FS , const TargetOptions & Options , Optional < Reloc :: Model > RM , CodeModel :: Model CM , CodeGenOpt :: Level OL ) : LLVMTargetMachine ( T , computeDataLayout ( TT ) , TT , CPU , FS , Options , getEffectiveRelocModel ( RM ) , CM , OL ) , TLOF ( make_unique < TargetObjectFile > ( ) ) , Subtarget ( TT , CPU , FS , * this ) { +initAsmInfo ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..353655a92f0f021ab072e54d72010f8302cc812d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addGlobalInstructionSelect.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig :: addGlobalInstructionSelect ( ) { +addPass ( new InstructionSelect ( ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19276599151c530e533e8cfa32b5d0f942b8cbb1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addIRPasses.cpp @@ -0,0 +1,4 @@ +void RISCVPassConfig :: addIRPasses ( ) { +addPass ( createAtomicExpandPass ( ) ) ; +TargetPassConfig :: addIRPasses ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1ac57ab76b0b7d5f39e287396a97ffee452cacf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addIRTranslator.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig :: addIRTranslator ( ) { +addPass ( new IRTranslator ( getOptLevel ( ) ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..303887b02a296efd51b0577c992419d56c225955 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig :: addInstSelector ( ) { +addPass ( createRISCVISelDag ( getRISCVTargetMachine ( ) ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a1e3283d2610ae06b80e64efe851634256d148e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addLegalizeMachineIR.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig :: addLegalizeMachineIR ( ) { +addPass ( new Legalizer ( ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..314a137ab7254cb9575f2b864fce780aa1a538d1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,3 @@ +void RISCVPassConfig :: addPreEmitPass ( ) { +addPass ( & BranchRelaxationPassID ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c2ec9402966140278db397cc4f52eab3c301f7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreEmitPass2.cpp @@ -0,0 +1,4 @@ +void RISCVPassConfig :: addPreEmitPass2 ( ) { +addPass ( createRISCVExpandPseudoPass ( ) ) ; +addPass ( createRISCVExpandAtomicPseudoPass ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5467de3e71a9fe2875ab8f3fb29e0fd19b7a1464 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreRegAlloc.cpp @@ -0,0 +1,8 @@ +void RISCVPassConfig :: addPreRegAlloc ( ) { +if ( TM -> getOptLevel ( ) != CodeGenOpt :: None ) { +if ( EnableAdvSIMDScalar ) { +addPass ( createRISCVAdvSIMDScalar ( ) ) ; +addPass ( & PeepholeOptimizerID ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..df752bad6b2de30338c3f6677be99f56c5b15231 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addPreSched2.cpp @@ -0,0 +1,2 @@ +void RISCVPassConfig :: addPreSched2 ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3bb266fa7802a19d61c2e84c0b1ac88f900f0885 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/addRegBankSelect.cpp @@ -0,0 +1,4 @@ +bool RISCVPassConfig :: addRegBankSelect ( ) { +addPass ( new RegBankSelect ( ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d0eefacff3c52b1d5790efd8b231f6d18aceb1da --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/computeDataLayout.cpp @@ -0,0 +1,7 @@ +static StringRef computeDataLayout ( const Triple & TT ) { +if ( TT . isArch64Bit ( ) ) { +return "e-m:e-p:64:64-i64:64-i128:128-n64-S128" ; +} +assert ( TT . isArch32Bit ( ) && "only RV32 and RV64 is currently supported" ) ; +return "e-m:e-p:32:32-i64:64-n32-S128" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08f40fcd409dc7dec9ab3c07ec1b291650a08662 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/createPassConfig.cpp @@ -0,0 +1,3 @@ +TargetPassConfig * TargetMachine :: createPassConfig ( PassManagerBase & PM ) { +return new RISCVPassConfig ( * this , PM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9424f05ebb3cbbd3ce9eff02ee928b811b620b67 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getEffectiveRelocModel.cpp @@ -0,0 +1,6 @@ +static Reloc :: Model getEffectiveRelocModel ( const Triple & TT , Optional < Reloc :: Model > RM ) { +if ( ! RM . hasValue ( ) ) { +return Reloc :: Static ; +} +return * RM ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6174dfa05f7cbe9092209bade1a1dee2435f5e04 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getObjFileLowering.cpp @@ -0,0 +1,3 @@ +TargetLoweringObjectFile * getObjFileLowering ( ) const override { +return TLOF . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1f3f3513181cba683f5df3eed7740c8daa221d98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,25 @@ +const RISCVSubtarget * RISCVTargetMachine :: getSubtargetImpl ( const Function & F ) const { +Attribute TuneAttr = F . getFnAttribute ( "tune-cpu" ) ; +Attribute CPUAttr = F . getFnAttribute ( "target-cpu" ) ; +Attribute FSAttr = F . getFnAttribute ( "target-features" ) ; +std :: string CPU = CPUAttr . isValid ( ) ? CPUAttr . getValueAsString ( ) . str ( ) : TargetCPU ; +std :: string TuneCPU = TuneAttr . isValid ( ) ? TuneAttr . getValueAsString ( ) . str ( ) : CPU ; +std :: string FS = FSAttr . isValid ( ) ? FSAttr . getValueAsString ( ) . str ( ) : TargetFS ; +std :: string Key = CPU + TuneCPU + FS ; +auto & I = SubtargetMap [ Key ] ; +if ( ! I ) { +resetTargetOptions ( F ) ; +auto ABIName = Options . MCOptions . getABIName ( ) ; +if ( const MDString * ModuleTargetABI = dyn_cast_or_null < MDString > ( F . getParent ( ) -> getModuleFlag ( "target-abi" ) ) ) { +auto TargetABI = RISCVABI :: getTargetABI ( ABIName ) ; +if ( TargetABI != RISCVABI :: ABI_Unknown ) { +if ( ModuleTargetABI -> getString ( ) != ABIName ) { +report_fatal_error ( "-target-abi option != target-abi module flag" ) ; +} +} +ABIName = ModuleTargetABI -> getString ( ) ; +} +I = std :: make_unique < RISCVSubtarget > ( TargetTriple , CPU , TuneCPU , FS , ABIName , * this ) ; +} +return I . get ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70d47ae062510f217f897f9d94ef669b3d66c440 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getTargetMachine.cpp @@ -0,0 +1,3 @@ +RISCVTargetMachine & getRISCVTargetMachine ( ) const { +return getTM < RISCVTargetMachine > ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..97d5f53e2a0e4039c94c9a8224370ec4a252e7fb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/getTargetTransformInfo.cpp @@ -0,0 +1,3 @@ +TargetTransformInfo RISCVTargetMachine :: getTargetTransformInfo ( const Function & F ) { +return TargetTransformInfo ( RISCVTTIImpl ( this , F ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de0e5cb35e217bc4dee6d2413e0cf1cd9b95754b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetMachine/isNoopAddrSpaceCast.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetMachine :: isNoopAddrSpaceCast ( unsigned SrcAS , unsigned DestAS ) const { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff01f0f5399237b5479a240d7c884e27b577ffbc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,5 @@ +void RISCVELFTargetObjectFile :: Initialize ( MCContext & Ctx , const TargetMachine & TM ) { +TargetLoweringObjectFileELF :: Initialize ( Ctx , TM ) ; +SmallDataSection = getContext ( ) . getELFSection ( ".sdata" , ELF :: SHT_PROGBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC ) ; +SmallBSSSection = getContext ( ) . getELFSection ( ".sbss" , ELF :: SHT_NOBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b915b5a7d5155af85458fe1635c7196af72165b1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,13 @@ +MCSection * RISCVELFTargetObjectFile :: SelectSectionForGlobal ( const GlobalObject * GO , SectionKind Kind , const TargetMachine & TM ) const { +if ( Kind . isBSS ( ) ) { +if ( isGlobalInSmallSection ( GO , TM ) ) { +return SmallBSSSection ; +} +} +if ( Kind . isData ( ) ) { +if ( isGlobalInSmallSection ( GO , TM ) ) { +return SmallDataSection ; +} +} +return TargetLoweringObjectFileELF :: SelectSectionForGlobal ( GO , Kind , TM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b930b868e176fea4894b9479d9af416ad84ef11d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/getModuleMetadata.cpp @@ -0,0 +1,23 @@ +void RISCVELFTargetObjectFile :: getModuleMetadata ( Module & M ) { +constexpr StringLiteral DeadKeys [ ] = { ValVerKey } ; +StringSet < > DeadKeySet ; +for ( auto & Key : DeadKeys ) { +if ( M . getModuleFlag ( Key ) ) { +DeadKeySet . insert ( Key ) ; +} +} +if ( DeadKeySet . empty ( ) ) { +return ; +} +SmallVector < Module :: ModuleFlagEntry , 8 > ModuleFlags ; +M . getModuleFlagsMetadata ( ModuleFlags ) ; +NamedMDNode * MDFlags = M . getModuleFlagsMetadata ( ) ; +MDFlags -> eraseFromParent ( ) ; +for ( auto & Flag : ModuleFlags ) { +StringRef Key = Flag . Key -> getString ( ) ; +if ( DeadKeySet . contains ( Key ) ) { +continue ; +} +M . addModuleFlag ( Flag . Behavior , Key , Flag . Val ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..098d9633fc11fa0fb7a8fb317d96e0fffe91e49f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,6 @@ +MCSection * RISCVELFTargetObjectFile :: getSectionForConstant ( const DataLayout & DL , SectionKind Kind , const Constant * C , Align & Alignment ) const { +if ( isConstantInSmallSection ( DL , C ) ) { +return SmallDataSection ; +} +return TargetLoweringObjectFileELF :: getSectionForConstant ( DL , Kind , C , Alignment ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..616abcc31c793acd3e701de06d8760013e5bb39a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isConstantInSmallSection.cpp @@ -0,0 +1,3 @@ +bool RISCVELFTargetObjectFile :: isConstantInSmallSection ( const DataLayout & DL , const Constant * CN ) const { +return isInSmallSection ( DL . getTypeAllocSize ( CN -> getType ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fe9bad88652380aaf1cd8a4cfaee42af8aebe44 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isGlobalInSmallSection.cpp @@ -0,0 +1,12 @@ +bool RISCVTargetObjectFile :: isGlobalInSmallSection ( const GlobalObject * GO , const TargetMachine & TM ) const { +if ( GO == nullptr ) { +return TM . getCodeModel ( ) == CodeModel :: Small ; +} +if ( GO -> isDeclaration ( ) ) { +return isGlobalInSmallSectionImpl ( GO , TM ) ; +} +if ( GO -> hasAvailableExternallyLinkage ( ) ) { +return isGlobalInSmallSectionImpl ( GO , TM ) ; +} +return isGlobalInSmallSection ( GO , TM , getKindForGlobal ( GO , TM ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d00011ff590686113391d6a4b9441bd616af062 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetObjectFile/isInSmallSection.cpp @@ -0,0 +1,3 @@ +bool RISCVELFTargetObjectFile :: isInSmallSection ( uint64_t Size ) const { +return Size > 0 && Size <= SSThreshold ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a01c6a46240853e15d7ba703e55c35182bbbfb7d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/TTIImpl.cpp @@ -0,0 +1,2 @@ +explicit RISCVTTIImpl ( const RISCVTargetMachine * TM , const Function & F ) : BaseT ( TM , F . getParent ( ) -> getDataLayout ( ) ) , ST ( TM -> getSubtargetImpl ( F ) ) , TLI ( ST -> getTargetLowering ( ) ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e82db21c6ffaa82704311393c6eaa6fc14bfe3de --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCost.cpp @@ -0,0 +1,6 @@ +int RISCVTTIImpl :: getIntImmCost ( const APInt & Imm , Type * Ty , TTI :: TargetCostKind CostKind ) { +if ( Imm == 0 ) { +return TTI :: TCC_Free ; +} +return RISCVMatInt::getIntMatCost(Imm, DL.getTypeSizeInBits(Ty), getST()->is64Bit()) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d182783270a71782eebbe782f7045852edfc68b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostInst.cpp @@ -0,0 +1,71 @@ +int RISCVTTIImpl :: getIntImmCostInst ( unsigned Opcode , unsigned Idx , const APInt & Imm , Type * Ty , TTI :: TargetCostKind CostKind , Instruction * Inst ) { +assert ( Ty -> isIntegerTy ( ) && "getIntImmCost can only estimate cost of materialising integers" ) ; +if ( Opcode == Instruction :: GetElementPtr ) { +return TTI :: TCC_Free ; +} +if ( Opcode == Instruction :: Add ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( Ty -> getPrimitiveSizeInBits ( ) == 8 ) { +return TTI :: TCC_Free ; +} +} +} +if ( Opcode == Instruction :: And ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Or ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Xor ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Mul ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Sub ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +return getIntImmCost ( Imm , Ty , CostKind ) ; +} +if ( Opcode == Instruction :: Shl ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( isInt < 32 > ( Imm . getSExtValue ( ) ) ) { +return TTI :: TCC_Free ; +} +} +} +if ( Opcode == Instruction :: LShr ) { +if ( Imm . getBitWidth ( ) <= 64 ) { +if ( Ty -> getPrimitiveSizeInBits ( ) <= 32 ) { +return TTI :: TCC_Free ; +} +} +} +if ( Opcode == Instruction :: AShr ) { +return TTI :: TCC_Free ; +} +return TTI :: TCC_Free ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3cc4a65705a79d2d6eba01844b8feb1e9d4ad30b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getIntImmCostIntrin.cpp @@ -0,0 +1,3 @@ +int RISCVTTIImpl :: getIntImmCostIntrin ( Intrinsic :: ID IID , unsigned Idx , const APInt & Imm , Type * Ty , TTI :: TargetCostKind CostKind ) { +return TTI :: TCC_Free ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6abade06b10f597112633f2279b6db54c0da03f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getST.cpp @@ -0,0 +1,3 @@ +const RISCVSubtarget * getST ( ) const { +return ST ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ef0206d9b5838455261d7311790309659b7cd36 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Scheduling/TargetTransformInfo/getTLI.cpp @@ -0,0 +1,3 @@ +const RISCVTargetLowering * getTLI ( ) const { +return TLI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/CallLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/CallLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f346e95ac7e28b68230370764822c23ee5369d48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/CallLowering.cpp @@ -0,0 +1,2 @@ +RISCVCallLowering :: RISCVCallLowering ( const RISCVTargetLowering & TLI ) : CallLowering ( & TLI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ee07984b435dc293551c46a5f3448e78645163e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerCall.cpp @@ -0,0 +1,3 @@ +bool RISCVCallLowering :: lowerCall ( MachineIRBuilder & MIRBuilder , CallLoweringInfo & Info ) const { +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e93f77dd2c38215720c6f67c52516f9f45ba3099 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerFormalArguments.cpp @@ -0,0 +1,6 @@ +bool RISCVCallLowering :: lowerFormalArguments ( MachineIRBuilder & MIRBuilder , const Function & F , ArrayRef < ArrayRef < Register >> VRegs , FunctionLoweringInfo & FLI ) const { +if ( F . arg_empty ( ) ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..facd562885bb227e1fc2539e22a0e6319329e9bf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/CallLowering/lowerReturn.cpp @@ -0,0 +1,8 @@ +bool RISCVCallLowering :: lowerReturn ( MachineIRBuilder & MIRBuilder , const Value * Val , ArrayRef < Register > VRegs , FunctionLoweringInfo & FLI ) const { +MachineInstrBuilder Ret = MIRBuilder . buildInstrNoInsert ( RISCV :: PseudoRET ) ; +if ( Val != nullptr ) { +return false ; +} +MIRBuilder . insertInstr ( Ret ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f7edfbd62872d1f6d4b68ed6eedfed75813d89d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +explicit RISCVSubtarget & STI ) : TargetFrameLowering ( StackGrowsDown , 4 , 0 ) , STI ( STI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/adjustReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/adjustReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d15b59b577104611e45820ce4efb2affa91c3e5f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/adjustReg.cpp @@ -0,0 +1,22 @@ +void RISCVFrameLowering :: adjustReg ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , const DebugLoc & DL , Register DestReg , Register SrcReg , int64_t Val , MachineInstr :: MIFlag Flag ) const { +MachineRegisterInfo & MRI = MBB . getParent ( ) -> getRegInfo ( ) ; +const RISCVInstrInfo * TII = STI . getInstrInfo ( ) ; +if ( DestReg == SrcReg ) { +if ( Val == 0 ) { +return ; +} +} +if ( DestReg != SrcReg ) { +if ( isInt < 12 > ( Val ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( RISCV :: ADDI ) , DestReg ) . addReg ( SrcReg ) . addImm ( Val ) . setMIFlag ( Flag ) ; +} +if ( ! isInt < 12 > ( Val ) ) { +unsigned Opc = RISCV :: ADD ; +bool isSub = Val < 0 ; +if ( isSub ) { +Opc = RISCV :: SUB ; +} +Register ScratchReg = MRI . createVirtualRegister ( & RISCV :: GPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( Opc ) , DestReg ) . addReg ( SrcReg ) . addReg ( ScratchReg , RegState :: Kill ) . setMIFlag ( Flag ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c2553b9a48bb8d93fb83b9e84985f6116f59276c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/canUseAsEpilogue.cpp @@ -0,0 +1,4 @@ +bool RISCVFrameLowering :: canUseAsEpilogue ( const MachineBasicBlock & MBB ) const { +return false ; +return SuccMBB -> isReturnBlock ( ) && SuccMBB -> size ( ) == 1 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47608b1eac8249e713e57750860ff5e18c426a0e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/canUseAsPrologue.cpp @@ -0,0 +1,4 @@ +bool RISCVFrameLowering :: canUseAsPrologue ( const MachineBasicBlock & MBB ) const { +const MachineFunction * MF = MBB . getParent ( ) ; +return !RS.isRegUsed(RISCV::X5) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f13e28a98a8f64fdcb3d455afd1a7d1c8ab749b0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/determineCalleeSaves.cpp @@ -0,0 +1,66 @@ +void RISCVFrameLowering :: determineCalleeSaves ( MachineFunction & MF , BitVector & SavedRegs , RegScavenger * RS ) const { +TargetFrameLowering :: determineCalleeSaves ( MF , SavedRegs , RS ) ; +RISCVMachineFunctionInfo * CFI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +if ( hasFP ( MF ) ) { +SavedRegs . set ( RISCV :: R8 ) ; +} +if ( hasBP ( MF ) ) { +SavedRegs . set ( RISCV :: R7 ) ; +} +if ( MF . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +if ( MFI . hasCalls ( ) ) { +static const MCPhysReg CSRegs [ ] = { RISCV :: R0 , RISCV :: R1 , RISCV :: R2 , RISCV :: R3 , RISCV :: R12 , RISCV :: R13 , 0 } ; +for ( unsigned i = 0 ; CSRegs [ i ] ; ++ i ) { +SavedRegs . set ( CSRegs [ i ] ) ; +} +static const MCPhysReg CSHRegs [ ] = { RISCV :: R18 , RISCV :: R19 , RISCV :: R20 , RISCV :: R21 , RISCV :: R22 , RISCV :: R23 , RISCV :: R24 , RISCV :: R25 , 0 } ; +for ( unsigned i = 0 ; CSHRegs [ i ] ; ++ i ) { +SavedRegs . set ( CSHRegs [ i ] ) ; +} +static const MCPhysReg CSF32Regs [ ] = { RISCV :: F8_32 , RISCV :: F9_32 , RISCV :: F10_32 , RISCV :: F11_32 , RISCV :: F12_32 , RISCV :: F13_32 , RISCV :: F14_32 , RISCV :: F15_32 , 0 } ; +static const MCPhysReg CSF64Regs [ ] = { RISCV :: F8_64 , RISCV :: F9_64 , RISCV :: F10_64 , RISCV :: F11_64 , RISCV :: F12_64 , RISCV :: F13_64 , RISCV :: F14_64 , RISCV :: F15_64 , 0 } ; +const MCPhysReg * FRegs = NULL ; +FRegs = CSF64Regs ; +FRegs = CSF64Regs ; +FRegs = CSF32Regs ; +FRegs = CSF32Regs ; +if ( FRegs != NULL ) { +const MCPhysReg * Regs = MF . getRegInfo ( ) . getCalleeSavedRegs ( ) ; +for ( unsigned i = 0 ; Regs [ i ] ; ++ i ) { +unsigned x = 0 ; +for ( ; FRegs [ x ] ; ++ x ) { +if ( FRegs [ x ] == Regs [ i ] ) { +break ; +} +} +if ( FRegs [ x ] == 0 ) { +SavedRegs . set ( Regs [ i ] ) ; +unsigned x = 0 ; +for ( ; FRegs [ x ] ; ++ x ) { +if ( FRegs [ x ] == Regs [ i ] ) { +break ; +if ( FRegs [ x ] == 0 ) { +SavedRegs . set ( Regs [ i ] ) ; +} +} +CFI -> setLRIsSpilled ( SavedRegs . test ( RISCV :: R15 ) ) ; +unsigned CSStackSize = 0 ; +for ( unsigned Reg : SavedRegs . set_bits ( ) ) { +auto RegSize = TRI -> getRegSizeInBits ( Reg , MRI ) / 8 ; +CFI -> setCalleeSaveAreaSize ( CSStackSize ) ; +uint64_t Limit = estimateRSStackSizeLimit ( MF , STI ) ; +bool BigFrame = ( MFI . estimateStackSize ( MF ) + CSStackSize >= Limit ) ; +if ( BigFrame ) { +const TargetRegisterClass * RC = & RISCV :: GPRRegClass ; +unsigned size = TRI -> getSpillSize ( * RC ) ; +Align align = TRI -> getSpillAlign ( * RC ) ; +if ( CFI -> isCRSpilled ( ) ) { +const TargetRegisterClass * RC = & RISCV :: GPRRegClass ; +unsigned size = TRI -> getSpillSize ( * RC ) ; +Align align = TRI -> getSpillAlign ( * RC ) ; +if ( ! STI . hasE2 ( ) ) { +const TargetRegisterClass * RC = & RISCV :: GPRRegClass ; +unsigned size = TRI -> getSpillSize ( * RC ) ; +Align align = TRI -> getSpillAlign ( * RC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..280fcc73f35e1a0a190f7e1185365ce8591e570e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,15 @@ +MachineBasicBlock :: iterator RISCVFrameLowering :: eliminateCallFramePseudoInstr ( MachineFunction & MF , MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI ) const { +Register SPReg = RISCV :: X2 ; +DebugLoc DL = MI -> getDebugLoc ( ) ; +if ( ! hasReservedCallFrame ( MF ) ) { +int64_t Amount = MI -> getOperand ( 0 ) . getImm ( ) ; +if ( Amount != 0 ) { +Amount = alignSPAdjust ( Amount ) ; +if ( MI -> getOpcode ( ) == RISCV :: ADJCALLSTACKDOWN ) { +Amount = - Amount ; +} +adjustReg ( MBB , MI , DL , SPReg , SPReg , Amount , MachineInstr :: NoFlags ) ; +} +} +return MBB . erase ( MI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..409e41620bb1646918f50aeaab3aa9c835245160 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,33 @@ +void RISCVFrameLowering :: emitEpilogue ( MachineFunction & MF , MachineBasicBlock & MBB ) const { +const TargetInstrInfo & TII = * MF . getSubtarget ( ) . getInstrInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +RISCVMachineFunctionInfo * CFI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +Register FPReg = getFPReg ( STI ) ; +Register SPReg = getSPReg ( STI ) ; +MachineBasicBlock :: iterator MBBI = MBB . end ( ) ; +DebugLoc DL ; +DL = MBBI -> getDebugLoc ( ) ; +if ( ! MBB . empty ( ) ) { +MBBI = MBB . getFirstTerminator ( ) ; +if ( MBBI == MBB . end ( ) ) { +MBBI = MBB . getLastNonDebugInstr ( ) ; +} +if ( ! MBBI -> isTerminator ( ) ) { +MBBI = std :: next ( MBBI ) ; +} +} +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +auto LastFrameDestroy = MBBI ; +if ( ! CSI . empty ( ) ) { +LastFrameDestroy = std :: prev ( MBBI , CSI . size ( ) ) ; +} +uint64_t StackSize = MFI . getStackSize ( ) ; +uint64_t ActualSize = CFI -> getCalleeSaveAreaSize ( ) + CFI -> getVarArgsSaveSize ( ) ; +if ( hasFP ( MF ) ) { +BuildMI ( MBB , LastFrameDestroy , DL , TII -> get ( TargetOpcode :: COPY ) , SPReg ) . addReg ( FPReg ) . setMIFlag ( MachineInstr :: NoFlags ) ; +} +if ( ! hasFP ( MF ) ) { +adjustReg ( MBB , LastFrameDestroy , DL , SPReg , SPReg , ( StackSize - ActualSize ) , MachineInstr :: FrameDestroy ) ; +} +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , ActualSize , MachineInstr :: FrameDestroy ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1155cd6b4251084dd35d2aa681a718903d1be43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,55 @@ +void RISCVFrameLowering :: emitPrologue ( MachineFunction & MF , MachineBasicBlock & MBB ) const { +const RegisterInfo * RI = STI . getRegisterInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineFunctionInfo * CFI = MF . getInfo < MachineFunctionInfo > ( ) ; +Register SPReg = getSPReg ( STI ) ; +Register BPReg = getBPReg ( STI ) ; +const RISCVInstrInfo * TII = STI . getInstrInfo ( ) ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) ; +const TargetRegisterInfo * TRI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +const MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +DebugLoc DL ; +if ( MF . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +determineFrameLayout ( MF ) ; +uint64_t StackSize = MFI . getStackSize ( ) ; +if ( StackSize == 0 ) { +if ( ! MFI . adjustsStack ( ) ) { +return ; +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +unsigned spillAreaSize = CFI -> getCalleeSaveAreaSize ( ) ; +uint64_t ActualSize = spillAreaSize + CFI -> getVarArgsSaveSize ( ) ; +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( ActualSize ) ) , MachineInstr :: NoFlags ) ; +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: cfiDefCfaOffset ( nullptr , ActualSize ) ) ; +std :: advance ( MBBI , CSI . size ( ) ) ; +for ( const auto & Entry : CSI ) { +int64_t Offset = MFI . getObjectOffset ( Entry . getFrameIdx ( ) ) ; +unsigned Num = TRI -> getRegSizeInBits ( Reg , MRI ) / 32 ; +for ( unsigned i = 0 ; i < Num ; i ++ ) { +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: createOffset ( nullptr , RI -> getDwarfRegNum ( Reg , true ) + i , Offset + i * 4 ) ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( TargetOpcode :: CFI_INSTRUCTION ) ) . addCFIIndex ( CFIIndex ) ; +} +if ( hasFP ( MF ) ) { +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: createDefCfaRegister ( nullptr , RI -> getDwarfRegNum ( FPReg , true ) ) ) ; +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( StackSize - ActualSize ) ) , MachineInstr :: NoFlags ) ; +if ( RI -> hasStackRealignment ( MF ) ) { +Align MaxAlignment = MFI . getMaxAlign ( ) ; +if ( isUInt < 12 > ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( TargetOpcode :: CFI_INSTRUCTION ) , SPReg ) . addReg ( SPReg ) . addImm ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ; +if ( ! STI . hasE2 ( ) ) { +if ( ! STI . hasE2 ( ) ) { +if ( ! isUInt < 12 > ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( RISCV::ANDI ) , SPReg ) . addReg ( VR ) . addImm ( ShiftAmount ) ; +if ( ! STI . hasE2 ( ) ) { +Register VR = MF . getRegInfo ( ) . createVirtualRegister ( & RISCV :: mGPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( RISCV :: ANDI ) , VR ) . addReg ( SPReg ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( RISCV::SRLI ) , VR ) . addReg ( VR ) . addImm ( ShiftAmount ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( RISCV :: SLLI ) , SPReg ) . addReg ( VR ) ; +} +if ( hasBP ( MF ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( RISCV::ADDI ) , BPReg ) . addReg ( SPReg ) ; +} +} +if ( ! hasFP ( MF ) ) { +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( StackSize - ActualSize ) ) , MachineInstr :: NoFlags ) ; +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: cfiDefCfaOffset ( nullptr , MFI . getStackSize ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp new file mode 100644 index 0000000000000000000000000000000000000000..05ecd69cea281a3a52cd6addd92717e8970dfe69 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/getFrameIndexReference.cpp @@ -0,0 +1,55 @@ +StackOffset RISCVFrameLowering :: getFrameIndexReference ( const MachineFunction & MF , int FI , Register & FrameReg ) const { +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterInfo * RI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +const auto * CFI = MF . getInfo < MachineFunctionInfo > ( ) ; +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +int MinCSFI = 0 ; +int MaxCSFI = - 1 ; +int Offset = MFI . getObjectOffset ( FI ) + MFI . getOffsetAdjustment ( ) ; +if ( CSI . size ( ) ) { +MinCSFI = CSI [ 0 ] . getFrameIdx ( ) ; +MaxCSFI = CSI [ CSI . size ( ) - 1 ] . getFrameIdx ( ) ; +} +if ( FI >= MinCSFI ) { +if ( FI <= MaxCSFI ) { +FrameReg = RISCV :: X2 ; +Offset = Offset + CFI -> getVarArgsSaveSize ( ) + CFI -> getCalleeSaveAreaSize ( ) ; +} +} +if ( RI -> hasStackRealignment ( MF ) ) { +if ( ! MFI . isFixedObjectIndex ( FI ) ) { +FrameReg = RISCV :: X9 ; +Offset = Offset + MFI . getStackSize ( ) ; +} +if ( MFI . isFixedObjectIndex ( FI ) ) { +FrameReg = getFPReg ( STI ) ; +Offset = Offset + CFI -> getVarArgsSaveSize ( ) + CFI -> getCalleeSaveAreaSize ( ) ; +} +if ( FI > MaxCSFI ) { +if ( ! MFI . isFixedObjectIndex ( FI ) ) { +Offset = Offset + MFI . getStackSize ( ) ; +} +if ( MFI . isFixedObjectIndex ( FI ) ) { +FrameReg = getFPReg ( STI ) ; +Offset = Offset + CFI -> getVarArgsSaveSize ( ) + CFI -> getCalleeSaveAreaSize ( ) ; +} +} +} +int64_t FrameOffset = MF . getFrameInfo ( ) . getObjectOffset ( FI ) ; +if ( ! hasFP ( MF ) ) { +return StackOffset :: getFixed ( FrameOffset + MF . getFrameInfo ( ) . getStackSize ( ) ) ; +} +if ( RI -> needsStackRealignment ( MF ) ) { +if ( ! MFI . isFixedObjectIndex ( FI ) ) { +if ( hasBP ( MF ) ) { +FrameReg = RISCV :: X9 ; +} +if ( ! hasBP ( MF ) ) { +FrameReg = RISCV :: X2 ; +} +return StackOffset :: getFixed ( FrameOffset + MF . getFrameInfo ( ) . getStackSize ( ) ) ; +} +} +FrameReg = RI -> getFrameRegister ( MF ) ; +return StackOffset :: getFixed ( Offset ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasBP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasBP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e1216bbbef2f2fac206e348fb534159d264106e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasBP.cpp @@ -0,0 +1,5 @@ +bool RISCVFrameLowering :: hasBP ( const MachineFunction & MF ) const { +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterInfo * TRI = STI . getRegisterInfo ( ) ; +return MFI . hasVarSizedObjects ( ) && TRI -> needsStackRealignment ( MF ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41a9e7884235055e05f9b24a354925d41adafc0d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,5 @@ +bool RISCVFrameLowering :: hasFP ( const MachineFunction & MF ) const { +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterInfo * RegInfo = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +return MF . getTarget ( ) . Options . DisableFramePointerElim ( MF ) || RegInfo -> needsStackRealignment ( MF ) || MFI . hasVarSizedObjects ( ) || MFI . isFrameAddressTaken ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6143029916b52f22491218fca66308335693b92a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/hasReservedCallFrame.cpp @@ -0,0 +1,3 @@ +bool RISCVFrameLowering :: hasReservedCallFrame ( const MachineFunction & MF ) const { +return ! MF . getFrameInfo ( ) . hasVarSizedObjects ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2c98e8855fdc66af79a5ce8307c269391f43644 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,9 @@ +void RISCVFrameLowering :: processFunctionBeforeFrameFinalized ( MachineFunction & MF , RegScavenger * RS ) const { +const TargetRegisterInfo * RegInfo = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +const TargetRegisterClass * RC = & RISCV :: GPRRegClass ; +if ( ! isInt < 11 > ( MFI . estimateStackSize ( MF ) ) ) { +int RegScavFI = MFI . CreateStackObject ( RegInfo -> getSpillSize ( * RC ) , RegInfo -> getSpillAlign ( * RC ) , false ) ; +RS -> addScavengingFrameIndex ( RegScavFI ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fc82d4bdd161a43e98a38f285fdc639ec6983a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,19 @@ +bool RISCVFrameLowering :: restoreCalleeSavedRegisters ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , MutableArrayRef < CalleeSavedInfo > CSI , const TargetRegisterInfo * TRI ) const { +if ( CSI . empty ( ) ) { +return true ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const TargetInstrInfo & TII = * MF -> getSubtarget ( ) . getInstrInfo ( ) ; +DebugLoc DL ; +if ( MI != MBB . end ( ) ) { +if ( ! MI -> isDebugInstr ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +} +for ( auto & CS : reverse ( CSI ) ) { +Register Reg = CS . getReg ( ) ; +TII . loadRegFromStackSlot ( MBB , MI , Reg , CS . getFrameIdx ( ) , RC , TRI ) ; +assert ( MI != MBB . begin ( ) && "loadRegFromStackSlot didn't insert any code!" ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..27e3c1e57015c82d42d1c8b0da0840f8289a5cb2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,30 @@ +bool RISCVFrameLowering :: spillCalleeSavedRegisters ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , ArrayRef < CalleeSavedInfo > CSI , const TargetRegisterInfo * TRI ) const { +if ( CSI . empty ( ) ) { +return false ; +} +DebugLoc DL ; +unsigned CalleeFrameSize = 0 ; +DebugLoc DL = MBB . findDebugLoc ( MI ) ; +DebugLoc dl ; +if ( MI != MBB . end ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const TargetInstrInfo & TII = * MF -> getSubtarget ( ) . getInstrInfo ( ) ; +DebugLoc DL ; +if ( MI != MBB . end ( ) ) { +DL = MI -> getDebugLoc ( ) ; +if ( ! MI -> isDebugInstr ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +} +for ( unsigned i = CSI . size ( ) ; i != 0 ; -- i ) { +unsigned Reg = CS . getReg ( ) ; +MachineFunction * MF = MBB . getParent ( ) ; +BuildMI ( MBB , MI , DL , TII . get ( RISCV :: PseudoCALL ) ) . addReg ( Reg , getKillRegState ( IsNotLiveIn ) ) . setMIFlag ( MachineInstr :: FrameSetup ) ; +Register Reg = CS . getReg ( ) ; +const TargetRegisterClass * RC = TRI -> getMinimalPhysRegClass ( Reg ) ; +TII -> storeRegToStackSlot ( MBB , MBBI , Reg , true , CS . getFrameIdx ( ) , RC , TRI ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..949472bcf4aeb01469b19d992e696f36ab2e04c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +explicit RISCVDAGToDAGISel ( RISCVTargetMachine & TargetMachine ) : SelectionDAGISel ( TargetMachine ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10f3f80f974371d3bfa629f5a8a37c4542d7736d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/MatchSLLIUW.cpp @@ -0,0 +1,2 @@ +bool RISCVDAGToDAGISel :: MatchSLLIUW ( SDNode * N ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d8e4bb93a2851ed78020598b9f3d62e97ef7537 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/MatchSRLIUW.cpp @@ -0,0 +1,2 @@ +bool RISCVDAGToDAGISel :: MatchSRLIUW ( SDNode * N ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64ebc5e399566bfe6ffd6cfc0c8707c05b14be31 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/PostprocessISelDAG.cpp @@ -0,0 +1,106 @@ +void RISCVDAGToDAGISel :: PostprocessISelDAG ( ) { +bool IsModified = false ; +if ( TM . getOptLevel ( ) == CodeGenOpt :: None ) { +SelectionDAG :: allnodes_iterator Position ( CurDAG -> getRoot ( ) . getNode ( ) ) ; +Position = Position + 1 ; +for ( ; IsModified ; ) { +IsModified = false ; +SelectionDAG :: allnodes_iterator Position = CurDAG -> allnodes_begin ( ) ; +for ( ; Position != CurDAG -> allnodes_end ( ) ; ) { +SDNode * Node = & * Position ++ ; +MachineSDNode * MachineNode = dyn_cast < MachineSDNode > ( Node ) ; +if ( ! MachineNode ) { +continue ; +} +SDNode * ResNode = Lowering . PostISelFolding ( MachineNode , * CurDAG ) ; +if ( ResNode != Node ) { +if ( ResNode ) { +ReplaceUses ( Node , ResNode ) ; +} +IsModified = true ; +} +} +CurDAG -> RemoveDeadNodes ( ) ; +DNode * N = Position - 1 ; +Position = Posiiton - 1 +if ( N -> use_empty ( ) ) { +continue ; +} +if ( ! N -> isMachineOpcode ( ) ) { +continue ; +} +unsigned FirstOp ; +unsigned StorageOpcode = N -> getMachineOpcode ( ) ; +if ( StorageOpcode == RISCV::LB ) { +FirstOp = 0 ; +} +if ( StorageOpcode == RISCV :: LH ) { +FirstOp = 0 ; +} +if ( StorageOpcode == RISCV :: LW ) { +FirstOp = 0 ; +} +if ( StorageOpcode == RISCV :: LBU ) { +FirstOp = 0 ; +} +if ( StorageOpcode == RISCV :: LHU ) { +FirstOp = 0 ; +} +if ( StorageOpcode == RISCV :: LWU ) { +FirstOp = 0 ; +} +if ( StorageOpcode == RISCV :: LD ) { +FirstOp = 1 ; +} +if ( StorageOpcode == RISCV::FLH ) { +FirstOp = 1 ; +} +if ( StorageOpcode == RISCV::FLW ) { +FirstOp = 1 ; +} +if ( StorageOpcode == RISCV :: FLD ) { +FirstOp = 1 ; +} +if ( StorageOpcode == RISCV :: SB ) { +FirstOp = 1 ; +} +if ( ! isa < ConstantSDNode > ( N -> getOperand ( FirstOp ) ) ) { +continue ; +} +if ( N -> getConstantOperandVal ( FirstOp ) != 0 ) { +continue ; +} +SDValue Base = N -> getOperand ( FirstOp + 1 ) ; +if ( ! Base . isMachineOpcode ( ) ) { +continue ; +} +unsigned Flags = 0 ; +bool ReplaceFlags = true ; +ReplaceFlags = false ; +Flags = RISCVII :: MO_DTPREL_LO ; +Flags = RISCVII :: MO_TLSLD_LO ; +Flags = RISCVII :: MO_TOC_LO ; +DEBUG ( dbgs ( ) << "Folding add-immediate into mem-op:\nBase: " ) ; +SDValue ImmOpnd = Base . getOperand ( 1 ) ; +if ( ReplaceFlags ) { +if ( GlobalAddressSDNode * GA = dyn_cast < GlobalAddressSDNode > ( ImmOpnd ) ) { +SDLoc dl ( GA ) ; +const GlobalValue * GV = GA -> getGlobal ( ) ; +ImmOpnd = CurDAG -> getTargetGlobalAddress ( GV , dl , MVT :: i64 , 0 , Flags ) ; +} +if ( ConstantPoolSDNode * CP = dyn_cast < ConstantPoolSDNode > ( ImmOpnd ) ) { +const Constant * C = CP -> getConstVal ( ) ; +ImmOpnd = CurDAG -> getTargetConstantPool ( C , MVT :: i64 , CP -> getAlignment ( ) , 0 , Flags ) ; +} +} +if ( FirstOp == 1 ) { +( void ) CurDAG -> UpdateNodeOperands ( N , N -> getOperand ( 0 ) , ImmOpnd , Base . getOperand ( 0 ) , N -> getOperand ( 3 ) ) ; +} +if ( FirstOp != 1 ) { +( void ) CurDAG -> UpdateNodeOperands ( N , N -> getOperand ( 0 ) , ImmOpnd , Base . getOperand ( 0 ) , N -> getOperand ( 3 ) ) ; +} +if ( Base . getNode ( ) -> use_empty ( ) ) { +CurDAG -> RemoveDeadNode ( Base . getNode ( ) ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f60b6aabbbb9fec3f010758aca9c5863c0003430 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1,66 @@ +void RISCVDAGToDAGISel :: Select ( SDNode * Node ) { +unsigned Opcode = Node -> getOpcode ( ) ; +if ( Node -> isMachineOpcode ( ) ) { +LLVM_DEBUG ( dbgs ( ) << "== " ; Node -> dump ( CurDAG ) ; dbgs ( ) << "\n" ) ; +Node -> setNodeId ( - 1 ) ; +return ; +} +EVT NodeTy = Node -> getValueType ( 0 ) ; +unsigned MultOpc ; +SDLoc Dl ( Node ) ; +unsigned Opcode = Node -> getOpcode ( ) ; +bool IsSelected = false ; +if ( Opcode == ISD :: ADD ) { +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( RISCV :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +if ( IntNo == ISD :: Constant ) { +SDLoc DL ( Node ) ; +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( RISCV :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +} +if ( IntNo == ISD :: FrameIndex ) { +SDLoc DL ( Node ) ; +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( RISCV :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +} +} +if ( Opcode == ISD :: INTRINSIC_W_CHAIN ) { +int FI = cast < FrameIndexSDNode > ( Node ) -> getIndex ( ) ; +EVT VT = Node -> getValueType ( 0 ) ; +SDValue TFI = CurDAG -> getTargetFrameIndex ( FI , VT ) ; +unsigned Opc = RISCV :: MOV_rr ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( Opc , SDLoc ( Node ) , VT , TFI ) ) ; +return ; +} +if ( Opcode == ISD :: INTRINSIC_VOID ) { +const ConstantSDNode * CN = dyn_cast < ConstantSDNode > ( Node ) ; +unsigned Size = CN -> getValueSizeInBits ( 0 ) ; +int FI = cast < FrameIndexSDNode > ( Node ) -> getIndex ( ) ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( Subtarget -> hasE2 ( ) ? RISCV :: ADDI32 : RISCV :: ADDI16XZ , Dl , MVT :: i32 , TFI , Imm ) ) ; +IsSelected = true ; +selectFrameIndex ( Node ) ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( RISCV :: ADDI , DL , VT , TFI , Imm ) ) ; +return ; +} +SDNode * ResNode = SelectCode ( Node ) ; +return ResNode ; +if ( IsSelected ) { +return ; +} +SelectCode ( Node ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..557c693bf868b0fc0b9cffea5c4c83536f585dbe --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/SelectAddrFI.cpp @@ -0,0 +1,7 @@ +bool RISCVDAGToDAGISel :: SelectAddrFI ( SDValue Addr , SDValue & Base ) { +if ( auto FIN = dyn_cast < FrameIndexSDNode > ( Addr ) ) { +Base = CurDAG -> getTargetFrameIndex ( FIN -> getIndex ( ) , Subtarget -> getXLenVT ( ) ) ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03bbb2c4d1a46bb6b0b1744ebb3c0a7c64a9570f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,12 @@ +bool RISCVDAGToDAGISel :: SelectInlineAsmMemoryOperand ( const SDValue & Op , unsigned ConstraintID , std :: vector < SDValue > & OutOps ) { +if ( ConstraintID == InlineAsm :: Constraint_m ) { +OutOps . push_back ( Op ) ; +return false ; +} +if ( ConstraintID == InlineAsm :: Constraint_A ) { +OutOps . push_back ( Op ) ; +return false ; +} +llvm_unreachable ( "Unexpected asm memory constraint" ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc4ca513b3d19fe740805ba02254115013b7adf9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createRISCVISelDag ( RISCVTargetMachine & TM ) { +return new RISCVDAGToDAGISel ( TM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6421d727e042af3e03db83a48934e1a6f832716 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +StringRef getPassName ( ) const override { +return "RISCV DAG->DAG Pattern Instruction Selection" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ce1ac25c2747cc2284cee6d398826135b851714 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/runOnMachineFunction.cpp @@ -0,0 +1,4 @@ +bool runOnMachineFunction ( MachineFunction & MF ) override { +Subtarget = & MF . getSubtarget < RISCVSubtarget > ( ) ; +return SelectionDAGISel :: runOnMachineFunction ( MF ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..217fe60421fbc9c1c4d8fd4169bb9120dae9bfdd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVLOp.cpp @@ -0,0 +1,9 @@ +bool RISCVDAGToDAGISel :: selectVLOp ( SDValue N , SDValue & VL ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +Val = N ; +if ( v ) { +if ( ! ( v & ( v - 1 ) ) ) { +return true ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c270a24175b584ed7007ee605b399d579a10134b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplat.cpp @@ -0,0 +1,10 @@ +bool RISCVDAGToDAGISel :: selectVSplat ( SDValue N , SDValue & SplatVal ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +} +int bit = 0x1f - __builtin_clz ( v ) ; +imm = CurDAG -> getTargetConstant ( bit , MVT :: i32 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98e3da06d578a447193cc2d7237ab037a511018e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatSimm5.cpp @@ -0,0 +1,10 @@ +bool RISCVDAGToDAGISel :: selectVSplatSimm5 ( SDValue N , SDValue & SplatVal ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +} +int bit = 0x1f - __builtin_clz ( v ) ; +imm = CurDAG -> getTargetConstant ( bit , MVT :: i32 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c08b4679a6b3a1ca334fc129ad5746a12a52c0a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelDAGToDAG/selectVSplatUimm5.cpp @@ -0,0 +1,9 @@ +bool RISCVDAGToDAGISel :: selectVSplatUimm5 ( SDValue N , SDValue & SplatVal ) { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +} +imm = CurDAG -> getTargetConstant ( bit , MVT :: i32 ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e0bf63fd8da8636b8e53a4d9760da5dc0cc2782d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,14 @@ +bool RISCVTargetLowering :: CanLowerReturn ( CallingConv :: ID CallConv , MachineFunction & MF , bool IsVarArg , const SmallVectorImpl < ISD :: OutputArg > & Outs , LLVMContext & Context ) const { +CCAssignFn * RetCC = CallConv == CallingConv :: WebKit_JS ? RetCC_RISCV_WebKit_JS : RetCC_RISCV_AAPCS ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState CCInfo ( CallConv , isVarArg , MF , RVLocs , Context ) ; +CCState CCInfo ( CallConv , IsVarArg , MF , RVLocs , Context ) ; +auto CCFunction = CCAssignFnForReturn ( CallConv ) ; +for ( unsigned i = 0 , e = Outs . size ( ) ; i != e ; ++ i ) { +MVT VT = Outs [ i ] . VT ; +if ( VT == MVT :: i128 ) { +return false ; +} +} +return CCInfo . CheckReturn ( Outs , RetCC ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e69d8f7a9d0dff85f54f6378e2364d9523facf16 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/ComputeNumSignBitsForTargetNode.cpp @@ -0,0 +1,39 @@ +unsigned RISCVTargetLowering :: ComputeNumSignBitsForTargetNode ( SDValue Op , const APInt & DemandedElts , const SelectionDAG & DAG , unsigned Depth ) const { +if ( Op . getOpcode ( ) == RISCVISD :: SLLW ) { +return Op . getScalarValueSizeInBits ( ) ; +} +if ( Op . getOpcode ( ) == RISCVISD :: SRAW ) { +return Op . getScalarValueSizeInBits ( ) ; +} +if ( Op . getOpcode ( ) == RISCVISD :: SRLW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == RISCVISD :: DIVW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == RISCVISD :: DIVUW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == RISCVISD :: REMUW ) { +return 33 ; +} +if ( Op . getOpcode ( ) == RISCVISD::VMV_X_S ) { +ConstantSDNode * Width = dyn_cast < ConstantSDNode > ( Op . getOperand ( 2 ) ) ; +if ( ! Width ) { +return 1 ; +} +unsigned SignBits = 32 - Width -> getZExtValue ( ) + 1 ; +if ( ! isNullConstant ( Op . getOperand ( 1 ) ) ) { +return SignBits ; +} +unsigned Op0SignBits = DAG . ComputeNumSignBits ( Op . getOperand ( 0 ) , Depth + 1 ) ; +SDValue Src = Op . getOperand ( 0 ) ; +unsigned Tmp = DAG . ComputeNumSignBits ( Src , Depth + 1 ) ; +Tmp = Tmp + VTBits - Src . getScalarValueSizeInBits ( ) ; +} +if ( Op . getOpcode ( ) == RISCVISD :: ROLW ) { +unsigned Tmp = DAG . ComputeNumSignBits ( Src , Depth + 1 ) ; +return 33 ; +} +return 1 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..715360bc6eb5c00b66e95aa1e11fde7bf6edb523 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,22 @@ +MachineBasicBlock * RISCVTargetLowering :: EmitInstrWithCustomInserter ( MachineInstr & MI , MachineBasicBlock * BB ) const { +if ( MI . getOpcode ( ) == RISCV :: Select_GPR_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , RISCV :: BCOND ) ; +} +if ( MI . getOpcode ( ) == RISCV :: Select_FPR16_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , RISCV :: BCOND ) ; +} +if ( MI . getOpcode ( ) == RISCV :: Select_FPR32_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , RISCV :: BCOND ) ; +} +if ( MI . getOpcode ( ) == RISCV :: Select_FPR64_Using_CC_GPR ) { +return expandSelectCC ( MI , BB , RISCV :: BCOND ) ; +} +if ( MI . getOpcode ( ) == RISCV :: BuildPairF64Pseudo ) { +return expandSelectCC ( MI , BB , RISCV :: FBCOND ) ; +return EmitSelectInstr ( MI , MBB ) ; +} +if ( MI . getOpcode ( ) == RISCV :: SplitF64Pseudo ) { +return expandSelectCC ( MI , BB , RISCV :: FBCOND ) ; +} +llvm_unreachable ( "Unexpected instruction for custom inserter!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2fc031d6fb3b4e0ce9f685b75f9c10c138a2446b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerAsmOperandForConstraint.cpp @@ -0,0 +1,35 @@ +void RISCVTargetLowering :: LowerAsmOperandForConstraint ( SDValue Op , std :: string & Constraint , std :: vector < SDValue > & Ops , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +SDValue Result ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +if ( Constraint . length ( ) == 1 ) { +if ( Constraint [ 0 ] == 'I' ) { +if ( auto * C = dyn_cast < ConstantSDNode > ( Op ) ) { +uint64_t Val = C -> getSExtValue ( ) ; +if ( isInt < 12 > ( Val ) ) { +Ops . push_back ( DAG . getTargetConstant ( Val , DL , XLenVT ) ) ; +} +} +return ; +} +if ( Constraint [ 0 ] == 'J' ) { +if ( auto * C = dyn_cast < ConstantSDNode > ( Op ) ) { +uint64_t Val = C -> getSExtValue ( ) ; +if ( Val == 0 ) { +Ops . push_back ( DAG . getTargetConstant ( 0 , DL , XLenVT ) ) ; +} +} +return ; +} +if ( Constraint [ 0 ] == 'K' ) { +if ( auto * C = dyn_cast < ConstantSDNode > ( Op ) ) { +uint64_t Val = C -> getSExtValue ( ) ; +if ( isUInt < 5 > ( Val ) ) { +Ops . push_back ( DAG . getTargetConstant ( Val , DL , XLenVT ) ) ; +} +} +return ; +} +} +TargetLowering :: LowerAsmOperandForConstraint ( Op , Constraint , Ops , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..825802886cf829c000e7bd4ed1ead03355f7439a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering :: lowerBlockAddress ( SDValue Op , SelectionDAG & DAG ) const { +BlockAddressSDNode * N = cast < BlockAddressSDNode > ( Op ) ; +return getAddr ( N , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0850225aedf95232a51d2f5e5c4ed53f3e4f12ad --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,348 @@ +SDValue RISCVTargetLowering :: LowerCall ( CallLoweringInfo & CLI , SmallVectorImpl < SDValue > & InVals ) const { +SelectionDAG & DAG = CLI . DAG ; +SDLoc & DL = CLI . DL ; +SmallVectorImpl < ISD :: OutputArg > & Outs = CLI . Outs ; +SmallVectorImpl < SDValue > & OutVals = CLI . OutVals ; +SmallVectorImpl < ISD :: InputArg > & Ins = CLI . Ins ; +DebugLoc & dl = CLI . DL ; +SmallVector < ISD :: OutputArg , 32 > & Outs = CLI . Outs ; +SmallVector < SDValue , 32 > & OutVals = CLI . OutVals ; +SmallVector < ISD :: InputArg , 32 > & Ins = CLI . Ins ; +SDValue Chain = CLI . Chain ; +SDValue Callee = CLI . Callee ; +bool & isTailCall = CLI . IsTailCall ; +CallingConv :: ID CallConv = CLI . CallConv ; +bool isVarArg = CLI . IsVarArg ; +const char * RISCV16HelperFunction = 0 ; +bool needRISCV16Helper = false ; +if ( Subtarget -> inMips16Mode ( ) ) { +bool lookupHelper = true ; +if ( ExternalSymbolSDNode * S = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +if ( noHelperNeeded . find ( S -> getSymbol ( ) ) != noHelperNeeded . end ( ) ) { +lookupHelper = false ; +} +} +if ( lookupHelper ) { +RISCV16HelperFunction = getRISCV16HelperFunction ( CLI . RetTy , CLI . Args , needRISCV16Helper ) ; +} +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +isTailCall = false ; +MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; +const TargetFrameLowering * TFL = MF . getTarget ( ) . getFrameLowering ( ) ; +bool IsPIC = getTargetMachine ( ) . getRelocationModel ( ) == Reloc :: PIC_ ; +SmallVector < CCValAssign , 16 > ArgLocs ; +CCState CCInfo ( CallConv , isVarArg , DAG . getMachineFunction ( ) , ArgLocs , * DAG . getContext ( ) ) ; +const Function * F = nullptr ; +if ( const GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +const GlobalValue * GV = G -> getGlobal ( ) ; +F = cast < Function > ( GV ) ; +Callee = DAG . getTargetGlobalAddress ( GV , DL , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +} +if ( const ExternalSymbolSDNode * ES = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +Callee = DAG . getTargetExternalSymbol ( ES -> getSymbol ( ) , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +} +analyzeArguments ( & CLI , F , & DAG . getDataLayout ( ) , & Outs , 0 , CallConv , ArgLocs , CCInfo , true , isVarArg ) ; +unsigned NumBytes = CCInfo . getNextStackOffset ( ) ; +CCState CCInfo ( CallConv , isVarArg , DAG . getTarget ( ) , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeCallOperands ( Outs , CC_RISCV32 ) ; +unsigned ArgsSize = CCInfo . getNextStackOffset ( ) ; +ArgsSize = ( ArgsSize + 7 ) & ~ 7 ; +MachineFrameInfo * MFI = DAG . getMachineFunction ( ) . getFrameInfo ( ) ; +SmallVector < SDValue , 8 > ByValArgs ; +for ( unsigned i = 0 , e = Outs . size ( ) ; i != e ; ++ i ) { +ISD :: ArgFlagsTy Flags = Outs [ i ] . Flags ; +if ( ! Flags . isByVal ( ) ) { +continue ; +} +SDValue Arg = OutVals [ i ] ; +unsigned Size = Flags . getByValSize ( ) ; +unsigned Align = Flags . getByValAlign ( ) ; +int FI = MFI -> CreateStackObject ( Size , Align , false ) ; +SDValue FIPtr = DAG . getFrameIndex ( FI , getPointerTy ( ) ) ; +SDValue SizeNode = DAG . getConstant ( Size , MVT :: i32 ) ; +Chain = DAG . getMemcpy ( Chain , dl , FIPtr , Arg , SizeNode , Align , false , ( Size <= 32 ) , MachinePointerInfo ( ) , MachinePointerInfo ( ) ) ; +ByValArgs . push_back ( FIPtr ) ; +} +Chain = DAG . getCALLSEQ_START ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DL ) ; +SmallVector < std :: pair < unsigned , SDValue > , 8 > RegsToPass ; +unsigned AI ; +unsigned AE ; +bool HasStackArgs = false ; +CCState CCInfo ( CallConv , isVarArg , DAG . getMachineFunction ( ) , getTargetMachine ( ) , ArgLocs , * DAG . getContext ( ) ) ; +RISCVCC RISCVCCInfo ( CallConv , IsO32 , CCInfo ) ; +RISCVCCInfo . analyzeCallOperands ( Outs , isVarArg ) ; +unsigned NextStackOffset = CCInfo . getNextStackOffset ( ) ; +if ( isTailCall ) { +isTailCall = IsEligibleForTailCallOptimization ( RISCVCCInfo , NextStackOffset , * MF . getInfo < RISCVFunctionInfo > ( ) ) ; +} +if ( isTailCall ) { +NumTailCalls = NumTailCalls + 1 ; +} +unsigned StackAlignment = TFL -> getStackAlignment ( ) ; +NextStackOffset = RoundUpToAlignment ( NextStackOffset , StackAlignment ) ; +SDValue NextStackOffsetVal = DAG . getIntPtrConstant ( NextStackOffset , true ) ; +if ( ! isTailCall ) { +Chain = DAG . getCALLSEQ_START ( Chain , NextStackOffsetVal ) ; +} +SDValue StackPtr = DAG . getCopyFromReg ( Chain , dl , IsN64 ? RISCV :: SP_64 : RISCV :: SP , getPointerTy ( ) ) ; +std :: deque < std :: pair < unsigned , SDValue > > RegsToPass ; +SmallVector < SDValue , 8 > MemOpChains ; +RISCVCC :: byval_iterator ByValArg = RISCVCCInfo . byval_begin ( ) ; +const unsigned StackOffset = 92 ; +bool hasStructRetAttr = false ; +for ( AI = 0 , AE = ArgLocs . size ( ) ; AI != AE ; ++ AI ) { +CCValAssign & VA = ArgLocs [ AI ] ; +EVT RegVT = VA . getLocVT ( ) ; +SDValue Arg = OutVals [ AI ] ; +CCValAssign & VA = ArgLocs [ i ] ; +MVT ValVT = VA . getValVT ( ) , LocVT = VA . getLocVT ( ) ; +if ( Flags . isByVal ( ) ) { +assert ( ! isTailCall && "Do not tail-call optimize if there is a byval argument." ) ; +passByValArg ( Chain , dl , RegsToPass , MemOpChains , StackPtr , MFI , DAG , Arg , RISCVCCInfo , * ByValArg , Flags , Subtarget -> isLittle ( ) ) ; +ByValArg = ByValArg + 1 ; +continue ; +Arg = ByValArgs [ byvalArgIdx ++ ] ; +} +Arg = DAG . getNode ( ISD :: SIGN_EXTEND , DL , RegVT , Arg ) ; +if ( ValVT == MVT :: f32 ) { +if ( LocVT == MVT :: i32 ) { +Arg = DAG . getNode ( ISD :: BITCAST , dl , LocVT , Arg ) ; +} +} +if ( ValVT == MVT :: f64 ) { +if ( LocVT == MVT :: i64 ) { +Arg = DAG . getNode ( ISD :: BITCAST , dl , LocVT , Arg ) ; +} +} +if ( LocVT == MVT :: i32 ) { +if ( ValVT == MVT :: f64 ) { +SDValue Lo = DAG . getNode ( RISCVISD :: ExtractElementF64 , dl , MVT :: i32 , Arg , DAG . getConstant ( 0 , MVT :: i32 ) ) ; +SDValue Hi = DAG . getNode ( RISCVISD :: ExtractElementF64 , dl , MVT :: i32 , Arg , DAG . getConstant ( 1 , MVT :: i32 ) ) ; +std :: swap ( Lo , Hi ) ; +unsigned LocRegLo = VA . getLocReg ( ) ; +unsigned LocRegHigh = getNextIntArgReg ( LocRegLo ) ; +RegsToPass . push_back ( std :: make_pair ( LocRegLo , Lo ) ) ; +RegsToPass . push_back ( std :: make_pair ( LocRegHigh , Hi ) ) ; +continue ; +} +} +Arg = DAG . getNode ( ISD :: ZERO_EXTEND , DL , RegVT , Arg ) ; +Arg = DAG . getNode ( ISD :: ANY_EXTEND , DL , RegVT , Arg ) ; +Arg = DAG . getNode ( ISD :: BITCAST , DL , RegVT , Arg ) ; +if ( VA . isMemLoc ( ) ) { +HasStackArgs = true ; +break ; +} +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +if ( Flags . isSRet ( ) ) { +SDValue StackPtr = DAG . getRegister ( RISCV :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( 64 ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +hasStructRetAttr = true ; +continue ; +} +if ( VA . needsCustom ( ) ) { +if ( VA . isMemLoc ( ) ) { +unsigned Offset = VA . getLocMemOffset ( ) + StackOffset ; +if ( Offset % 8 == 0 ) { +SDValue StackPtr = DAG . getRegister ( RISCV :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +continue ; +} +} +SDValue StackPtr = DAG . CreateStackTemporary ( MVT :: f64 , MVT :: i32 ) ; +SDValue Store = DAG . getStore ( DAG . getEntryNode ( ) , dl , Arg , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +SDValue Hi = DAG . getLoad ( MVT :: i32 , dl , Store , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +StackPtr = DAG . getNode ( ISD :: ADD , dl , StackPtr . getValueType ( ) , StackPtr , DAG . getIntPtrConstant ( 4 ) ) ; +SDValue Lo = DAG . getLoad ( MVT :: i32 , dl , Store , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +if ( VA . isRegLoc ( ) ) { +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Hi ) ) ; +CCValAssign & NextVA = ArgLocs [ ++ i ] ; +if ( NextVA . isRegLoc ( ) ) { +RegsToPass . push_back ( std :: make_pair ( NextVA . getLocReg ( ) , Lo ) ) ; +} +if ( ! NextVA . isRegLoc ( ) ) { +unsigned Offset = NextVA . getLocMemOffset ( ) + StackOffset ; +SDValue StackPtr = DAG . getRegister ( RISCV :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Lo , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +} +if ( ! VA . isRegLoc ( ) ) { +unsigned Offset = VA . getLocMemOffset ( ) + StackOffset ; +SDValue StackPtr = DAG . getRegister ( RISCV :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Hi , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +PtrOff = DAG . getIntPtrConstant ( Offset + 4 ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Lo , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +continue ; +} +if ( VA . isRegLoc ( ) ) { +if ( VA . getLocVT ( ) != MVT :: f32 ) { +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +continue ; +} +Arg = DAG . getNode ( ISD :: BITCAST , dl , MVT :: i32 , Arg ) ; +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +continue ; +} +assert ( VA . isMemLoc ( ) ) ; +MemOpChains . push_back ( passArgOnStack ( StackPtr , VA . getLocMemOffset ( ) , Chain , Arg , dl , isTailCall , DAG ) ) ; +SDValue StackPtr = DAG . getRegister ( RISCV :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) + StackOffset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +if ( HasStackArgs ) { +for ( AE = AI , AI = ArgLocs . size ( ) ; AI != AE ; -- AI ) { +unsigned Loc = AI - 1 ; +CCValAssign & VA = ArgLocs [ Loc ] ; +SDValue Arg = OutVals [ Loc ] ; +assert ( VA . isMemLoc ( ) ) ; +SDValue PtrOff = DAG . getNode ( ISD :: ADD , DL , getPointerTy ( DAG . getDataLayout ( ) ) , DAG . getRegister ( RISCV :: SP , getPointerTy ( DAG . getDataLayout ( ) ) ) , DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) + 1 , DL ) ) ; +Chain = DAG . getStore ( Chain , DL , Arg , PtrOff , MachinePointerInfo :: getStack ( MF , VA . getLocMemOffset ( ) ) , 0 ) ; +} +} +if ( ! MemOpChains . empty ( ) ) { +Chain = DAG . getCopyToReg ( Chain , DL , Reg . first , Reg . second , InFlag ) ; +} +bool IsPICCall = ( IsN64 || IsPIC ) ; +bool GlobalOrExternal = false , InternalLinkage = false ; +SDValue CalleeLo ; +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +if ( IsPICCall ) { +InternalLinkage = G -> getGlobal ( ) -> hasInternalLinkage ( ) ; +if ( InternalLinkage ) { +Callee = getAddrLocal ( Callee , DAG , HasRISCV64 ) ; +} +if ( LargeGOT ) { +Callee = getAddrGlobalLargeGOT ( Callee , DAG , RISCVII :: MO_CALL_HI16 , RISCVII :: MO_CALL_LO16 ) ; +} +if ( ! InternalLinkage ) { +if ( ! LargeGOT ) { +Callee = getAddrGlobal ( Callee , DAG , RISCVII :: MO_GOT_CALL ) ; +} +} +} +if ( ! IsPICCall ) { +Callee = DAG . getTargetGlobalAddress ( G -> getGlobal ( ) , dl , getPointerTy ( ) , 0 , RISCVII :: MO_NO_FLAG ) ; +} +GlobalOrExternal = true ; +} +if ( ExternalSymbolSDNode * S = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +if ( ! IsN64 ) { +if ( ! IsPIC ) { +Callee = DAG . getTargetExternalSymbol ( S -> getSymbol ( ) , getPointerTy ( ) , RISCVII :: MO_NO_FLAG ) ; +} +} +if ( LargeGOT ) { +Callee = getAddrGlobalLargeGOT ( Callee , DAG , RISCVII :: MO_CALL_HI16 , RISCVII :: MO_CALL_LO16 ) ; +} +if ( ! LargeGOT ) { +Callee = getAddrGlobal ( Callee , DAG , RISCVII :: MO_GOT_CALL ) ; +} +GlobalOrExternal = true ; +} +SDValue JumpTarget = Callee ; +if ( IsPICCall ) { +unsigned T9Reg = IsN64 ? RISCV :: T9_64 : RISCV :: T9 ; +unsigned V0Reg = RISCV :: V0 ; +if ( needRISCV16Helper ) { +RegsToPass . push_front ( std :: make_pair ( V0Reg , Callee ) ) ; +JumpTarget = DAG . getExternalSymbol ( RISCV16HelperFunction , getPointerTy ( ) ) ; +JumpTarget = getAddrGlobal ( JumpTarget , DAG , RISCVII :: MO_GOT ) ; +} +if ( ! needRISCV16Helper ) { +RegsToPass . push_front ( std :: make_pair ( T9Reg , Callee ) ) ; +JumpTarget = SDValue ( ) ; +} +} +if ( ! GlobalOrExternal ) { +unsigned T9Reg = IsN64 ? RISCV :: T9_64 : RISCV :: T9 ; +unsigned V0Reg = RISCV :: V0 ; +if ( needRISCV16Helper ) { +RegsToPass . push_front ( std :: make_pair ( V0Reg , Callee ) ) ; +JumpTarget = DAG . getExternalSymbol ( RISCV16HelperFunction , getPointerTy ( ) ) ; +JumpTarget = getAddrGlobal ( JumpTarget , DAG , RISCVII :: MO_GOT ) ; +} +if ( ! needRISCV16Helper ) { +RegsToPass . push_front ( std :: make_pair ( T9Reg , Callee ) ) ; +JumpTarget = SDValue ( ) ; +} +} +if ( IsPICCall ) { +if ( ! InternalLinkage ) { +unsigned GPReg = IsN64 ? RISCV :: GP_64 : RISCV :: GP ; +EVT Ty = IsN64 ? MVT :: i64 : MVT :: i32 ; +RegsToPass . push_back ( std :: make_pair ( GPReg , GetGlobalReg ( DAG , Ty ) ) ) ; +} +} +SDValue InFlag ; +for ( auto Reg : RegsToPass ) { +unsigned Reg = RegsToPass [ i ] . first ; +Reg = Reg - RISCV :: I0 + RISCV :: O0 ; +Chain = DAG . getCALLSEQ_END ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DAG . getIntPtrConstant ( 0 , DL , true ) , InFlag , DL ) ; +InFlag = Chain . getValue ( 1 ) ; +} +unsigned SRetArgSize = ( hasStructRetAttr ) ? getSRetArgSize ( DAG , Callee ) : 0 ; +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +Callee = DAG . getTargetGlobalAddress ( G -> getGlobal ( ) , dl , MVT :: i32 ) ; +} +if ( ExternalSymbolSDNode * E = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +Callee = DAG . getTargetExternalSymbol ( E -> getSymbol ( ) , MVT :: i32 ) ; +} +SDVTList NodeTys = DAG . getVTList ( MVT :: Other , MVT :: Glue ) ; +SmallVector < SDValue , 8 > Ops ; +Ops . push_back ( Chain ) ; +Ops . push_back ( Callee ) ; +SmallVector < SDValue , 8 > Ops ( 1 , Chain ) ; +if ( JumpTarget . getNode ( ) ) { +Ops . push_back ( JumpTarget ) ; +} +if ( hasStructRetAttr ) { +Ops . push_back ( DAG . getTargetConstant ( SRetArgSize , MVT :: i32 ) ) ; +} +for ( auto Reg : RegsToPass ) { +Ops . push_back ( DAG . getRegister ( Reg . first , Reg . second . getValueType ( ) ) ) ; +Ops . push_back ( DAG . getRegister ( RegsToPass [ i ] . first , RegsToPass [ i ] . second . getValueType ( ) ) ) ; +unsigned Reg = RegsToPass [ i ] . first ; +Reg = Reg - RISCV :: I0 + RISCV :: O0 ; +Ops . push_back ( DAG . getRegister ( Reg , RegsToPass [ i ] . second . getValueType ( ) ) ) ; +} +const RISCVTargetMachine & TM = ( const RISCVTargetMachine & ) getTargetMachine ( ) ; +const TargetRegisterInfo * TRI = TM . getSubtargetImpl ( ) -> getRegisterInfo ( ) ; +const uint32_t * Mask = TRI -> getCallPreservedMask ( DAG . getMachineFunction ( ) , CallConv ) ; +assert ( Mask && "Missing call preserved mask for calling convention" ) ; +Ops . push_back ( DAG . getRegisterMask ( Mask ) ) ; +if ( InFlag . getNode ( ) ) { +Ops . push_back ( InFlag ) ; +} +if ( isTailCall ) { +return DAG . getNode ( RISCVISD :: TailCall , dl , MVT :: Other , & Ops [ 0 ] , Ops . size ( ) ) ; +} +Chain = DAG . getNode ( RISCVISD :: CALL , DL , NodeTys , Ops ) ; +InFlag = Chain . getValue ( 1 ) ; +Chain = DAG . getCALLSEQ_END ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DAG . getIntPtrConstant ( 0 , DL , true ) , InFlag , DL ) ; +if ( ! Ins . empty ( ) ) { +InFlag = Chain . getValue ( 1 ) ; +} +InFlag = Chain . getValue ( 1 ) ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState RVInfo ( CallConv , isVarArg , DAG . getTarget ( ) , RVLocs , * DAG . getContext ( ) ) ; +RVInfo . AnalyzeCallResult ( Ins , RetCC_RISCV32 ) ; +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +unsigned Reg = RVLocs [ i ] . getLocReg ( ) ; +Reg = Reg - RISCV :: I0 + RISCV :: O0 ; +Chain = DAG . getCopyFromReg ( Chain , dl , Reg , RVLocs [ i ] . getValVT ( ) , InFlag ) . getValue ( 1 ) ; +InFlag = Chain . getValue ( 2 ) ; +InVals . push_back ( Chain . getValue ( 0 ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9277a30ce937d8286924e62eb523833933e23702 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering :: lowerConstantPool ( SDValue Op , SelectionDAG & DAG ) const { +ConstantPoolSDNode * N = cast < ConstantPoolSDNode > ( Op ) ; +return getAddr ( N , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..245811c6be8cd3241f71f05fb9a9091b9382ec35 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,19 @@ +SDValue RISCVTargetLowering :: lowerFRAMEADDR ( SDValue Op , SelectionDAG & DAG ) const { +const RISCVRegisterInfo & RI = * Subtarget . getRegisterInfo ( ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MFI . setFrameAddressIsTaken ( true ) ; +Register FrameReg = RI . getFrameRegister ( MF ) ; +int XLenInBytes = Subtarget . getZLen ( ) / 8 ; +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +SDValue FrameAddr = DAG . getCopyFromReg ( DAG . getEntryNode ( ) , DL , FrameReg , VT ) ; +unsigned Depth = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +for ( ; Depth > 0 ; ) { +int Offset = - ( XLenInBytes * 2 ) ; +SDValue Ptr = DAG . getNode ( ISD :: ADD , DL , VT , FrameAddr , DAG . getIntPtrConstant ( Offset , DL ) ) ; +FrameAddr = DAG . getLoad ( VT , DL , DAG . getEntryNode ( ) , Ptr , MachinePointerInfo ( ) ) ; +Depth = Depth - 1 ; +} +return FrameAddr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c505e477ee2df0209d53865ee3454d6784270656 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,149 @@ +SDValue RISCVTargetLowering :: LowerFormalArguments ( SDValue Chain , CallingConv :: ID CallConv , bool IsVarArg , const SmallVectorImpl < ISD :: InputArg > & Ins , const SDLoc & DL , SelectionDAG & DAG , SmallVectorImpl < SDValue > & InVals ) const { +if ( CallCConv != CallingConv :: C ) { +if ( CallCConv != CallingConv :: Fast ) { +report_fatal_error ( "Unsupported calling convention" ) ; +} +} +LLVM_DEBUG ( dbgs ( ) << "ISelDAG: Lowering formal arguments\n" ) ; +if ( isVarArg ) { +LLVM_DEBUG ( dbgs ( ) << "ISelDAG: Can't lower variadic arguments\n" ) ; +return SDValue ( ) ; +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +std :: vector < SDValue > OutChains ; +unsigned ArgsBaseOffset = 176 ; +unsigned ArgsPreserved = 64 ; +RISCVMachineFunctionInfo * FuncInfo = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +SmallVector < CCValAssign , 16 > ArgLocs ; +CCState CCInfo ( CallConv , IsVarArg , MF , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CCAssignFnForCall ( CallConv , IsVarArg ) ) ; +CCState CCInfo ( CallConv , IsVarArg , DAG . getMachineFunction ( ) , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AllocateStack ( ArgsPreserved , Align ( 8 ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CC_RISCV ) ; +CCState CCInfo ( CallConv , isVarArg , MF , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CCAssignFnForCall ( CallConv , isVarArg ) ) ; +Chain = DAG . getNode ( RISCVISD :: ENTRY_FLAG , DL , MVT :: Other , { Chain , DAG . getRegister ( RISCV :: a1 , MVT :: i32 ) , DAG . getTargetConstant ( 4 , DL , MVT :: i32 ) } ) ; +CCInfo . AnalyzeFormalArguments ( Ins , getCCAssignFn ( CallConv ) ) ; +if ( MFI . hasVAStart ( ) ) { +FuncInfo -> setVarArgsFrameIndex ( MFI . CreateFixedObject ( 1 , CCInfo . getNextStackOffset ( ) , true ) ) ; +} +SDValue ArgValue ; +for ( unsigned i = 0 , e = ArgLocs . size ( ) ; i != e ; ++ i ) { +CCValAssign & VA = ArgLocs [ i ] ; +SDValue ArgValue ; +bool IsF64OnRISCV = VA . getLocVT ( ) == MVT :: i32 && VA . getValVT ( ) == MVT :: f64 ; +if ( IsF64OnRISCV ) { +ArgValue = unpack64 ( DAG , Chain , VA , DL ) ; +} +if ( ! IsF64OnRISCV ) { +if ( VA . isRegLoc ( ) ) { +ArgValue = unpackFromRegLoc ( Subtarget , DAG , Chain , VA , DL ) ; +} +} +if ( ! IsF64OnRISCV ) { +if ( ! VA . isRegLoc ( ) ) { +ArgValue = unpackFromMemLoc ( DAG , Chain , VA , DL ) ; +} +} +InVals . push_back ( ArgValue ) ; +if ( VA . isRegLoc ( ) ) { +unsigned VReg = MF . addLiveIn ( VA . getLocReg ( ) , getRegClassFor ( VA . getLocVT ( ) ) ) ; +SDValue Arg = DAG . getCopyFromReg ( Chain , DL , VReg , VA . getLocVT ( ) ) ; +if ( VA . getValVT ( ) == MVT :: i32 ) { +if ( VA . needsCustom ( ) ) { +Arg = DAG . getNode ( ISD :: SRL , DL , VA . getLocVT ( ) , Arg , DAG . getConstant ( 32 , DL , MVT :: i32 ) ) ; +} +} +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +Arg = DAG . getNode ( ISD :: AssertSext , DL , VA . getLocVT ( ) , Arg , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +Arg = DAG . getNode ( ISD :: AssertZext , DL , VA . getLocVT ( ) , Arg , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . isExtInLoc ( ) ) { +Arg = DAG . getNode ( ISD :: TRUNCATE , DL , VA . getValVT ( ) , Arg ) ; +} +InVals . push_back ( Arg ) ; +continue ; +} +unsigned Offset = VA . getLocMemOffset ( ) + ArgsBaseOffset ; +unsigned ValSize = VA . getValVT ( ) . getSizeInBits ( ) / 8 ; +int FI = MF . getFrameInfo ( ) . CreateFixedObject ( ValSize , Offset , true ) ; +InVals . push_back ( DAG . getLoad ( VA . getValVT ( ) , DL , Chain , DAG . getFrameIndex ( FI , getPointerTy ( MF . getDataLayout ( ) ) ) , MachinePointerInfo :: getFixedStack ( MF , FI ) ) ) ; +if ( VA . isRegLoc ( ) ) { +EVT RegVT = VA . getLocVT ( ) ; +const TargetRegisterClass * RC ; +if ( RegVT == MVT :: i32 ) { +RC = & RISCV :: GPRRegClass ; +} +if ( RegVT == MVT :: f32 ) { +RC = & RISCV :: FPRRegClass ; +} +unsigned Reg = MF . addLiveIn ( VA . getLocReg ( ) , RC ) ; +SDValue ArgValue = DAG . getCopyFromReg ( Chain , DL , Reg , RegVT ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: Full ) { +InVals . push_back ( ArgValue ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: BCvt ) { +ArgValue = DAG . getNode ( ISD :: BITCAST , DL , VA . getValVT ( ) , ArgValue ) ; +InVals . push_back ( ArgValue ) ; +} +} +SDValue Val = DAG . getLoad ( VA . getLocInfo ( ) == CCValAssign :: AExt ? VA . getValVT ( ) : VA . getLocVT ( ) , DL , Chain , DAG . getFrameIndex ( FI , getPointerTy ( DAG . getDataLayout ( ) ) ) , MachinePointerInfo :: getFixedStack ( DAG . getMachineFunction ( ) , FI ) ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +MFI . setObjectZExt ( FI , true ) ; +Val = DAG . getNode ( ISD :: AssertZext , DL , VA . getLocVT ( ) , Val , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +MFI . setObjectSExt ( FI , true ) ; +Val = DAG . getNode ( ISD :: AssertSext , DL , VA . getLocVT ( ) , Val , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +InVals . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VA . getValVT ( ) , Val ) ) ; +} +if ( IsVarArg ) { +const unsigned XLenInBytes = 4 ; +const MVT XLenVT = MVT :: i32 ; +ArrayRef < MCPhysReg > ArgRegs = makeArrayRef ( GPRArgRegs ) ; +unsigned Idx = CCInfo . getFirstUnallocated ( ArgRegs ) ; +const TargetRegisterClass * RC = & RISCV :: GPRRegClass ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineRegisterInfo & RegInfo = MF . getRegInfo ( ) ; +RISCVMachineFunctionInfo * RISCVFI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +int VaArgOffset ; +int VarArgsSaveSize ; +if ( ArgRegs . size ( ) == Idx ) { +VaArgOffset = CCInfo . getNextStackOffset ( ) ; +VarArgsSaveSize = 0 ; +} +if ( ArgRegs . size ( ) != Idx ) { +VarArgsSaveSize = XLenInBytes * ( ArgRegs . size ( ) - Idx ) ; +VaArgOffset = - VarArgsSaveSize ; +} +int FI = MFI . CreateFixedObject ( XLenInBytes , VaArgOffset , true ) ; +RISCVFI -> setVarArgsFrameIndex ( FI ) ; +for ( unsigned i = Idx ; i < ArgRegs . size ( ) ; ++ i , VaArgOffset += XLenInBytes ) { +const Register Reg = RegInfo . createVirtualRegister ( RC ) ; +RegInfo . addLiveIn ( ArgRegs [ i ] , Reg ) ; +SDValue ArgValue = DAG . getCopyFromReg ( Chain , DL , Reg , XLenVT ) ; +FI = MFI . CreateFixedObject ( XLenInBytes , VaArgOffset , true ) ; +SDValue PtrOff = DAG . getFrameIndex ( FI , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +SDValue Store = DAG . getStore ( Chain , DL , ArgValue , PtrOff , MachinePointerInfo :: getFixedStack ( MF , FI ) ) ; +cast < StoreSDNode > ( Store . getNode ( ) ) -> getMemOperand ( ) -> setValue ( ( Value * ) nullptr ) ; +OutChains . push_back ( Store ) ; +} +RISCVFI -> setVarArgsSaveSize ( VarArgsSaveSize ) ; +} +if ( ! OutChains . empty ( ) ) { +OutChains . push_back ( Chain ) ; +Chain = DAG . getNode ( ISD :: TokenFactor , DL , MVT :: Other , OutChains ) ; +} +if ( ! IsVarArg ) { +return Chain ; +} +unsigned ArgOffset = ArgLocs . size ( ) * 8 ; +RISCVMachineFunctionInfo * FuncInfo = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +FuncInfo -> setVarArgsFrameOffset ( ArgOffset + ArgsBaseOffset ) ; +return Chain ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..099b20dc0e1d28870c2af0c72835bcad698b4604 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,14 @@ +SDValue RISCVTargetLowering :: lowerGlobalAddress ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +EVT Ty = Op . getValueType ( ) ; +GlobalAddressSDNode * N = cast < GlobalAddressSDNode > ( Op ) ; +int64_t Offset = N -> getOffset ( ) ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +const GlobalValue * GV = N -> getGlobal ( ) ; +bool IsLocal = getTargetMachine ( ) . shouldAssumeDSOLocal ( * GV -> getParent ( ) , GV ) ; +SDValue Addr = getAddr ( N , DAG , IsLocal ) ; +if ( Offset ) { +return DAG . getNode ( ISD :: ADD , DL , Ty , Addr , DAG . getConstant ( Offset , DL , XLenVT ) ) ; +} +return Addr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3076140ae5cb9cc92ed12cb26acc0794cd2f8726 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,28 @@ +SDValue RISCVTargetLowering :: lowerGlobalTLSAddress ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +EVT Ty = Op . getValueType ( ) ; +GlobalAddressSDNode * N = cast < GlobalAddressSDNode > ( Op ) ; +int64_t Offset = N -> getOffset ( ) ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +TLSModel :: Model Model = getTargetMachine ( ) . getTLSModel ( N -> getGlobal ( ) ) ; +if ( DAG . getMachineFunction ( ) . getFunction ( ) . getCallingConv ( ) == CallingConv :: GHC ) { +report_fatal_error ( "In GHC calling convention TLS is not supported" ) ; +} +SDValue Addr ; +if ( Model == TLSModel :: LocalExec ) { +Addr = getStaticTLSAddr ( N , DAG , false ) ; +} +if ( Model == TLSModel :: InitialExec ) { +Addr = getStaticTLSAddr ( N , DAG , true ) ; +} +if ( Model == TLSModel :: LocalDynamic ) { +Addr = getDynamicTLSAddr ( N , DAG ) ; +} +if ( Model == TLSModel :: GeneralDynamic ) { +Addr = getDynamicTLSAddr ( N , DAG ) ; +} +if ( Offset != 0 ) { +return DAG . getNode ( ISD :: ADD , DL , Ty , Addr , DAG . getConstant ( Offset , DL , XLenVT ) ) ; +} +return Addr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f46087a0fc61e5030738b72d66d21da8d9c596f6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,29 @@ +SDValue RISCVTargetLowering :: LowerINTRINSIC_WO_CHAIN ( SDValue Op , SelectionDAG & DAG ) const { +MVT PtrVT = DAG . getTargetLoweringInfo ( ) . getPointerTy ( ) ; +unsigned IntNo = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +DebugLoc DL = Op . getDebugLoc ( ) ; +SDLoc DL ( Op ) ; +SmallVector < SDValue , 16 > Ops ( std :: next ( Op -> op_begin ( ) ) , Op -> op_end ( ) ) ; +unsigned Size = Ops . size ( ) ; +bool SmallTuple = Size <= RISCVTargetMachine :: SmallTupleLimit ; +Ops . push_back ( DAG . getConstant ( Size , DL , MVT :: i257 , SmallTuple ) ) ; +unsigned Cmd = SmallTuple ? RISCVISD :: TUPLE : RISCVISD :: TUPLEVAR ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MVT VT = Op . getSimpleValueType ( ) ; +const RISCVTargetMachine * TM = static_cast < const RISCVTargetMachine * > ( & DAG . getTarget ( ) ) ; +TM -> getStrList ( ) -> push_back ( std :: string ( ( Twine ( "GCC_except_table" ) + Twine ( MF . getFunctionNumber ( ) ) ) . str ( ) ) ) ; +SDValue Addr = DAG . getTargetExternalSymbol ( TM -> getStrList ( ) -> back ( ) . c_str ( ) , VT , 0 ) ; +if ( isPositionIndependent ( ) ) { +Addr = makeHiLoPair ( Addr , RISCVMCExpr :: VK_RISCV_GOTOFF_HI32 , RISCVMCExpr :: VK_RISCV_GOTOFF_LO32 , DAG ) ; +SDValue GlobalBase = DAG . getNode ( RISCVISD :: GLOBAL_BASE_REG , DL , VT ) ; +return DAG . getNode ( ISD :: ADD , DL , VT , GlobalBase , Addr ) ; +} +EVT VT = Op . getValueType ( ) ; +const RISCVTargetLowering & TLI = DAG . getTargetLoweringInfo ( ) ; +MVT PtrVT = TLI . getPointerTy ( DAG . getDataLayout ( ) ) ; +auto & Context = MF . getMMI ( ) . getContext ( ) ; +MCSymbol * S = Context . getOrCreateSymbol ( Twine ( "GCC_except_table" ) + Twine ( MF . getFunctionNumber ( ) ) ) ; +EVT PtrVT = getPointerTy ( DAG . getDataLayout ( ) ) ; +return DAG . getRegister ( RISCV :: G7 , PtrVT ) ; +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..37677d8bd163ef48e9e50077bb00dfee07e19686 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerINTRINSIC_W_CHAIN.cpp @@ -0,0 +1,68 @@ +SDValue RISCVTargetLowering :: LowerINTRINSIC_W_CHAIN ( SDValue Op , SelectionDAG & DAG ) const { +unsigned IntNo = cast ( Op . getOperand ( 1 ) ) . getZExtValue ( ) ; +if ( IntNo == Intrinsic :: RISCV_vleff ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: EXTP ) ; +} +if ( IntNo == Intrinsic :: RISCV_vleff_mask ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: EXTPDP ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg8ff ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: EXTR_W ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg7ff ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: EXTR_R_W ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg6ff ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: EXTR_RS_W ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg5ff ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: EXTR_S_H ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg4ff ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: MTHLIP ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg2ff ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: MULSAQ_S_W_PH ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg8ff_mask ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: MAQ_S_W_PHL ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg7ff_mask ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: MAQ_S_W_PHR ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg6ff_mask ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: MAQ_SA_W_PHL ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg5ff_mask ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: MAQ_SA_W_PHR ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg4ff_mask ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: DPAQ_S_W_PH ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg3ff_mask ) { +return lowerDSPIntr ( Op , DAG , RISCVISD :: DPSQ_S_W_PH ) ; +} +if ( IntNo == Intrinsic :: RISCV_vlseg2ff_mask ) { +auto Node = cast < MemIntrinsicSDNode > ( Op . getNode ( ) ) ; +SDLoc DL ( Op ) ; +SDValue Chain = Node -> getChain ( ) ; +SDValue Dst = Op . getOperand ( 2 ) ; +SDValue Val = Op . getOperand ( 3 ) ; +Val = DAG . getAnyExtOrTrunc ( Val , DL , MVT :: i64 ) ; +SDValue Size = Op . getOperand ( 4 ) ; +auto Alignment = Node -> getMemOperand ( ) -> getAlign ( ) ; +bool IsVol = Node -> isVolatile ( ) ; +auto DstPtrInfo = Node -> getPointerInfo ( ) ; +const auto & SDI = static_cast < const RISCVSelectionDAGInfo & > ( DAG . getSelectionDAGInfo ( ) ) ; +SDValue MS = SDI . EmitMOPS ( RISCVISD :: MOPS_MEMSET_TAGGING , DAG , DL , Chain , Dst , Val , Size , Alignment , IsVol , DstPtrInfo , MachinePointerInfo { } ) ; +} +unsigned Opcode ; +unsigned CCValid ; +if ( isIntrinsicWithCCAndChain ( Op , Opcode , CCValid ) ) { +SDNode * Node = emitIntrinsicWithCCAndChain ( DAG , Op , Opcode ) ; +SDValue CC = getCCResult ( DAG , SDValue ( Node , 0 ) ) ; +DAG . ReplaceAllUsesOfValueWith ( SDValue ( Op . getNode ( ) , 0 ) , CC ) ; +return SDValue ( ) ; +} +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ff4576b39126b5c55de9dc131764c29465ff28e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerJumpTable.cpp @@ -0,0 +1,4 @@ +SDValue RISCVTargetLowering :: lowerJumpTable ( SDValue Op , SelectionDAG & DAG ) const { +JumpTableSDNode * N = cast < JumpTableSDNode > ( Op ) ; +return getAddr ( N , DAG ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fb418e19da755787e5af2f304c21590fbc497b9f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,60 @@ +SDValue RISCVTargetLowering :: LowerOperation ( SDValue Op , SelectionDAG & DAG ) const { +if ( Op . getOpcode ( ) == ISD :: FRAMEADDR ) { +return LowerFrameIndex ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: GlobalAddress ) { +return LowerGlobalAddress ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: JumpTable ) { +return LowerJumpTable ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: BlockAddress ) { +return lowerBlockAddress ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: ConstantPool ) { +return lowerConstantPool ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: GlobalTLSAddress ) { +return lowerGlobalTLSAddress ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: SELECT ) { +return lowerSELECT ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: VASTART ) { +return lowerVASTART ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: RETURNADDR ) { +return lowerRETURNADDR ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: SHL_PARTS ) { +return lowerShiftLeftParts ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: SRA_PARTS ) { +return lowerShiftRightParts ( Op , DAG , true ) ; +} +if ( Op . getOpcode ( ) == ISD :: SRL_PARTS ) { +return lowerShiftRightParts ( Op , DAG , false ) ; +} +if ( Op . getOpcode ( ) == ISD :: INTRINSIC_WO_CHAIN ) { +return LowerINTRINSIC_WO_CHAIN ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: INTRINSIC_W_CHAIN ) { +return LowerINTRINSIC_W_CHAIN ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: ANY_EXTEND ) { +return lowerVectorMaskExt ( Op , DAG , 1 ) ; +} +if ( Op . getOpcode ( ) == ISD :: ZERO_EXTEND ) { +return lowerVectorMaskExt ( Op , DAG , 1 ) ; +} +if ( Op . getOpcode ( ) == ISD :: SIGN_EXTEND ) { +return lowerVectorMaskExt ( Op , DAG , - 1 ) ; +} +if ( Op . getOpcode ( ) == ISD :: SPLAT_VECTOR ) { +return lowerSPLATVECTOR ( Op , DAG ) ; +} +if ( Op . getOpcode ( ) == ISD :: INSERT_VECTOR_ELT ) { +return lowerINSERT_VECTOR_ELT ( Op , DAG ) ; +} +report_fatal_error ( "unimplemented operand" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b3b5430543858f3f0f6180d7af18be861bf3d63b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,20 @@ +SDValue RISCVTargetLowering :: lowerRETURNADDR ( SDValue Op , SelectionDAG & DAG ) const { +const RISCVRegisterInfo & RI = * Subtarget . getRegisterInfo ( ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MFI . setReturnAddressIsTaken ( true ) ; +int XLenInBytes = Subtarget . getZLen ( ) / 8 ; +if ( verifyReturnAddressArgumentIsConstant ( Op , DAG ) ) { +return SDValue ( ) ; +} +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +unsigned Depth = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +if ( Depth ) { +int Off = - XLenInBytes ; +SDValue FrameAddr = lowerFRAMEADDR ( Op , DAG ) ; +SDValue Offset = DAG . getConstant ( Off , DL , VT ) ; +return DAG . getLoad ( VT , DL , DAG . getEntryNode ( ) , DAG . getNode ( ISD :: ADD , DL , VT , FrameAddr , Offset ) , MachinePointerInfo ( ) ) ; +} +return DAG . getCopyFromReg ( DAG . getEntryNode ( ) , DL , Reg , XLenVT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2683f04c5a9650f040810fc7a7c4b03b45b483c4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,155 @@ +SDValue RISCVTargetLowering :: LowerReturn ( SDValue Chain , CallingConv :: ID CallConv , bool IsVarArg , const SmallVectorImpl < ISD :: OutputArg > & Outs , const SmallVectorImpl < SDValue > & OutVals , const SDLoc & DL , SelectionDAG & DAG ) const { +report_fatal_error ( "VarArg not supported" ) ; +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState CCInfo ( CallConv , IsVarArg , DAG . getMachineFunction ( ) , RVLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeReturn ( Outs , RetCC_RISCV ) ; +if ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_empty ( ) ) { +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) +if ( RVLocs [ i ] . isRegLoc ( ) ) { +DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( RVLocs [ i ] . getLocReg ( ) ) ; +} +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +if ( RVLocs [ i ] . isRegLoc ( ) ) { +DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( RVLocs [ i ] . getLocReg ( ) ) ; +} +} +} +if ( MF . getRegInfo ( ) . liveout_empty ( ) ) { +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +if ( RVLocs [ i ] . isRegLoc ( ) ) { +MF . getRegInfo ( ) . addLiveOut ( RVLocs [ i ] . getLocReg ( ) ) ; +} +} +} +SDValue Flag ; +analyzeOutputArgs ( CCInfo , Outs , CC_RISCV ) ; +analyzeOutputArgs ( DAG . getMachineFunction ( ) , CCInfo , Outs , true , nullptr ) ; +SDValue Glue ; +SmallVector < SDValue , 4 > RetOps ( 1 , Chain ) ; +RetOps . push_back ( SDValue ( ) ) ; +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +SDValue Val = OutVals [ i ] ; +CCValAssign & VA = RVLocs [ i ] ; +SDValue ResValue = Outs [ i ] . Val ; +assert ( VA . isRegLoc ( ) && "Can only return in registers!" ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +ResValue = DAG . getNode ( ISD :: SIGN_EXTEND , dl , VA . getLocVT ( ) , ResValue ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +ResValue = DAG . getNode ( ISD :: ZERO_EXTEND , dl , VA . getLocVT ( ) , ResValue ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: AExt ) { +ResValue = DAG . getNode ( ISD :: ANY_EXTEND , dl , VA . getLocVT ( ) , ResValue ) ; +} +Chain = DAG . getCopyToReg ( Chain , DL , VA . getLocReg ( ) , OutVals [ i ] , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( VA . getLocReg ( ) , VA . getLocVT ( ) ) ) ; +bool IsF64OnRISCV = VA . getLocVT ( ) == MVT :: i32 && VA . getValVT ( ) == MVT :: f64 ; +if ( IsF64OnRISCV ) { +SDValue Split64 = DAG . getNode ( RISCVISD :: BITCAST_TO_LOHI , DL , DAG . getVTList ( MVT :: i32 , MVT :: i32 ) , Val ) ; +SDValue Lo = Split64 . getValue ( 0 ) ; +SDValue Hi = Split64 . getValue ( 1 ) ; +Register RegLo = VA . getLocReg ( ) ; +assert ( RegLo < RISCV :: R31 && "Invalid register pair" ) ; +Register RegHi = RegLo + 1 ; +Chain = DAG . getCopyToReg ( Chain , DL , RegLo , Lo , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( RegLo , MVT :: i32 ) ) ; +Chain = DAG . getCopyToReg ( Chain , DL , RegHi , Hi , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( RegHi , MVT :: i32 ) ) ; +} +if ( ! IsF64OnRISCV ) { { +} +RetOps [ 0 ] = Chain ; +if ( Glue . getNode ( ) ) { +RetOps . push_back ( Glue ) ; +} +if ( DAG . getMachineFunction ( ) . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +return DAG . getNode ( RISCVISD :: NIR , DL , MVT :: Other , RetOps ) ; +} +return DAG . getNode ( RISCVISD :: RET , DL , MVT :: Other , RetOps ) ; +if ( VA . getLocVT ( ) != MVT :: i32 ) { +Val = convertValVTToLocVT ( DAG , Val , VA , DL ) ; +Chain = DAG . getCopyToReg ( Chain , DL , VA . getLocReg ( ) , Val , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( VA . getLocReg ( ) , VA . getLocVT ( ) ) ) ; +} +if ( VA . getValVT ( ) != MVT :: f64 ) { +Val = convertValVTToLocVT ( DAG , Val , VA , DL ) ; +Chain = DAG . getCopyToReg ( Chain , DL , VA . getLocReg ( ) , Val , Glue ) ; +Glue = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( VA . getLocReg ( ) , VA . getLocVT ( ) ) ) ; +} +} +if ( DAG . getMachineFunction ( ) . getFunction ( ) . hasStructRetAttr ( ) ) { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +RISCVMachineFunctionInfo * RISCVMFI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +Register Reg = RISCVMFI -> getSRetReturnReg ( ) ; +Chain = DAG . getCopyToReg ( Chain , DL , RISCV :: RV , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( RISCV :: RV , getPointerTy ( DAG . getDataLayout ( ) ) ) ) ; +} +if ( MF . getFunction ( ) . hasStructRetAttr ( ) ) { +RISCVMachineFunctionInfo * FuncInfo = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +unsigned Reg = FuncInfo -> getSRetReturnReg ( ) ; +if ( ! Reg ) { +llvm_unreachable ( "sret virtual register not created in entry block" ) ; +} +SDValue Val = DAG . getCopyFromReg ( Chain , dl , Reg , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +unsigned R12 = RISCV :: R12 ; +Chain = DAG . getCopyToReg ( Chain , dl , R12 , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( R12 , getPointerTy ( DAG . getDataLayout ( ) ) ) ) ; +} +unsigned Opc = ( CallConv == CallingConv :: RISCV_INTR ? RISCVISD :: RETI_FLAG : RISCVISD :: RET_FLAG ) ; +unsigned RetAddrOffset = 8 ; +if ( MF . getFunction ( ) -> hasStructRetAttr ( ) ) { +RISCVMachineFunctionInfo * SFI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +RISCVMachineFunctionInfo * FI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +if ( ! Reg ) { +llvm_unreachable ( "sret virtual register not created in the entry block" ) ; +} +Chain = DAG . getCopyToReg ( Chain , dl , RISCV :: I0 , Val , Flag ) ; +Chain = DAG . getCopyToReg ( Chain , DL , RISCV :: R0 , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +RetOps . push_back ( DAG . getRegister ( RISCV :: I0 , getPointerTy ( ) ) ) ; +RetAddrOffset = 12 ; +if ( MF . getRegInfo ( ) . liveout_empty ( ) ) { +MF . getRegInfo ( ) . addLiveOut ( RISCV :: R0 ) ; +} +} +RetOps [ 0 ] = Chain ; +unsigned Opc = RISCVISD :: RET_FLAG ; +if ( DAG . getMachineFunction ( ) . getFunction ( ) -> hasStructRetAttr ( ) ) { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +RISCVFunctionInfo * RISCVFI = MF . getInfo < RISCVFunctionInfo > ( ) ; +unsigned Reg = RISCVFI -> getSRetReturnReg ( ) ; +if ( ! Reg ) { +llvm_unreachable ( "sret virtual register not created in the entry block" ) ; +} +SDValue Val = DAG . getCopyFromReg ( Chain , dl , Reg , getPointerTy ( ) ) ; +Chain = DAG . getCopyToReg ( Chain , dl , RISCV :: V0 , Val , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +} +RetOps [ 1 ] = DAG . getConstant ( RetAddrOffset , MVT :: i32 ) ; +SDValue LinkReg = DAG . getRegister ( RISCV :: LinkRegister , getPointerTy ( ) ) ; +if ( Flag . getNode ( ) ) { +RetOps . push_back ( Flag ) ; +return DAG . getNode ( RISCVISD :: Ret , dl , MVT :: Other , Chain , DAG . getRegister ( RISCV :: RA , MVT :: i32 ) , Flag ) ; +} +if ( Glue . getNode ( ) ) { +RetOps . push_back ( Glue ) ; +} +const Function & Func = DAG . getMachineFunction ( ) . getFunction ( ) ; +if ( Func . hasFnAttribute ( "interrupt" ) ) { +llvm_unreachable ( "interrupts not supported" ) ; +} +if ( ! Flag . getNode ( ) ) { +return DAG . getNode ( RISCVISD :: Ret , dl , MVT :: Other , Chain , DAG . getRegister ( RISCV :: RA , MVT :: i32 ) ) ; +return DAG . getNode ( T64ISD :: JRP , DL , MVT :: Other , Chain , LinkReg ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20003795fc4bdfdab7940187c54033e0ec4e23da --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,8 @@ +SDValue RISCVTargetLowering :: lowerVASTART ( SDValue Op , SelectionDAG & DAG ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +const RISCVMachineFunctionInfo * FuncInfo = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +SDLoc DL ( Op ) ; +SDValue FI = DAG . getFrameIndex ( FuncInfo -> getVarArgsFrameIndex ( ) , getPointerTy ( MF . getDataLayout ( ) ) ) ; +const Value * SV = cast < SrcValueSDNode > ( Op . getOperand ( 2 ) ) -> getValue ( ) ; +return DAG . getStore ( Op . getOperand ( 0 ) , DL , FI , Op . getOperand ( 1 ) , MachinePointerInfo ( SV ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16f1222fb7662f8a978a0205d7d36b3d76930d7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,43 @@ +enum NodeType : unsigned { +FIRST_NUMBER = ISD :: BUILTIN_OP_END , +RET_FLAG , +URET_FLAG , +SRET_FLAG , +MRET_FLAG , +CALL , +SELECT_CC , +BuildPairF64 , +SplitF64 , +TAIL , +SLLW , +SRAW , +SRLW , +DIVW , +DIVUW , +REMUW , +ROLW , +RORW , +FSRW , +FSLW , +FMV_H_X , +FMV_X_ANYEXTH , +FMV_W_X_RV64 , +FMV_X_ANYEXTW_RV64 , +READ_CYCLE_WIDE , +GREVI , +GREVIW , +GORCI , +GORCIW , +VMV_X_S , +SPLAT_VECTOR_I64 , +READ_VLENB , +TRUNCATE_VECTOR , +VLEFF , +VLEFF_MASK , +VLSEGFF , +VLSEGFF_MASK , +READ_VL , +VSLIDEUP , +VSLIDEDOWN , +VID , +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..684c4ba88c4f46a2e998da28d478370720844eeb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,42 @@ +SDValue RISCVTargetLowering :: PerformDAGCombine ( SDNode * N , DAGCombinerInfo & DCI ) const { +if ( N -> getOpcode ( ) == RISCVISD :: SplitF64 ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: SLLW ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: SRAW ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: SRLW ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: ROLW ) { +} +SelectionDAG & DAG = DCI . DAG ; +SDValue Val ; +if ( N -> getOpcode ( ) == RISCVISD :: RORW ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: FSLW ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: FSRW ) { +} +if ( N -> getOpcode ( ) == RISCVISD::GREVIW ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: GORCIW ) { +} +if ( N -> getOpcode ( ) == RISCVISD::FMV_X_ANYEXTW_RV64 ) { +} +if ( N -> getOpcode ( ) == RISCVISD::GREVI ) { +Val = performSETCCCombine ( N , DAG ) ; +} +if ( Val . getNode ( ) ) { +return Val ; +} +if ( N -> getOpcode ( ) == RISCVISD :: GORCI ) { +return combineBSWAP ( N , DCI ) ; +} +if ( N -> getOpcode ( ) == RISCVISD :: OR ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: SELECT_CC ) { +} +if ( N -> getOpcode ( ) == RISCVISD :: SETCC ) { +} +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2eb1735ae1a6b6f2f92ad84c2933ec7f689b94f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,211 @@ +void RISCVTargetLowering :: ReplaceNodeResults ( SDNode * N , SmallVectorImpl < SDValue > & Results , SelectionDAG & DAG ) const { +SDValue Res ; +if ( N -> getOpcode ( ) == ISD :: STRICT_FP_TO_SINT ) { +ExpandREAD_REGISTER ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: STRICT_FP_TO_UINT ) { +Res = ExpandBITCAST ( N , DAG , Subtarget ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FP_TO_SINT ) { +ReplaceBITCASTResults ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FP_TO_UINT ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: READCYCLECOUNTER ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: ADD ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerREM ( N , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: SUB ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerREM ( N , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FSHL ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerDivRem ( SDValue ( N , 0 ) , DAG ) ; +Results . push_back ( Res . getValue ( 0 ) ) ; +Results . push_back ( Res . getValue ( 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: MUL ) { +Results . push_back ( LowerCTPOP ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerDivRem ( SDValue ( N , 0 ) , DAG ) ; +Results . push_back ( Res . getValue ( 0 ) ) ; +Results . push_back ( Res . getValue ( 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: SHL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: ADD , RISCVISD :: SADDV ) ; +Res = LowerSADDSUBSAT ( SDValue ( N , 0 ) , DAG , Subtarget ) ; +Results . push_back ( Res ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: SRA ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: ADD , RISCVISD :: UADDV ) ; +Res = LowerSADDSUBSAT ( SDValue ( N , 0 ) , DAG , Subtarget ) ; +Results . push_back ( Res ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: SRL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: SMIN , RISCVISD :: SMINVV ) ; +ReplaceREADCYCLECOUNTER ( N , Results , DAG , Subtarget ) ; +Results . push_back ( Res ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: ROTL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: UMINV , RISCVISD :: UMINV ) ; +return ; +return ExpandDIV_Windows ( SDValue ( N , 0 ) , DAG , N -> getOpcode ( ) == ISD :: SDIV , Results ) ; +} +if ( N -> getOpcode ( ) == ISD :: ROTR ) { +return ; +} +if ( N -> getOpcode ( ) == ISD :: SDIV ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: UMAX , RISCVISD :: UMAXVV ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: UDIV ) { +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: f128 ) { +return ; +} +if ( N -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: FPTOSINT_F128_I64 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: UREM ) { +if ( ! LoadNode -> isVolatile ( ) ) { +return ; +} +if ( LoadNode -> getMemoryVT ( ) != MVT :: i128 ) { +return ; +} +SDValue Result = DAG . getMemIntrinsicNode ( RISCVISD :: LDP , SDLoc ( N ) , DAG . getVTList ( { MVT :: i64 , MVT :: i64 , MVT :: Other } ) , { LoadNode -> getChain ( ) , LoadNode -> getBasePtr ( ) } , LoadNode -> getMemoryVT ( ) , LoadNode -> getMemOperand ( ) ) ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , SDLoc ( N ) , MVT :: i128 , Result . getValue ( 0 ) , Result . getValue ( 1 ) ) ; +Results . append ( { Pair , Result . getValue ( 2 ) } ) ; +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: f128 ) { +return ; +} +if ( N -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: FPTOUINT_F128_I64 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: BITCAST ) { +ReplaceCMP_SWAP_128Results ( N , Results , DAG , Subtarget ) ; +ReplaceExtractSubVectorResults ( N , Results , DAG ) ; +SDValue Lo = DAG . getCopyFromReg ( N -> getOperand ( 0 ) , DL , RISCV :: ASR23 , MVT :: i32 ) ; +SDValue Hi = DAG . getCopyFromReg ( Lo , DL , RISCV :: G0 , MVT :: i32 ) ; +SDValue Ops [ ] = { Lo , Hi } ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , DL , MVT :: i64 , Ops ) ; +Results . push_back ( Pair ) ; +return ; +} +if ( N -> getOpcode ( ) == RISCVISD::GREVI ) { +LoadSDNode * LoadNode = cast < LoadSDNode > ( N ) ; +if ( ! LoadNode -> isVolatile ( ) ) { +return ; +} +if ( LoadNode -> getMemoryVT ( ) != MVT :: i128 ) { +return ; +} +SDValue Result = DAG . getMemIntrinsicNode ( RISCVISD :: LDP , SDLoc ( N ) , DAG . getVTList ( { MVT :: i64 , MVT :: i64 , MVT :: Other } ) , { LoadNode -> getChain ( ) , LoadNode -> getBasePtr ( ) } , LoadNode -> getMemoryVT ( ) , LoadNode -> getMemOperand ( ) ) ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , SDLoc ( N ) , MVT :: i128 , Result . getValue ( 0 ) , Result . getValue ( 1 ) ) ; +Results . append ( { Pair , Result . getValue ( 2 ) } ) ; +if ( N -> getValueType ( 0 ) != MVT :: f128 ) { +return ; +} +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: SINTTOFP_I64_F128 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +return ReplaceLongIntrinsic ( N , Results , DAG ) ; +} +if ( N -> getOpcode ( ) == RISCVISD :: GORCI ) { +ReplaceExtractSubVectorResults ( N , Results , DAG ) ; +ReplaceLongIntrinsic ( N , Results , DAG ) ; +if ( N -> getValueType ( 0 ) != MVT :: f128 ) { +return ; +} +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: UINTTOFP_I64_F128 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: BSWAP ) { +EVT VT = N -> getValueType ( 0 ) ; +ConstantSDNode * CN = cast < ConstantSDNode > ( N -> getOperand ( 0 ) ) ; +Intrinsic :: ID IntID = static_cast < Intrinsic :: ID > ( CN -> getZExtValue ( ) ) ; +if ( IntID == Intrinsic :: aarch64_sve_clasta_n ) { +SDLoc DL ( N ) ; +auto Op2 = DAG . getNode ( ISD :: ANY_EXTEND , DL , MVT :: i32 , N -> getOperand ( 2 ) ) ; +auto V = DAG . getNode ( RISCVISD :: CLASTA_N , DL , MVT :: i32 , N -> getOperand ( 1 ) , Op2 , N -> getOperand ( 3 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +} +SDLoc DL ( N ) ; +auto V = DAG . getNode ( RISCVISD :: LASTA , DL , MVT :: i32 , N -> getOperand ( 1 ) , N -> getOperand ( 2 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +SDLoc DL ( N ) ; +auto V = DAG . getNode ( RISCVISD :: LASTB , DL , MVT :: i32 , N -> getOperand ( 1 ) , N -> getOperand ( 2 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +LowerLOAD ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +LoadSDNode * Ld = cast < LoadSDNode > ( N ) ; +if ( Ld -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +if ( Ld -> getMemoryVT ( ) != MVT :: i64 ) { +return ; +} +SDLoc DL ( N ) ; +SDValue LoadRes = DAG . getExtLoad ( Ld -> getExtensionType ( ) , DL , MVT :: v2i32 , Ld -> getChain ( ) , Ld -> getBasePtr ( ) , Ld -> getPointerInfo ( ) , MVT :: v2i32 , Ld -> getAlignment ( ) , Ld -> getMemOperand ( ) -> getFlags ( ) , Ld -> getAAInfo ( ) ) ; +SDValue Res = DAG . getNode ( ISD :: BITCAST , DL , MVT :: i64 , LoadRes ) ; +Results . push_back ( Res ) ; +Results . push_back ( LoadRes . getValue ( 1 ) ) ; +return ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3d2fb2af0c056b9c2f3568520a755dff2f0232db --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,42 @@ +RISCVTargetLowering :: RISCVTargetLowering ( const TargetMachine & TM , const RISCVSubtarget & STI ) : TargetLowering ( TM ) , Subtarget ( STI ) { +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setStackPointerRegisterToSaveRestore ( RISCV :: X1 ) ; +for ( auto N : { ISD :: EXTLOAD , ISD :: SEXTLOAD , ISD :: ZEXTLOAD } ) { +} +setBooleanContents ( ZeroOrOneBooleanContent ) ; +addRegisterClass ( MVT :: i32 , & RISCV :: GPRRegClass ) ; +TRI = STI . getRegisterInfo ( ) ; +computeRegisterProperties ( TRI ) ; +auto * RegInfo = Subtarget . getRegisterInfo ( ) ; +setBooleanVectorContents ( ZeroOrNegativeOneBooleanContent ) ; +setBooleanContents ( ZeroOrOneBooleanContent , ZeroOrNegativeOneBooleanContent ) ; +} +} +for ( auto CC : FPCCToExtend ) { +setLoadExtAction ( ISD :: SEXTLOAD , VT , MVT :: i1 , Promote ) ; +setLoadExtAction ( ISD :: ZEXTLOAD , VT , MVT :: i1 , Promote ) ; +if ( F16VT . isValid ( ) ) { +} +} +if ( Subtarget . atLeastM68020 ( ) ) { +} +setBooleanContents ( ZeroOrOneBooleanContent ) ; +setMinimumJumpTableEntries ( INT_MAX ) ; +setCondCodeAction ( CC , VT , Expand ) ; +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setBooleanContents ( UndefinedBooleanContent ) ; +setBooleanVectorContents ( ZeroOrNegativeOneBooleanContent ) ; +setMaxAtomicSizeInBitsSupported ( 0 ) ; +setStackPointerRegisterToSaveRestore ( RISCV :: R14 ) ; +const Align FunctionAlignment ( 2 ) ; +setStackPointerRegisterToSaveRestore ( RISCV :: R3 ) ; +setMinFunctionAlignment ( FunctionAlignment ) ; +setSchedulingPreference ( Sched :: Source ) ; +setJumpIsExpensive ( true ) ; +setLibcallCallingConv ( static_cast < RTLIB :: Libcall > ( I ) , CallingConv :: Fast ) ; +setBooleanContents ( ZeroOrOneBooleanContent ) ; +computeRegisterProperties ( ) ; +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setMinFunctionAlignment ( Align :: Constant < 2 > ( ) ) ; +setStackPointerRegisterToSaveRestore ( ABI . IsN64 ( ) ? RISCV :: SP_64 : RISCV :: SP ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e382eff4824d447aead39f6e4241c5dfc5dc7071 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/analyzeInputArgs.cpp @@ -0,0 +1,16 @@ +void RISCVTargetLowering :: analyzeInputArgs ( MachineFunction & MF , CCState & CCInfo , const SmallVectorImpl < ISD :: InputArg > & Ins , bool IsRet ) const { +unsigned NumArgs = Ins . size ( ) ; +FunctionType * FType = MF . getFunction ( ) . getFunctionType ( ) ; +for ( unsigned i = 0 ; i != NumArgs ; ++ i ) { +MVT ArgVT = Ins [ i ] . VT ; +ISD :: ArgFlagsTy ArgFlags = Ins [ i ] . Flags ; +if ( IsRet ) { +} +if ( ! IsRet ) { +if ( CC_ ( i , ArgVT , ArgVT , CCValAssign :: Full , ArgFlags , CCInfo ) ) { +} +} +if ( Fn ( i , ArgVT , CCValAssign :: Full , CCInfo ) ) { +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6450f3bbfe25541641cce7faf82031a29bf671e5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/analyzeOutputArgs.cpp @@ -0,0 +1,15 @@ +void RISCVTargetLowering :: analyzeOutputArgs ( MachineFunction & MF , CCState & CCInfo , const SmallVectorImpl < ISD :: OutputArg > & Outs , bool IsRet , CallLoweringInfo * CLI ) const { +unsigned NumArgs = Outs . size ( ) ; +for ( unsigned i = 0 ; i != NumArgs ; i ++ ) { +MVT ArgVT = Outs [ i ] . VT ; +ISD :: ArgFlagsTy ArgFlags = Outs [ i ] . Flags ; +if ( IsRet ) { +if ( RetCC_ ( i , ArgVT , ArgVT , CCValAssign :: Full , ArgFlags , CCInfo ) ) { +} +} +if ( ! IsRet ) { +if ( CC_ ( i , ArgVT , ArgVT , CCValAssign :: Full , ArgFlags , CCInfo ) ) { +} +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7702402e9ea546afa1514a1529b053e51ac9686b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/computeKnownBitsForTargetNode.cpp @@ -0,0 +1,26 @@ +void RISCVTargetLowering :: computeKnownBitsForTargetNode ( const SDValue Op , KnownBits & Known , const APInt & DemandedElts , const SelectionDAG & DAG , unsigned Depth ) const { +KnownZero = KnownOne = APInt ( KnownOne . getBitWidth ( ) , 0 ) ; +APInt KnownZero2 ; +APInt KnownOne2 ; +unsigned BitWidth = Known . getBitWidth ( ) ; +unsigned Opc = Op . getOpcode ( ) ; +EVT VT = Op . getValueType ( ) ; +Known . resetAll ( ) ; +if ( Op . getOpcode ( ) == RISCVISD :: REMUW ) { +Known . Zero . setBitsFrom ( 1 ) ; +} +if ( Op . getOpcode ( ) == RISCVISD :: DIVUW ) { +KnownBits Known2 ; +DAG . computeKnownBits ( Op . getOperand ( 0 ) , Known , Depth + 1 ) ; +DAG . computeKnownBits ( Op . getOperand ( 1 ) , Known2 , Depth + 1 ) ; +Known . Zero = Known . Zero & Known2 . Zero ; +Known . One = Known . One & Known2 . One ; +Known . Zero . setBitsFrom ( 1 ) ; +} +if ( Op . getOpcode ( ) == RISCVISD :: READ_VLENB ) { +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp new file mode 100644 index 0000000000000000000000000000000000000000..51269f50ce2e5fc7c824cfa4100384d706db162c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/convertSelectOfConstantsToMath.cpp @@ -0,0 +1,3 @@ +bool convertSelectOfConstantsToMath ( EVT VT ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3178e743bf8e6612f2326e0390c95e0ed53bbb73 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/convertSetCCLogicToBitwiseLogic.cpp @@ -0,0 +1,3 @@ +bool convertSetCCLogicToBitwiseLogic ( EVT VT ) const override { +return VT . isScalarInteger ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62df45e0d1324398407de1489c1207801bab9658 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/decomposeMulByConstant.cpp @@ -0,0 +1,18 @@ +bool RISCVTargetLowering :: decomposeMulByConstant ( LLVMContext & Context , EVT VT , SDValue C ) const { +if ( ! VT . isScalarInteger ( ) ) { +return false ; +} +if ( auto * ConstNode = dyn_cast < ConstantSDNode > ( C . getNode ( ) ) ) { +if ( ! ConstNode -> getAPIntValue ( ) . isSignedIntN ( 64 ) ) { +return false ; +} +int64_t Imm = ConstNode -> getSExtValue ( ) ; +unsigned Shift = countTrailingZeros < uint64_t > ( Imm ) ; +Imm = Imm >> Shift ; +if ( isInt < 16 > ( Imm ) ) { +return false ; +} +uint64_t UImm = static_cast < uint64_t > ( Imm ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aaf0462eacccf2161cf029182c909d9d244bb0fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitLeadingFence.cpp @@ -0,0 +1,20 @@ +Instruction * RISCVTargetLowering :: emitLeadingFence ( IRBuilder < > & Builder , Instruction * Inst , AtomicOrdering Ord ) const { +return nullptr ; +return nullptr ; +if ( Ord == AtomicOrdering :: SequentiallyConsistent ) { +if ( ! Inst -> hasAtomicStore ( ) ) { +return nullptr ; +} +} +if ( Ord == AtomicOrdering :: Release ) { +return makeDMB ( Builder , RISCV_MB :: ISHST ) ; +return makeDMB ( Builder , RISCV_MB :: ISH ) ; +} +return makeDMB ( Builder , RISCV_MB :: ISHST ) ; +return makeDMB ( Builder , RISCV_MB :: ISH ) ; +return callIntrinsic ( Builder , Intrinsic :: ppc_sync ) ; +if ( isAtLeastRelease ( Ord ) ) { +return callIntrinsic ( Builder , Intrinsic :: ppc_lwsync ) ; +} +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cfcf09034d257e0e65527385fed17f36a5976f5a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicCmpXchgIntrinsic.cpp @@ -0,0 +1,19 @@ +Value * RISCVTargetLowering :: emitMaskedAtomicCmpXchgIntrinsic ( IRBuilder < > & Builder , AtomicCmpXchgInst * CI , Value * AlignedAddr , Value * CmpVal , Value * NewVal , Value * Mask , AtomicOrdering Ord ) const { +Module * M = Builder . GetInsertBlock ( ) -> getParent ( ) -> getParent ( ) ; +Type * ValTy = CmpVal -> getType ( ) ; +Function * IntCmpXchg = Intrinsic :: getDeclaration ( M , Intrinsic :: ppc_cmpxchg_i128 ) ; +Type * Int64Ty = Type :: getInt64Ty ( M -> getContext ( ) ) ; +Value * CmpLo = Builder . CreateTrunc ( CmpVal , Int64Ty , "cmp_lo" ) ; +Value * CmpHi = Builder . CreateTrunc ( Builder . CreateLShr ( CmpVal , 64 ) , Int64Ty , "cmp_hi" ) ; +Value * NewLo = Builder . CreateTrunc ( NewVal , Int64Ty , "new_lo" ) ; +Value * NewHi = Builder . CreateTrunc ( Builder . CreateLShr ( NewVal , 64 ) , Int64Ty , "new_hi" ) ; +Value * Addr = Builder . CreateBitCast ( AlignedAddr , Type :: getInt8PtrTy ( M -> getContext ( ) ) ) ; +emitLeadingFence ( Builder , CI , Ord ) ; +Value * LoHi = Builder . CreateCall ( IntCmpXchg , { Addr , CmpLo , CmpHi , NewLo , NewHi } ) ; +emitTrailingFence ( Builder , CI , Ord ) ; +Value * Lo = Builder . CreateExtractValue ( LoHi , 0 , "lo" ) ; +Value * Hi = Builder . CreateExtractValue ( LoHi , 1 , "hi" ) ; +Lo = Builder . CreateZExt ( Lo , ValTy , "lo64" ) ; +Hi = Builder . CreateZExt ( Hi , ValTy , "hi64" ) ; +return Builder . CreateOr ( Lo , Builder . CreateShl ( Hi , ConstantInt :: get ( ValTy , 64 ) ) , "val64" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7388d9db713699e2d25209b8cee4409b798407e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitMaskedAtomicRMWIntrinsic.cpp @@ -0,0 +1,15 @@ +Value * RISCVTargetLowering :: emitMaskedAtomicRMWIntrinsic ( IRBuilder < > & Builder , AtomicRMWInst * AI , Value * AlignedAddr , Value * Incr , Value * Mask , Value * ShiftAmt , AtomicOrdering Ord ) const { +Module * M = Builder . GetInsertBlock ( ) -> getParent ( ) -> getParent ( ) ; +Type * ValTy = AlignedAddr -> getType ( ) -> getPointerElementType ( ) ; +Function * RMW = Intrinsic :: getDeclaration ( M , getIntrinsicForAtomicRMWBinOp128 ( AI -> getOperation ( ) ) ) ; +Type * Int64Ty = Type :: getInt64Ty ( M -> getContext ( ) ) ; +Value * IncrLo = Builder . CreateTrunc ( Incr , Int64Ty , "incr_lo" ) ; +Value * IncrHi = Builder . CreateTrunc ( Builder . CreateLShr ( Incr , 64 ) , Int64Ty , "incr_hi" ) ; +Value * Addr = Builder . CreateBitCast ( AlignedAddr , Type :: getInt8PtrTy ( M -> getContext ( ) ) ) ; +Value * LoHi = Builder . CreateCall ( RMW , { Addr , IncrLo , IncrHi } ) ; +Value * Lo = Builder . CreateExtractValue ( LoHi , 0 , "lo" ) ; +Value * Hi = Builder . CreateExtractValue ( LoHi , 1 , "hi" ) ; +Lo = Builder . CreateZExt ( Lo , ValTy , "lo64" ) ; +Hi = Builder . CreateZExt ( Hi , ValTy , "hi64" ) ; +return Builder . CreateOr ( Lo , Builder . CreateShl ( Hi , ConstantInt :: get ( ValTy , 64 ) ) , "val64" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0095027c763a78157c0d3d7cd2da0936f0694646 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/emitTrailingFence.cpp @@ -0,0 +1,14 @@ +Instruction * RISCVTargetLowering :: emitTrailingFence ( IRBuilder < > & Builder , Instruction * Inst , AtomicOrdering Ord ) const { +if ( Ord == AtomicOrdering :: AcquireRelease ) { +if ( Ord == AtomicOrdering :: SequentiallyConsistent ) { +if ( Ord == AtomicOrdering :: Monotonic ) { +return nullptr ; +return nullptr ; +if ( isAcquireOrStronger ( Ord ) ) { +if ( isa < LoadInst > ( Inst ) ) { +return Builder . CreateCall ( Intrinsic :: getDeclaration ( Builder . GetInsertBlock ( ) -> getParent ( ) -> getParent ( ) , Intrinsic :: ppc_cfence , { Inst -> getType ( ) } ) , { Inst } ) ; +} +} +return callIntrinsic ( Builder , Intrinsic :: ppc_lwsync ) ; +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getAddr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e428bc4d3c41e5a5a31ba055bda636e73f368133 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getAddr.cpp @@ -0,0 +1,20 @@ +template < class NodeTy > SDValue RISCVTargetLowering :: getAddr ( NodeTy * N , SelectionDAG & DAG , bool IsLocal ) const { +SDLoc DL ( N ) ; +EVT Ty = getPointerTy ( DAG . getDataLayout ( ) ) ; +unsigned Flag = RISCVII :: MO_None ; +if ( isPositionIndependent ( ) ) { +SDValue GPReg = DAG . getRegister ( RISCV :: GP_REG , MVT :: i32 ) ; +SDValue Wrapper = DAG . getNode ( RISCVISD :: GOT_ADDR , DL , Ty , GPReg , getTargetNode ( N , Ty , DAG , RISCV :: MO_GOT ) ) ; +return DAG . getLoad ( Ty , DL , DAG . getEntryNode ( ) , Wrapper , MachinePointerInfo :: getGOT ( DAG . getMachineFunction ( ) ) ) ; +} +SDValue TV = getTargetNode ( N , DL , Ty , DAG , Flag ) ; +if ( ! isPositionIndependent ( ) ) { +SDValue Hi = getTargetNode ( N , Ty , DAG , RISCV :: MO_ABS_HI ) ; +SDValue Lo = getTargetNode ( N , Ty , DAG , RISCV :: MO_ABS_LO ) ; +SDValue MoveHi = DAG . getNode ( RISCVISD :: MOVEHI , DL , MVT :: i32 , Hi ) ; +} +if ( IsLocal ) { +DAG . getNode ( ISD :: ADD , DL , Ty , { DAG . getGLOBAL_OFFSET_TABLE ( Ty ) , Addr } ) ; +} +return DAG . getLoad ( Ty , DL , DAG . getEntryNode ( ) , Result , MachinePointerInfo :: getGOT ( DAG . getMachineFunction ( ) ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3cd3a4682a77efc696a92a3141f7ac6330c1e4c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getConstraintType.cpp @@ -0,0 +1,20 @@ +RISCVTargetLowering :: ConstraintType RISCVTargetLowering :: getConstraintType ( StringRef Constraint ) const { +if ( Constraint . size ( ) == 1 ) { +if ( Constraint [ 0 ] == 'f' ) { +return C_RegisterClass ; +} +if ( Constraint [ 0 ] == 'I' ) { +return C_Immediate ; +} +if ( Constraint [ 0 ] == 'J' ) { +return C_Immediate ; +} +if ( Constraint [ 0 ] == 'K' ) { +return C_Immediate ; +} +if ( Constraint [ 0 ] == 'A' ) { +return C_Memory ; +} +} +return TargetLowering :: getConstraintType ( Constraint ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a595cc74e020497c74d7dfac4079f445cf314273 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getDynamicTLSAddr.cpp @@ -0,0 +1,19 @@ +SDValue RISCVTargetLowering :: getDynamicTLSAddr ( GlobalAddressSDNode * N , SelectionDAG & DAG ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +RISCVMachineFunctionInfo * CFI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +unsigned RISCVPCLabelIndex = CFI -> createPICLabelUId ( ) ; +SDLoc DL ( N ) ; +EVT Ty = getPointerTy ( DAG . getDataLayout ( ) ) ; +IntegerType * CallTy = Type :: getIntNTy ( * DAG . getContext ( ) , Ty . getSizeInBits ( ) ) ; +SDValue PICLabel = DAG . getTargetConstant ( RISCVPCLabelIndex , DL , MVT :: i32 ) ; +SDValue Addr = DAG . getTargetGlobalAddress ( GV , DL , Ty , 0 , 0 ) ; +SDValue Load = SDValue ( DAG . getMachineNode ( RISCV :: PseudoLA_TLS_GD , DL , Ty , Addr ) , 0 ) ; +ArgListTy Args ; +ArgListEntry Entry ; +Entry . Node = Load ; +Entry . Ty = CallTy ; +Args . push_back ( Entry ) ; +TargetLowering :: CallLoweringInfo CLI ( DAG ) ; +CLI . setDebugLoc ( DL ) . setChain ( DAG . getEntryNode ( ) ) . setLibCallee ( CallingConv :: C , CallTy , DAG . getExternalSymbol ( "__tls_get_addr" , Ty ) , std :: move ( Args ) ) ; +return LowerCallTo ( CLI ) . first ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc02741aaf5a8cbf9dd1c422325f1b9264cfe403 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExceptionPointerRegister.cpp @@ -0,0 +1,3 @@ +Register RISCVTargetLowering :: getExceptionPointerRegister ( const Constant * PersonalityFn ) const { +return RISCV :: X10 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b009628facdcf7986bcf0d4fc93fae496f151f60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExceptionSelectorRegister.cpp @@ -0,0 +1,3 @@ +Register RISCVTargetLowering :: getExceptionSelectorRegister ( const Constant * PersonalityFn ) const { +return RISCV :: X11 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38de26de656308f961676867af71fc387570f00a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExtendForAtomicCmpSwapArg.cpp @@ -0,0 +1,3 @@ +ISD :: NodeType getExtendForAtomicCmpSwapArg ( ) const override { +return ISD :: SIGN_EXTEND ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b9c2d6c3acd41ab5253583248f7de9c051d4481b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getExtendForAtomicOps.cpp @@ -0,0 +1,3 @@ +ISD :: NodeType getExtendForAtomicOps ( ) const override { +return ISD :: SIGN_EXTEND ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..253b96d8be6ebabc2aa0d331feb3b67fb0ddfdff --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getInlineAsmMemConstraint.cpp @@ -0,0 +1,8 @@ +unsigned RISCVTargetLowering :: getInlineAsmMemConstraint ( StringRef ConstraintCode ) const { +if ( ConstraintCode . size ( ) == 1 ) { +if ( ConstraintCode [ 0 ] == 'A' ) { +return InlineAsm :: Constraint_A ; +} +} +return TargetLowering :: getInlineAsmMemConstraint ( ConstraintCode ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40ad815c07e1409e745187e8ddbc2ea6bb676f97 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,326 @@ +std :: pair < unsigned , const TargetRegisterClass * > RISCVTargetLowering :: getRegForInlineAsmConstraint ( const TargetRegisterInfo * TRI , StringRef Constraint , MVT VT ) const { +if ( Constraint . size ( ) == 1 ) { +if ( Constraint [ 0 ] == 'r' ) { +return std :: make_pair ( 0U , & RISCV :: GPRRegClass ) ; +} +if ( Constraint [ 0 ] == 'f' ) { +if ( Subtarget . hasStdExtF ( ) ) { +if ( VT == MVT :: f32 ) { +return std :: make_pair ( 0U , & RISCV :: FPR32RegClass ) ; +} +} +if ( Subtarget . hasStdExtD ( ) ) { +if ( VT == MVT :: f64 ) { +return std :: make_pair ( 0U , & RISCV :: FPR64RegClass ) ; +} +} +} +} +return TargetLowering :: getRegForInlineAsmConstraint ( Constraint , VT ) ; +unsigned XRegFromAlias = RISCV :: NoRegister ; +if ( Constraint . lower ( ) == "{zero}" ) { +XRegFromAlias = RISCV :: X0 ; +} +if ( Constraint . lower ( ) == "{ra}" ) { +XRegFromAlias = RISCV :: X1 ; +} +if ( Constraint . lower ( ) == "{sp}" ) { +XRegFromAlias = RISCV :: X2 ; +} +if ( Constraint . lower ( ) == "{gp}" ) { +XRegFromAlias = RISCV :: X3 ; +} +if ( Constraint . lower ( ) == "{tp}" ) { +XRegFromAlias = RISCV :: X4 ; +} +if ( Constraint . lower ( ) == "{t0}" ) { +XRegFromAlias = RISCV :: X5 ; +} +if ( Constraint . lower ( ) == "{t1}" ) { +XRegFromAlias = RISCV :: X6 ; +} +if ( Constraint . lower ( ) == "{t2}" ) { +XRegFromAlias = RISCV :: X7 ; +} +if ( Constraint . lower ( ) == "{s0}" ) { +XRegFromAlias = RISCV :: X8 ; +} +if ( Constraint . lower ( ) == "{fp}" ) { +XRegFromAlias = RISCV :: X8 ; +} +if ( Constraint . lower ( ) == "{s1}" ) { +XRegFromAlias = RISCV :: X9 ; +} +if ( Constraint . lower ( ) == "{a0}" ) { +XRegFromAlias = RISCV :: X10 ; +} +if ( Constraint . lower ( ) == "{a1}" ) { +XRegFromAlias = RISCV :: X11 ; +} +if ( Constraint . lower ( ) == "{a2}" ) { +XRegFromAlias = RISCV :: X12 ; +} +if ( Constraint . lower ( ) == "{a3}" ) { +XRegFromAlias = RISCV :: X13 ; +} +if ( Constraint . lower ( ) == "{a4}" ) { +XRegFromAlias = RISCV :: X14 ; +} +if ( Constraint . lower ( ) == "{a5}" ) { +XRegFromAlias = RISCV :: X15 ; +} +if ( Constraint . lower ( ) == "{a6}" ) { +XRegFromAlias = RISCV :: X16 ; +} +if ( Constraint . lower ( ) == "{a7}" ) { +XRegFromAlias = RISCV :: X17 ; +} +if ( Constraint . lower ( ) == "{s2}" ) { +XRegFromAlias = RISCV :: X18 ; +} +if ( Constraint . lower ( ) == "{s3}" ) { +XRegFromAlias = RISCV :: X19 ; +} +if ( Constraint . lower ( ) == "{s4}" ) { +XRegFromAlias = RISCV :: X20 ; +} +if ( Constraint . lower ( ) == "{s5}" ) { +XRegFromAlias = RISCV :: X21 ; +} +if ( Constraint . lower ( ) == "{s6}" ) { +XRegFromAlias = RISCV :: X22 ; +} +if ( Constraint . lower ( ) == "{s7}" ) { +XRegFromAlias = RISCV :: X23 ; +} +if ( Constraint . lower ( ) == "{s8}" ) { +XRegFromAlias = RISCV :: X24 ; +} +if ( Constraint . lower ( ) == "{s9}" ) { +XRegFromAlias = RISCV :: X25 ; +} +if ( Constraint . lower ( ) == "{s10}" ) { +XRegFromAlias = RISCV :: X26 ; +} +if ( Constraint . lower ( ) == "{s11}" ) { +XRegFromAlias = RISCV :: X27 ; +} +if ( Constraint . lower ( ) == "{t3}" ) { +XRegFromAlias = RISCV :: X28 ; +} +if ( Constraint . lower ( ) == "{t4}" ) { +XRegFromAlias = RISCV :: X29 ; +} +if ( Constraint . lower ( ) == "{t5}" ) { +XRegFromAlias = RISCV :: X30 ; +} +if ( Constraint . lower ( ) == "{t6}" ) { +XRegFromAlias = RISCV :: X31 ; +} +if ( XRegFromAlias != RISCV :: NoRegister ) { +return std :: make_pair ( XRegFromAlias , & RISCV :: GPRRegClass ) ; +} +if ( Subtarget . hasStdExtF ( ) ) { +unsigned FReg = RISCV :: NoRegister ; +if ( Constraint . lower ( ) == "{f0}" ) { +FReg = RISCV :: F0_F ; +} +if ( Constraint . lower ( ) == "{ft0}" ) { +FReg = RISCV :: F0_F ; +} +if ( Constraint . lower ( ) == "{f1}" ) { +FReg = RISCV :: F1_F ; +} +if ( Constraint . lower ( ) == "{ft1}" ) { +FReg = RISCV :: F1_F ; +} +if ( Constraint . lower ( ) == "{f2}" ) { +FReg = RISCV :: F2_F ; +} +if ( Constraint . lower ( ) == "{ft2}" ) { +FReg = RISCV :: F2_F ; +} +if ( Constraint . lower ( ) == "{f3}" ) { +FReg = RISCV :: F3_F ; +} +if ( Constraint . lower ( ) == "{ft3}" ) { +FReg = RISCV :: F3_F ; +} +if ( Constraint . lower ( ) == "{f4}" ) { +FReg = RISCV :: F4_F ; +} +if ( Constraint . lower ( ) == "{ft4}" ) { +FReg = RISCV :: F4_F ; +} +if ( Constraint . lower ( ) == "{f5}" ) { +FReg = RISCV :: F5_F ; +} +if ( Constraint . lower ( ) == "{ft5}" ) { +FReg = RISCV :: F5_F ; +} +if ( Constraint . lower ( ) == "{f6}" ) { +FReg = RISCV :: F6_F ; +} +if ( Constraint . lower ( ) == "{ft6}" ) { +FReg = RISCV :: F6_F ; +} +if ( Constraint . lower ( ) == "{f7}" ) { +FReg = RISCV :: F7_F ; +} +if ( Constraint . lower ( ) == "{ft7}" ) { +FReg = RISCV :: F7_F ; +} +if ( Constraint . lower ( ) == "{f8}" ) { +FReg = RISCV :: F8_F ; +} +if ( Constraint . lower ( ) == "{ft8}" ) { +FReg = RISCV :: F8_F ; +} +if ( Constraint . lower ( ) == "{f9}" ) { +FReg = RISCV :: F9_F ; +} +if ( Constraint . lower ( ) == "{ft9}" ) { +FReg = RISCV :: F9_F ; +} +if ( Constraint . lower ( ) == "{f10}" ) { +FReg = RISCV :: F10_F ; +} +if ( Constraint . lower ( ) == "{ft10}" ) { +FReg = RISCV :: F10_F ; +} +if ( Constraint . lower ( ) == "{f11}" ) { +FReg = RISCV :: F11_F ; +} +if ( Constraint . lower ( ) == "{ft11}" ) { +FReg = RISCV :: F11_F ; +} +if ( Constraint . lower ( ) == "{f12}" ) { +FReg = RISCV :: F12_F ; +} +if ( Constraint . lower ( ) == "{ft12}" ) { +FReg = RISCV :: F12_F ; +} +if ( Constraint . lower ( ) == "{f13}" ) { +FReg = RISCV :: F13_F ; +} +if ( Constraint . lower ( ) == "{ft13}" ) { +FReg = RISCV :: F13_F ; +} +if ( Constraint . lower ( ) == "{f14}" ) { +FReg = RISCV :: F14_F ; +} +if ( Constraint . lower ( ) == "{ft14}" ) { +FReg = RISCV :: F14_F ; +} +if ( Constraint . lower ( ) == "{f15}" ) { +FReg = RISCV :: F15_F ; +} +if ( Constraint . lower ( ) == "{ft15}" ) { +FReg = RISCV :: F15_F ; +} +if ( Constraint . lower ( ) == "{f16}" ) { +FReg = RISCV :: F16_F ; +} +if ( Constraint . lower ( ) == "{ft16}" ) { +FReg = RISCV :: F16_F ; +} +if ( Constraint . lower ( ) == "{f17}" ) { +FReg = RISCV :: F17_F ; +} +if ( Constraint . lower ( ) == "{ft17}" ) { +FReg = RISCV :: F17_F ; +} +if ( Constraint . lower ( ) == "{f18}" ) { +FReg = RISCV :: F18_F ; +} +if ( Constraint . lower ( ) == "{ft18}" ) { +FReg = RISCV :: F18_F ; +} +if ( Constraint . lower ( ) == "{f19}" ) { +FReg = RISCV :: F19_F ; +} +if ( Constraint . lower ( ) == "{ft19}" ) { +FReg = RISCV :: F19_F ; +} +if ( Constraint . lower ( ) == "{f20}" ) { +FReg = RISCV :: F20_F ; +} +if ( Constraint . lower ( ) == "{ft20}" ) { +FReg = RISCV :: F20_F ; +} +if ( Constraint . lower ( ) == "{f21}" ) { +FReg = RISCV :: F21_F ; +} +if ( Constraint . lower ( ) == "{ft21}" ) { +FReg = RISCV :: F21_F ; +} +if ( Constraint . lower ( ) == "{f22}" ) { +FReg = RISCV :: F22_F ; +} +if ( Constraint . lower ( ) == "{ft22}" ) { +FReg = RISCV :: F22_F ; +} +if ( Constraint . lower ( ) == "{f23}" ) { +FReg = RISCV :: F23_F ; +} +if ( Constraint . lower ( ) == "{ft23}" ) { +FReg = RISCV :: F23_F ; +} +if ( Constraint . lower ( ) == "{f24}" ) { +FReg = RISCV :: F24_F ; +} +if ( Constraint . lower ( ) == "{ft24}" ) { +FReg = RISCV :: F24_F ; +} +if ( Constraint . lower ( ) == "{f25}" ) { +FReg = RISCV :: F25_F ; +} +if ( Constraint . lower ( ) == "{ft25}" ) { +FReg = RISCV :: F25_F ; +} +if ( Constraint . lower ( ) == "{f26}" ) { +FReg = RISCV :: F26_F ; +} +if ( Constraint . lower ( ) == "{ft26}" ) { +FReg = RISCV :: F26_F ; +} +if ( Constraint . lower ( ) == "{f27}" ) { +FReg = RISCV :: F27_F ; +} +if ( Constraint . lower ( ) == "{ft27}" ) { +FReg = RISCV :: F27_F ; +} +if ( Constraint . lower ( ) == "{f28}" ) { +FReg = RISCV :: F28_F ; +} +if ( Constraint . lower ( ) == "{ft28}" ) { +FReg = RISCV :: F28_F ; +} +if ( Constraint . lower ( ) == "{f29}" ) { +FReg = RISCV :: F29_F ; +} +if ( Constraint . lower ( ) == "{ft29}" ) { +FReg = RISCV :: F29_F ; +} +if ( Constraint . lower ( ) == "{f30}" ) { +FReg = RISCV :: F30_F ; +} +if ( Constraint . lower ( ) == "{ft30}" ) { +FReg = RISCV :: F30_F ; +} +if ( Constraint . lower ( ) == "{f31}" ) { +FReg = RISCV :: F31_F ; +} +if ( Constraint . lower ( ) == "{ft31}" ) { +FReg = RISCV :: F31_F ; +} +if ( FReg != RISCV :: NoRegister ) { +assert ( RISCV :: F0_32 <= FReg && FReg <= RISCV :: F31_32 && "Unknown fp-reg" ) ; +if ( Subtarget . hasStdExtD ( ) ) { +unsigned RegNo = FReg - RISCV :: F0_32 ; +unsigned DReg = RISCV :: F0_64 + RegNo ; +} +} +} +return TargetLowering :: getRegForInlineAsmConstraint ( TRI , Constraint , VT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c16b4703c68fed7aab4e8cde232d9094b9ccd8ca --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getRegisterByName.cpp @@ -0,0 +1,6 @@ +Register RISCVTargetLowering :: getRegisterByName ( const char * RegName , LLT VT , const MachineFunction & MF ) const { +Register Reg = MatchRegisterAltName ( RegName ) ; +if ( Reg ) { +return Reg ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77bb51ed2c7075e9575dfc327e58c36fb28e43c2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getSetCCResultType.cpp @@ -0,0 +1,8 @@ +EVT RISCVTargetLowering :: getSetCCResultType ( const DataLayout & DL , LLVMContext & , EVT VT ) const { +if ( ! VT . isVector ( ) ) { +return getPointerTy ( DL ) ; +} +if ( Subtarget . hasStdExtV ( ) ) { +return MVT :: getVectorVT ( MVT :: i1 , VT . getVectorElementCount ( ) ) ; +return VT . changeVectorElementTypeToInteger ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..442db86c6e45445e2d7c6b517d23cf2a715ea20a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getStaticTLSAddr.cpp @@ -0,0 +1,24 @@ +SDValue RISCVTargetLowering :: getStaticTLSAddr ( GlobalAddressSDNode * N , SelectionDAG & DAG , bool UseGOT ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +RISCVMachineFunctionInfo * CFI = MF . getInfo < RISCVMachineFunctionInfo > ( ) ; +unsigned RISCVPCLabelIndex = CFI -> createPICLabelUId ( ) ; +SDLoc DL ( N ) ; +EVT Ty = getPointerTy ( DAG . getDataLayout ( ) ) ; +RISCVCP :: RISCVCPModifier Flag = UseGOT ? RISCVCP :: TLSIE : RISCVCP :: TLSLE ; +bool AddCurrentAddr = UseGOT ? true : false ; +unsigned char PCAjust = UseGOT ? 4 : 0 ; +RISCVConstantPoolValue * CPV = RISCVConstantPoolConstant :: Create ( N -> getGlobal ( ) , RISCVCP :: CPValue , PCAjust , Flag , AddCurrentAddr , RISCVPCLabelIndex ) ; +SDValue CAddr = DAG . getTargetConstantPool ( CPV , Ty ) ; +SDValue Load ; +if ( UseGOT ) { +SDValue PICLabel = DAG . getTargetConstant ( RISCVPCLabelIndex , DL , MVT :: i32 ) ; +auto * LRWGRS = DAG . getMachineNode ( RISCV :: PseudoTLSLA32 , DL , { Ty , Ty } , { CAddr , PICLabel } ) ; +auto LRWADDGRS = DAG . getNode ( ISD :: ADD , DL , Ty , SDValue ( LRWGRS , 0 ) , SDValue ( LRWGRS , 1 ) ) ; +Load = DAG . getLoad ( Ty , DL , DAG . getEntryNode ( ) , LRWADDGRS , MachinePointerInfo ( N -> getGlobal ( ) ) ) ; +} +if ( ! UseGOT ) { +Load = SDValue ( DAG . getMachineNode ( RISCV :: LRW32 , DL , Ty , CAddr ) , 0 ) ; +} +SDValue TPReg = DAG . getRegister ( RISCV :: R31 , MVT :: i32 ) ; +return DAG . getNode ( ISD :: ADD , DL , Ty , Load , TPReg ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a040c2636476d164c22e0a10b28a246c3520a00b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getSubtarget.cpp @@ -0,0 +1,3 @@ +const RISCVSubtarget & getSubtarget ( ) const { +return Subtarget ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a2d1131fb5f1f81109040e25546a593d6c76b834 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,123 @@ +const char * RISCVTargetLowering :: getTargetNodeName ( unsigned Opcode ) const { +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: RET_FLAG ) { +return "RISCVISD::RET_FLAG" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD::URET_FLAG ) { +return "RISCVISD::URET_FLAG" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: SRET_FLAG ) { +return "RISCVISD::SRET_FLAG" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: MRET_FLAG ) { +return "RISCVISD::MRET_FLAG" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: CALL ) { +return "RISCVISD::CALL" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: SELECT_CC ) { +return "RISCVISD::SELECT_CC" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: BuildPairF64 ) { +return "RISCVISD::BuildPairF64" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: SplitF64 ) { +return "RISCVISD::SplitF64" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD ::TAIL ) { +return "RISCVISD::TAIL" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: FMV_X_ANYEXTH ) { +return "RISCVISD::FMV_X_ANYEXTH" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: FMV_W_X_RV64 ) { +return "RISCVISD::FMV_W_X_RV64" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: FMV_X_ANYEXTW_RV64 ) { +return "RISCVISD::FMV_X_ANYEXTW_RV64" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: READ_CYCLE_WIDE ) { +return "RISCVISD::READ_CYCLE_WIDE" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD::GREVI ) { +return "RISCVISD::GREVI" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD::GREVIW ) { +return "RISCVISD::GREVIW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: GORCI ) { +return "RISCVISD::GORCI" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: GORCIW ) { +return "RISCVISD::GORCIW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD::VMV_X_S ) { +return "RISCVISD::VMV_X_S" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: SPLAT_VECTOR_I64 ) { +return "RISCVISD::SPLAT_VECTOR_I64" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: READ_VLENB ) { +return "RISCVISD::READ_VLENB" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: TRUNCATE_VECTOR ) { +return "RISCVISD::TRUNCATE_VECTOR" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: VLEFF ) { +return "RISCVISD::VLEFF" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: VLEFF_MASK ) { +return "RISCVISD::VLEFF_MASK" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD::VLSEGFF ) { +return "RISCVISD::VLSEGFF" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: VLSEGFF_MASK ) { +return "RISCVISD::VLSEGFF_MASK" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: READ_VL ) { +return "RISCVISD::READ_VL" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: VSLIDEUP ) { +return "RISCVISD::VSLIDEUP" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: VSLIDEDOWN ) { +return "RISCVISD::VSLIDEDOWN" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: VID ) { +return "RISCVISD::VID" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: FMV_H_X ) { +return "RISCVISD::FMV_H_X" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: FSRW ) { +return "RISCVISD::FSRW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: FSLW ) { +return "RISCVISD::FSLW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: RORW ) { +return "RISCVISD::RORW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: ROLW ) { +return "RISCVISD::ROLW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: REMUW ) { +return "RISCVISD::REMUW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: DIVUW ) { +return "RISCVISD::DIVUW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: DIVW ) { +return "RISCVISD::DIVW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: SRLW ) { +return "RISCVISD::SRLW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: SRAW ) { +return "RISCVISD::SRAW" ; +} +if ( ( RISCVISD :: NodeType ) Opcode == RISCVISD :: SLLW ) { +return "RISCVISD::SLLW" ; +} +return nullptr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3579f0736c29acc14ca6ad1b4c7b396a980277f5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/getTgtMemIntrinsic.cpp @@ -0,0 +1,111 @@ +bool RISCVTargetLowering :: getTgtMemIntrinsic ( IntrinsicInfo & Info , const CallInst & I , MachineFunction & MF , unsigned Intrinsic ) const { +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_xchg_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_add_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_sub_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_nand_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_max_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 1 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 1 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = false ; +Info . writeMem = true ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_min_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 1 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 1 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = false ; +Info . writeMem = true ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_umax_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_atomicrmw_umin_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +if ( Intrinsic == Intrinsic :: RISCV_masked_cmpxchg_i32 ) { +PointerType * PtrTy = cast < PointerType > ( I . getArgOperand ( 0 ) -> getType ( ) ) ; +Info . opc = ISD :: INTRINSIC_W_CHAIN ; +Info . memVT = MVT :: getVT ( PtrTy -> getElementType ( ) ) ; +Info . ptrVal = I . getArgOperand ( 0 ) ; +Info . offset = 0 ; +Info . align = I . getModule ( ) -> getDataLayout ( ) . getABITypeAlignment ( PtrTy -> getElementType ( ) ) ; +Info . vol = true ; +Info . readMem = true ; +Info . writeMem = false ; +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..558a2f60006bf8e5482ed81b7857f92e9cb02c54 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/hasBitPreservingFPLogic.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering :: hasBitPreservingFPLogic ( EVT VT ) const { +return ( VT == MVT :: f16 && Subtarget . hasStdExtZfh ( ) ) || ( VT == MVT :: f32 && Subtarget . hasStdExtF ( ) ) || ( VT == MVT :: f64 && Subtarget . hasStdExtD ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4427dc250a9b14b0605fc29f282b714b447e3b48 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCtlz.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering :: isCheapToSpeculateCtlz ( ) const { +return Subtarget . hasStdExtZbb ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41b20d8233d4b501a3330b31305ac754f057073c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isCheapToSpeculateCttz.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering :: isCheapToSpeculateCttz ( ) const { +return Subtarget . hasStdExtZbb ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eaa72c8ecfe7d984d0c39a275176b30dc93cdcdd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isDesirableToCommuteWithShift.cpp @@ -0,0 +1,8 @@ +bool RISCVTargetLowering :: isDesirableToCommuteWithShift ( const SDNode * N , CombineLevel Level ) const { +if ( Level == BeforeLegalizeTypes ) { +return true ; +return true ; +if ( N -> getOpcode ( ) != ISD :: SHL ) { +return true ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9663f6712e4cedfd95144b31ae165430cc5d719b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isEligibleForTailCallOptimization.cpp @@ -0,0 +1,23 @@ +bool RISCVTargetLowering :: isEligibleForTailCallOptimization ( CCState & CCInfo , CallLoweringInfo & CLI , MachineFunction & MF , const SmallVector < CCValAssign , 16 > & ArgLocs ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +const Function & CallerF = MF . getFunction ( ) ; +CallingConv :: ID CallerCC = CallerF . getCallingConv ( ) ; +bool CCMatch = CallerCC == CalleeCC ; +for ( Function :: const_arg_iterator i = CallerF . arg_begin ( ) , e = CallerF . arg_end ( ) ; i != e ; ++ i ) { +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +const GlobalValue * GV = G -> getGlobal ( ) ; +if ( GV -> hasExternalWeakLinkage ( ) ) { +return false ; +} +if ( GV -> hasExternalWeakLinkage ( ) ) { +if ( TT . isOSBinFormatELF ( ) ) { +return false ; +} +if ( GV -> hasExternalWeakLinkage ( ) ) { +return false ; +} +} +assert ( ( ! isVarArg || CalleeCC == CallingConv :: C ) && "Unexpected variadic calling convention" ) ; +for ( const CCValAssign & ArgLoc : ArgLocs ) { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ba3288894950b3d49166d803f88732c98e0db5d3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isFMAFasterThanFMulAndFAdd.cpp @@ -0,0 +1,16 @@ +bool RISCVTargetLowering :: isFMAFasterThanFMulAndFAdd ( const MachineFunction & MF , EVT VT ) const { +VT = VT . getScalarType ( ) ; +if ( ! VT . isSimple ( ) ) { +return false ; +} +if ( VT . getSimpleVT ( ) . SimpleTy == MVT :: f16 ) { +return Subtarget . hasStdExtZfh ( ) ; +} +if ( VT . getSimpleVT ( ) . SimpleTy == MVT :: f32 ) { +return Subtarget . hasStdExtF ( ) ; +} +if ( VT . getSimpleVT ( ) . SimpleTy == MVT :: f64 ) { +return Subtarget . hasStdExtD ( ) ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e059ba3b083f586ba645b41d656c18f0eb2ff5c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isFPImmLegal.cpp @@ -0,0 +1,24 @@ +bool RISCVTargetLowering :: isFPImmLegal ( const APFloat & Imm , EVT VT , bool ForCodeSize ) const { +if ( VT == MVT :: f16 ) { +if ( Subtarget . hasFullFP16 ( ) ) { +return RISCV_AM :: getFP16Imm ( Imm ) != - 1 ; +} +} +if ( VT == MVT :: f32 ) { +return RISCV_AM :: getFP32Imm ( Imm ) != - 1 ; +} +if ( VT == MVT :: f64 ) { +if ( Subtarget . isFPOnlySP ( ) ) { +return RISCV_AM :: getFP64Imm ( Imm ) != - 1 ; +} +} +if ( VT != MVT :: f32 ) { +if ( VT != MVT :: f64 ) { +return false ; +} +} +if ( Imm . isNegZero ( ) ) { +return false ; +} +return Imm . isZero ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d5834d6144049eae3dbf3fe6dd9e28a4b8c13a2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering :: isLegalAddImmediate ( int64_t Imm ) const { +return isInt < 12 > ( Imm ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4d12ec1c1b567ebfad0025a54909a62c21f78173 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,17 @@ +bool RISCVTargetLowering :: isLegalAddressingMode ( const DataLayout & DL , const AddrMode & AM , Type * Ty , unsigned AS , Instruction * I ) const { +if ( AM . BaseGV ) { +return false ; +} +if ( ! isInt < 12 > ( AM . BaseOffs ) ) { +return false ; +} +if ( AM . Scale == 0 ) { +return true ; +} +if ( AM . Scale == 1 ) { +if ( ! AM . HasBaseReg ) { +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cbde0e488134a5c31dc0832326826d473fc641a9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering :: isLegalICmpImmediate ( int64_t Imm ) const { +return isInt < 12 > ( Imm ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d72959088a6b5a01d516575ba586b3c4e1e98549 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isSExtCheaperThanZExt.cpp @@ -0,0 +1,3 @@ +bool RISCVTargetLowering :: isSExtCheaperThanZExt ( EVT VT1 , EVT VT2 ) const { +return Subtarget . is64Bit ( ) && VT1 == MVT :: i32 && VT2 == MVT :: i64 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..99032499ffe75c5f3f92460c5e05943f6952eb16 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isTruncateFree.cpp @@ -0,0 +1,14 @@ +bool RISCVTargetLowering :: isTruncateFree ( Type * SrcTy , Type * DstTy ) const { +if ( Subtarget . is64Bit ( ) ) { +return false ; +} +if ( ! SrcTy -> isIntegerTy ( ) ) { +return false ; +} +if ( ! DstTy -> isIntegerTy ( ) ) { +return false ; +} +unsigned NumBits1 = SrcTy -> getPrimitiveSizeInBits ( ) ; +unsigned NumBits2 = DstTy -> getPrimitiveSizeInBits ( ) ; +return NumBits1 == 64 && NumBits2 == 32 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..76397e4a0806301acd38defcccf149b328bc5615 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isTruncateFree2.cpp @@ -0,0 +1,20 @@ +bool RISCVTargetLowering :: isTruncateFree ( EVT SrcVT , EVT DstVT ) const { +if ( Subtarget . is64Bit ( ) ) { +return false ; +} +if ( SrcVT . isVector ( ) ) { +return false ; +} +if ( DstVT . isVector ( ) ) { +return false ; +} +if ( ! SrcVT . isInteger ( ) ) { +return false ; +} +if ( ! DstVT . isInteger ( ) ) { +return false ; +} +unsigned SrcBits = SrcVT . getSizeInBits ( ) ; +unsigned DestBits = DstVT . getSizeInBits ( ) ; +return ( SrcBits == 64 && DestBits == 32 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcbba94cbf602366fad80d1244d09825914acb64 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/isZExtFree.cpp @@ -0,0 +1,37 @@ +bool RISCVTargetLowering :: isZExtFree ( SDValue Val , EVT VT2 ) const { +if ( auto * LD = dyn_cast < LoadSDNode > ( Val ) ) { +EVT MemVT = LD -> getMemoryVT ( ) ; +if ( MemVT == MVT :: i1 ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +if ( MemVT == MVT :: i8 ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +} +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +} +} +if ( MemVT == MVT :: i16 ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +} +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +} +} +if ( MemVT == MVT :: i32 ) { +if ( Subtarget . is64Bit ( ) ) { +if ( LD -> getExtensionType ( ) == ISD :: NON_EXTLOAD ) { +return true ; +} +if ( LD -> getExtensionType ( ) == ISD :: ZEXTLOAD ) { +return true ; +} +} +} +} +return TargetLowering :: isZExtFree ( Val , VT2 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80a380dfc2b84af4c8b934700e6392727ea8c615 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerEXTRACT_VECTOR_ELT.cpp @@ -0,0 +1,15 @@ +SDValue RISCVTargetLowering :: lowerEXTRACT_VECTOR_ELT ( SDValue Op , SelectionDAG & DAG ) const { +return Op ; +return Op ; +return Op ; +return Op ; +return Op ; +return Op ; +SDLoc DL ( Op ) ; +SDValue Idx = Op . getOperand ( 1 ) ; +Result = DAG . getNode ( ISD :: TRUNCATE , SL , MVT :: i16 , Result ) ; +MVT VecTy = ty ( Vec ) ; +return Op ; +return Op ; +SDValue Res = DAG . getNode ( ISD :: EXTRACT_VECTOR_ELT , DL , IntVT , DAG . getNode ( ISD :: BITCAST , DL , IntVecVT , Op0 ) , Op1 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39244c32b1a8f2f48d211bcfd180c40890ec7729 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerINSERT_VECTOR_ELT.cpp @@ -0,0 +1,10 @@ +SDValue RISCVTargetLowering :: lowerINSERT_VECTOR_ELT ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc dl ( Op ) ; +SDValue V1 = Op . getOperand ( 0 ) ; +SDValue V2 = Op . getOperand ( 1 ) ; +SDLoc SL ( Op ) ; +SDValue Vec = Op . getOperand ( 0 ) ; +SDValue Val = DAG . getNode ( ISD :: BITCAST , SL , MVT :: i16 , Op . getOperand ( 1 ) ) ; +SDValue BCVec = DAG . getNode ( ISD :: BITCAST , SL , MVT :: i32 , Vec ) ; +SDValue Res = DAG . getNode ( ISD :: INSERT_VECTOR_ELT , DL , IntVecVT , DAG . getNode ( ISD :: BITCAST , DL , IntVecVT , Op0 ) , DAG . getNode ( ISD :: BITCAST , DL , IntVT , Op1 ) , Op2 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4cee3b7c82e61d3c23a706ad7971bd0b7bc7ef6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerSELECT.cpp @@ -0,0 +1,27 @@ +SDValue RISCVTargetLowering :: lowerSELECT ( SDValue Op , SelectionDAG & DAG ) const { +SDValue CondV = Op . getOperand ( 0 ) ; +SDValue TrueV = Op . getOperand ( 1 ) ; +SDValue FalseV = Op . getOperand ( 2 ) ; +SDLoc DL ( Op ) ; +MVT XLenVT = Subtarget . getXLenVT ( ) ; +if ( Op . getSimpleValueType ( ) == XLenVT ) { +if ( CondV . getOperand ( 0 ) . getSimpleValueType ( ) == XLenVT ) { +if ( CondV . getOpcode ( ) == ISD :: SETCC ) { +SDValue LHS = CondV . getOperand ( 0 ) ; +SDValue RHS = CondV . getOperand ( 1 ) ; +auto CC = cast < CondCodeSDNode > ( CondV . getOperand ( 2 ) ) ; +ISD :: CondCode CCVal = CC -> get ( ) ; +normaliseSetCC ( LHS , RHS , CCVal ) ; +SDValue TargetCC = DAG . getConstant ( CCVal , DL , XLenVT ) ; +auto VTs = Op . getValueType ( ) ; +SDValue Ops [ ] = { LHS , RHS , TargetCC , TrueV , FalseV } ; +return DAG . getNode ( RISCVISD :: SELECT_CC , DL , VTs , Ops ) ; +} +} +} +SDValue Zero = DAG . getConstant ( 0 , DL , XLenVT ) ; +SDValue SetNE = DAG . getConstant ( ISD :: SETNE , DL , XLenVT ) ; +auto VTs = Op . getValueType ( ) ; +SDValue Ops [ ] = { CondV , Zero , SetNE , TrueV , FalseV } ; +return DAG . getNode ( RISCVISD :: SELECT_CC , DL , VTs , Ops ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7022898f76521dad4874a7e3cc1905b9a1017dd4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerSPLATVECTOR.cpp @@ -0,0 +1,19 @@ +SDValue RISCVTargetLowering :: lowerSPLATVECTOR ( SDValue Op , SelectionDAG & DAG ) const { +assert ( ! Subtarget . is64Bit ( ) && VecVT . getVectorElementType ( ) == MVT :: i64 && "Unexpected SPLAT_VECTOR lowering" ) ; +SDLoc DL ( Op ) ; +SDValue N1 = Op . getOperand ( 0 ) ; +unsigned SrcSize = N1 . getValueType ( ) . getSizeInBits ( ) ; +SDValue WideSrc = SrcSize == 128 ? N1 : widenVec ( DAG , N1 , DL ) ; +unsigned TrgNumElts = TrgVT . getVectorNumElements ( ) ; +SmallVector < int , 16 > ShuffV ; +if ( Subtarget . isLittleEndian ( ) ) { +for ( unsigned i = 0 ; i < TrgNumElts ; ++ i ) { +ShuffV . push_back ( i * SizeMult ) ; +if ( Subtarget . isBigEndian ( ) ) { +for ( unsigned i = 1 ; i < TrgNumElts ; ++ i ) { +ShuffV . push_back ( i * SizeMult - 1 ) ; +for ( unsigned i = TrgNumElts ; i < WideNumElts ; ++ i ) { +ShuffV . push_back ( WideNumElts + 1 ) ; +SDValue Conv = DAG . getNode ( ISD :: BITCAST , DL , WideVT , WideSrc ) ; +return DAG . getVectorShuffle ( WideVT , DL , Conv , DAG . getUNDEF ( WideVT ) , ShuffV ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e7868e4bb56096f70d5c71d642f5a39eea21ec5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerShiftLeftParts.cpp @@ -0,0 +1,40 @@ +SDValue RISCVTargetLowering :: lowerShiftLeftParts ( SDValue Op , SelectionDAG & DAG ) const { +EVT VT = Op . getValueType ( ) ; +unsigned VTBits = VT . getSizeInBits ( ) ; +SDLoc DL ( Op ) ; +MVT VT = Subtarget . isGP64bit ( ) ? MVT :: i64 : MVT :: i32 ; +SDValue Lo = Op . getOperand ( 0 ) ; +SDValue Hi = Op . getOperand ( 1 ) ; +SDValue Shamt = Op . getOperand ( 2 ) ; +SDValue RevShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , DAG . getConstant ( VTBits , MVT :: i64 ) , Shamt ) ; +SDValue Tmp1 = DAG . getNode ( ISD :: SRL , DL , VT , Lo , RevShAmt ) ; +SDValue ExtraShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , Shamt , DAG . getConstant ( VTBits , MVT :: i64 ) ) ; +SDValue Tmp2 = DAG . getNode ( ISD :: SHL , DL , VT , Hi , Shamt ) ; +SDValue Tmp3 = DAG . getNode ( ISD :: SHL , DL , VT , Lo , ExtraShAmt ) ; +SDValue FalseVal = DAG . getNode ( ISD :: OR , DL , VT , Tmp1 , Tmp2 ) ; +SDValue Tmp4 = DAG . getNode ( ISD :: SHL , DL , VT , Lo , Shamt ) ; +SDValue CmpOp = getSelectableIntSetCC ( ExtraShAmt , DAG . getConstant ( 0 , MVT :: i64 ) , ISD :: SETGE , A64cc , DAG , DL ) ; +SDValue CCR = DAG . getRegister ( RISCV :: CPSR , MVT :: i32 ) ; +SDValue Cmp = getRISCVCmp ( ExtraShAmt , DAG . getConstant ( 0 , MVT :: i32 ) , ISD :: SETGE , RISCVcc , DAG , DL ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +EVT VT = Lo . getValueType ( ) ; +SDValue Zero = DAG . getConstant ( 0 , DL , VT ) ; +SDValue One = DAG . getConstant ( 1 , DL , VT ) ; +SDValue MinusRegisterSize = DAG . getConstant ( - 32 , DL , VT ) ; +SDValue RegisterSizeMinus1 = DAG . getConstant ( 32 - 1 , DL , VT ) ; +SDValue ShamtMinusRegisterSize = DAG . getNode ( ISD :: ADD , DL , VT , Shamt , MinusRegisterSize ) ; +SDValue RegisterSizeMinus1Shamt = DAG . getNode ( ISD :: XOR , DL , VT , RegisterSizeMinus1 , Shamt ) ; +SDValue LoTrue = DAG . getNode ( ISD :: SHL , DL , VT , Lo , Shamt ) ; +SDValue Not = DAG . getNode ( ISD :: XOR , DL , MVT :: i32 , Shamt , DAG . getConstant ( - 1 , MVT :: i32 ) ) ; +SDValue ShiftLeftHi = DAG . getNode ( ISD :: SHL , DL , VT , Hi , Shamt ) ; +SDValue HiTrue = DAG . getNode ( ISD :: OR , DL , VT , ShiftLeftHi , ShiftRightLo ) ; +SDValue HiFalse = DAG . getNode ( ISD :: SHL , DL , VT , Lo , ShamtMinusRegisterSize ) ; +SDValue CC = DAG . getSetCC ( DL , MVT :: i8 , ShamtMinusRegisterSize , Zero , ISD :: SETLT ) ; +SDValue Or = DAG . getNode ( ISD :: OR , DL , VT , ShiftLeftHi , ShiftRightLo ) ; +SDValue ShiftLeftLo = DAG . getNode ( ISD :: SHL , DL , VT , Lo , Shamt ) ; +SDValue Cond = DAG . getNode ( ISD :: AND , DL , MVT :: i32 , Shamt , DAG . getConstant ( VT . getSizeInBits ( ) , MVT :: i32 ) ) ; +Lo = DAG . getNode ( ISD :: SELECT , DL , VT , CC , LoTrue , Zero ) ; +Hi = DAG . getNode ( ISD :: SELECT , DL , VT , CC , HiTrue , HiFalse ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +return DAG . getMergeValues (Parts , DL ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp new file mode 100644 index 0000000000000000000000000000000000000000..030cb3ec045fd289c527d89453b2f9dbd9184904 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerShiftRightParts.cpp @@ -0,0 +1,56 @@ +SDValue RISCVTargetLowering :: lowerShiftRightParts ( SDValue Op , SelectionDAG & DAG , bool IsSRA ) const { +EVT VT = Op . getValueType ( ) ; +unsigned VTBits = VT . getSizeInBits ( ) ; +SDLoc DL ( Op ) ; +SDValue ShOpLo = Op . getOperand ( 0 ) ; +SDValue ShOpHi = Op . getOperand ( 1 ) ; +SDValue ShAmt = Op . getOperand ( 2 ) ; +unsigned Opc = ( Op . getOpcode ( ) == ISD :: SRA_PARTS ) ? ISD :: SRA : ISD :: SRL ; +SDValue RevShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , DAG . getConstant ( VTBits , DL , MVT :: i64 ) , ShAmt ) ; +SDValue Tmp1 = DAG . getNode ( ISD :: SRL , DL , VT , ShOpLo , ShAmt ) ; +SDValue ExtraShAmt = DAG . getNode ( ISD :: SUB , DL , MVT :: i64 , ShAmt , DAG . getConstant ( VTBits , DL , MVT :: i64 ) ) ; +SDValue Tmp2 = DAG . getNode ( ISD :: SHL , DL , VT , ShOpHi , RevShAmt ) ; +SDValue FalseVal = DAG . getNode ( ISD :: OR , DL , VT , Tmp1 , Tmp2 ) ; +SDValue TrueVal = DAG . getNode ( Opc , DL , VT , ShOpHi , ExtraShAmt ) ; +SDValue CCR = DAG . getRegister ( RISCV :: CPSR , MVT :: i32 ) ; +SDValue Cmp = emitComparison ( ExtraShAmt , DAG . getConstant ( 0 , DL , MVT :: i64 ) , ISD :: SETGE , DL , DAG ) ; +SDValue CCVal = DAG . getConstant ( RISCVCC :: GE , DL , MVT :: i32 ) ; +SDValue FalseValLo = DAG . getNode ( ISD :: OR , DL , VT , Tmp1 , Tmp2 ) ; +SDValue TrueValLo = DAG . getNode ( Opc , DL , VT , ShOpHi , ExtraShAmt ) ; +SDValue Lo = Op . getOperand ( 0 ) ; +SDValue FalseValHi = DAG . getNode ( Opc , DL , VT , ShOpHi , ShAmt ) ; +SDValue TrueValHi = Opc == ISD :: SRA ? DAG . getNode ( Opc , DL , VT , ShOpHi , DAG . getConstant ( VTBits - 1 , DL , MVT :: i64 ) ) : DAG . getConstant ( 0 , DL , VT ) ; +SDValue Hi = Op . getOperand ( 1 ) ; +SDValue Lo = DAG . getNode ( RISCVISD :: CMOV , DL , VT , FalseVal , TrueVal , RISCVcc , CCR , Cmp ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +SDValue Lo = Op . getOperand ( 0 ) , Hi = Op . getOperand ( 1 ) ; +SDValue Shamt = Op . getOperand ( 2 ) ; +EVT VT = Lo . getValueType ( ) ; +unsigned ShiftRightOp = IsSRA ? ISD :: SRA : ISD :: SRL ; +SDValue Zero = DAG . getConstant ( 0 , DL , VT ) ; +SDValue One = DAG . getConstant ( 1 , DL , VT ) ; +SDValue MinusRegisterSize = DAG . getConstant ( - 32 , DL , VT ) ; +SDValue RegisterSizeMinus1 = DAG . getConstant ( 32 - 1 , DL , VT ) ; +SDValue ShamtMinusRegisterSize = DAG . getNode ( ISD :: ADD , DL , VT , Shamt , MinusRegisterSize ) ; +SDValue RegisterSizeMinus1Shamt = DAG . getNode ( ISD :: XOR , DL , VT , RegisterSizeMinus1 , Shamt ) ; +SDValue ShiftRightLo = DAG . getNode ( ISD :: SRL , DL , VT , Lo , Shamt ) ; +SDValue ShiftLeftHi1 = DAG . getNode ( ISD :: SHL , DL , VT , Hi , One ) ; +MVT VT = Subtarget . isGP64bit ( ) ? MVT :: i64 : MVT :: i32 ; +SDValue Not = DAG . getNode ( ISD :: XOR , DL , MVT :: i32 , Shamt , DAG . getConstant ( - 1 , MVT :: i32 ) ) ; +SDValue ShiftLeft1Hi = DAG . getNode ( ISD :: SHL , DL , VT , Hi , DAG . getConstant ( 1 , VT ) ) ; +SDValue ShiftLeftHi = DAG . getNode ( ISD :: SHL , DL , VT , ShiftLeftHi1 , RegisterSizeMinus1Shamt ) ; +SDValue LoTrue = DAG . getNode ( ISD :: OR , DL , VT , ShiftRightLo , ShiftLeftHi ) ; +SDValue HiTrue = DAG . getNode ( ShiftRightOp , DL , VT , Hi , Shamt ) ; +SDValue LoFalse = DAG . getNode ( ShiftRightOp , DL , VT , Hi , ShamtMinusRegisterSize ) ; +SDValue HiFalse = IsSRA ? DAG . getNode ( ISD :: SRA , DL , VT , Hi , RegisterSizeMinus1 ) : Zero ; +SDValue CC = DAG . getSetCC ( DL , MVT :: i8 , ShamtMinusRegisterSize , Zero , ISD :: SETLT ) ; +SDValue ShiftRightLo = DAG . getNode ( ISD :: SRL , DL , VT , Lo , Shamt ) ; +SDValue Or = DAG . getNode ( ISD :: OR , DL , VT , ShiftLeftHi , ShiftRightLo ) ; +SDValue ShiftRightHi = DAG . getNode ( IsSRA ? ISD :: SRA : ISD :: SRL , DL , VT , Hi , Shamt ) ; +SDValue Cond = DAG . getNode ( ISD :: AND , DL , MVT :: i32 , Shamt , DAG . getConstant ( VT . getSizeInBits ( ) , MVT :: i32 ) ) ; +SDValue Ext = DAG . getNode ( ISD :: SRA , DL , VT , Hi , DAG . getConstant ( VT . getSizeInBits ( ) - 1 , VT ) ) ; +Lo = DAG . getNode ( ISD :: SELECT , DL , VT , CC , LoTrue , LoFalse ) ; +Hi = DAG . getNode ( ISD :: SELECT , DL , VT , CC , HiTrue , HiFalse ) ; +SDValue Ops [ 2 ] = { Lo , Hi } ; +return DAG . getMergeValues (Parts , DL ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..230cf468a4445c364d402e6551db9fbfd5cc3121 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerVectorMaskExt.cpp @@ -0,0 +1,15 @@ +static SDValue RISCVTargetLowering :: lowerVectorMaskExt ( SDValue Op , SelectionDAG & DAG , int64_t ExtTrueVal ) const { +SDLoc DL ( N ) ; +EVT VT = N -> getValueType ( 0 ) ; +if ( VT . getSizeInBits ( ) . getKnownMinSize ( ) != RISCV :: SVEBitsPerBlock ) { +return SDValue ( ) ; +} +unsigned ElemSize = VT . getVectorElementType ( ) . getSizeInBits ( ) / 8 ; +unsigned ByteSize = VT . getSizeInBits ( ) . getKnownMinSize ( ) / 8 ; +EVT ByteVT = EVT :: getVectorVT ( Ctx , MVT :: i8 , { ByteSize , true } ) ; +if ( ! ST -> hasMVEFloatOps ( ) ) { +return SDValue ( ) ; +} +SDLoc DL ( BV ) ; +EVT VT = BV . getValueType ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc8a3001fca52c0616d830e6b54b93fdc98dd831 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/lowerVectorMaskTrunc.cpp @@ -0,0 +1,33 @@ +SDValue RISCVTargetLowering :: lowerVectorMaskTrunc ( SDValue Op , SelectionDAG & DAG ) const { +assert ( MaskVT . isVector ( ) && MaskVT . getVectorElementType ( ) == MVT :: i1 ) && "Unexpected type for vector mask lowering" ) ; +if ( ! ST -> hasMVEFloatOps ( ) ) { +return SDValue ( ) ; +SDLoc dl ( BV ) ; +if ( VT != MVT :: v8f16 ) { +return SDValue ( ) ; +if ( BV . getOperand ( 0 ) . getOpcode ( ) != ISD :: FP_ROUND ) { +return SDValue ( ) ; +if ( BV . getOperand ( 0 ) . getOperand ( 0 ) . getOpcode ( ) != ISD :: EXTRACT_VECTOR_ELT ) { +return SDValue ( ) ; +if ( BV . getOperand ( 0 ) . getOperand ( 0 ) . getConstantOperandVal ( 1 ) != 0 ) { +return SDValue ( ) ; +if ( BV . getOperand ( 1 ) . getOpcode ( ) != ISD :: FP_ROUND ) { +return SDValue ( ) ; +if ( BV . getOperand ( 1 ) . getOperand ( 0 ) . getOpcode ( ) != ISD :: EXTRACT_VECTOR_ELT ) { +return SDValue ( ) ; +if ( BV . getOperand ( 1 ) . getOperand ( 0 ) . getConstantOperandVal ( 1 ) != 0 ) { +return SDValue ( ) ; +SDValue Op0 = BV . getOperand ( 0 ) . getOperand ( 0 ) . getOperand ( 0 ) ; +SDValue Op1 = BV . getOperand ( 1 ) . getOperand ( 0 ) . getOperand ( 0 ) ; +if ( Op0 . getValueType ( ) != MVT :: v4f32 ) { +return SDValue ( ) ; +if ( Op1 . getValueType ( ) != MVT :: v4f32 ) { +return SDValue ( ) ; +for ( unsigned i = 1 ; i < 4 ; i ++ ) { +if ( ! Check ( BV . getOperand ( i * 2 + 0 ) , Op0 , i ) ) { +return SDValue ( ) ; +if ( ! Check ( BV . getOperand ( i * 2 + 1 ) , Op1 , i ) ) { +return SDValue ( ) ; +SDValue N1 = DAG . getNode ( RISCVISD :: VCVTN , dl , VT , DAG . getUNDEF ( VT ) , Op0 , DAG . getConstant ( 0 , dl , MVT :: i32 ) ) ; +return DAG . getNode ( RISCVISD :: VCVTN , dl , VT , N1 , Op1 , DAG . getConstant ( 1 , dl , MVT :: i32 ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56c56592ac7a191998c82a0bc8dd7a27e2218fa9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/mayBeEmittedAsTailCall.cpp @@ -0,0 +1,6 @@ +bool RISCVTargetLowering :: mayBeEmittedAsTailCall ( const CallInst * CI ) const { +if ( CI -> isTailCall ( ) ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5e8ca14d17c2c96e01f50cf003b660fd552090a8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/normaliseSetCC.cpp @@ -0,0 +1,22 @@ +static void normaliseSetCC ( SDValue & LHS , SDValue & RHS , ISD :: CondCode & CC ) { +if ( CC == ISD :: SETGT ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +if ( CC == ISD :: SETLE ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +if ( CC == ISD :: SETUGT ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +if ( CC == ISD :: SETULE ) { +CC = ISD :: getSetCCSwappedOperands ( CC ) ; +std :: swap ( LHS , RHS ) ; +return ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f68f25a787d6d9d179404a12f57ee6bc55abf05a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/normalizeSetCC.cpp @@ -0,0 +1,2 @@ +static void normaliseSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode &CC) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aea7b13466bda38ef605e932c0424e464e006d3c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldConsiderGEPOffsetSplit.cpp @@ -0,0 +1,3 @@ +bool shouldConsiderGEPOffsetSplit ( ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6c4f52e649ae4b4b1a72eabf7992953c6c65f9e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldConvertConstantLoadToIntImm.cpp @@ -0,0 +1,3 @@ +bool shouldConvertConstantLoadToIntImm ( const APInt & Imm , Type * Ty ) const override { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03f57c86bfe6399a80de39551a813c90cd79abcd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicCmpXchgInIR.cpp @@ -0,0 +1,10 @@ +TargetLowering :: AtomicExpansionKind RISCVTargetLowering :: shouldExpandAtomicCmpXchgInIR ( AtomicCmpXchgInst * AI ) const { +unsigned Size = AI -> getCompareOperand ( ) -> getType ( ) -> getPrimitiveSizeInBits ( ) ; +if ( Size == 8 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +if ( Size == 16 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +return AtomicExpansionKind :: None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e947ccb45d4f2d7405aacabf6dfdab7a87049b3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandAtomicRMWInIR.cpp @@ -0,0 +1,13 @@ +TargetLowering :: AtomicExpansionKind RISCVTargetLowering :: shouldExpandAtomicRMWInIR ( AtomicRMWInst * AI ) const { +if ( AI -> isFloatingPointOperation ( ) ) { +return AtomicExpansionKind :: CmpXChg ; +} +unsigned Size = AI -> getType ( ) -> getPrimitiveSizeInBits ( ) ; +if ( Size == 8 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +if ( Size == 16 ) { +return AtomicExpansionKind :: MaskedIntrinsic ; +} +return AtomicExpansionKind :: None ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c810809a86725d91ae1c0fa0178381f6acebb69a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExpandShift.cpp @@ -0,0 +1,7 @@ +bool shouldExpandShift ( SelectionDAG & DAG , SDNode * N ) const override { +if ( DAG . getMachineFunction ( ) . getFunction ( ) . hasMinSize ( ) ) { +return false ; +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73655d0cb35912f63fadd5eef2ac7ccf71c9de52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldExtendTypeInLibCall.cpp @@ -0,0 +1,8 @@ +bool RISCVTargetLowering :: shouldExtendTypeInLibCall ( EVT Type ) const { +if ( Subtarget . abiUsesSoftFloat ( ) ) { +if ( Type == MVT :: i32 ) { +return true ; +} +} +return IsSigned ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1428347bf80aab4226352f9fbf46158c4494c134 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldInsertFencesForAtomic.cpp @@ -0,0 +1,3 @@ +bool shouldInsertFencesForAtomic ( const Instruction * I ) const override { +return isa < LoadInst > ( I ) || isa < StoreInst > ( I ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8f36cd9532f14f0a552656209ace736862ffdb5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/shouldSignExtendTypeInLibCall.cpp @@ -0,0 +1,8 @@ +bool RISCVTargetLowering :: shouldSignExtendTypeInLibCall ( EVT Type , bool IsSigned ) const { +if ( Subtarget . is64Bit ( ) ) { +if ( Type == MVT :: i32 ) { +return true ; +} +} +return IsSigned ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d63d128be2aa4f51d4d1721fc38b40a134711b00 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/targetShrinkDemandedConstant.cpp @@ -0,0 +1,33 @@ +bool RISCVTargetLowering :: targetShrinkDemandedConstant ( SDValue Op , const APInt & DemandedBits , const APInt & DemandedElts , TargetLoweringOpt & TLO ) const { +if ( ! TLO . LegalOps ) { +return false ; +} +EVT VT = Op . getValueType ( ) ; +if ( VT . isVector ( ) ) { +return false ; +} +if ( Op . getOpcode ( ) != ISD :: AND ) { +return false ; +} +unsigned Size = VT . getSizeInBits ( ) ; +ConstantSDNode * C = dyn_cast < ConstantSDNode > ( Op . getOperand ( 1 ) ) ; +if ( ! C ) { +return false ; +} +const APInt & Mask = C -> getAPIntValue ( ) ; +APInt ExpandedMask = Mask | ~ Demanded ; +if ( ShrunkMask == 0 ) { +return false ; +} +if ( ExpandedMask == ~ 0U ) { +return TLO . CombineTo ( Op , Op . getOperand ( 0 ) ) ; +} +if ( NewMask == Mask ) { +return true ; +} +return false ; +return false ; +SDLoc DL ( Op ) ; +SDValue NewOp = TLO . DAG . getNode ( ISD :: AND , DL , VT , Op . getOperand ( 0 ) , NewC ) ; +return TLO . CombineTo ( Op , NewOp ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..08d730ae9daf2b7e0ae7effd7041b01d4dfd6935 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/ISelLowering/validateCCReservedRegs.cpp @@ -0,0 +1,11 @@ +void RISCVTargetLowering :: validateCCReservedRegs ( const SmallVectorImpl < std :: pair < llvm :: Register , llvm :: SDValue >> & Regs , MachineFunction & MF ) const { +auto * CA = dyn_cast < ConstantSDNode > ( Ptr ) ; +if ( ! CA ) { +return true ; +unsigned Addr = CA -> getZExtValue ( ) ; +return true ; +std :: string ErrMsg ; +raw_string_ostream O ( ErrMsg ) ; +if ( DebugLoc DL = dl . getDebugLoc ( ) ) { +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53cc2835a41ac58f713da3322777b6baeda2bb12 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/InstructionSelector.cpp @@ -0,0 +1,9 @@ +RISCVInstructionSelector::RISCVInstructionSelector(const RISCVTargetMachine &TM, const RISCVSubtarget &STI,const RISCVRegisterBankInfo &RBI) : InstructionSelector(), STI(STI), TII(*STI.getInstrInfo()), TRI(*STI.getRegisterInfo()), RBI(RBI), +#define GET_GLOBALISEL_PREDICATES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_PREDICATES_INIT +#define GET_GLOBALISEL_TEMPORARIES_INIT +#include "RISCVGenGlobalISel.inc" +#undef GET_GLOBALISEL_TEMPORARIES_INIT +{ +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ede3ab8f53f444fa23593c2acad51ad21bc8f27 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/createInstructionSelector.cpp @@ -0,0 +1,3 @@ +InstructionSelector * createRISCVInstructionSelector ( const RISCVTargetMachine & TM , RISCVSubtarget & Subtarget , RISCVRegisterBankInfo & RBI ) { +return new RISCVInstructionSelector ( TM , Subtarget , RBI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/getName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/getName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..740b6f1fbb4a3afc4ded45f1aa79d0fb35ce8a43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/getName.cpp @@ -0,0 +1,3 @@ +static const char * getName ( ) { +return DEBUG_TYPE ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/select.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce42c15be2bbe5d8c30dbf51033ebd0ae9508f5b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/InstructionSelector/select.cpp @@ -0,0 +1,9 @@ +bool RISCVInstructionSelector :: select ( MachineInstr & I ) { +if ( ! isPreISelGenericOpcode ( I . getOpcode ( ) ) ) { +return true ; +} +if ( selectImpl ( I , * CoverageInfo ) ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e79f38b38db881cf83b95d2eded06d891975f42d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/LegalizeInfo/LegalizerInfo.cpp @@ -0,0 +1,3 @@ +RISCVLegalizerInfo :: RISCVLegalizerInfo ( const RISCVSubtarget & ST ) { +computeTables ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7c5990a18b07e178c2bbb5817ccee060a72bfb7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerMachineInstrToMCInst.cpp @@ -0,0 +1,13 @@ +void llvm :: LowerMachineInstrToMCInst ( const MachineInstr * MI , MCInst & OutMI , const AsmPrinter & AP ) { +OutMI . setOpcode ( MI -> getOpcode ( ) ) ; +for ( const MachineOperand & MO : MI -> operands ( ) ) { +MCOperand MCOp ; +if ( MCOp . isValid ( ) ) { +OutMI . addOperand ( LowerOperand ( MI , MO , AP ) ) ; +} +LowerMachineOperandToMCOperand ( MO , MCOp , AP ) ; +if ( LowerMachineOperandToMCOperand ( MO , MCOp , AP ) ) { +OutMI . addOperand ( MCOp ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13385ff94e4c86b6a86a73070083bfcdc93e6b0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerMachineOperandToMCOperand.cpp @@ -0,0 +1,41 @@ +bool llvm :: LowerRISCVMachineOperandToMCOperand ( const MachineOperand & MO , MCOperand & MCOp , const AsmPrinter & AP ) { +if ( MO . getType ( ) == MachineOperand :: MO_ConstantPoolIndex ) { +MCOp = lowerSymbolOperand ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_JumpTableIndex ) { +MCOp = lowerSymbolOperand ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_Register ) { +if ( MO . isImplicit ( ) ) { +return false ; +} +MCOp = MCOperand :: createReg ( MO . getReg ( ) ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_Immediate ) { +MCOp = MCOperand :: createImm ( MO . getImm ( ) ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_RegisterMask ) { +return false ; +} +if ( MO . getType ( ) == MachineOperand :: MO_MachineBasicBlock ) { +MCOp = lowerSymbolOperand ( MO , MO . getMBB ( ) -> getSymbol ( ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_GlobalAddress ) { +MCOp = lowerSymbolOperand ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_BlockAddress ) { +MCOp = lowerSymbolOperand ( MO , AP . GetBlockAddressSymbol ( MO . getBlockAddress ( ) ) , AP ) ; +return true ; +} +if ( MO . getType ( ) == MachineOperand :: MO_ExternalSymbol ) { +MCOp = lowerSymbolOperand ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP ) ; +return true ; +} +report_fatal_error ( "LowerRISCVMachineInstrToMCInst: unknown operand type" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..91628062dcaa99768620b4effc89b2a9e86f7c71 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/RISCV/Selection/MCInstLower/lowerSymbolOperand.cpp @@ -0,0 +1,65 @@ +static MCOperand lowerSymbolOperand ( const MachineOperand & MO , MCSymbol * Sym , const AsmPrinter & AP ) { +MCContext & Ctx = AP . OutContext ; +const MCExpr * Expr = nullptr ; +Expr = MCSymbolRefExpr :: create ( Sym , MCSymbolRefExpr :: VK_RISCV_None , Ctx ) ; +if ( ! MO . isJTI ( ) ) { +if ( ! MO . isMBB ( ) ) { +if ( MO . getOffset ( ) ) { +Expr = MCBinaryExpr :: createAdd ( Expr , MCConstantExpr :: create ( MO . getOffset ( ) , Ctx ) , Ctx ) ; +} +} +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_CALL ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_CALL , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_PLT ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_CALL_PLT , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_LO ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_RISCV_LO , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_HI ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_PCREL_LO ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_PCREL_LO , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_PCREL_HI ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_PCREL_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_GOT_HI ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_GOT_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_TPREL_LO ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_TPREL_LO , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_TPREL_HI ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_TPREL_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_TPREL_ADD ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_TPREL_ADD , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_TLS_GOT_HI ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_TLS_GOT_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_TLS_GD_HI ) { +Expr = RISCVMCExpr :: create ( Expr , RISCVMCExpr :: VK_TLS_GD_HI , Ctx ) ; +return MCOperand :: createExpr ( Expr ) ; +} +if ( MO . getTargetFlags ( ) == RISCVII :: MO_None ) { +return MCOperand :: createExpr ( Expr ) ; +} +llvm_unreachable ( "Unknown target flag on GV operand" ) ; +return MCOperand :: createExpr ( Expr ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d88da16534f44c4bf8a6f6486a0a281cc7de0ede --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/RegisterInfo.cpp @@ -0,0 +1,2 @@ +XCoreRegisterInfo :: XCoreRegisterInfo ( const TargetInstrInfo & tii ) : XCoreGenRegisterInfo ( XCore :: LR ) , TII ( tii ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7ec4d140c0eeb48637efaac184d0ec9be3b26c2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/eliminateCallFramePseudoInstr.cpp @@ -0,0 +1,20 @@ +void XCoreRegisterInfo :: eliminateCallFramePseudoInstr ( MachineFunction & MF , MachineBasicBlock & MBB , MachineBasicBlock :: iterator I ) const { +if ( ! TFI -> hasReservedCallFrame ( MF ) ) { +MachineInstr * Old = I ; +uint64_t Amount = Old -> getOperand ( 0 ) . getImm ( ) ; +if ( Amount != 0 ) { +unsigned Align = MF . getTarget ( ) . getFrameInfo ( ) -> getStackAlignment ( ) ; +Amount = ( Amount + Align - 1 ) / Align * Align ; +MachineInstr * New ; +if ( Old -> getOpcode ( ) == XCore :: ADJUSTSTACKDOWN ) { +New = BuildMI ( MF , Old -> getDebugLoc ( ) , TII . get ( XCore :: LDA ) , XCore :: R30 ) . addImm ( - Amount ) . addReg ( XCore :: R30 ) ; +} +else { +assert ( Old -> getOpcode ( ) == XCore :: ADJUSTSTACKUP ) ; +New = BuildMI ( MF , Old -> getDebugLoc ( ) , TII . get ( XCore :: LDA ) , XCore :: R30 ) . addImm ( Amount ) . addReg ( XCore :: R30 ) ; +} +MBB . insert ( I , New ) ; +} +} +MBB . erase ( I ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73e769959121e6beb82a56e3ee5546877073e2e6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/eliminateFrameIndex.cpp @@ -0,0 +1,59 @@ +void XCoreRegisterInfo :: eliminateFrameIndex ( MachineBasicBlock :: iterator II , int SPAdj , unsigned FIOperandNum , RegScavenger * RS ) const { +assert ( SPAdj == 0 && "Unexpected non-zero SPAdj value" ) ; +MachineInstr & MI = * II ; +MachineFunction & MF = * MI . getParent ( ) -> getParent ( ) ; +MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; +DebugLoc DL = MI . getDebugLoc ( ) ; +const TargetFrameLowering * TFI = MF . getTarget ( ) . getFrameLowering ( ) ; +DebugLoc dl = MI . getDebugLoc ( ) ; +int FrameIndex = MI . getOperand ( FIOperandNum ) . getIndex ( ) ; +Register FrameReg ; +MI . getOperand ( FIOperandNum ) . ChangeToRegister ( XCore :: SP , false ) ; +int OffsetOperandNo = FIOperandNum + 1 ; +int Offset = getFrameLowering ( MF ) -> getFrameIndexReference ( MF , FrameIndex , FrameReg ) + MI . getOperand ( FIOperandNum + 1 ) . getImm ( ) ; +if ( ! isInt < 16 > ( Offset ) ) { +report_fatal_error ( "Frame offsets outside of the signed 16-bit range not supported" ) ; +} +MachineBasicBlock & MBB = * MI . getParent ( ) ; +const MachineFunction & MF = * MI . getParent ( ) -> getParent ( ) ; +const MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineOperand & FIOp = MI . getOperand ( FIOperandNum ) ; +int FI = FIOp . getIndex ( ) ; +unsigned ImmOpIdx = 0 ; +const TargetInstrInfo & TII = * MF . getSubtarget ( ) . getInstrInfo ( ) ; +unsigned DstReg = MI . getOperand ( 0 ) . getReg ( ) ; +if ( Offset == 0 ) { +MI . setDesc ( TII . get ( XCore :: MOV ) ) ; +MI . getOperand ( 1 ) . ChangeToRegister ( FrameReg , false ) ; +MI . RemoveOperand ( 2 ) ; +return ; +} +MI . setDesc ( TII . get ( XCore :: LI ) ) ; +MI . getOperand ( 1 ) . ChangeToImmediate ( Offset ) ; +MI . RemoveOperand ( 2 ) ; +II = II + 1 ; +MachineInstr * New = BuildMI ( MBB , II , DL , TII . get ( XCore :: ADD ) , DstReg ) . addReg ( DstReg , RegState :: Kill ) . addReg ( FrameReg ) ; +New -> getOperand ( 3 ) . setIsDead ( ) ; +return ; +ImmOpIdx = FIOperandNum + 1 ; +MI . getOperand ( FIOperandNum ) . ChangeToRegister ( FrameReg , false ) ; +MI . getOperand ( FIOperandNum ) . ChangeToRegister ( FrameReg , false ) ; +const XCoreTargetMachine & TM = ( const XCoreTargetMachine & ) MF . getTarget ( ) ; +const TargetFrameLowering * TFI = TM . getSubtargetImpl ( ) -> getFrameLowering ( ) ; +Offset = Offset + MFI . getStackSize ( ) - TFI -> getOffsetOfLocalArea ( ) + 1 ; +Offset = Offset + MI . getOperand ( OffsetOperandNo ) . getImm ( ) ; +MI . getOperand ( FIOperandNum ) . ChangeToRegister ( XCore :: A , false ) ; +uint64_t stackSize = MF . getFrameInfo ( ) -> getStackSize ( ) ; +int64_t spOffset = MF . getFrameInfo ( ) -> getObjectOffset ( frameIndex ) ; +Register FrameReg = getFrameRegister ( MF ) ; +bool FrameRegIsKill = true ; +int64_t Offset = spOffset + ( int64_t ) stackSize ; +MI . getOperand ( FIOperandNum ) . ChangeToRegister ( FrameReg , false , false , FrameRegIsKill ) ; +MI . getOperand ( FIOperandNum + 1 ) . ChangeToImmediate ( Offset ) ; +ImmOpIdx = FIOperandNum + 1 ; +MachineOperand & ImmOp = MI . getOperand ( ImmOpIdx ) ; +int Offset = MFI . getObjectOffset ( FI ) + MFI . getStackSize ( ) + ImmOp . getImm ( ) ; +FIOp . ChangeToRegister ( XCore :: SP , false ) ; +ImmOp . ChangeToImmediate ( Offset ) ; +MI . getOperand ( OffsetOperandNo ) . ChangeToImmediate ( Offset ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f445c17971760c9d19a9a39b66ef27b58d0cae0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getArgRegs.cpp @@ -0,0 +1,3 @@ +const unsigned * XCoreRegisterInfo :: getArgRegs ( const MachineFunction * MF ) { +return XCore_ArgRegs ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..acea69b5fcb341bd8b384e3e2a11f27d92b75f28 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getCalleeSavedRegs.cpp @@ -0,0 +1,11 @@ +const MCPhysReg * XCoreRegisterInfo :: getCalleeSavedRegs ( const MachineFunction * MF ) const { +static const MCPhysReg CalleeSavedRegs [ ] = { XCore :: S0 , XCore :: SRB , XCore :: SRO , XCore :: R21 , XCore :: R22 , XCore :: R23 , XCore :: R24 , XCore :: R25 , XCore :: R26 , XCore :: R27 , XCore :: R28 , XCore :: P1 , XCore :: P2 , XCore :: P3 , XCore :: P4 , XCore :: P5 , XCore :: P6 , XCore :: P7 , 0 +} +static const MCPhysReg CalleeSavedRegsFP [ ] = { +XCore :: S0 , XCore :: SRB , XCore :: SRO , XCore :: R21 , XCore :: R22 , XCore :: R23 , XCore :: R24 , XCore :: R25 , XCore :: R26 , XCore :: R27 , XCore :: R28 , XCore :: RFP , XCore :: P1 , XCore :: P2 , XCore :: P3 , XCore :: P4 , XCore :: P5 , XCore :: P6 , XCore :: P7 , 0 +} +if ( TFI -> hasFP ( * MF ) ) { +return CalleeSavedRegsFP ; +} +return CalleeSavedRegs ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eca2779042f9c273a3f2b2fd836b8b2bc58af2ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getFrameRegister.cpp @@ -0,0 +1,4 @@ +unsigned XCoreRegisterInfo :: getFrameRegister ( const MachineFunction & MF ) const { +const TargetFrameLowering * TFI = MF . getTarget ( ) . getFrameLowering ( ) ; +return TFI -> hasFP ( MF ) ? XCore :: R10 : XCore :: SP ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2810ef11097de7bb546a5fb0f494b93edbdd09ee --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getNumArgRegs.cpp @@ -0,0 +1,3 @@ +unsigned XCoreRegisterInfo :: getNumArgRegs ( const MachineFunction * MF ) { +return array_lengthof ( XCore_ArgRegs ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..463f1f6ffdcd722bc3738bf7e98ea53f16a7ba56 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/getReservedRegs.cpp @@ -0,0 +1,12 @@ +BitVector XCoreRegisterInfo :: getReservedRegs ( const MachineFunction & MF ) const { +BitVector Reserved ( getNumRegs ( ) ) ; +const TargetFrameLowering * TFI = MF . getTarget ( ) . getFrameLowering ( ) ; +Reserved . set ( XCore :: CP ) ; +Reserved . set ( XCore :: DP ) ; +Reserved . set ( XCore :: SP ) ; +Reserved . set ( XCore :: LR ) ; +if ( TFI -> hasFP ( MF ) ) { +Reserved . set ( XCore :: R10 ) ; +} +return Reserved ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4eb16cbde8c952e03e125a180394630277a1573e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/needsFrameMoves.cpp @@ -0,0 +1,3 @@ +bool XCoreRegisterInfo :: needsFrameMoves ( const MachineFunction & MF ) { +return MF . getMMI ( ) . hasDebugInfo ( ) || ! MF . getFunction ( ) -> doesNotThrow ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..954f2cf29e5e9da842ef31dabff9a23c3b2dc7f5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,2 @@ +void XCoreRegisterInfo :: processFunctionBeforeFrameFinalized ( MachineFunction & MF ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..335562ff4af74639356e7aa489d79f87f2c98486 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/requiresRegisterScavenging.cpp @@ -0,0 +1,4 @@ +bool XCoreRegisterInfo :: requiresRegisterScavenging ( const MachineFunction & MF ) const { +const TargetFrameLowering * TFI = MF . getTarget ( ) . getFrameLowering ( ) ; +return TFI -> hasFP ( MF ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71cfffecad0614ba3682b00a650ed2f000c79c52 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Allocation/RegisterInfo/useFPForScavengingIndex.cpp @@ -0,0 +1,3 @@ +bool XCoreRegisterInfo :: useFPForScavengingIndex ( const MachineFunction & MF ) const { +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dd93da5bd92577904a0dd3597fee7e4610c2afda --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/AsmPrinter.cpp @@ -0,0 +1,2 @@ +explicit XCoreAsmPrinter ( TargetMachine & TM , std :: unique_ptr < MCStreamer > Streamer ) : AsmPrinter ( TM , std :: move ( Streamer ) ) , STI ( TM . getMCSubtargetInfo ( ) ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp new file mode 100644 index 0000000000000000000000000000000000000000..646537c7ba0ebabd183f3e3882640114082c15b1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitBasicBlockStart.cpp @@ -0,0 +1,6 @@ +void XCoreAsmPrinter :: EmitBasicBlockStart ( const MachineBasicBlock * MBB ) { +AsmPrinter :: EmitBasicBlockStart ( MBB ) ; +if ( isLoopHeaderOfNoUnroll ( MBB ) ) { +OutStreamer -> EmitRawText ( StringRef ( "\t.pragma \"nounroll\";\n" ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..139244fe5d514fca3880519b95f099ce3fdb9536 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitConstantPool.cpp @@ -0,0 +1,39 @@ +void XCoreAsmPrinter :: EmitConstantPool ( ) { +const MachineConstantPool * MCP = MF -> getConstantPool ( ) ; +const std :: vector < MachineConstantPoolEntry > & CP = MCP -> getConstants ( ) ; +XCoreTargetMachine & TTM = static_cast < XCoreTargetMachine & > ( TM ) ; +const std :: vector < MachineConstantPoolEntry > & CP = TTM . MCP . getConstants ( ) ; +if ( CP . empty ( ) ) { +return ; +} +const MCSection * S = TM . getTargetLowering ( ) -> getObjFileLowering ( ) . getDataSection ( ) ; +OutStreamer . SwitchSection ( S ) ; +unsigned Offset = 0 ; +for ( unsigned i = 0 , e = CP . size ( ) ; i != e ; ++ i ) { +const MachineConstantPoolEntry & CPE = CP [ i ] ; +unsigned Align = CPE . getAlignment ( ) ; +unsigned AlignMask = CPE . getAlignment ( ) - 1 ; +unsigned NewOffset = ( Offset + AlignMask ) & ~ AlignMask ; +SmallString < 128 > Str ; +raw_svector_ostream OS ( Str ) ; +if ( NewOffset - Offset ) { +OS << "\tstring\tbyte[" << ( NewOffset - Offset ) << "] 0\n" ; +} +Type * Ty = CPE . getType ( ) ; +Offset = NewOffset + TM . getDataLayout ( ) -> getTypeAllocSize ( Ty ) ; +MCSymbol * Symbol = GetCPISymbol ( i ) ; +OS << "\t" << * Symbol ; +HackStreamer ( OutStreamer ) << OS . str ( ) ; +if ( CPE . isMachineConstantPoolEntry ( ) ) { +EmitMachineConstantPoolValue ( CPE . Val . MachineCPVal ) ; +} +else { +EmitGlobalConstant ( CPE . Val . ConstVal ) ; +} +} +MCTargetStreamer & TS = * OutStreamer -> getTargetStreamer ( ) ; +XCoreTargetStreamer & TTS = static_cast < XCoreTargetStreamer & > ( TS ) ; +while ( cpi < CP . size ( ) ) { +TTS . EmitConstantPoolEntry ( CP [ cpi ++ ] ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae94aa84a66f6aa550d808610ca711ed5a5ea19f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitFunctionEntryLabel.cpp @@ -0,0 +1,4 @@ +void XCoreAsmPrinter :: EmitFunctionEntryLabel ( ) { +getTargetStreamer ( ) . emitCCTopFunction ( CurrentFnSym -> getName ( ) ) ; +OutStreamer . EmitLabel ( CurrentFnSym ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55f99c669192b0d39dd552740110c1f2ee28c855 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitGlobalVariable.cpp @@ -0,0 +1,59 @@ +void XCoreAsmPrinter :: EmitGlobalVariable ( const GlobalVariable * GV ) { +XCoreoldTargetStreamer * TS = static_cast < XCoreoldTargetStreamer * > ( OutStreamer -> getTargetStreamer ( ) ) ; +if ( GV -> hasInitializer ( ) ) { +if ( EmitSpecialLLVMGlobal ( GV ) ) { +return ; +} +} +MCSymbol * GVSym = getSymbol ( GV ) ; +ValidateGV ( GV ) ; +if ( ! GV -> hasInitializer ( ) ) { +return ; +} +GVSym -> redefineIfPossible ( ) ; +if ( GVSym -> isDefined ( ) || GVSym -> isVariable ( ) ) { +report_fatal_error ( "symbol '" + Twine ( GVSym -> getName ( ) ) + "' is already defined" ) ; +} +SectionKind GVKind = TargetLoweringObjectFile :: getKindForGlobal ( GV , TM ) ; +MCSymbolXCOFF * GVSym = cast < MCSymbolXCOFF > ( getSymbol ( GV ) ) ; +GVSym -> setStorageClass ( TargetLoweringObjectFileXCOFF :: getStorageClassForGlobal ( GV ) ) ; +SectionKind GVKind = getObjFileLowering ( ) . getKindForGlobal ( GV , TM ) ; +if ( ( ! GVKind . isCommon ( ) && ! GVKind . isBSS ( ) && ! GVKind . isData ( ) && ! GVKind . isReadOnly ( ) ) || GVKind . isMergeable2ByteCString ( ) || GVKind . isMergeable4ByteCString ( ) ) { +report_fatal_error ( "Encountered a global variable kind that is not supported yet." ) ; +} +MCSectionXCOFF * Csect = cast < MCSectionXCOFF > ( getObjFileLowering ( ) . SectionForGlobal ( GV , GVKind , TM ) ) ; +OutStreamer -> SwitchSection ( Csect ) ; +GVSym -> setContainingCsect ( Csect ) ; +uint64_t Size = DL . getTypeAllocSize ( GV -> getType ( ) -> getElementType ( ) ) ; +unsigned Align = DL . getPreferredAlignment ( GV ) ; +MCSection * TheSection = getObjFileLowering ( ) . SectionForGlobal ( GV , GVKind , TM ) ; +OutStreamer -> SwitchSection ( TheSection ) ; +TS -> emitAlign ( Align ) ; +if ( ! GV -> hasLocalLinkage ( ) ) { +TS -> emitGlobal ( GVSym ) ; +} +OutStreamer -> EmitLabel ( GVSym ) ; +if ( GVKind . isBSS ( ) ) { +TS -> emitBlock ( Size ) ; +} +else { +EmitGlobalConstant ( DL , GV -> getInitializer ( ) ) ; +} +OutStreamer -> AddBlankLine ( ) ; +if ( GVKind . isCommon ( ) || GVKind . isBSSLocal ( ) ) { +unsigned Align = GV -> getAlignment ( ) ? GV -> getAlignment ( ) : DL . getPreferredAlignment ( GV ) ; +uint64_t Size = DL . getTypeAllocSize ( GV -> getType ( ) -> getElementType ( ) ) ; +if ( GVKind . isBSSLocal ( ) ) { +OutStreamer -> EmitXCOFFLocalCommonSymbol ( GVSym , Size , Csect -> getQualNameSymbol ( ) , Align ) ; +} +else { +OutStreamer -> EmitCommonSymbol ( Csect -> getQualNameSymbol ( ) , Size , Align ) ; +} +return ; +} +MCSymbol * EmittedInitSym = GVSym ; +EmitLinkage ( GV , EmittedInitSym ) ; +EmitAlignment ( getGVAlignment ( GV , DL ) , GV ) ; +OutStreamer -> EmitLabel ( EmittedInitSym ) ; +EmitGlobalConstant ( GV -> getParent ( ) -> getDataLayout ( ) , GV -> getInitializer ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..004518d3a34b37dc936a06180b807467d95ac1ba --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/EmitInstruction.cpp @@ -0,0 +1,8 @@ +void XCoreAsmPrinter :: EmitInstruction ( const MachineInstr * MI ) { +if ( emitPseudoExpansionLowering ( * OutStreamer , MI ) ) { +return ; +} +MCInst TmpInst ; +LowerXCoreMachineInstrToMCInst ( MI , TmpInst , * this ) ; +EmitToStreamer ( * OutStreamer , TmpInst ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..03682e4d98193184051e9da282205d3a5b88bccb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/LLVMInitializeAsmPrinter.cpp @@ -0,0 +1,3 @@ +extern "C" void LLVMInitializeXCoreAsmPrinter ( ) { +RegisterAsmPrinter < XCoreAsmPrinter > X ( TheXCoreTarget ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84bc0aa01286f2894d901814c9a2e97ba1082a11 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintAsmMemoryOperand.cpp @@ -0,0 +1,10 @@ +bool XCoreAsmPrinter :: PrintAsmMemoryOperand ( const MachineInstr * MI , unsigned OpNo , unsigned AsmVariant , const char * ExtraCode , raw_ostream & O ) { +if ( ExtraCode && ExtraCode [ 0 ] ) { +return true ; +} +printOperand ( MI , OpNo , O ) ; +O << "[" ; +printMemOperand ( MI , OpNo + 1 , O ) ; +O << "]" ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e191b5b9bb8540b7cd27df8b9014274632cdc090 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintAsmOperand.cpp @@ -0,0 +1,4 @@ +bool XCoreAsmPrinter :: PrintAsmOperand ( const MachineInstr * MI , unsigned OpNo , unsigned AsmVariant , const char * ExtraCode , raw_ostream & O ) { +printOperand ( MI , OpNo , O ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e798c77bd033d1bd212b5e2f19537b10c5004d25 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/PrintSpecial.cpp @@ -0,0 +1,9 @@ +void XCoreAsmPrinter :: PrintSpecial ( const MCInst * MI , raw_ostream & O , const char * Code ) const { +assert ( strcmp ( Code , "arguments" ) == 0 ) ; +for ( unsigned i = 0 ; i < MI -> getNumOperands ( ) - 1 ; i ++ ) { +if ( i != 0 ) { +O << ", " ; +} +O << "$r" << i << "|0" ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3385972429238a323a320cdb856d0704d230df97 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/emitEndOfAsmFile.cpp @@ -0,0 +1,9 @@ +void XCoreAsmPrinter :: EmitEndOfAsmFile ( Module & M ) { +if ( TM . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +CTS . finishAttributeSection ( ) ; +} +const TargetLoweringObjectFile & TLOF = getObjFileLowering ( ) ; +OutStreamer . SwitchSection ( TLOF . getTextSection ( ) ) ; +MCSymbol * EndOfTextLabel = OutContext . GetOrCreateSymbol ( StringRef ( END_OF_TEXT_LABEL_NAME ) ) ; +OutStreamer . EmitLabel ( EndOfTextLabel ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ecf63e6d4eb303d919b132a9dbe9a1d178c67ae6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/emitStartOfAsmFile.cpp @@ -0,0 +1,11 @@ +void XCoreAsmPrinter :: emitStartOfAsmFile ( Module & M ) { +OutStreamer -> emitAssemblerFlag ( MCAF_SyntaxUnified ) ; +if ( TM . getTargetTriple ( ) . isOSBinFormatELF ( ) ) { +emitAttributes ( ) ; +} +if ( ! M . getModuleInlineAsm ( ) . empty ( ) ) { +if ( TM . getTargetTriple ( ) . isThumb ( ) ) { +OutStreamer -> emitAssemblerFlag ( MCAF_Code16 ) ; +} +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a36959e91a44efe2736ac596ef85e6434ec0ebb2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getAnalysisUsage.cpp @@ -0,0 +1,5 @@ +void getAnalysisUsage ( AnalysisUsage & AU ) const { +AsmPrinter :: getAnalysisUsage ( AU ) ; +AU . setPreservesAll ( ) ; +AU . addRequired < XCoreMetadata > ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e42f1915bc314f1e46b9e3f922bb6641cff1e576 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getDebugValueLocation.cpp @@ -0,0 +1,5 @@ +MachineLocation XCoreAsmPrinter :: getDebugValueLocation ( const MachineInstr * MI ) const { +assert ( MI -> getNumOperands ( ) == 4 && "Invalid no. of machine operands!" ) ; +assert ( MI -> getOperand ( 0 ) . isReg ( ) && MI -> getOperand ( 1 ) . isImm ( ) && "Unexpected MachineOperand types" ) ; +return MachineLocation ( MI -> getOperand ( 0 ) . getReg ( ) , MI -> getOperand ( 1 ) . getImm ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c490a54e1033bf81ca115ff9b2c92baaab5c27eb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char * getPassName ( ) const { +return "XCore Assembly Printer" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb986ae09b05db3f8831a28c30479259a8e98bd9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printInlineJT.cpp @@ -0,0 +1,3 @@ +void XCoreInstPrinter :: printInlineJT ( const MCInst * MI , int opNum , raw_ostream & O ) { +report_fatal_error ( "can't handle InlineJT" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp new file mode 100644 index 0000000000000000000000000000000000000000..49746db2084d79f13571e6e08a87aef93ef16900 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printInlineJT32.cpp @@ -0,0 +1,3 @@ +void XCoreInstPrinter :: printInlineJT32 ( const MCInst * MI , int opNum , raw_ostream & O ) { +report_fatal_error ( "can't handle InlineJT32" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9c9961adae27fc891e610d6d5dc25f3c69e06618 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printMemOperand.cpp @@ -0,0 +1,8 @@ +void XCoreAsmPrinter :: printMemOperand ( const MachineInstr * MI , int opNum , raw_ostream & O ) { +printOperand ( MI , opNum , O ) ; +if ( MI -> getOperand ( opNum + 1 ) . isImm ( ) && MI -> getOperand ( opNum + 1 ) . getImm ( ) == 0 ) { +return ; +} +O << "+" ; +printOperand ( MI , opNum + 1 , O ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48732184388ab36467b63ab680a5035085b996e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/printOperand.cpp @@ -0,0 +1,36 @@ +void XCoreAsmPrinter :: printOperand ( const MachineInstr * MI , int OpNo , raw_ostream & O ) { +const MachineOperand & MO = MI -> getOperand ( OpNo ) ; +if ( MO . getType ( ) == MachineOperand :: MO_Register ) { +O << getRegisterName ( MO . getReg ( ) ) ; +return ; +} +if ( MO . getType ( ) == MachineOperand :: MO_Immediate ) { +O << MO . getImm ( ) ; +return ; +} +if ( MO . getType ( ) == MachineOperand :: MO_MachineBasicBlock ) { +O << * MO . getMBB ( ) -> getSymbol ( ) ; +return ; +} +if ( MO . getType ( ) == MachineOperand :: MO_GlobalAddress ) { +O << * Mang -> getSymbol ( MO . getGlobal ( ) ) ; +return ; +} +if ( MO . getType ( ) == MachineOperand :: MO_ConstantPoolIndex ) { +O << MAI -> getPrivateGlobalPrefix ( ) << "CPI" << getFunctionNumber ( ) << '_' << MO . getIndex ( ) ; +return ; +} +if ( MO . getType ( ) == MachineOperand :: MO_BlockAddress ) { +O << * GetBlockAddressSymbol ( MO . getBlockAddress ( ) ) ; +return ; +} +if ( MO . getType ( ) == MachineOperand :: MO_ExternalSymbol ) { +O << MO . getSymbolName ( ) ; +return ; +} +if ( MO . getType ( ) == MachineOperand :: MO_JumpTableIndex ) { +O << MAI -> getPrivateGlobalPrefix ( ) << "JTI" << getFunctionNumber ( ) << '_' << MO . getIndex ( ) ; +return ; +} +llvm_unreachable ( "not implemented" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64a11fc15b9f52e7d1a279d4e95b2835c0be318f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/runOnMachineFunction.cpp @@ -0,0 +1,9 @@ +bool XCoreAsmPrinter :: runOnMachineFunction ( MachineFunction & MF ) { +NewSTI . setFeatureBits ( MF . getSubtarget ( ) . getFeatureBits ( ) ) ; +if ( MF . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +EmitInterruptVectorSection ( MF ) ; +} +SetupMachineFunction ( MF ) ; +emitFunctionBody ( ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4bf49ae92475fdf2da730d2fc6fbb1ea9cb22ed --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Assembler/AsmPrinter/~AsmPrinter.cpp @@ -0,0 +1,2 @@ +virtual ~ XCoreAsmPrinter ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47b0f74da6093d80f1bbdafd1655b350c859be60 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/AsmInfo/MCAsmInfo.cpp @@ -0,0 +1,13 @@ +XCoreMCAsmInfo :: XCoreMCAsmInfo ( const Target & T , StringRef TT ) { +SupportsDebugInformation = true ; +Data16bitsDirective = "\t.short\t" ; +Data32bitsDirective = "\t.long\t" ; +Data64bitsDirective = 0 ; +ZeroDirective = "\t.space\t" ; +CommentString = "#" ; +PrivateGlobalPrefix = ".L" ; +AscizDirective = ".asciiz" ; +WeakRefDirective = "\t.weak\t" ; +HasLEB128 = true ; +ExceptionsType = DwarfCFI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ad4572016a583d0f24654bf95af0ecf9e8b0d648 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/LLVMInitializeTargetMC.cpp @@ -0,0 +1,7 @@ +extern "C" void LLVMInitializeXCoreTargetMC ( ) { +RegisterMCAsmInfoFn X ( TheXCoreTarget , createXCoreMCAsmInfo ) ; +TargetRegistry :: RegisterMCCodeGenInfo ( TheXCoreTarget , createXCoreMCCodeGenInfo ) ; +TargetRegistry :: RegisterMCInstrInfo ( TheXCoreTarget , createXCoreMCInstrInfo ) ; +TargetRegistry :: RegisterMCRegInfo ( TheXCoreTarget , createXCoreMCRegisterInfo ) ; +TargetRegistry :: RegisterMCSubtargetInfo ( TheXCoreTarget , createXCoreMCSubtargetInfo ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..388448d5287007b849d2c7a23ea67c715351fbb0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCAsmInfo.cpp @@ -0,0 +1,7 @@ +static MCAsmInfo * createXCoreMCAsmInfo ( const Target & T , StringRef TT ) { +MCAsmInfo * MAI = new XCoreMCAsmInfo ( T , TT ) ; +MachineLocation Dst ( MachineLocation :: VirtualFP ) ; +MachineLocation Src ( XCore :: SP , 0 ) ; +MAI -> addInitialFrameState ( 0 , Dst , Src ) ; +return MAI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0985d539f262eb70ca3380939802b7702529fefa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCCodeGenInfo.cpp @@ -0,0 +1,5 @@ +static MCCodeGenInfo * createXCoreMCCodeGenInfo ( StringRef TT , Reloc :: Model RM , CodeModel :: Model CM ) { +MCCodeGenInfo * X = new MCCodeGenInfo ( ) ; +X -> InitMCCodeGenInfo ( RM , CM ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..30f512b8abfda27774b209bd765850933fe57777 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCInstrInfo.cpp @@ -0,0 +1,6 @@ +static MCInstrInfo * createXCoreMCInstrInfo ( ) { +MCInstrInfo * X ; +X = new MCInstrInfo ( ) ; +InitXCoreMCInstrInfo ( X ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4605684aeb841213588d65e8c49b7ad2705ab35 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCRegisterInfo.cpp @@ -0,0 +1,6 @@ +static MCRegisterInfo * createXCoreMCRegisterInfo ( StringRef TT ) { +MCRegisterInfo * X ; +X = new MCRegisterInfo ( ) ; +InitXCoreMCRegisterInfo ( X , XCore :: LR ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d5c7b7b1c5b2f674b0401f93d5b65270a156864a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Emission/MCTargetDesc/createMCSubtargetInfo.cpp @@ -0,0 +1,5 @@ +static MCSubtargetInfo * createXCoreMCSubtargetInfo ( StringRef TT , StringRef CPU , StringRef FS ) { +MCSubtargetInfo * X = new MCSubtargetInfo ( ) ; +InitXCoreMCSubtargetInfo ( X , TT , CPU , FS ) ; +return X ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fd1aec54bc0a12717d7bc9255f0e37890b35c0d5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/FTAOElim.cpp @@ -0,0 +1,2 @@ +XCoreFTAOElim ( ) : MachineFunctionPass ( ID ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f7a1a1415db832540fb6c850d4cf6ede91113354 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/XCoreFTAOElim.cpp @@ -0,0 +1,2 @@ +XCoreFTAOElim() : MachineFunctionPass(ID) { +} diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e674677a492ef74b6ecc159279c6380d10670764 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createXCoreFrameToArgsOffsetEliminationPass ( ) { +return new XCoreFTAOElim ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..674a4a0c4f862aed107d0cc5af311e52cde84d2d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char * getPassName ( ) const { +return "XCore FRAME_TO_ARGS_OFFSET Elimination" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b844f69d52c1bd25558a02de518e585c45b3a909 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/FrameToArgsOffsetElim/runOnMachineFunction.cpp @@ -0,0 +1,11 @@ +bool XCoreFTAOElim :: runOnMachineFunction ( MachineFunction & MF ) { +if ( skipFunction ( MF . getFunction ( ) ) ) { +} +bool Changed = false ; +TII = ST . getInstrInfo ( ) ; +TRI = ST . getRegisterInfo ( ) ; +for ( MachineBasicBlock & MBB : MF ) { +Changed = Changed | runOnMachineBasicBlock ( MBB ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7421d0e8d323058a7484b27aac82ca54ff0ae98 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/LoopMetadataLowering.cpp @@ -0,0 +1,3 @@ +XCoreLoopMetadataLowering ( ) : FunctionPass ( ID ) { +initializeXCoreLoopMetadataLowering ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4818b614f669dce7b448540635b53b27e91f287 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createXCoreLoopMetadataLowering ( ) { +return new XCoreLoopMetadataLowering ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b17340c848fe3a53f69c28a88af8297dfa812c69 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/getAnalysisUsage.cpp @@ -0,0 +1,3 @@ +virtual void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . setPreservesAll ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6809fc1d47f6a5f1b6fcb81fca52f1f0286c64ba --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/runOnFunction.cpp @@ -0,0 +1,54 @@ +bool XCoreLoopMetadataLowering :: runOnFunction ( Function & F ) { +LI = & getAnalysis < LoopInfoWrapperPass > ( ) . getLoopInfo ( ) ; +SE = & getAnalysis < ScalarEvolution > ( ) ; +DT = & getAnalysis < DominatorTreeWrapperPass > ( ) . getDomTree ( ) ; +DL = & F . getParent ( ) -> getDataLayout ( ) ; +auto * TLIP = getAnalysisIfAvailable < TargetLibraryInfoWrapperPass > ( ) ; +LibInfo = TLIP ? & TLIP -> getTLI ( ) : nullptr ; +bool MadeChange = false ; +for ( LoopInfo :: iterator I = LI -> begin ( ) , E = LI -> end ( ) ; I != E ; ++ I ) { +Loop * L = * I ; +if ( ! L -> getParentLoop ( ) ) { +MadeChange |= convertToCTRLoop ( L ) ; +} +} +return MadeChange ; +if ( Func . isDeclaration ( ) ) { +} +F = & Func ; +IRB = new IRBuilder < > ( Func . getContext ( ) ) ; +AggrConsts . clear ( ) ; +AggrStores . clear ( ) ; +IRB -> SetInsertPoint ( & Func . getEntryBlock ( ) . front ( ) ) ; +for ( auto & GV : Func . getParent ( ) -> globals ( ) ) { +processGlobalValue ( GV ) ; +} +SmallVector < Instruction * > Worklist ; +for ( auto & I : instructions ( Func ) ) { +Worklist . push_back ( & I ) ; +} +for ( auto & I : Worklist ) { +insertAssignTypeIntrs ( I ) ; +} +for ( auto * I : Worklist ) { +TrackConstants = true ; +if ( ! I -> getType ( ) -> isVoidTy ( ) || isa < StoreInst > ( I ) ) { +IRB -> SetInsertPoint ( I -> getNextNode ( ) ) ; +} +I = visit ( * I ) ; +processInstrAfterVisit ( I ) ; +} +bool functionModified = false ; +Function :: iterator I = function . begin ( ) ; +TerminatorInst * firstTerminatorInst = ( I ++ ) -> getTerminator ( ) ; +for ( Function :: iterator E = function . end ( ) ; I != E ; ++ I ) { +for ( BasicBlock :: iterator BI = I -> begin ( ) , BE = I -> end ( ) ; BI != BE ; ) { +AllocaInst * allocaInst = dyn_cast < AllocaInst > ( BI ++ ) ; +if ( allocaInst && isa < ConstantInt > ( allocaInst -> getArraySize ( ) ) ) { +allocaInst -> moveBefore ( firstTerminatorInst ) ; +functionModified = true ; +} +} +} +return functionModified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f46339f5ca9ecc44f0d7eb2d23ef8b7a88dbc7b4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/LoopMetadataLowering/~LoopMetadataLowering.cpp @@ -0,0 +1,2 @@ +~ XCoreLoopMetadataLowering ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp new file mode 100644 index 0000000000000000000000000000000000000000..efe6f5308673e7ed46d8a73f05c50339143ac667 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/SimpleBranchOpt.cpp @@ -0,0 +1,2 @@ +XCoreSimpleBranchOpt ( ) : MachineFunctionPass ( ID ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83ca9d40821520b3692953036fb1e7f765668297 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createXCoreSimpleBranchOptPass ( ) { +return new XCoreSimpleBranchOpt ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcb4a6ee09d8ff4258f1addd18dc8db54dbfed69 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char * getPassName ( ) const { +return "XCore branch to trap optimization" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c551026b23954b356f067b683b6bdf35ed69989 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/SimpleBranchOpt/runOnMachineFunction.cpp @@ -0,0 +1,11 @@ +bool XCoreSimpleBranchOpt :: runOnMachineFunction ( MachineFunction & MF ) { +if ( skipFunction ( MF . getFunction ( ) ) ) { +} +bool Changed = false ; +TII = ST . getInstrInfo ( ) ; +TRI = ST . getRegisterInfo ( ) ; +for ( MachineBasicBlock & MBB : MF ) { +Changed = Changed | runOnMachineBasicBlock ( MBB ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7ab4f4a003cb411608071e8e6b27c088992d296a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/StackAnalysisPrepare.cpp @@ -0,0 +1,3 @@ +XCoreStackAnalysisPrepare ( ) : FunctionPass ( ID ) { +initializeXCoreStackAnalysisPrepare ( * PassRegistry :: getPassRegistry ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aef589bbad9818c07b357e30fdd1d1d886cf9b44 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createXCoreStackAnalysisPrepare ( ) { +return new XCoreStackAnalysisPrepare ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b17340c848fe3a53f69c28a88af8297dfa812c69 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/getAnalysisUsage.cpp @@ -0,0 +1,3 @@ +virtual void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . setPreservesAll ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3e4adbf95e2c73ac447e1a3e9bac84b8573bd203 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/runOnFunction.cpp @@ -0,0 +1,55 @@ +bool XCoreStackAnalysisPrepare :: runOnFunction ( Function & F ) { +LI = & getAnalysis < LoopInfoWrapperPass > ( ) . getLoopInfo ( ) ; +SE = & getAnalysis < ScalarEvolution > ( ) ; +DT = & getAnalysis < DominatorTreeWrapperPass > ( ) . getDomTree ( ) ; +DL = & F . getParent ( ) -> getDataLayout ( ) ; +auto * TLIP = getAnalysisIfAvailable < TargetLibraryInfoWrapperPass > ( ) ; +LibInfo = TLIP ? & TLIP -> getTLI ( ) : nullptr ; +bool MadeChange = false ; +for ( LoopInfo :: iterator I = LI -> begin ( ) , E = LI -> end ( ) ; I != E ; ++ I ) { +Loop * L = * I ; +if ( ! L -> getParentLoop ( ) ) { +MadeChange |= convertToCTRLoop ( L ) ; +} +} +return MadeChange ; +if ( Func . isDeclaration ( ) ) { +} +F = & Func ; +IRB = new IRBuilder < > ( Func . getContext ( ) ) ; +AggrConsts . clear ( ) ; +AggrStores . clear ( ) ; +IRB -> SetInsertPoint ( & Func . getEntryBlock ( ) . front ( ) ) ; +for ( auto & GV : Func . getParent ( ) -> globals ( ) ) { +processGlobalValue ( GV ) ; +} +preprocessCompositeConstants ( ) ; +SmallVector < Instruction * > Worklist ; +for ( auto & I : instructions ( Func ) ) { +Worklist . push_back ( & I ) ; +} +for ( auto & I : Worklist ) { +insertAssignTypeIntrs ( I ) ; +} +for ( auto * I : Worklist ) { +TrackConstants = true ; +if ( ! I -> getType ( ) -> isVoidTy ( ) || isa < StoreInst > ( I ) ) { +IRB -> SetInsertPoint ( I -> getNextNode ( ) ) ; +} +I = visit ( * I ) ; +processInstrAfterVisit ( I ) ; +} +bool functionModified = false ; +Function :: iterator I = function . begin ( ) ; +TerminatorInst * firstTerminatorInst = ( I ++ ) -> getTerminator ( ) ; +for ( Function :: iterator E = function . end ( ) ; I != E ; ++ I ) { +for ( BasicBlock :: iterator BI = I -> begin ( ) , BE = I -> end ( ) ; BI != BE ; ) { +AllocaInst * allocaInst = dyn_cast < AllocaInst > ( BI ++ ) ; +if ( allocaInst && isa < ConstantInt > ( allocaInst -> getArraySize ( ) ) ) { +allocaInst -> moveBefore ( firstTerminatorInst ) ; +functionModified = true ; +} +} +} +return functionModified ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp new file mode 100644 index 0000000000000000000000000000000000000000..760d3e9778423dcf52e0307e76681f7eccc494e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackAnalysisPrepare/~StackAnalysisPrepare.cpp @@ -0,0 +1,2 @@ +~ XCoreStackAnalysisPrepare ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/StackUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/StackUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c8653ae1ae6795005bbb51141811abd840e6e7ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/StackUsage.cpp @@ -0,0 +1,2 @@ +XCoreStackUsage ( ) : MachineFunctionPass ( ID ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/createPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/createPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..994c88fdbac2d9819220ab927ec224ae653a06b2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/createPass.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createXCoreStackUsage ( ) { +return new XCoreStackUsage ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7fc06dcdd4aa3d2e82b8eab2047bac7ec6bdcac --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/getAnalysisUsage.cpp @@ -0,0 +1,4 @@ +virtual void getAnalysisUsage ( AnalysisUsage & AU ) const override { +AU . setPreservesAll ( ) ; +MachineFunctionPass :: getAnalysisUsage ( AU ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..554e6cf89e2baad3ba8ec8222a3bb84d1c5414fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/getPassName.cpp @@ -0,0 +1,3 @@ +const char * getPassName ( ) const { +return "Calculates XCore stack usage" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..17f0210a26f39d43e78d24a0056e8c135e48ca89 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Optimization/StackUsage/runOnMachineFunction.cpp @@ -0,0 +1,11 @@ +bool XCoreStackUsage :: runOnMachineFunction ( MachineFunction & MF ) { +if ( skipFunction ( MF . getFunction ( ) ) ) { +} +bool Changed = false ; +TII = ST . getInstrInfo ( ) ; +TRI = ST . getRegisterInfo ( ) ; +for ( MachineBasicBlock & MBB : MF ) { +Changed = Changed | runOnMachineBasicBlock ( MBB ) ; +} +return Changed ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf29225b942b976fb4867a778ab2c40dba66b9bd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetCondBranchFromCond.cpp @@ -0,0 +1,9 @@ +static inline unsigned GetCondBranchFromCond ( XCore :: CondCode BrOpc ) { +if ( BrOpc == XCore :: COND_TRUE ) { +return XCore :: BRFT_lru6 ; +} +if ( BrOpc == XCore :: COND_FALSE ) { +return XCore :: BRFF_lru6 ; +} +llvm_unreachable ( "Illegal condition code!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..164a9e54b9be1b9e098d4723c25438ad3cd1f0a0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetCondFromBranchOpc.cpp @@ -0,0 +1,27 @@ +static XCore :: CondCode GetCondFromBranchOpc ( unsigned CC ) { +if ( CC == XCore :: BRFT_ru6 ) { +return XCore :: COND_TRUE ; +} +if ( CC == XCore :: BRFT_lru6 ) { +return XCore :: COND_TRUE ; +} +if ( CC == XCore :: BRBT_ru6 ) { +return XCore :: COND_TRUE ; +} +if ( CC == XCore :: BRBT_lru6 ) { +return XCore :: COND_TRUE ; +} +if ( CC == XCore :: BRFF_ru6 ) { +return XCore :: COND_FALSE ; +} +if ( CC == XCore :: BRFF_lru6 ) { +return XCore :: COND_FALSE ; +} +if ( CC == XCore :: BRBF_ru6 ) { +return XCore :: COND_FALSE ; +} +if ( CC == XCore :: BRBF_lru6 ) { +return XCore :: COND_FALSE ; +} +return XCore :: COND_INVALID ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7395edfcc9e1b46a1a432ba5f204fe0d4a6b849e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetInstSizeInBytes.cpp @@ -0,0 +1,19 @@ +unsigned XCoreInstrInfo :: GetInstSizeInBytes ( const MachineInstr * MI ) const { +if ( MI -> getOpcode ( ) == XCore :: INLINEASM ) { +} +if ( Desc . getOpcode ( ) == XCore :: INLINEASM ) { +return 4 ; +} +if ( Desc . getOpcode ( ) == XCore :: BR_JT ) { +} +if ( Desc . getOpcode ( ) == XCore :: BR_JT32 ) { +return 0 ; +} +const MachineFunction * MF = MI -> getParent ( ) -> getParent ( ) ; +const XCoreTargetMachine & TM = static_cast < const XCoreTargetMachine & > ( MF -> getTarget ( ) ) ; +const TargetInstrInfo & TII = * TM . getSubtargetImpl ( ) -> getInstrInfo ( ) ; +return TII . getInlineAsmLength ( MI -> getOperand ( 0 ) . getSymbolName ( ) , * TM . getMCAsmInfo ( ) ) ; +const char * AsmStr = MI -> getOperand ( 0 ) . getSymbolName ( ) ; +return getInlineAsmLength ( AsmStr , * MF -> getTarget ( ) . getMCAsmInfo ( ) ) ; +llvm_unreachable ( "GetInstSizeInBytes()- Unable to determin insn size" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6279a2b94e29fcd32180d5713b862d3864ee6076 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/GetOppositeBranchCondition.cpp @@ -0,0 +1,9 @@ +static inline XCore :: CondCode GetOppositeBranchCondition ( XCore :: CondCode CC ) { +if ( CC == XCore :: COND_TRUE ) { +return XCore :: COND_FALSE ; +} +if ( CC == XCore :: COND_FALSE ) { +return XCore :: COND_TRUE ; +} +llvm_unreachable ( "Illegal condition code!" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b262e5e2a3ac07071cc2b5b2928e8d79aed25a58 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/InstrInfo.cpp @@ -0,0 +1,2 @@ +XCoreInstrInfo :: XCoreInstrInfo ( ) : XCoreGenInstrInfo ( XCore :: ADJCALLSTACKDOWN , XCore :: ADJCALLSTACKUP ) , RI ( * this ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2f9c9d24a4f4eb4c122e24f977599703c33a1ae7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRF.cpp @@ -0,0 +1,15 @@ +static inline bool IsBRF ( unsigned BrOpc ) { +if ( BrOpc == XCore :: BRFF_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRFF_lru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBF_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBF_lru6 ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..077f623f95c359ce8cfd63c09083633a9996666d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRT.cpp @@ -0,0 +1,15 @@ +static inline bool IsBRT ( unsigned BrOpc ) { +if ( BrOpc == XCore :: BRFT_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRFT_lru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBT_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBT_lru6 ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp new file mode 100644 index 0000000000000000000000000000000000000000..014b3c19d6a4c3fa55c1ac412150e3cf11d36e7c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBRU.cpp @@ -0,0 +1,15 @@ +static inline bool IsBRU ( unsigned BrOpc ) { +if ( BrOpc == XCore :: BRFU_u6 ) { +return true ; +} +if ( BrOpc == XCore :: BRFU_lu6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBU_u6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBU_lu6 ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e83480f67fa0232eeb79b7dabc31fdf31d0e9788 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsBR_JT.cpp @@ -0,0 +1,9 @@ +static inline bool IsBR_JT ( unsigned BrOpc ) { +if ( BrOpc == XCore :: BR_JT ) { +return true ; +} +if ( BrOpc == XCore :: BR_JT32 ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b19ce91e2acd70a67d5f778c9465a42479044990 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/IsCondBranch.cpp @@ -0,0 +1,27 @@ +static inline bool IsCondBranch ( unsigned BrOpc ) { +if ( BrOpc == XCore :: BRFF_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRFF_lru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBF_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBF_lru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRFT_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRFT_lru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBT_ru6 ) { +return true ; +} +if ( BrOpc == XCore :: BRBT_lru6 ) { +return true ; +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3c5f86e6abc6a303ebb2cbec8a22f275806c439 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/analyzeBranch.cpp @@ -0,0 +1,60 @@ +bool XCoreInstrInfo :: analyzeBranch ( MachineBasicBlock & MBB , MachineBasicBlock * & TBB , MachineBasicBlock * & FBB , SmallVectorImpl < MachineOperand > & Cond , bool AllowModify ) const { +TBB = nullptr ; +FBB = nullptr ; +Cond . clear ( ) ; +MachineBasicBlock :: iterator I = MBB . getLastNonDebugInstr ( ) ; +if ( I == MBB . end ( ) ) { +return false ; +} +if ( ! isUnpredicatedTerminator ( * I ) ) { +return false ; +} +MachineBasicBlock :: iterator FirstUncondOrIndirectBr = MBB . end ( ) ; +int NumTerminators = 0 ; +for ( auto J = I . getReverse ( ) ; J != MBB . rend ( ) && isUnpredicatedTerminator ( * J ) ; J ++ ) { +NumTerminators = NumTerminators + 1 ; +if ( J -> getDesc ( ) . isUnconditionalBranch ( ) ) { +FirstUncondOrIndirectBr = J . getReverse ( ) ; +} +if ( J -> getDesc ( ) . isIndirectBranch ( ) ) { +FirstUncondOrIndirectBr = J . getReverse ( ) ; +} +} +if ( AllowModify ) { +if ( FirstUncondOrIndirectBr != MBB . end ( ) ) { +for ( ; std :: next ( FirstUncondOrIndirectBr ) != MBB . end ( ) ; ) { +std :: next ( FirstUncondOrIndirectBr ) -> eraseFromParent ( ) ; +NumTerminators = NumTerminators - 1 ; +} +I = FirstUncondOrIndirectBr ; +} +} +if ( I -> getDesc ( ) . isIndirectBranch ( ) ) { +return true ; +} +if ( NumTerminators > 2 ) { +return true ; +} +if ( NumTerminators == 1 ) { +if ( I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +TBB = getBranchDestBlock ( * I ) ; +return false ; +} +} +if ( NumTerminators == 1 ) { +if ( I -> getDesc ( ) . isConditionalBranch ( ) ) { +parseCondBranch ( * I , TBB , Cond ) ; +return false ; +} +} +if ( NumTerminators == 2 ) { +if ( I -> getDesc ( ) . isUnconditionalBranch ( ) ) { +if ( std :: prev ( I ) -> getDesc ( ) . isConditionalBranch ( ) ) { +parseCondBranch ( * std :: prev ( I ) , TBB , Cond ) ; +FBB = getBranchDestBlock ( * I ) ; +return false ; +} +} +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..70a993e7825d4f2005107da609d2e3875a356796 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/copyPhysReg.cpp @@ -0,0 +1,10 @@ +void XCoreInstrInfo :: copyPhysReg ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MBBI , const DebugLoc & DL , MCRegister DstReg , MCRegister SrcReg , bool KillSrc ) const { +return ; +return ; +return ; +return ; +return ; +return ; +return ; +llvm_unreachable ( "Impossible reg-to-reg copy" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc2b3766c4a5f82c66bcb0d347e633c09201a4fe --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/emitFrameIndexDebugValue.cpp @@ -0,0 +1,4 @@ +MachineInstr * XCoreInstrInfo :: emitFrameIndexDebugValue ( MachineFunction & MF , int FrameIx , uint64_t Offset , const MDNode * MDPtr , DebugLoc DL ) const { +MachineInstrBuilder MIB = BuildMI ( MF , DL , get ( XCore :: DBG_VALUE ) ) . addFrameIndex ( FrameIx ) . addImm ( 0 ) . addImm ( Offset ) . addMetadata ( MDPtr ) ; +return & * MIB ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5dd97f1459e046e69c38462cd9a2b7b4ae8857c5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/enum CondCode.cpp @@ -0,0 +1,5 @@ +enum CondCode { +COND_TRUE , +COND_FALSE , +COND_INVALID +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..273524c4ea3d3a5e3ac4fcff3c6c0becdbbf6473 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +virtual const TargetRegisterInfo & getRegisterInfo ( ) const { +return RI ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..89ea654f9829f392c8edd731834b85f1c7d3597f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/insertBranch.cpp @@ -0,0 +1,24 @@ +unsigned XCoreInstrInfo :: insertBranch ( MachineBasicBlock & MBB , MachineBasicBlock * TBB , MachineBasicBlock * FBB , ArrayRef < MachineOperand > Cond , const DebugLoc & DL , int * BytesAdded ) const { +if ( BytesAdded ) { +* BytesAdded = 0 ; +} +assert ( TBB && "insertBranch must not be told to insert a fallthrough" ) ; +if ( Cond . empty ( ) ) { +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( MI ) ; +} +return 1 ; +} +unsigned Opc = Cond [ 0 ] . getImm ( ) ; +MachineInstr & CondMI = * BuildMI ( & MBB , DL , get ( Opc ) ) . add ( Cond [ 1 ] ) . add ( Cond [ 2 ] ) . addMBB ( TBB ) ; +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( CondMI ) ; +} +if ( ! FBB ) { +return 1 ; +} +if ( BytesAdded ) { +* BytesAdded = * BytesAdded + getInstSizeInBytes ( MI ) ; +} +return 2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ce625cf9e19368b8eb4abe097e5052016342b0c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isLoadFromStackSlot.cpp @@ -0,0 +1,10 @@ +unsigned XCoreInstrInfo :: isLoadFromStackSlot ( const MachineInstr * MI , int & FrameIndex ) const { +int Opcode = MI -> getOpcode ( ) ; +if ( Opcode == XCore :: LDWFI ) { +if ( ( MI -> getOperand ( 1 ) . isFI ( ) ) && ( MI -> getOperand ( 2 ) . isImm ( ) ) && ( isZeroImm ( MI -> getOperand ( 2 ) ) ) ) { +FrameIndex = MI -> getOperand ( 1 ) . getIndex ( ) ; +return MI -> getOperand ( 0 ) . getReg ( ) ; +} +} +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88ce456dd52273ea10fbdb82850e5b850a09da01 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isStoreToStackSlot.cpp @@ -0,0 +1,10 @@ +unsigned XCoreInstrInfo :: isStoreToStackSlot ( const MachineInstr * MI , int & FrameIndex ) const { +int Opcode = MI -> getOpcode ( ) ; +if ( Opcode == XCore :: STWFI ) { +if ( ( MI -> getOperand ( 1 ) . isFI ( ) ) && ( MI -> getOperand ( 2 ) . isImm ( ) ) && ( isZeroImm ( MI -> getOperand ( 2 ) ) ) ) { +FrameIndex = MI -> getOperand ( 1 ) . getIndex ( ) ; +return MI -> getOperand ( 0 ) . getReg ( ) ; +} +} +return 0 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..557cd477a3d53d5b8819e3be72a2517f713d37b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/isZeroImm.cpp @@ -0,0 +1,8 @@ +static bool isZeroImm ( const MachineOperand & Op ) { +if ( Op . isImm ( ) ) { +if ( Op . getImm ( ) == 0 ) { +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8ff9f844d9918f72707c955d7d41f6a5dcf2588 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/loadRegFromStackSlot.cpp @@ -0,0 +1,7 @@ +void XCoreInstrInfo :: loadRegFromStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , unsigned DestReg , int FrameIndex , const TargetRegisterClass * RC , const TargetRegisterInfo * TRI ) const { +DebugLoc DL ; +if ( MI != MBB . end ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +BuildMI ( MBB , MI , DL , get ( XCore :: LDWFI ) , DestReg ) . addFrameIndex ( FrameIndex ) . addImm ( 0 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fff550bd86d9aaf2e448b6d2fc4f24734b09ad15 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/removeBranch.cpp @@ -0,0 +1,27 @@ +unsigned XCoreInstrInfo :: RemoveBranch ( MachineBasicBlock & MBB ) const { +MachineBasicBlock :: iterator I = MBB . end ( ) ; +if ( I == MBB . begin ( ) ) { +return 0 ; +} +-- I ; +while ( I -> isDebugValue ( ) ) { +if ( I == MBB . begin ( ) ) { +return 0 ; +} +-- I ; +} +if ( ! IsBRU ( I -> getOpcode ( ) ) && ! IsCondBranch ( I -> getOpcode ( ) ) ) { +return 0 ; +} +I -> eraseFromParent ( ) ; +I = MBB . end ( ) ; +if ( I == MBB . begin ( ) ) { +return 1 ; +} +-- I ; +if ( ! IsCondBranch ( I -> getOpcode ( ) ) ) { +return 1 ; +} +I -> eraseFromParent ( ) ; +return 2 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef875ff424ec1b641d4b544513a3c44665ca45c9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/reverseBranchCondition.cpp @@ -0,0 +1,5 @@ +bool XCoreInstrInfo :: ReverseBranchCondition ( SmallVectorImpl < MachineOperand > & Cond ) const { +assert ( ( Cond . size ( ) == 2 ) && "Invalid XCore branch condition!" ) ; +Cond [ 0 ] . setImm ( GetOppositeBranchCondition ( ( XCore :: CondCode ) Cond [ 0 ] . getImm ( ) ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ab9903b7a8d239021fa9563f912d45ccfae18af6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/InstrInfo/storeRegToStackSlot.cpp @@ -0,0 +1,9 @@ +void XCoreInstrInfo :: storeRegToStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator I , unsigned SrcReg , bool isKill , int FrameIndex , const TargetRegisterClass * RC , const TargetRegisterInfo * TRI ) const { +DebugLoc DL ; +if ( I != MBB . end ( ) ) { +DL = I -> getDebugLoc ( ) ; +} +MachineFrameInfo * MFI = MBB . getParent ( ) -> getFrameInfo ( ) ; +MachineMemOperand * MMO = MBB . getParent ( ) -> getMachineMemOperand ( MachinePointerInfo :: getFixedStack ( FrameIndex ) , MachineMemOperand :: MOStore , MFI -> getObjectSize ( FrameIndex ) , MFI -> getObjectAlignment ( FrameIndex ) ) ; +BuildMI ( MBB , I , DL , get ( XCore :: STWFI ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIndex ) . addMemOperand ( MMO ) . addImm ( 0 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c8d75766004503c989d721a5da392f3d194ae7b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/Call.cpp @@ -0,0 +1,2 @@ +XCoreCall ( unsigned T ) : UsesLR ( false ) , LRSpillSlot ( 0 ) , FPSpillSlot ( 0 ) , VarArgsFrameIndex ( 0 ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..905bae2205f2d908b450455503422f584822a5f9 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/ExternalSymbolCall.cpp @@ -0,0 +1,2 @@ +XCoreExternalSymbolCall ( const char * S ) : UsesLR ( false ) , LRSpillSlot ( 0 ) , FPSpillSlot ( 0 ) , VarArgsFrameIndex ( 0 ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7ba722a059a85b677701346c0c7b66de1a9bf3a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionCall.cpp @@ -0,0 +1,2 @@ +XCoreFunctionCall ( const Function * F ) : UsesLR ( false ) , LRSpillSlot ( 0 ) , FPSpillSlot ( 0 ) , VarArgsFrameIndex ( 0 ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6164e57f433049649c56c56da6db72922fe8309c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo.cpp @@ -0,0 +1,2 @@ +XCoreFunctionInfo ( ) : UsesLR ( false ) , LRSpillSlot ( 0 ) , FPSpillSlot ( 0 ) , VarArgsFrameIndex ( 0 ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6e4ad3071bfb649c4034f9295593e4e7b66b806d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/FunctionInfo2.cpp @@ -0,0 +1,2 @@ +explicit XCoreFunctionInfo ( MachineFunction & MF ) : : UsesLR ( false ) , LRSpillSlot ( 0 ) , FPSpillSlot ( 0 ) , VarArgsFrameIndex ( 0 ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fe0f84bf161a4321ef596a87d0021c3142e769e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof1.cpp @@ -0,0 +1,3 @@ +static inline bool classof ( const XCoreCall * C ) { +return C -> getType ( ) == XCoreCall :: FunctionType ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9d44a18c07869ec317b993601a7c580fe0e9c36a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof2.cpp @@ -0,0 +1,3 @@ +static inline bool classof ( const XCoreFunctionCall * ) { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f29f95c285d2c9398b5102aeb9f84f872793569f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof3.cpp @@ -0,0 +1,3 @@ +static inline bool classof ( const XCoreCall * ) { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp new file mode 100644 index 0000000000000000000000000000000000000000..df6befaf4902d48c44d19f377b1645844cbc7c1d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof4.cpp @@ -0,0 +1,3 @@ +static inline bool classof ( const XCoreExternalSymbolCall * ) { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp new file mode 100644 index 0000000000000000000000000000000000000000..02b859bbdd6ee6a1f11e31379e9590aa2eb37a01 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/classof5.cpp @@ -0,0 +1,3 @@ +static inline bool classof ( const XCoreCall * C ) { +return C -> getType ( ) == XCoreCall :: ExternalSymbolType ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5adc8a97966212709ea643014afbdcae89ac93e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getCalls.cpp @@ -0,0 +1,3 @@ +const std :: vector < XCoreCall * > & getCalls ( ) const { +return Calls ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b2175ffa55a4f94e02bb3d6b4e36a9e825275af --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getFunction.cpp @@ -0,0 +1,3 @@ +const Function * getFunction ( ) { +return Fn ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10040359dcb8151760f1be80b1e42d610f95320f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getHasIndirectCalls.cpp @@ -0,0 +1,3 @@ +bool getHasIndirectCalls ( ) const { +return HasIndirectCalls ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc191945e861f35a42eeb1ee9ffb096452844787 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getSymbol.cpp @@ -0,0 +1,3 @@ +const char * getSymbol ( ) { +return Sym ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cfac2032277ab3b21123ab953fee67f2f0611c89 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getType.cpp @@ -0,0 +1,3 @@ +unsigned getType ( ) const { +return Type ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc86317bf4ffdb2157afe0cc9f496c3f8454b58d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/getVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +int getVarArgsFrameIndex ( ) const { +return VarArgsFrameIndex ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2404ad862713ec9f74e6b7a7aff202f4fa9a12cd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/setHasIndirectCalls.cpp @@ -0,0 +1,3 @@ +void setHasIndirectCalls ( bool val ) { +HasIndirectCalls = val ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66ec61362627179d015c191feff7e83b189ae468 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/setVarArgsFrameIndex.cpp @@ -0,0 +1,3 @@ +void setVarArgsFrameIndex ( int Index ) { +VarArgsFrameIndex = Index ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20b5ff310ae8e78377049130cf4afb646943c5a3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/MachineFunctionInfo/~FunctionInfo.cpp @@ -0,0 +1,2 @@ +XCoreFunctionInfo :: ~ XCoreFunctionInfo ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/Subtarget/Subtarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/Subtarget/Subtarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41d360e211aec39795fc6180c6bc08e5b2da087e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/Subtarget/Subtarget.cpp @@ -0,0 +1,2 @@ +XCoreSubtarget :: XCoreSubtarget ( const std :: string & TT , const std :: string & CPU , const std :: string & FS ) : XCoreGenSubtargetInfo ( TT , CPU , FS ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..795ccd137b02f392ebe86e79fdb3188d1b58e076 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetInfo/LLVMInitializeTargetInfo.cpp @@ -0,0 +1,3 @@ +extern "C" void LLVMInitializeXCoreTargetInfo ( ) { +RegisterTarget < Triple :: XCore > X ( TheXCoreTarget , "XCore" , "XCore" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82a072fb5c0fab266b2dd250c7853d1d5ca0abcb --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/LLVMInitializeTarget.cpp @@ -0,0 +1,3 @@ +extern "C" void LLVMInitializeXCoreTarget ( ) { +RegisterTargetMachine < XCoreTargetMachine > X ( TheXCoreTarget ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..623379f36af0910719bb487f320de7475c9de555 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/TargetMachine.cpp @@ -0,0 +1,2 @@ +XCoreTargetMachine :: XCoreTargetMachine ( const Target & T , StringRef TT , StringRef CPU , StringRef FS , Reloc :: Model RM , CodeModel :: Model CM ) : LLVMTargetMachine ( T , TT , CPU , FS , RM , CM ) , Subtarget ( TT , CPU , FS ) , DataLayout ( "e-p:32:32:32-a0:0:32-f32:32:32-f64:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-v64:32:32-v128:32:32-n32" ) , InstrInfo ( ) , FrameLowering ( Subtarget ) , TLInfo ( * this ) , TSInfo ( * this ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72c9d3f1aef44ff8567c25a81bde6577c599740e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addInstSelector.cpp @@ -0,0 +1,4 @@ +bool XCoreTargetMachine :: addInstSelector ( PassManagerBase & PM , CodeGenOpt :: Level OptLevel ) { +PM . add ( createXCoreISelDag ( * this , OptLevel ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f9db25d5b9de30dfb6e05e466bd1cccd07c86f11 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addPreEmitPass.cpp @@ -0,0 +1,8 @@ +bool XCoreTargetMachine :: addPreEmitPass ( PassManagerBase & PM , CodeGenOpt :: Level OptLevel ) { +PM . add ( createXCoreFrameToArgsOffsetEliminationPass ( ) ) ; +if ( OptLevel == 0 ) { +PM . add ( createXCoreSimpleBranchOptPass ( ) ) ; +} +PM . add ( createXCoreStackUsage ( ) ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..30cc704dc2c1fe9f5cc40948c3cfb1916bd23627 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/addPreISel.cpp @@ -0,0 +1,6 @@ +bool XCoreTargetMachine :: addPreISel ( PassManagerBase & PM , CodeGenOpt :: Level OptLevel ) { +PM . add ( createXCoreStackAnalysisPrepare ( ) ) ; +PM . add ( createXCoreLoopMetadataLowering ( ) ) ; +PM . add ( createXCoreLowerTwoStageResourceAllocPass ( ) ) ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1962f6fff4c722bb9a651c077e138d832639500d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getFrameLowering.cpp @@ -0,0 +1,3 @@ +virtual const XCoreFrameLowering * getFrameLowering ( ) const { +return & FrameLowering ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f82f9e350ed2843eb19a77d3415a863bbc4e24ad --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getInstrInfo.cpp @@ -0,0 +1,3 @@ +virtual const XCoreInstrInfo * getInstrInfo ( ) const { +return & InstrInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1896ceaecf72edecf383979445871297f1b9385e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getRegisterInfo.cpp @@ -0,0 +1,3 @@ +virtual const TargetRegisterInfo * getRegisterInfo ( ) const { +return & InstrInfo . getRegisterInfo ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0c37ade2906db50eb7e2f2122b7dbb74aa22ffce --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getSelectionDAGInfo.cpp @@ -0,0 +1,3 @@ +virtual const XCoreSelectionDAGInfo * getSelectionDAGInfo ( ) const { +return & TSInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe4e169d02e3ac16876b8051a5ea87f31d2e95c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getSubtargetImpl.cpp @@ -0,0 +1,3 @@ +virtual const XCoreSubtarget * getSubtargetImpl ( ) const { +return & Subtarget ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..695e32f1c08703020137c8d64952af28ebe0ce5b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getTargetData.cpp @@ -0,0 +1,3 @@ +virtual const TargetData * getTargetData ( ) const { +return & DataLayout ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4ff8036f06a6abca5675222a754c0a1ec54aed7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetMachine/getTargetLowering.cpp @@ -0,0 +1,3 @@ +virtual const XCoreTargetLowering * getTargetLowering ( ) const { +return & TLInfo ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57f9fcb8331119ee4f9b711d1dd6182f7b3f51b1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/Initialize.cpp @@ -0,0 +1,7 @@ +void XCoreELFTargetObjectFile :: Initialize ( MCContext & Ctx , const TargetMachine & TM ) { +TargetLoweringObjectFileELF :: Initialize ( Ctx , TM ) ; +InitializeELF ( TM . Options . UseInitArray ) ; +SmallDataSection = getContext ( ) . getELFSection ( ".sdata" , ELF :: SHT_PROGBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC ) ; +SmallBSSSection = getContext ( ) . getELFSection ( ".sbss" , ELF :: SHT_NOBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC ) ; +this -> TM = & static_cast < const XCoreTargetMachine & > ( TM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8a627cfc36fb8c0704138aba79d78b48de1b59d --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/SelectSectionForGlobal.cpp @@ -0,0 +1,13 @@ +MCSection * XCoreELFTargetObjectFile :: SelectSectionForGlobal ( const GlobalObject * GO , SectionKind Kind , const TargetMachine & TM ) const { +if ( Kind . isBSS ( ) ) { +if ( isGlobalInSmallSection ( GO , TM ) ) { +return SmallBSSSection ; +} +} +if ( Kind . isData ( ) ) { +if ( isGlobalInSmallSection ( GO , TM ) ) { +return SmallDataSection ; +} +} +return TargetLoweringObjectFileELF :: SelectSectionForGlobal ( GO , Kind , TM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3c1c2e504220d8bf69764050547cd07a02417df3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/getExplicitSectionGlobal.cpp @@ -0,0 +1,10 @@ +MCSection * XCoreTargetObjectFile :: getExplicitSectionGlobal ( const GlobalObject * GO , SectionKind Kind , const TargetMachine & TM ) const { +StringRef SectionName = GO -> getSection ( ) ; +if ( SectionName . startswith ( ".XCore.comment." ) ) { +SK = SectionKind :: getMetadata ( ) ; +} +if ( isExecuteOnlyFunction ( GO , SK , TM ) ) { +SK = SectionKind :: getExecuteOnly ( ) ; +} +return TargetLoweringObjectFileELF :: getExplicitSectionGlobal ( GO , SK , TM ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e0bf2601aabd729389669a020cea7bb96fe25ae --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Scheduling/TargetObjectFile/getSectionForConstant.cpp @@ -0,0 +1,6 @@ +MCSection * XCoreELFTargetObjectFile :: getSectionForConstant ( const DataLayout & DL , SectionKind Kind , const Constant * C , Align & Alignment ) const { +if ( isConstantInSmallSection ( DL , C ) ) { +return SmallDataSection ; +} +return TargetLoweringObjectFileELF :: getSectionForConstant ( DL , Kind , C , Alignment ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/FrameLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/FrameLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce843baf5e1b318d6b63e010ccfee99c4841a3fc --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/FrameLowering.cpp @@ -0,0 +1,2 @@ +XCoreFrameLowering :: XCoreFrameLowering ( const XCoreSubtarget & STI ) : TargetFrameLowering ( TargetFrameLowering :: StackGrowsDown , 4 , 0 ) , STI ( STI ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7bc32399cf47254a9d60e414ed4f48f8c305c25c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/emitEpilogue.cpp @@ -0,0 +1,42 @@ +void XCoreFrameLowering :: emitEpilogue ( MachineFunction & MF , MachineBasicBlock & MBB ) const { +const TargetInstrInfo & TII = * MF . getSubtarget ( ) . getInstrInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +XCoreMachineFunctionInfo * CFI = MF . getInfo < XCoreMachineFunctionInfo > ( ) ; +Register FPReg = getFPReg ( STI ) ; +Register SPReg = getSPReg ( STI ) ; +MachineBasicBlock :: iterator MBBI = MBB . end ( ) ; +DebugLoc DL ; +DL = MBBI -> getDebugLoc ( ) ; +if ( ! MBB . empty ( ) ) { +MBBI = MBB . getFirstTerminator ( ) ; +if ( MBBI == MBB . end ( ) ) { +MBBI = MBB . getLastNonDebugInstr ( ) ; +} +if ( ! MBBI -> isTerminator ( ) ) { +MBBI = std :: next ( MBBI ) ; +} +} +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +auto LastFrameDestroy = MBBI ; +if ( ! CSI . empty ( ) ) { +LastFrameDestroy = std :: prev ( MBBI , CSI . size ( ) ) ; +} +uint64_t StackSize = MFI . getStackSize ( ) ; +uint64_t ActualSize = CFI -> getCalleeSaveAreaSize ( ) + CFI -> getVarArgsSaveSize ( ) ; +if ( hasFP ( MF ) ) { +BuildMI ( MBB , LastFrameDestroy , DL , TII -> get ( TargetOpcode :: COPY ) , SPReg ) . addReg ( FPReg ) . setMIFlag ( MachineInstr :: NoFlags ) ; +} +if ( ! hasFP ( MF ) ) { +adjustReg ( MBB , LastFrameDestroy , DL , SPReg , SPReg , ( StackSize - ActualSize ) , MachineInstr :: FrameDestroy ) ; +} +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , ActualSize , MachineInstr :: FrameDestroy ) ; +if ( ! StackSize ) { +return ; +} +if ( materializeOffset ( MF , MBB , MBBI , ( unsigned ) StackSize ) ) { +BuildMI ( MBB , MBBI , DL , TII . get ( XCore :: ADDrr ) , XCore :: SP ) . addReg ( StackReg ) . addReg ( OffsetReg ) . setMIFlag ( MachineInstr :: FrameSetup ) ; +} +if ( ! materializeOffset ( MF , MBB , MBBI , ( unsigned ) StackSize ) ) { +BuildMI ( MBB , MBBI , DL , TII . get ( XCore :: ADDri ) , XCore :: SP ) . addReg ( StackReg ) . addImm ( StackSize ) . setMIFlag ( MachineInstr :: FrameSetup ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/emitPrologue.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/emitPrologue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbc884f66e605faabddee76c48f0dd67d2d3e9ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/emitPrologue.cpp @@ -0,0 +1,72 @@ +void XCoreFrameLowering :: emitPrologue ( MachineFunction & MF , MachineBasicBlock & MBB ) const { +const RegisterInfo * RI = STI . getRegisterInfo ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineFunctionInfo * CFI = MF . getInfo < MachineFunctionInfo > ( ) ; +Register SPReg = getSPReg ( STI ) ; +Register BPReg = getBPReg ( STI ) ; +const XCoreInstrInfo * TII = STI . getInstrInfo ( ) ; +MachineBasicBlock :: iterator MBBI = MBB . begin ( ) ; +const TargetRegisterInfo * TRI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; +const MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +DebugLoc DL ; +if ( MF . getFunction ( ) . hasFnAttribute ( "interrupt" ) ) { +} +determineFrameLayout ( MF ) ; +uint64_t StackSize = MFI . getStackSize ( ) ; +if ( StackSize == 0 ) { +if ( ! MFI . adjustsStack ( ) ) { +return ; +} +} +const auto & CSI = MFI . getCalleeSavedInfo ( ) ; +unsigned spillAreaSize = CFI -> getCalleeSaveAreaSize ( ) ; +uint64_t ActualSize = spillAreaSize + CFI -> getVarArgsSaveSize ( ) ; +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( ActualSize ) ) , MachineInstr :: NoFlags ) ; +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: cfiDefCfaOffset ( nullptr , ActualSize ) ) ; +std :: advance ( MBBI , CSI . size ( ) ) ; +for ( const auto & Entry : CSI ) { +int64_t Offset = MFI . getObjectOffset ( Entry . getFrameIdx ( ) ) ; +unsigned Num = TRI -> getRegSizeInBits ( Reg , MRI ) / 32 ; +for ( unsigned i = 0 ; i < Num ; i ++ ) { +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: createOffset ( nullptr , RI -> getDwarfRegNum ( Reg , true ) + i , Offset + i * 4 ) ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( TargetOpcode :: CFI_INSTRUCTION ) ) . addCFIIndex ( CFIIndex ) ; +} +} +if ( hasFP ( MF ) ) { +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: createDefCfaRegister ( nullptr , RI -> getDwarfRegNum ( FPReg , true ) ) ) ; +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( StackSize - ActualSize ) ) , MachineInstr :: NoFlags ) ; +const XCoreRegisterInfo * RI = STI . getRegisterInfo ( ) ; +if ( RI -> hasStackRealignment ( MF ) ) { +Align MaxAlignment = MFI . getMaxAlign ( ) ; +const XCoreInstrInfo * TII = STI . getInstrInfo ( ) ; +if ( isUInt < 12 > ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( TargetOpcode :: CFI_INSTRUCTION ) , SPReg ) . addReg ( SPReg ) . addImm ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ; +} +if ( ! STI . hasE2 ( ) ) { +unsigned ShiftAmount = Log2 ( MaxAlignment ) ; +Register VR = MF . getRegInfo ( ) . createVirtualRegister ( & XCore :: GPRRegClass ) ; +if ( ! STI . hasE2 ( ) ) { +Register VR = MF . getRegInfo ( ) . createVirtualRegister ( & XCore :: mGPRRegClass ) ; +} +} +if ( ! isUInt < 12 > ( ~ ( - ( int ) MaxAlignment . value ( ) ) ) ) { +unsigned ShiftAmount = Log2 ( MaxAlignment ) ; +Register VR = MF . getRegInfo ( ) . createVirtualRegister ( & XCore :: GPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( XCore::ANDI ) , SPReg ) . addReg ( VR ) . addImm ( ShiftAmount ) ; +if ( ! STI . hasE2 ( ) ) { +Register VR = MF . getRegInfo ( ) . createVirtualRegister ( & XCore :: mGPRRegClass ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( XCore :: ANDI ) , VR ) . addReg ( SPReg ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( XCore::SRLI ) , VR ) . addReg ( VR ) . addImm ( ShiftAmount ) ; +BuildMI ( MBB , MBBI , DL , TII -> get ( XCore :: SLLI ) , SPReg ) . addReg ( VR ) ; +} +} +} +if ( hasBP ( MF ) ) { +BuildMI ( MBB , MBBI , DL , TII -> get ( XCore::ADDI ) , BPReg ) . addReg ( SPReg ) ; +} +} +if ( ! hasFP ( MF ) ) { +adjustReg ( MBB , MBBI , DL , SPReg , SPReg , - ( static_cast < int64_t > ( StackSize - ActualSize ) ) , MachineInstr :: NoFlags ) ; +unsigned CFIIndex = MF . addFrameInst ( MCCFIInstruction :: cfiDefCfaOffset ( nullptr , MFI . getStackSize ( ) ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/hasFP.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/hasFP.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5614fb4b4b63e1357e33a1dbc086c7c68b8e52cf --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/hasFP.cpp @@ -0,0 +1,3 @@ +bool XCoreFrameLowering :: hasFP ( const MachineFunction & MF ) const { +return DisableFramePointerElim ( MF ) || MF . getFrameInfo ( ) -> hasVarSizedObjects ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc93b19f6dad24a71e00a98f45eebdfa0156155b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/isShrinkWrappingProfitable.cpp @@ -0,0 +1,3 @@ +bool XCoreFrameLowering :: isShrinkWrappingProfitable ( ) const { +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c0ec1fc615a4426f96098f20838b986f54627d97 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/processFunctionBeforeCalleeSavedScan.cpp @@ -0,0 +1,19 @@ +void XCoreFrameLowering :: processFunctionBeforeCalleeSavedScan ( MachineFunction & MF , RegScavenger * RS ) const { +MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; +const TargetRegisterClass * RC = & XCore :: R32CRegClass ; +RS -> setScavengingFrameIndex ( MFI -> CreateStackObject ( RC -> getSize ( ) , RC -> getAlignment ( ) , false ) ) ; +XCoreFunctionInfo * FI = MF . getInfo < XCoreFunctionInfo > ( ) ; +CallingConv :: ID CallConv = MF . getFunction ( ) -> getCallingConv ( ) ; +bool requiresRA = CallConv == CallingConv :: MBLAZE_INTR ; +if ( MFI -> adjustsStack ( ) || requiresRA ) { +MBlazeFI -> setRAStackOffset ( 0 ) ; +MFI -> CreateFixedObject ( 4 , 0 , true ) ; +} +if ( hasFP ( MF ) ) { +MBlazeFI -> setFPStackOffset ( 4 ) ; +MFI -> CreateFixedObject ( 4 , 4 , true ) ; +} +interruptFrameLayout ( MF ) ; +analyzeFrameIndexes ( MF ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8b12f196b62ec88d75099afd4f550eb656f8f683 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/processFunctionBeforeFrameFinalized.cpp @@ -0,0 +1,2 @@ +void XCoreFrameLowering :: processFunctionBeforeFrameFinalized ( MachineFunction & MF ) const { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10d7ffbeb9e337a5f782dcf7c42f619b91d5b559 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/restoreCalleeSavedRegisters.cpp @@ -0,0 +1,19 @@ +bool XCoreFrameLowering :: restoreCalleeSavedRegisters ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , MutableArrayRef < CalleeSavedInfo > CSI , const TargetRegisterInfo * TRI ) const { +if ( CSI . empty ( ) ) { +return true ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const TargetInstrInfo & TII = * MF -> getSubtarget ( ) . getInstrInfo ( ) ; +DebugLoc DL ; +if ( MI != MBB . end ( ) ) { +if ( ! MI -> isDebugInstr ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +} +for ( auto & CS : CSI ) { +Register Reg = CS . getReg ( ) ; +const TargetInstrInfo & TII = * MF -> getSubtarget ( ) . getInstrInfo ( ) ; +TII . loadRegFromStackSlot ( MBB , MI , Reg , CS . getFrameIdx ( ) , RC , TRI ) ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0943e166c7a184db8ed35147d9763849caa8149b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/spillCalleeSavedRegisters.cpp @@ -0,0 +1,73 @@ +bool XCoreFrameLowering :: spillCalleeSavedRegisters ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , ArrayRef < CalleeSavedInfo > CSI , const TargetRegisterInfo * TRI ) const { +if ( CSI . empty ( ) ) { +return false ; +} +DebugLoc DL ; +unsigned CalleeFrameSize = 0 ; +DebugLoc DL = MBB . findDebugLoc ( MI ) ; +DebugLoc dl ; +if ( MI != MBB . end ( ) ) { +DL = MI -> getDebugLoc ( ) ; +} +MachineFunction * MF = MBB . getParent ( ) ; +const TargetInstrInfo & TII = * MF -> getSubtarget ( ) . getInstrInfo ( ) ; +DebugLoc DL ; +if ( MI != MBB . end ( ) ) { +DL = MI -> getDebugLoc ( ) ; +if ( ! MI -> isDebugInstr ( ) ) { +} +} +MachineInstrBuilder MIB = BuildMI ( MBB , MI , DL , TII . get ( XCore :: tPUSH ) ) ; +AddDefaultPred ( MIB ) ; +MachineFunctionInfo * XCoreFI = MF . getInfo < MachineFunctionInfo > ( ) ; +MachineFunctionInfo * MFI = MF . getInfo < MachineFunctionInfo > ( ) ; +XCoreMachineFunctionInfo * MFI = MF . getInfo < XCoreMachineFunctionInfo > ( ) ; +MFI -> setCalleeSavedFrameSize ( CSI . size ( ) * 2 ) ; +MachineBasicBlock * EntryBlock = MF -> begin ( ) ; +for ( const CalleeSavedInfo & CS : CSI ) { +unsigned Reg = CS . getReg ( ) ; +if ( CS . isSpilledToReg ( ) ) { +BuildMI ( MBB , MBBI , DebugLoc ( ) , TII -> get ( TargetOpcode :: COPY ) , CS . getDstReg ( ) ) . addReg ( Reg , getKillRegState ( true ) ) ; +} +if ( ! CS . isSpilledToReg ( ) ) { +const TargetRegisterClass * RC = TRI -> getMinimalPhysRegClass ( Reg ) ; +const MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +TII -> storeRegToStackSlotCFI ( MBB , MBBI , Reg , ! IsLiveIn , CS . getFrameIdx ( ) , RC , TRI ) ; +} +MachineFunction * MF = MBB . getParent ( ) ; +if ( MF . getFrameInfo ( ) -> isReturnAddressTaken ( ) ) { +if ( MF . getRegInfo ( ) . isLiveIn ( Reg ) ) { +} +} +if ( isKill ) { +MBB . addLiveIn ( Reg ) ; +} +MIB . addReg ( Reg , getKillRegState ( isKill ) ) ; +bool IsNotLiveIn = ! MBB . isLiveIn ( Reg ) ; +if ( IsNotLiveIn ) { +MBB . addLiveIn ( Reg ) ; +} +CalleeFrameSize = CalleeFrameSize + 1 ; +MBB . addLiveIn ( Reg ) ; +bool IsRAAndRetAddrIsTaken = ( Reg == XCore :: LR ) && MF -> getFrameInfo ( ) . isReturnAddressTaken ( ) ; +bool IsRAAndRetAddrIsTaken = ( Reg == XCore :: RA || Reg == XCore :: RA_64 ) && MF -> getFrameInfo ( ) -> isReturnAddressTaken ( ) ; +bool IsRAAndRetAddrIsTaken = ( Reg == XCore :: L ) && MF -> getFrameInfo ( ) -> isReturnAddressTaken ( ) ; +if ( ! IsRAAndRetAddrIsTaken ) { +EntryBlock -> addLiveIn ( Reg ) ; +} +bool IsKill = ! IsRAAndRetAddrIsTaken ; +Register Reg = CS . getReg ( ) ; +const TargetRegisterClass * RC = TRI -> getMinimalPhysRegClass ( Reg ) ; +TII . storeRegToStackSlot ( * EntryBlock , MI , Reg , IsKill , CSI [ i ] . getFrameIdx ( ) , RC , TRI ) ; +TII . storeRegToStackSlot ( MBB , MI , Reg , true , CS . getFrameIdx ( ) , RC , TRI ) ; +BuildMI ( MBB , MI , dl , TII . get ( XCore :: PUSH16r ) ) . addReg ( Reg , RegState :: Kill ) ; +if ( ! MBB . isLiveIn ( Reg ) ) { +MBB . addLiveIn ( Reg ) ; +} +TII -> storeRegToStackSlot ( MBB , MBBI , Reg , true , CS . getFrameIdx ( ) , RC , TRI ) ; +} +MIB . setMIFlags ( MachineInstr :: FrameSetup ) ; +XCoreFI -> setCalleeSavedFrameSize ( CalleeFrameSize ) ; +MFI -> setCalleeSavedFrameSize ( CalleeFrameSize ) ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..54770bc352d2a56951a1340591d6fec7fa919cc5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/FrameLowering/stackSlotSize.cpp @@ -0,0 +1,3 @@ +static int stackSlotSize ( ) { +return 4 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c5090eff583501f0c50b3201a43af65d2517b874 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/DAGToDAGISel.cpp @@ -0,0 +1,2 @@ +XCoreDAGToDAGISel ( XCoreTargetMachine & TM , CodeGenOpt :: Level OptLevel ) : SelectionDAGISel ( TM , OptLevel ) , Lowering ( * TM . getTargetLowering ( ) ) , Subtarget ( * TM . getSubtargetImpl ( ) ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/Select.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/Select.cpp new file mode 100644 index 0000000000000000000000000000000000000000..459ce799c25ea386f4fa4e80d94ae074012ce619 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/Select.cpp @@ -0,0 +1,134 @@ +void XCoreDAGToDAGISel :: Select ( SDNode * Node ) { +unsigned Opcode = Node -> getOpcode ( ) ; +DEBUG ( dbgs ( ) << "Selecting: " ; Node -> dump ( CurDAG ) ; dbgs ( ) << '\n' ) ; +DebugLoc dl = Node -> getDebugLoc ( ) ; +DEBUG ( errs ( ) << "Selecting: " ; Node -> dump ( CurDAG ) ; errs ( ) << "\n" ) ; +if ( Node -> isMachineOpcode ( ) ) { +DEBUG ( dbgs ( ) << "== " ; Node -> dump ( CurDAG ) ; dbgs ( ) << '\n' ) ; +DEBUG ( errs ( ) << "== " ; Node -> dump ( CurDAG ) ; errs ( ) << "\n" ) ; +LLVM_DEBUG ( dbgs ( ) << "== " ; Node -> dump ( CurDAG ) ; dbgs ( ) << "\n" ) ; +Node -> setNodeId ( - 1 ) ; +LLVM_DEBUG ( errs ( ) << "== " ; Node -> dump ( CurDAG ) ; errs ( ) << "\n" ) ; +return ; +return NULL ; +} +EVT NodeTy = Node -> getValueType ( 0 ) ; +unsigned MultOpc ; +SDLoc Dl ( Node ) ; +unsigned Opcode = Node -> getOpcode ( ) ; +bool IsSelected = false ; +DebugLoc Empty ; +const DebugLoc & DL = Node -> getDebugLoc ( ) ; +if ( DL != Empty ) { +} +if ( DL == Empty ) { +} +errs ( ) << "Unsupport signed division for DAG: " ; +Node -> print ( errs ( ) , CurDAG ) ; +errs ( ) << "Please convert to unsigned div/mod.\n" ; +break ; +MultOpc = ( Opcode == ISD :: MULHU ? XCore :: MULTu : XCore :: MULT ) ; +return SelectMULT ( Node , MultOpc , dl , NodeTy , false , true ) . second ; +IsSelected = selectAddCarry ( Node ) ; +if ( Opcode == ISD :: ADD ) { +unsigned IntNo = cast < ConstantSDNode > ( Node -> getOperand ( 1 ) ) -> getZExtValue ( ) ; +SDLoc DL ( Node ) ; +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( XCore :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +if ( IntNo == ISD :: Constant ) { +SDLoc DL ( Node ) ; +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( XCore :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +} +if ( IntNo == ISD :: FrameIndex ) { +SDLoc DL ( Node ) ; +SDValue Chain = Node -> getOperand ( 0 ) ; +SDValue Skb = Node -> getOperand ( 2 ) ; +SDValue N3 = Node -> getOperand ( 3 ) ; +SDValue R6Reg = CurDAG -> getRegister ( XCore :: R6 , MVT :: i64 ) ; +Chain = CurDAG -> getCopyToReg ( Chain , DL , R6Reg , Skb , SDValue ( ) ) ; +Node = CurDAG -> UpdateNodeOperands ( Node , Chain , N1 , R6Reg , N3 ) ; +break ; +} +MultOpc = ( Opcode == ISD :: MULHU ? XCore :: MULTu : XCore :: MULT ) ; +return SelectMULT ( Node , MultOpc , dl , NodeTy , false , true ) . second ; +IsSelected = selectSubCarry ( Node ) ; +} +MVT XLenVT = MVT :: i32 ; +SDLoc DL ( Node ) ; +EVT VT = Node -> getValueType ( 0 ) ; +if ( Opcode == ISD :: INTRINSIC_W_CHAIN ) { +int FI = cast < FrameIndexSDNode > ( Node ) -> getIndex ( ) ; +EVT VT = Node -> getValueType ( 0 ) ; +SDValue TFI = CurDAG -> getTargetFrameIndex ( FI , VT ) ; +unsigned Opc = XCore :: MOV_rr ; +if ( Node -> hasOneUse ( ) ) { +CurDAG -> SelectNodeTo ( Node , Opc , VT , TFI ) ; +return ; +} +ReplaceNode ( Node , CurDAG -> getMachineNode ( Opc , SDLoc ( Node ) , VT , TFI ) ) ; +return ; +return getGlobalBaseReg ( ) ; +Register GP = Subtarget -> getInstrInfo ( ) -> getGlobalBaseReg ( * MF ) ; +ReplaceNode ( Node , CurDAG -> getRegister ( GP , Node -> getValueType ( 0 ) ) . getNode ( ) ) ; +IsSelected = true ; +auto ConstNode = cast < ConstantSDNode > ( Node ) ; +ConstantSDNode * ConstNode = cast < ConstantSDNode > ( Node ) ; +if ( ConstNode -> isNullValue ( ) ) { +SDValue New = CurDAG -> getCopyFromReg ( CurDAG -> getEntryNode ( ) , SDLoc ( Node ) , XCore :: R0 , MVT :: i32 ) ; +return ReplaceNode ( Node , New . getNode ( ) ) ; +SDValue New = CurDAG -> getCopyFromReg ( CurDAG -> getEntryNode ( ) , SDLoc ( Node ) , XCore :: ZERO , XLenVT ) ; +ReplaceNode ( Node , New . getNode ( ) ) ; +return ; +} +if ( ConstNode -> isAllOnesValue ( ) ) { +SDValue New = CurDAG -> getCopyFromReg ( CurDAG -> getEntryNode ( ) , SDLoc ( Node ) , XCore :: R1 , MVT :: i32 ) ; +return ReplaceNode ( Node , New . getNode ( ) ) ; +} +int64_t Imm = ConstNode -> getSExtValue ( ) ; +if ( XLenVT == MVT :: i32 ) { +ReplaceNode ( Node , selectImm ( CurDAG , SDLoc ( Node ) , Imm , XLenVT ) ) ; +return ; +} +break ; +} +SDLoc dl ( Node ) ; +int FI = cast < FrameIndexSDNode > ( Node ) -> getIndex ( ) ; +SDValue TFI = CurDAG -> getTargetFrameIndex ( FI , MVT :: i32 ) ; +if ( Node -> hasOneUse ( ) ) { +CurDAG -> SelectNodeTo ( Node , XCore :: ADDri , MVT :: i32 , TFI , CurDAG -> getTargetConstant ( 0 , dl , MVT :: i32 ) ) ; +return ; +} +ReplaceNode ( Node , CurDAG -> getMachineNode ( XCore :: ADDri , dl , MVT :: i32 , TFI , CurDAG -> getTargetConstant ( 0 , dl , MVT :: i32 ) ) ) ; +return ; +SelectCode ( Node ) ; +if ( Opcode == ISD :: INTRINSIC_VOID ) { +const ConstantSDNode * CN = dyn_cast < ConstantSDNode > ( Node ) ; +unsigned Size = CN -> getValueSizeInBits ( 0 ) ; +if ( Size == 32 ) { +break ; +} +int FI = cast < FrameIndexSDNode > ( Node ) -> getIndex ( ) ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( Subtarget -> hasE2 ( ) ? XCore :: ADDI32 : XCore :: ADDI16XZ , Dl , MVT :: i32 , TFI , Imm ) ) ; +IsSelected = true ; +selectFrameIndex ( Node ) ; +ReplaceNode ( Node , CurDAG -> getMachineNode ( XCore :: ADDI , DL , VT , TFI , Imm ) ) ; +return ; +} +SDNode * ResNode = SelectCode ( Node ) ; +return ResNode ; +if ( IsSelected ) { +return ; +} +SelectCode ( Node ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..afcac9b3f35d705e7831a56e71d84e7622b02c76 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRcpii.cpp @@ -0,0 +1,16 @@ +bool XCoreDAGToDAGISel :: SelectADDRcpii ( SDValue Addr , SDValue & Base , SDValue & Offset ) { +if ( Addr . getOpcode ( ) == XCoreISD :: CPRelativeWrapper ) { +Base = Addr . getOperand ( 0 ) ; +Offset = CurDAG -> getTargetConstant ( 0 , MVT :: i32 ) ; +return true ; +} +if ( Addr . getOpcode ( ) == ISD :: ADD ) { +ConstantSDNode * CN = 0 ; +if ( ( Addr . getOperand ( 0 ) . getOpcode ( ) == XCoreISD :: CPRelativeWrapper ) && ( CN = dyn_cast < ConstantSDNode > ( Addr . getOperand ( 1 ) ) ) && ( CN -> getSExtValue ( ) % 4 == 0 && CN -> getSExtValue ( ) >= 0 ) ) { +Base = Addr . getOperand ( 0 ) . getOperand ( 0 ) ; +Offset = CurDAG -> getTargetConstant ( CN -> getSExtValue ( ) , MVT :: i32 ) ; +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be39c1d301621ed75b3043f7217c4d1557b935c8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRdpii.cpp @@ -0,0 +1,16 @@ +bool XCoreDAGToDAGISel :: SelectADDRdpii ( SDValue Addr , SDValue & Base , SDValue & Offset ) { +if ( Addr . getOpcode ( ) == XCoreISD :: DPRelativeWrapper ) { +Base = Addr . getOperand ( 0 ) ; +Offset = CurDAG -> getTargetConstant ( 0 , MVT :: i32 ) ; +return true ; +} +if ( Addr . getOpcode ( ) == ISD :: ADD ) { +ConstantSDNode * CN = 0 ; +if ( ( Addr . getOperand ( 0 ) . getOpcode ( ) == XCoreISD :: DPRelativeWrapper ) && ( CN = dyn_cast < ConstantSDNode > ( Addr . getOperand ( 1 ) ) ) && ( CN -> getSExtValue ( ) % 4 == 0 && CN -> getSExtValue ( ) >= 0 ) ) { +Base = Addr . getOperand ( 0 ) . getOperand ( 0 ) ; +Offset = CurDAG -> getTargetConstant ( CN -> getSExtValue ( ) , MVT :: i32 ) ; +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b48277fc9524b0c8cb90b3c06c1238bf196f8df --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectADDRspii.cpp @@ -0,0 +1,17 @@ +bool XCoreDAGToDAGISel :: SelectADDRspii ( SDValue Addr , SDValue & Base , SDValue & Offset ) { +FrameIndexSDNode * FIN = 0 ; +if ( ( FIN = dyn_cast < FrameIndexSDNode > ( Addr ) ) ) { +Base = CurDAG -> getTargetFrameIndex ( FIN -> getIndex ( ) , MVT :: i32 ) ; +Offset = CurDAG -> getTargetConstant ( 0 , MVT :: i32 ) ; +return true ; +} +if ( Addr . getOpcode ( ) == ISD :: ADD ) { +ConstantSDNode * CN = 0 ; +if ( ( FIN = dyn_cast < FrameIndexSDNode > ( Addr . getOperand ( 0 ) ) ) && ( CN = dyn_cast < ConstantSDNode > ( Addr . getOperand ( 1 ) ) ) && ( CN -> getSExtValue ( ) % 4 == 0 && CN -> getSExtValue ( ) >= 0 ) ) { +Base = CurDAG -> getTargetFrameIndex ( FIN -> getIndex ( ) , MVT :: i32 ) ; +Offset = CurDAG -> getTargetConstant ( CN -> getSExtValue ( ) , MVT :: i32 ) ; +return true ; +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..255a2293fa271fdaa539e7bd3a7d0468d31e2559 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/SelectInlineAsmMemoryOperand.cpp @@ -0,0 +1,8 @@ +bool XCoreDAGToDAGISel :: SelectInlineAsmMemoryOperand ( const SDValue & Op , unsigned ConstraintID , std :: vector < SDValue > & OutOps ) { +OutOps . push_back ( Op ) ; +OutOps . push_back ( Op ) ; +return false ; +OutOps . push_back ( Op ) ; +return false ; +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..039e4aeeb2b838fa97154902c09cfacb254098ac --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/createISelDag.cpp @@ -0,0 +1,3 @@ +FunctionPass * llvm :: createXCoreISelDag ( XCoreTargetMachine & TM , CodeGenOpt :: Level OptLevel ) { +return new XCoreDAGToDAGISel ( TM , OptLevel ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..29e43cde1da4a67936e90f1283dd0dc5ce79b865 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/getI32Imm.cpp @@ -0,0 +1,3 @@ +inline SDValue getI32Imm ( unsigned Imm ) { +return CurDAG -> getTargetConstant ( Imm , MVT :: i32 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fcbdce0cff47e27816c1db6da52831c5eecd1483 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/getPassName.cpp @@ -0,0 +1,3 @@ +virtual const char * getPassName ( ) const { +return "XCore DAG->DAG Pattern Instruction Selection" ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7701596e14fadf5b7483924b3a14459634d08ee --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/immBitp.cpp @@ -0,0 +1,42 @@ +inline bool immBitp ( SDNode * inN ) const { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ! CN ) { +return false ; +} +bool IsExact ; +APSInt IntVal ( 65 , true ) ; +CN -> getValueAPF ( ) . convertToInteger ( IntVal , APFloat :: rmTowardZero , & IsExact ) ; +if ( ! IsExact ) { +return false ; +} +if ( ! IntVal . isPowerOf2 ( ) ) { +return false ; +} +unsigned FBits = IntVal . logBase2 ( ) ; +return false ; +if ( FBits > RegWidth ) { +return false ; +} +FixedPos = CurDAG -> getTargetConstant ( 64 - FBits , MVT :: i32 ) ; +return true ; +SDLoc dl ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +Reg = CurDAG -> getRegister ( XCore :: NoRegister , MVT :: i1 ) ; +Inv = CurDAG -> getTargetConstant ( ( Imm -> getConstantIntValue ( ) -> isZero ( ) ) ? 1 : 0 , dl , MVT :: i1 ) ; +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +Reg = N ; +Inv = CurDAG -> getTargetConstant ( 0 , dl , MVT :: i1 ) ; +} +if ( FrameIndexSDNode * FIN = dyn_cast < FrameIndexSDNode > ( N ) ) { +R1 = CurDAG -> getTargetFrameIndex ( FIN -> getIndex ( ) , MVT :: i32 ) ; +return true ; +} +if ( ConstantSDNode * CN = dyn_cast < ConstantSDNode > ( N ) ) { +if ( v ) { +if ( ! ( v & ( v - 1 ) ) ) { +} +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d87916eb96d39e97815ce7bcb172f627fc08d0a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelDAGToDAG/immMskBitp.cpp @@ -0,0 +1,42 @@ +inline bool immMskBitp ( SDNode * inN ) const { +const ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; +if ( ! CN ) { +return false ; +} +bool IsExact ; +APSInt IntVal ( 65 , true ) ; +CN -> getValueAPF ( ) . convertToInteger ( IntVal , APFloat :: rmTowardZero , & IsExact ) ; +if ( ! IsExact ) { +return false ; +} +if ( ! IntVal . isPowerOf2 ( ) ) { +return false ; +} +unsigned FBits = IntVal . logBase2 ( ) ; +return false ; +if ( FBits > RegWidth ) { +return false ; +} +FixedPos = CurDAG -> getTargetConstant ( 64 - FBits , MVT :: i32 ) ; +return true ; +SDLoc dl ( N ) ; +if ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) { +Reg = CurDAG -> getRegister ( XCore :: NoRegister , MVT :: i1 ) ; +Inv = CurDAG -> getTargetConstant ( ( Imm -> getConstantIntValue ( ) -> isZero ( ) ) ? 1 : 0 , dl , MVT :: i1 ) ; +} +if ( ! ( ConstantSDNode * Imm = dyn_cast < ConstantSDNode > ( N . getNode ( ) ) ) ) { +Reg = N ; +Inv = CurDAG -> getTargetConstant ( 0 , dl , MVT :: i1 ) ; +} +if ( FrameIndexSDNode * FIN = dyn_cast < FrameIndexSDNode > ( N ) ) { +R1 = CurDAG -> getTargetFrameIndex ( FIN -> getIndex ( ) , MVT :: i32 ) ; +return true ; +} +if ( ConstantSDNode * CN = dyn_cast < ConstantSDNode > ( N ) ) { +if ( v ) { +if ( ! ( v & ( v - 1 ) ) ) { +} +} +} +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf58df0f1deca09a1617bd8c642e6d94c43246b5 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/CanLowerReturn.cpp @@ -0,0 +1,11 @@ +bool XCoreTargetLowering :: CanLowerReturn ( CallingConv :: ID CallConv , MachineFunction & MF , bool isVarArg , const SmallVectorImpl < ISD :: OutputArg > & Outs , LLVMContext & Context ) const { +SmallVector < CCValAssign , 16 > RVLocs ; +CCState CCInfo ( CallConv , isVarArg , MF , getTargetMachine ( ) , RVLocs , Context ) ; +if ( ! CCInfo . CheckReturn ( Outs , RetCC_XCore ) ) { +return false ; +} +if ( CCInfo . getNextStackOffset ( ) != 0 && isVarArg ) { +return false ; +} +return true ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9452fa0fc125f5e7646b881b443594613faba537 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/EmitInstrWithCustomInserter.cpp @@ -0,0 +1,25 @@ +MachineBasicBlock * XCoreTargetLowering :: EmitInstrWithCustomInserter ( MachineInstr * MI , MachineBasicBlock * BB ) const { +const TargetInstrInfo & TII = * getTargetMachine ( ) . getInstrInfo ( ) ; +DebugLoc dl = MI -> getDebugLoc ( ) ; +assert ( ( MI -> getOpcode ( ) == XCore :: SELECT_CC ) && "Unexpected instr type to insert" ) ; +const BasicBlock * LLVM_BB = BB -> getBasicBlock ( ) ; +MachineFunction :: iterator I = BB ; +++ I ; +MachineBasicBlock * thisMBB = BB ; +MachineFunction * F = BB -> getParent ( ) ; +MachineBasicBlock * copy0MBB = F -> CreateMachineBasicBlock ( LLVM_BB ) ; +MachineBasicBlock * copy1MBB = F -> CreateMachineBasicBlock ( LLVM_BB ) ; +F -> insert ( I , copy0MBB ) ; +F -> insert ( I , copy1MBB ) ; +copy1MBB -> splice ( copy1MBB -> begin ( ) , BB , llvm :: next ( MachineBasicBlock :: iterator ( MI ) ) , BB -> end ( ) ) ; +copy1MBB -> transferSuccessorsAndUpdatePHIs ( BB ) ; +BB -> addSuccessor ( copy0MBB ) ; +BB -> addSuccessor ( copy1MBB ) ; +BuildMI ( BB , dl , TII . get ( XCore :: BRFT_lru6 ) ) . addReg ( MI -> getOperand ( 1 ) . getReg ( ) ) . addMBB ( copy1MBB ) ; +BB = copy0MBB ; +BB -> addSuccessor ( copy1MBB ) ; +BB = copy1MBB ; +BuildMI ( * BB , BB -> begin ( ) , dl , TII . get ( XCore :: PHI ) , MI -> getOperand ( 0 ) . getReg ( ) ) . addReg ( MI -> getOperand ( 3 ) . getReg ( ) ) . addMBB ( copy0MBB ) . addReg ( MI -> getOperand ( 2 ) . getReg ( ) ) . addMBB ( thisMBB ) ; +MI -> eraseFromParent ( ) ; +return BB ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca3dbf417574f79cf172ac534810daad76c105e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/ExpandADDSUB.cpp @@ -0,0 +1,44 @@ +SDValue XCoreTargetLowering :: ExpandADDSUB ( SDNode * N , SelectionDAG & DAG ) const { +EVT VT = N -> getValueType ( 0 ) ; +SDLoc dl ( N ) ; +if ( VT != MVT :: i64 ) { +} +assert ( ( N -> getOpcode ( ) == ISD :: SRL || N -> getOpcode ( ) == ISD :: SRA ) && "Unknown shift to lower!" ) ; +if ( ! isa < ConstantSDNode > ( N -> getOperand ( 1 ) ) || cast < ConstantSDNode > ( N -> getOperand ( 1 ) ) -> getZExtValue ( ) != 1 ) { +} +if ( ST -> isThumb1Only ( ) ) { +} +SDValue Lo = DAG . getNode ( ISD :: EXTRACT_ELEMENT , dl , MVT :: i32 , N -> getOperand ( 0 ) , DAG . getConstant ( 0 , MVT :: i32 ) ) ; +SDValue Hi = DAG . getNode ( ISD :: EXTRACT_ELEMENT , dl , MVT :: i32 , N -> getOperand ( 0 ) , DAG . getConstant ( 1 , MVT :: i32 ) ) ; +unsigned Opc = N -> getOpcode ( ) == ISD :: SRL ? XCoreISD :: SRL_FLAG : XCoreISD :: SRA_FLAG ; +Hi = DAG . getNode ( Opc , dl , DAG . getVTList ( MVT :: i32 , MVT :: Glue ) , Hi ) ; +Lo = DAG . getNode ( XCoreISD :: RRX , dl , MVT :: i32 , Lo , Hi . getValue ( 1 ) ) ; +return DAG . getNode ( ISD :: BUILD_PAIR , dl , MVT :: i64 , Lo , Hi ) ; +EVT VT = V0 . getValueType ( ) ; +assert ( VT . is256BitVector ( ) && VT == V1 . getValueType ( ) && "Invalid nodes in input!" ) ; +unsigned NumElts = VT . getVectorNumElements ( ) ; +SDValue V0_LO = Extract128BitVector ( V0 , 0 , DAG , DL ) ; +SDValue V0_HI = Extract128BitVector ( V0 , NumElts / 2 , DAG , DL ) ; +SDValue V1_LO = Extract128BitVector ( V1 , 0 , DAG , DL ) ; +SDValue V1_HI = Extract128BitVector ( V1 , NumElts / 2 , DAG , DL ) ; +EVT NewVT = V0_LO . getValueType ( ) ; +SDValue LO = DAG . getUNDEF ( NewVT ) ; +SDValue HI = DAG . getUNDEF ( NewVT ) ; +if ( Mode ) { +if ( ! isUndefLO && V0 -> getOpcode ( ) != ISD :: UNDEF ) { +LO = DAG . getNode ( XCoreOpcode , DL , NewVT , V0_LO , V0_HI ) ; +} +if ( ! isUndefHI && V1 -> getOpcode ( ) != ISD :: UNDEF ) { +HI = DAG . getNode ( XCoreOpcode , DL , NewVT , V1_LO , V1_HI ) ; +} +} +else { +if ( ! isUndefLO && ( V0_LO -> getOpcode ( ) != ISD :: UNDEF || V1_LO -> getOpcode ( ) != ISD :: UNDEF ) ) { +LO = DAG . getNode ( XCoreOpcode , DL , NewVT , V0_LO , V1_LO ) ; +} +if ( ! isUndefHI && ( V0_HI -> getOpcode ( ) != ISD :: UNDEF || V1_HI -> getOpcode ( ) != ISD :: UNDEF ) ) { +HI = DAG . getNode ( XCoreOpcode , DL , NewVT , V0_HI , V1_HI ) ; +} +} +return DAG . getNode ( ISD :: CONCAT_VECTORS , DL , VT , LO , HI ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6fc092d73128d2ee4a2d380f97031a20a4dd93d0 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerADJUST_TRAMPOLINE.cpp @@ -0,0 +1,3 @@ +SDValue XCoreTargetLowering :: LowerADJUST_TRAMPOLINE ( SDValue Op , SelectionDAG & DAG ) const { +return Op . getOperand ( 0 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2a982d70b213c77b6e9c1c5b5bcbfb502ea43ba7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerATOMIC_FENCE.cpp @@ -0,0 +1,4 @@ +SDValue XCoreTargetLowering :: LowerATOMIC_FENCE ( SDValue Op , SelectionDAG & DAG ) const { +DebugLoc dl = Op . getDebugLoc ( ) ; +return DAG . getNode ( XCoreISD::MEMBARRIER , dl , MVT :: Other , Op . getOperand ( 0 ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40a11377268e0e1381f4c20a0d2940a471643f87 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerBR_JT.cpp @@ -0,0 +1,36 @@ +SDValue XCoreTargetLowering :: LowerBR_JT ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +SDValue Chain = Op . getOperand ( 0 ) ; +const auto * JT = cast < JumpTableSDNode > ( Op . getOperand ( 1 ) ) ; +SDValue Table = Op . getOperand ( 1 ) ; +SDValue Index = Op . getOperand ( 2 ) ; +assert ( JT -> getTargetFlags ( ) == 0 && "XCore doesn't set target flags" ) ; +SmallVector < SDValue , 8 > Ops ; +Ops . push_back ( Chain ) ; +Ops . push_back ( Index ) ; +MachineJumpTableInfo * MJTI = DAG . getMachineFunction ( ) . getJumpTableInfo ( ) ; +const auto & MBBs = MJTI -> getJumpTables ( ) [ JT -> getIndex ( ) ] . MBBs ; +for ( auto MBB : MBBs ) { +Ops . push_back ( DAG . getBasicBlock ( MBB ) ) ; +} +Ops . push_back ( DAG . getBasicBlock ( MBBs [ 0 ] ) ) ; +return DAG . getNode ( XCoreISD :: BR_TABLE , DL , MVT :: Other , Ops ) ; +DebugLoc dl = Op . getDebugLoc ( ) ; +JumpTableSDNode * JT = cast < JumpTableSDNode > ( Table ) ; +unsigned JTI = JT -> getIndex ( ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +const MachineJumpTableInfo * MJTI = MF . getJumpTableInfo ( ) ; +SDValue TargetJT = DAG . getTargetJumpTable ( JT -> getIndex ( ) , MVT :: i32 ) ; +const std :: vector < MachineJumpTableEntry > & JTE = MJTI -> getJumpTables ( ) ; +const std :: vector < MachineBasicBlock * > & JTBBs = JTE [ JTI ] . MBBs ; +for ( unsigned i = 0 , e = JTBBs . size ( ) ; i != e ; ++ i ) { +MachineBasicBlock * MBB = JTBBs [ i ] ; +MBB -> setHasAddressTaken ( ) ; +BlockAddress :: get ( const_cast < BasicBlock * > ( MBB -> getBasicBlock ( ) ) ) ; +} +SDValue JumpTableBase = DAG . getNode ( XCoreISD :: WrapperJT , dl , getPointerTy ( ) , TargetJT ) ; +SDValue ShiftIndex = DAG . getNode ( ISD :: SHL , dl , MVT :: i32 , Index , DAG . getConstant ( 2 , MVT :: i32 ) ) ; +SDValue JTAddress = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , JumpTableBase , ShiftIndex ) ; +SDValue LoadTarget = DAG . getLoad ( MVT :: i32 , dl , Chain , JTAddress , MachinePointerInfo ( ) , false , false , false , 0 ) ; +return DAG . getNode ( XCoreISD :: BR_JT , dl , MVT :: Other , Chain , LoadTarget ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8439703fe3d368e64028ecebd061434985c1435 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerBlockAddress.cpp @@ -0,0 +1,6 @@ +SDValue XCoreTargetLowering :: LowerBlockAddress ( SDValue Op , SelectionDAG & DAG ) const { +DebugLoc DL = Op . getDebugLoc ( ) ; +const BlockAddress * BA = cast < BlockAddressSDNode > ( Op ) -> getBlockAddress ( ) ; +SDValue Result = DAG . getBlockAddress ( BA , getPointerTy ( ) , true ) ; +return DAG . getNode ( XCoreISD :: PCRelativeWrapper , DL , getPointerTy ( ) , Result ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerCall.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerCall.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c1fa816f21cb4538d222d0dd464f13bcb111b5c7 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerCall.cpp @@ -0,0 +1,348 @@ +SDValue XCoreTargetLowering :: LowerCall ( CallLoweringInfo & CLI , SmallVectorImpl < SDValue > & InVals ) const { +SelectionDAG & DAG = CLI . DAG ; +SDLoc & DL = CLI . DL ; +SmallVectorImpl < ISD :: OutputArg > & Outs = CLI . Outs ; +SmallVectorImpl < SDValue > & OutVals = CLI . OutVals ; +SmallVectorImpl < ISD :: InputArg > & Ins = CLI . Ins ; +DebugLoc & dl = CLI . DL ; +SmallVector < ISD :: OutputArg , 32 > & Outs = CLI . Outs ; +SmallVector < SDValue , 32 > & OutVals = CLI . OutVals ; +SmallVector < ISD :: InputArg , 32 > & Ins = CLI . Ins ; +SDValue Chain = CLI . Chain ; +SDValue Callee = CLI . Callee ; +bool & isTailCall = CLI . IsTailCall ; +CallingConv :: ID CallConv = CLI . CallConv ; +bool isVarArg = CLI . IsVarArg ; +const char * XCore16HelperFunction = 0 ; +bool needXCore16Helper = false ; +if ( Subtarget -> inMips16Mode ( ) ) { +bool lookupHelper = true ; +if ( ExternalSymbolSDNode * S = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +if ( noHelperNeeded . find ( S -> getSymbol ( ) ) != noHelperNeeded . end ( ) ) { +lookupHelper = false ; +} +} +if ( lookupHelper ) { +XCore16HelperFunction = getXCore16HelperFunction ( CLI . RetTy , CLI . Args , needXCore16Helper ) ; +} +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +isTailCall = false ; +MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; +const TargetFrameLowering * TFL = MF . getTarget ( ) . getFrameLowering ( ) ; +bool IsPIC = getTargetMachine ( ) . getRelocationModel ( ) == Reloc :: PIC_ ; +SmallVector < CCValAssign , 16 > ArgLocs ; +CCState CCInfo ( CallConv , isVarArg , DAG . getMachineFunction ( ) , ArgLocs , * DAG . getContext ( ) ) ; +const Function * F = nullptr ; +if ( const GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +const GlobalValue * GV = G -> getGlobal ( ) ; +F = cast < Function > ( GV ) ; +Callee = DAG . getTargetGlobalAddress ( GV , DL , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +} +if ( const ExternalSymbolSDNode * ES = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +Callee = DAG . getTargetExternalSymbol ( ES -> getSymbol ( ) , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +} +analyzeArguments ( & CLI , F , & DAG . getDataLayout ( ) , & Outs , 0 , CallConv , ArgLocs , CCInfo , true , isVarArg ) ; +unsigned NumBytes = CCInfo . getNextStackOffset ( ) ; +CCState CCInfo ( CallConv , isVarArg , DAG . getTarget ( ) , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeCallOperands ( Outs , CC_XCore32 ) ; +unsigned ArgsSize = CCInfo . getNextStackOffset ( ) ; +ArgsSize = ( ArgsSize + 7 ) & ~ 7 ; +MachineFrameInfo * MFI = DAG . getMachineFunction ( ) . getFrameInfo ( ) ; +SmallVector < SDValue , 8 > ByValArgs ; +for ( unsigned i = 0 , e = Outs . size ( ) ; i != e ; ++ i ) { +ISD :: ArgFlagsTy Flags = Outs [ i ] . Flags ; +if ( ! Flags . isByVal ( ) ) { +continue ; +} +SDValue Arg = OutVals [ i ] ; +unsigned Size = Flags . getByValSize ( ) ; +unsigned Align = Flags . getByValAlign ( ) ; +int FI = MFI -> CreateStackObject ( Size , Align , false ) ; +SDValue FIPtr = DAG . getFrameIndex ( FI , getPointerTy ( ) ) ; +SDValue SizeNode = DAG . getConstant ( Size , MVT :: i32 ) ; +Chain = DAG . getMemcpy ( Chain , dl , FIPtr , Arg , SizeNode , Align , false , ( Size <= 32 ) , MachinePointerInfo ( ) , MachinePointerInfo ( ) ) ; +ByValArgs . push_back ( FIPtr ) ; +} +Chain = DAG . getCALLSEQ_START ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DL ) ; +SmallVector < std :: pair < unsigned , SDValue > , 8 > RegsToPass ; +unsigned AI ; +unsigned AE ; +bool HasStackArgs = false ; +CCState CCInfo ( CallConv , isVarArg , DAG . getMachineFunction ( ) , getTargetMachine ( ) , ArgLocs , * DAG . getContext ( ) ) ; +XCoreCC XCoreCCInfo ( CallConv , IsO32 , CCInfo ) ; +XCoreCCInfo . analyzeCallOperands ( Outs , isVarArg ) ; +unsigned NextStackOffset = CCInfo . getNextStackOffset ( ) ; +if ( isTailCall ) { +isTailCall = IsEligibleForTailCallOptimization ( XCoreCCInfo , NextStackOffset , * MF . getInfo < XCoreFunctionInfo > ( ) ) ; +} +if ( isTailCall ) { +NumTailCalls = NumTailCalls + 1 ; +} +unsigned StackAlignment = TFL -> getStackAlignment ( ) ; +NextStackOffset = RoundUpToAlignment ( NextStackOffset , StackAlignment ) ; +SDValue NextStackOffsetVal = DAG . getIntPtrConstant ( NextStackOffset , true ) ; +if ( ! isTailCall ) { +Chain = DAG . getCALLSEQ_START ( Chain , NextStackOffsetVal ) ; +} +SDValue StackPtr = DAG . getCopyFromReg ( Chain , dl , IsN64 ? XCore :: SP_64 : XCore :: SP , getPointerTy ( ) ) ; +std :: deque < std :: pair < unsigned , SDValue > > RegsToPass ; +SmallVector < SDValue , 8 > MemOpChains ; +XCoreCC :: byval_iterator ByValArg = XCoreCCInfo . byval_begin ( ) ; +const unsigned StackOffset = 92 ; +bool hasStructRetAttr = false ; +for ( AI = 0 , AE = ArgLocs . size ( ) ; AI != AE ; ++ AI ) { +CCValAssign & VA = ArgLocs [ AI ] ; +EVT RegVT = VA . getLocVT ( ) ; +SDValue Arg = OutVals [ AI ] ; +CCValAssign & VA = ArgLocs [ i ] ; +MVT ValVT = VA . getValVT ( ) , LocVT = VA . getLocVT ( ) ; +if ( Flags . isByVal ( ) ) { +assert ( ! isTailCall && "Do not tail-call optimize if there is a byval argument." ) ; +passByValArg ( Chain , dl , RegsToPass , MemOpChains , StackPtr , MFI , DAG , Arg , XCoreCCInfo , * ByValArg , Flags , Subtarget -> isLittle ( ) ) ; +ByValArg = ByValArg + 1 ; +continue ; +Arg = ByValArgs [ byvalArgIdx ++ ] ; +} +Arg = DAG . getNode ( ISD :: SIGN_EXTEND , DL , RegVT , Arg ) ; +if ( ValVT == MVT :: f32 ) { +if ( LocVT == MVT :: i32 ) { +Arg = DAG . getNode ( ISD :: BITCAST , dl , LocVT , Arg ) ; +} +} +if ( ValVT == MVT :: f64 ) { +if ( LocVT == MVT :: i64 ) { +Arg = DAG . getNode ( ISD :: BITCAST , dl , LocVT , Arg ) ; +} +} +if ( LocVT == MVT :: i32 ) { +if ( ValVT == MVT :: f64 ) { +SDValue Lo = DAG . getNode ( XCoreISD :: ExtractElementF64 , dl , MVT :: i32 , Arg , DAG . getConstant ( 0 , MVT :: i32 ) ) ; +SDValue Hi = DAG . getNode ( XCoreISD :: ExtractElementF64 , dl , MVT :: i32 , Arg , DAG . getConstant ( 1 , MVT :: i32 ) ) ; +std :: swap ( Lo , Hi ) ; +unsigned LocRegLo = VA . getLocReg ( ) ; +unsigned LocRegHigh = getNextIntArgReg ( LocRegLo ) ; +RegsToPass . push_back ( std :: make_pair ( LocRegLo , Lo ) ) ; +RegsToPass . push_back ( std :: make_pair ( LocRegHigh , Hi ) ) ; +continue ; +} +} +Arg = DAG . getNode ( ISD :: ZERO_EXTEND , DL , RegVT , Arg ) ; +Arg = DAG . getNode ( ISD :: ANY_EXTEND , DL , RegVT , Arg ) ; +Arg = DAG . getNode ( ISD :: BITCAST , DL , RegVT , Arg ) ; +if ( VA . isMemLoc ( ) ) { +HasStackArgs = true ; +break ; +} +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +if ( Flags . isSRet ( ) ) { +SDValue StackPtr = DAG . getRegister ( XCore :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( 64 ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +hasStructRetAttr = true ; +continue ; +} +if ( VA . needsCustom ( ) ) { +if ( VA . isMemLoc ( ) ) { +unsigned Offset = VA . getLocMemOffset ( ) + StackOffset ; +if ( Offset % 8 == 0 ) { +SDValue StackPtr = DAG . getRegister ( XCore :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +continue ; +} +} +SDValue StackPtr = DAG . CreateStackTemporary ( MVT :: f64 , MVT :: i32 ) ; +SDValue Store = DAG . getStore ( DAG . getEntryNode ( ) , dl , Arg , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +SDValue Hi = DAG . getLoad ( MVT :: i32 , dl , Store , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +StackPtr = DAG . getNode ( ISD :: ADD , dl , StackPtr . getValueType ( ) , StackPtr , DAG . getIntPtrConstant ( 4 ) ) ; +SDValue Lo = DAG . getLoad ( MVT :: i32 , dl , Store , StackPtr , MachinePointerInfo ( ) , false , false , 0 ) ; +if ( VA . isRegLoc ( ) ) { +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Hi ) ) ; +CCValAssign & NextVA = ArgLocs [ ++ i ] ; +if ( NextVA . isRegLoc ( ) ) { +RegsToPass . push_back ( std :: make_pair ( NextVA . getLocReg ( ) , Lo ) ) ; +} +if ( ! NextVA . isRegLoc ( ) ) { +unsigned Offset = NextVA . getLocMemOffset ( ) + StackOffset ; +SDValue StackPtr = DAG . getRegister ( XCore :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Lo , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +} +if ( ! VA . isRegLoc ( ) ) { +unsigned Offset = VA . getLocMemOffset ( ) + StackOffset ; +SDValue StackPtr = DAG . getRegister ( XCore :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( Offset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Hi , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +PtrOff = DAG . getIntPtrConstant ( Offset + 4 ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Lo , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +continue ; +} +if ( VA . isRegLoc ( ) ) { +if ( VA . getLocVT ( ) != MVT :: f32 ) { +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +continue ; +} +Arg = DAG . getNode ( ISD :: BITCAST , dl , MVT :: i32 , Arg ) ; +RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; +continue ; +} +assert ( VA . isMemLoc ( ) ) ; +MemOpChains . push_back ( passArgOnStack ( StackPtr , VA . getLocMemOffset ( ) , Chain , Arg , dl , isTailCall , DAG ) ) ; +SDValue StackPtr = DAG . getRegister ( XCore :: O6 , MVT :: i32 ) ; +SDValue PtrOff = DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) + StackOffset ) ; +PtrOff = DAG . getNode ( ISD :: ADD , dl , MVT :: i32 , StackPtr , PtrOff ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , 0 ) ) ; +} +if ( HasStackArgs ) { +for ( AE = AI , AI = ArgLocs . size ( ) ; AI != AE ; -- AI ) { +unsigned Loc = AI - 1 ; +CCValAssign & VA = ArgLocs [ Loc ] ; +SDValue Arg = OutVals [ Loc ] ; +assert ( VA . isMemLoc ( ) ) ; +SDValue PtrOff = DAG . getNode ( ISD :: ADD , DL , getPointerTy ( DAG . getDataLayout ( ) ) , DAG . getRegister ( XCore :: SP , getPointerTy ( DAG . getDataLayout ( ) ) ) , DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) + 1 , DL ) ) ; +Chain = DAG . getStore ( Chain , DL , Arg , PtrOff , MachinePointerInfo :: getStack ( MF , VA . getLocMemOffset ( ) ) , 0 ) ; +} +} +if ( ! MemOpChains . empty ( ) ) { +Chain = DAG . getCopyToReg ( Chain , DL , Reg . first , Reg . second , InFlag ) ; +} +bool IsPICCall = ( IsN64 || IsPIC ) ; +bool GlobalOrExternal = false , InternalLinkage = false ; +SDValue CalleeLo ; +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +if ( IsPICCall ) { +InternalLinkage = G -> getGlobal ( ) -> hasInternalLinkage ( ) ; +if ( InternalLinkage ) { +Callee = getAddrLocal ( Callee , DAG , HasXCore64 ) ; +} +if ( LargeGOT ) { +Callee = getAddrGlobalLargeGOT ( Callee , DAG , XCoreII :: MO_CALL_HI16 , XCoreII :: MO_CALL_LO16 ) ; +} +if ( ! InternalLinkage ) { +if ( ! LargeGOT ) { +Callee = getAddrGlobal ( Callee , DAG , XCoreII :: MO_GOT_CALL ) ; +} +} +} +if ( ! IsPICCall ) { +Callee = DAG . getTargetGlobalAddress ( G -> getGlobal ( ) , dl , getPointerTy ( ) , 0 , XCoreII :: MO_NO_FLAG ) ; +} +GlobalOrExternal = true ; +} +if ( ExternalSymbolSDNode * S = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +if ( ! IsN64 ) { +if ( ! IsPIC ) { +Callee = DAG . getTargetExternalSymbol ( S -> getSymbol ( ) , getPointerTy ( ) , XCoreII :: MO_NO_FLAG ) ; +} +} +if ( LargeGOT ) { +Callee = getAddrGlobalLargeGOT ( Callee , DAG , XCoreII :: MO_CALL_HI16 , XCoreII :: MO_CALL_LO16 ) ; +} +if ( ! LargeGOT ) { +Callee = getAddrGlobal ( Callee , DAG , XCoreII :: MO_GOT_CALL ) ; +} +GlobalOrExternal = true ; +} +SDValue JumpTarget = Callee ; +if ( IsPICCall ) { +unsigned T9Reg = IsN64 ? XCore :: T9_64 : XCore :: T9 ; +unsigned V0Reg = XCore :: V0 ; +if ( needXCore16Helper ) { +RegsToPass . push_front ( std :: make_pair ( V0Reg , Callee ) ) ; +JumpTarget = DAG . getExternalSymbol ( XCore16HelperFunction , getPointerTy ( ) ) ; +JumpTarget = getAddrGlobal ( JumpTarget , DAG , XCoreII :: MO_GOT ) ; +} +if ( ! needXCore16Helper ) { +RegsToPass . push_front ( std :: make_pair ( T9Reg , Callee ) ) ; +JumpTarget = SDValue ( ) ; +} +} +if ( ! GlobalOrExternal ) { +unsigned T9Reg = IsN64 ? XCore :: T9_64 : XCore :: T9 ; +unsigned V0Reg = XCore :: V0 ; +if ( needXCore16Helper ) { +RegsToPass . push_front ( std :: make_pair ( V0Reg , Callee ) ) ; +JumpTarget = DAG . getExternalSymbol ( XCore16HelperFunction , getPointerTy ( ) ) ; +JumpTarget = getAddrGlobal ( JumpTarget , DAG , XCoreII :: MO_GOT ) ; +} +if ( ! needXCore16Helper ) { +RegsToPass . push_front ( std :: make_pair ( T9Reg , Callee ) ) ; +JumpTarget = SDValue ( ) ; +} +} +if ( IsPICCall ) { +if ( ! InternalLinkage ) { +unsigned GPReg = IsN64 ? XCore :: GP_64 : XCore :: GP ; +EVT Ty = IsN64 ? MVT :: i64 : MVT :: i32 ; +RegsToPass . push_back ( std :: make_pair ( GPReg , GetGlobalReg ( DAG , Ty ) ) ) ; +} +} +SDValue InFlag ; +for ( auto Reg : RegsToPass ) { +unsigned Reg = RegsToPass [ i ] . first ; +Reg = Reg - XCore :: I0 + XCore :: O0 ; +Chain = DAG . getCALLSEQ_END ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DAG . getIntPtrConstant ( 0 , DL , true ) , InFlag , DL ) ; +InFlag = Chain . getValue ( 1 ) ; +} +unsigned SRetArgSize = ( hasStructRetAttr ) ? getSRetArgSize ( DAG , Callee ) : 0 ; +if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) { +Callee = DAG . getTargetGlobalAddress ( G -> getGlobal ( ) , dl , MVT :: i32 ) ; +} +if ( ExternalSymbolSDNode * E = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) { +Callee = DAG . getTargetExternalSymbol ( E -> getSymbol ( ) , MVT :: i32 ) ; +} +SDVTList NodeTys = DAG . getVTList ( MVT :: Other , MVT :: Glue ) ; +SmallVector < SDValue , 8 > Ops ; +Ops . push_back ( Chain ) ; +Ops . push_back ( Callee ) ; +SmallVector < SDValue , 8 > Ops ( 1 , Chain ) ; +if ( JumpTarget . getNode ( ) ) { +Ops . push_back ( JumpTarget ) ; +} +if ( hasStructRetAttr ) { +Ops . push_back ( DAG . getTargetConstant ( SRetArgSize , MVT :: i32 ) ) ; +} +for ( auto Reg : RegsToPass ) { +Ops . push_back ( DAG . getRegister ( Reg . first , Reg . second . getValueType ( ) ) ) ; +Ops . push_back ( DAG . getRegister ( RegsToPass [ i ] . first , RegsToPass [ i ] . second . getValueType ( ) ) ) ; +unsigned Reg = RegsToPass [ i ] . first ; +Reg = Reg - XCore :: I0 + XCore :: O0 ; +Ops . push_back ( DAG . getRegister ( Reg , RegsToPass [ i ] . second . getValueType ( ) ) ) ; +} +const XCoreTargetMachine & TM = ( const XCoreTargetMachine & ) getTargetMachine ( ) ; +const TargetRegisterInfo * TRI = TM . getSubtargetImpl ( ) -> getRegisterInfo ( ) ; +const uint32_t * Mask = TRI -> getCallPreservedMask ( DAG . getMachineFunction ( ) , CallConv ) ; +assert ( Mask && "Missing call preserved mask for calling convention" ) ; +Ops . push_back ( DAG . getRegisterMask ( Mask ) ) ; +if ( InFlag . getNode ( ) ) { +Ops . push_back ( InFlag ) ; +} +if ( isTailCall ) { +return DAG . getNode ( XCoreISD :: TailCall , dl , MVT :: Other , & Ops [ 0 ] , Ops . size ( ) ) ; +} +Chain = DAG . getNode ( XCoreISD :: CALL , DL , NodeTys , Ops ) ; +InFlag = Chain . getValue ( 1 ) ; +Chain = DAG . getCALLSEQ_END ( Chain , DAG . getIntPtrConstant ( NumBytes , DL , true ) , DAG . getIntPtrConstant ( 0 , DL , true ) , InFlag , DL ) ; +if ( ! Ins . empty ( ) ) { +InFlag = Chain . getValue ( 1 ) ; +} +InFlag = Chain . getValue ( 1 ) ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState RVInfo ( CallConv , isVarArg , DAG . getTarget ( ) , RVLocs , * DAG . getContext ( ) ) ; +RVInfo . AnalyzeCallResult ( Ins , RetCC_XCore32 ) ; +for ( unsigned i = 0 ; i != RVLocs . size ( ) ; ++ i ) { +unsigned Reg = RVLocs [ i ] . getLocReg ( ) ; +Reg = Reg - XCore :: I0 + XCore :: O0 ; +Chain = DAG . getCopyFromReg ( Chain , dl , Reg , RVLocs [ i ] . getValVT ( ) , InFlag ) . getValue ( 1 ) ; +InFlag = Chain . getValue ( 2 ) ; +InVals . push_back ( Chain . getValue ( 0 ) ) ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a7719f0a042d151083067f45d0e1bd46e77dcf84 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerConstantPool.cpp @@ -0,0 +1,13 @@ +SDValue XCoreTargetLowering :: LowerConstantPool ( SDValue Op , SelectionDAG & DAG ) const { +ConstantPoolSDNode * CP = cast < ConstantPoolSDNode > ( Op ) ; +DebugLoc dl = CP -> getDebugLoc ( ) ; +EVT PtrVT = Op . getValueType ( ) ; +SDValue Res ; +if ( CP -> isMachineConstantPoolEntry ( ) ) { +Res = DAG . getTargetConstantPool ( CP -> getMachineCPVal ( ) , PtrVT , CP -> getAlignment ( ) ) ; +} +else { +Res = DAG . getTargetConstantPool ( CP -> getConstVal ( ) , PtrVT , CP -> getAlignment ( ) ) ; +} +return DAG . getNode ( XCoreISD :: CPRelativeWrapper , dl , MVT :: i32 , Res ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..390aa0a658c093b7e00a2b6427fca192b1f5855e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerDYNAMIC_STACKALLOC.cpp @@ -0,0 +1,35 @@ +SDValue XCoreTargetLowering :: LowerDYNAMIC_STACKALLOC ( SDValue Op , SelectionDAG & DAG ) const { +assert ( Subtarget -> isTargetWindows ( ) && "unsupported target platform" ) ; +SDLoc DL ( Op ) ; +SDValue Chain = Op . getOperand ( 0 ) ; +SDValue Size = Op . getOperand ( 1 ) ; +if ( isa < ConstantSDNode > ( Size ) ) { +return lowerDYNAMIC_STACKALLOCImpl ( Op , DAG ) ; +} +return XCoreTargetLowering :: LowerDYNAMIC_STACKALLOC ( Op , DAG ) ; +if ( DAG . getMachineFunction ( ) . getFunction ( ) . hasFnAttribute ( "no-stack-arg-probe" ) ) { +MaybeAlign Align = cast < ConstantSDNode > ( Op . getOperand ( 2 ) ) -> getMaybeAlignValue ( ) ; +SDValue SP = DAG . getCopyFromReg ( Chain , DL , XCore :: SP , MVT :: i32 ) ; +Chain = SP . getValue ( 1 ) ; +SP = DAG . getNode ( ISD :: SUB , DL , MVT :: i32 , SP , Size ) ; +if ( Align ) { +SP = DAG . getNode ( ISD :: AND , DL , MVT :: i32 , SP . getValue ( 0 ) , DAG . getConstant ( - ( uint64_t ) Align -> value ( ) , DL , MVT :: i32 ) ) ; +} +Chain = DAG . getCopyToReg ( Chain , DL , XCore :: SP , SP ) ; +SDValue Ops [ 2 ] = { SP , Chain } ; +} +SDValue Words = DAG . getNode ( ISD :: SRL , DL , MVT :: i32 , Size , DAG . getConstant ( 2 , DL , MVT :: i32 ) ) ; +SDValue Flag ; +Chain = DAG . getCopyToReg ( Chain , DL , XCore :: R4 , Words , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +SDVTList NodeTys = DAG . getVTList ( MVT :: Other , MVT :: Glue ) ; +Chain = DAG . getNode ( XCoreISD :: WIN__CHKSTK , DL , NodeTys , Chain , Flag ) ; +SDValue NewSP = DAG . getCopyFromReg ( Chain , DL , XCore :: SP , MVT :: i32 ) ; +Chain = NewSP . getValue ( 1 ) ; +SDValue Ops [ 2 ] = { NewSP , Chain } ; +SDValue NegSize = DAG . getNode ( ISD :: SUB , dl , PtrVT , DAG . getConstant ( 0 , dl , PtrVT ) , Size ) ; +SDValue FPSIdx = getFramePointerFrameIndex ( DAG ) ; +SDValue Ops [ 3 ] = { Chain , NegSize , FPSIdx } ; +SDVTList VTs = DAG . getVTList ( PtrVT , MVT :: Other ) ; +return DAG . getNode ( XCoreISD :: DYNALLOC , dl , VTs , Ops ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5e08d2a8b9d51a96cf7eed551eb62cb6f46a5309 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerEH_RETURN.cpp @@ -0,0 +1,32 @@ +SDValue XCoreTargetLowering :: LowerEH_RETURN ( SDValue Op , SelectionDAG & DAG ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +XCoreMachineFunctionInfo * XCoreFI = MF . getInfo < XCoreMachineFunctionInfo > ( ) ; +XCoreFunctionInfo * XCoreFI = MF . getInfo < XCoreFunctionInfo > ( ) ; +XCoreFI -> setCallsEhReturn ( ) ; +SDValue Chain = Op . getOperand ( 0 ) ; +SDValue Offset = Op . getOperand ( 1 ) ; +SDValue Handler = Op . getOperand ( 2 ) ; +SDLoc dl ( Op ) ; +unsigned OffsetReg = XCore :: R2 ; +unsigned AddrReg = XCore :: R3 ; +unsigned ReturnReg = XCore :: R0 ; +auto PtrVT = getPointerTy ( DAG . getDataLayout ( ) ) ; +FuncInfo -> setHasEHReturn ( ) ; +unsigned OffsetReg = XCore :: R28 ; +SDValue StoreAddr = DAG . getNode ( ISD :: ADD , dl , PtrVT , DAG . getRegister ( XCore :: R30 , PtrVT ) , DAG . getIntPtrConstant ( 4 , dl ) ) ; +Chain = DAG . getStore ( Chain , dl , Handler , StoreAddr , MachinePointerInfo ( ) , false , false , 0 ) ; +Chain = DAG . getCopyToReg ( Chain , dl , OffsetReg , Offset ) ; +Chain = DAG . getCopyToReg ( Chain , dl , AddrReg , Handler ) ; +Chain = DAG . getCopyToReg ( Chain , dl , ReturnReg , DAG . getIntPtrConstant ( 0 ) ) ; +return DAG . getNode ( XCoreISD :: EH_RETURN , dl , MVT :: Other , Chain , DAG . getRegister ( OffsetReg , MVT :: i32 ) , DAG . getRegister ( AddrReg , getPointerTy ( ) ) ) ; +unsigned OffsetReg = XCore :: V1 ; +unsigned AddrReg = XCore :: V0 ; +EVT Ty = ABI . IsN64 ( ) ? MVT :: i64 : MVT :: i32 ; +unsigned OffsetReg = ABI . IsN64 ( ) ? XCore :: V1_64 : XCore :: V1 ; +unsigned AddrReg = ABI . IsN64 ( ) ? XCore :: V0_64 : XCore :: V0 ; +Chain = DAG . getCopyToReg ( Chain , dl , OffsetReg , Offset , SDValue ( ) ) ; +Chain = DAG . getCopyToReg ( Chain , dl , AddrReg , Handler , Chain . getValue ( 1 ) ) ; +return DAG . getNode ( XCoreISD :: EH_RETURN , dl , MVT :: Other , Chain , DAG . getRegister ( OffsetReg , MVT :: i32 ) , DAG . getRegister ( AddrReg , getPointerTy ( MF . getDataLayout ( ) ) ) , Chain . getValue ( 1 ) ) ; +return DAG . getNode ( XCoreISD :: EH_RETURN , dl , MVT :: Other , Chain ) ; +return DAG . getNode ( XCoreISD :: EH_RETURN , dl , MVT :: Other , Chain , DAG . getRegister ( OffsetReg , Ty ) , DAG . getRegister ( AddrReg , getPointerTy ( MF . getDataLayout ( ) ) ) , Chain . getValue ( 1 ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32c2965c0c4e85d429cc949633cc1b851dcaab32 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFRAMEADDR.cpp @@ -0,0 +1,18 @@ +SDValue XCoreTargetLowering :: lowerFRAMEADDR ( SDValue Op , SelectionDAG & DAG ) const { +const XCoreRegisterInfo & RI = * Subtarget . getRegisterInfo ( ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MFI . setFrameAddressIsTaken ( true ) ; +Register FrameReg = RI . getFrameRegister ( MF ) ; +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +SDValue FrameAddr = DAG . getCopyFromReg ( DAG . getEntryNode ( ) , DL , FrameReg , VT ) ; +unsigned Depth = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +for ( ; Depth > 0 ; ) { +int Offset = - ( XLenInBytes * 2 ) ; +SDValue Ptr = DAG . getNode ( ISD :: ADD , DL , VT , FrameAddr , DAG . getIntPtrConstant ( Offset , DL ) ) ; +FrameAddr = DAG . getLoad ( VT , DL , DAG . getEntryNode ( ) , Ptr , MachinePointerInfo ( ) ) ; +Depth = Depth - 1 ; +} +return FrameAddr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fef2f3c7990fd41401982666e55607b73a15cb2f --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFRAME_TO_ARGS_OFFSET.cpp @@ -0,0 +1,3 @@ +SDValue XCoreTargetLowering :: LowerFRAME_TO_ARGS_OFFSET ( SDValue Op , SelectionDAG & DAG ) const { +return DAG . getIntPtrConstant ( 2 * RegInfo -> getSlotSize ( ) , SDLoc ( Op ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp new file mode 100644 index 0000000000000000000000000000000000000000..740a359cc7cafd2d4239b277f0167e978b05e110 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerFormalArguments.cpp @@ -0,0 +1,149 @@ +SDValue XCoreTargetLowering :: LowerFormalArguments ( SDValue Chain , CallingConv :: ID CallConv , bool IsVarArg , const SmallVectorImpl < ISD :: InputArg > & Ins , const SDLoc & DL , SelectionDAG & DAG , SmallVectorImpl < SDValue > & InVals ) const { +if ( CallCConv != CallingConv :: C ) { +if ( CallCConv != CallingConv :: Fast ) { +report_fatal_error ( "Unsupported calling convention" ) ; +} +} +LLVM_DEBUG ( dbgs ( ) << "ISelDAG: Lowering formal arguments\n" ) ; +if ( isVarArg ) { +LLVM_DEBUG ( dbgs ( ) << "ISelDAG: Can't lower variadic arguments\n" ) ; +return SDValue ( ) ; +} +MachineFunction & MF = DAG . getMachineFunction ( ) ; +std :: vector < SDValue > OutChains ; +unsigned ArgsBaseOffset = 176 ; +unsigned ArgsPreserved = 64 ; +XCoreMachineFunctionInfo * FuncInfo = MF . getInfo < XCoreMachineFunctionInfo > ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineRegisterInfo & MRI = MF . getRegInfo ( ) ; +SmallVector < CCValAssign , 16 > ArgLocs ; +CCState CCInfo ( CallConv , IsVarArg , MF , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CCAssignFnForCall ( CallConv , IsVarArg ) ) ; +CCState CCInfo ( CallConv , IsVarArg , DAG . getMachineFunction ( ) , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AllocateStack ( ArgsPreserved , Align ( 8 ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CC_XCore ) ; +CCState CCInfo ( CallConv , isVarArg , MF , ArgLocs , * DAG . getContext ( ) ) ; +CCInfo . AnalyzeFormalArguments ( Ins , CCAssignFnForCall ( CallConv , isVarArg ) ) ; +Chain = DAG . getNode ( XCoreISD :: ENTRY_FLAG , DL , MVT :: Other , { Chain , DAG . getRegister ( XCore :: a1 , MVT :: i32 ) , DAG . getTargetConstant ( 4 , DL , MVT :: i32 ) } ) ; +CCInfo . AnalyzeFormalArguments ( Ins , getCCAssignFn ( CallConv ) ) ; +if ( MFI . hasVAStart ( ) ) { +FuncInfo -> setVarArgsFrameIndex ( MFI . CreateFixedObject ( 1 , CCInfo . getNextStackOffset ( ) , true ) ) ; +} +SDValue ArgValue ; +for ( unsigned i = 0 , e = ArgLocs . size ( ) ; i != e ; ++ i ) { +CCValAssign & VA = ArgLocs [ i ] ; +SDValue ArgValue ; +bool IsF64OnXCore = VA . getLocVT ( ) == MVT :: i32 && VA . getValVT ( ) == MVT :: f64 ; +if ( IsF64OnXCore ) { +ArgValue = unpack64 ( DAG , Chain , VA , DL ) ; +} +if ( ! IsF64OnXCore ) { +if ( VA . isRegLoc ( ) ) { +ArgValue = unpackFromRegLoc ( Subtarget , DAG , Chain , VA , DL ) ; +} +} +if ( ! IsF64OnXCore ) { +if ( ! VA . isRegLoc ( ) ) { +ArgValue = unpackFromMemLoc ( DAG , Chain , VA , DL ) ; +} +} +InVals . push_back ( ArgValue ) ; +if ( VA . isRegLoc ( ) ) { +unsigned VReg = MF . addLiveIn ( VA . getLocReg ( ) , getRegClassFor ( VA . getLocVT ( ) ) ) ; +SDValue Arg = DAG . getCopyFromReg ( Chain , DL , VReg , VA . getLocVT ( ) ) ; +if ( VA . getValVT ( ) == MVT :: i32 ) { +if ( VA . needsCustom ( ) ) { +Arg = DAG . getNode ( ISD :: SRL , DL , VA . getLocVT ( ) , Arg , DAG . getConstant ( 32 , DL , MVT :: i32 ) ) ; +} +} +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +Arg = DAG . getNode ( ISD :: AssertSext , DL , VA . getLocVT ( ) , Arg , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +Arg = DAG . getNode ( ISD :: AssertZext , DL , VA . getLocVT ( ) , Arg , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . isExtInLoc ( ) ) { +Arg = DAG . getNode ( ISD :: TRUNCATE , DL , VA . getValVT ( ) , Arg ) ; +} +InVals . push_back ( Arg ) ; +continue ; +} +unsigned Offset = VA . getLocMemOffset ( ) + ArgsBaseOffset ; +unsigned ValSize = VA . getValVT ( ) . getSizeInBits ( ) / 8 ; +int FI = MF . getFrameInfo ( ) . CreateFixedObject ( ValSize , Offset , true ) ; +InVals . push_back ( DAG . getLoad ( VA . getValVT ( ) , DL , Chain , DAG . getFrameIndex ( FI , getPointerTy ( MF . getDataLayout ( ) ) ) , MachinePointerInfo :: getFixedStack ( MF , FI ) ) ) ; +if ( VA . isRegLoc ( ) ) { +EVT RegVT = VA . getLocVT ( ) ; +const TargetRegisterClass * RC ; +if ( RegVT == MVT :: i32 ) { +RC = & XCore :: GPRRegClass ; +} +if ( RegVT == MVT :: f32 ) { +RC = & XCore :: FPRRegClass ; +} +unsigned Reg = MF . addLiveIn ( VA . getLocReg ( ) , RC ) ; +SDValue ArgValue = DAG . getCopyFromReg ( Chain , DL , Reg , RegVT ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: Full ) { +InVals . push_back ( ArgValue ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: BCvt ) { +ArgValue = DAG . getNode ( ISD :: BITCAST , DL , VA . getValVT ( ) , ArgValue ) ; +InVals . push_back ( ArgValue ) ; +} +} +SDValue Val = DAG . getLoad ( VA . getLocInfo ( ) == CCValAssign :: AExt ? VA . getValVT ( ) : VA . getLocVT ( ) , DL , Chain , DAG . getFrameIndex ( FI , getPointerTy ( DAG . getDataLayout ( ) ) ) , MachinePointerInfo :: getFixedStack ( DAG . getMachineFunction ( ) , FI ) ) ; +if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) { +MFI . setObjectZExt ( FI , true ) ; +Val = DAG . getNode ( ISD :: AssertZext , DL , VA . getLocVT ( ) , Val , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) { +MFI . setObjectSExt ( FI , true ) ; +Val = DAG . getNode ( ISD :: AssertSext , DL , VA . getLocVT ( ) , Val , DAG . getValueType ( VA . getValVT ( ) ) ) ; +} +InVals . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VA . getValVT ( ) , Val ) ) ; +} +if ( IsVarArg ) { +const unsigned XLenInBytes = 4 ; +const MVT XLenVT = MVT :: i32 ; +ArrayRef < MCPhysReg > ArgRegs = makeArrayRef ( GPRArgRegs ) ; +unsigned Idx = CCInfo . getFirstUnallocated ( ArgRegs ) ; +const TargetRegisterClass * RC = & XCore :: GPRRegClass ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MachineRegisterInfo & RegInfo = MF . getRegInfo ( ) ; +XCoreMachineFunctionInfo * XCoreFI = MF . getInfo < XCoreMachineFunctionInfo > ( ) ; +int VaArgOffset ; +int VarArgsSaveSize ; +if ( ArgRegs . size ( ) == Idx ) { +VaArgOffset = CCInfo . getNextStackOffset ( ) ; +VarArgsSaveSize = 0 ; +} +if ( ArgRegs . size ( ) != Idx ) { +VarArgsSaveSize = XLenInBytes * ( ArgRegs . size ( ) - Idx ) ; +VaArgOffset = - VarArgsSaveSize ; +} +int FI = MFI . CreateFixedObject ( XLenInBytes , VaArgOffset , true ) ; +XCoreFI -> setVarArgsFrameIndex ( FI ) ; +for ( unsigned i = Idx ; i < ArgRegs . size ( ) ; ++ i , VaArgOffset += XLenInBytes ) { +const Register Reg = RegInfo . createVirtualRegister ( RC ) ; +RegInfo . addLiveIn ( ArgRegs [ i ] , Reg ) ; +SDValue ArgValue = DAG . getCopyFromReg ( Chain , DL , Reg , XLenVT ) ; +FI = MFI . CreateFixedObject ( XLenInBytes , VaArgOffset , true ) ; +SDValue PtrOff = DAG . getFrameIndex ( FI , getPointerTy ( DAG . getDataLayout ( ) ) ) ; +SDValue Store = DAG . getStore ( Chain , DL , ArgValue , PtrOff , MachinePointerInfo :: getFixedStack ( MF , FI ) ) ; +cast < StoreSDNode > ( Store . getNode ( ) ) -> getMemOperand ( ) -> setValue ( ( Value * ) nullptr ) ; +OutChains . push_back ( Store ) ; +} +XCoreFI -> setVarArgsSaveSize ( VarArgsSaveSize ) ; +} +if ( ! OutChains . empty ( ) ) { +OutChains . push_back ( Chain ) ; +Chain = DAG . getNode ( ISD :: TokenFactor , DL , MVT :: Other , OutChains ) ; +} +if ( ! IsVarArg ) { +return Chain ; +} +unsigned ArgOffset = ArgLocs . size ( ) * 8 ; +XCoreMachineFunctionInfo * FuncInfo = MF . getInfo < XCoreMachineFunctionInfo > ( ) ; +FuncInfo -> setVarArgsFrameOffset ( ArgOffset + ArgsBaseOffset ) ; +return Chain ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..852118b282f4e0062a03221a3bb226d0633b1db8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerGlobalAddress.cpp @@ -0,0 +1,13 @@ +SDValue XCoreTargetLowering :: lowerGlobalAddress ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc DL ( Op ) ; +EVT Ty = Op . getValueType ( ) ; +GlobalAddressSDNode * N = cast < GlobalAddressSDNode > ( Op ) ; +int64_t Offset = N -> getOffset ( ) ; +const GlobalValue * GV = N -> getGlobal ( ) ; +bool IsLocal = getTargetMachine ( ) . shouldAssumeDSOLocal ( * GV -> getParent ( ) , GV ) ; +SDValue Addr = getAddr ( N , DAG , IsLocal ) ; +if ( Offset ) { +return DAG . getNode ( ISD :: ADD , DL , Ty , Addr , DAG . getConstant ( Offset , DL , XLenVT ) ) ; +} +return Addr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c53fb82fee7a461966462b332d010f3341876191 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerGlobalTLSAddress.cpp @@ -0,0 +1,9 @@ +SDValue XCoreTargetLowering :: lowerGlobalTLSAddress ( SDValue Op , SelectionDAG & DAG ) const { +if ( DAG . getTarget ( ) . useEmulatedTLS ( ) ) { +} +SDLoc DL ( Op ) ; +SDValue Offset ; +SDValue Addr ; +MFI -> incNumLocalDynamicTLSAccesses ( ) ; +return Addr ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..74a89b469327a0f8a3fd5cf8488a08f0efdf3b2c --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerINIT_TRAMPOLINE.cpp @@ -0,0 +1,22 @@ +SDValue XCoreTargetLowering :: LowerINIT_TRAMPOLINE ( SDValue Op , SelectionDAG & DAG ) const { +SDValue Chain = Op . getOperand ( 0 ) ; +SDValue Trmp = Op . getOperand ( 1 ) ; +SDValue FPtr = Op . getOperand ( 2 ) ; +SDValue Nest = Op . getOperand ( 3 ) ; +SDLoc dl ( Op ) ; +bool isPPC64 = ( PtrVT == MVT :: i64 ) ; +Type * IntPtrTy = DAG . getTargetLoweringInfo ( ) . getDataLayout ( ) -> getIntPtrType ( * DAG . getContext ( ) ) ; +TargetLowering :: ArgListTy Args ; +TargetLowering :: ArgListEntry Entry ; +Entry . Ty = IntPtrTy ; +Entry . Node = Trmp ; +Args . push_back ( Entry ) ; +Entry . Node = DAG . getConstant ( isPPC64 ? 48 : 40 , isPPC64 ? MVT :: i64 : MVT :: i32 ) ; +Args . push_back ( Entry ) ; +Entry . Node = FPtr ; +Args . push_back ( Entry ) ; +Entry . Node = Nest ; +Args . push_back ( Entry ) ; +std :: pair < SDValue , SDValue > CallResult = LowerCallTo ( CLI ) ; +return CallResult . second ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c114af20b5a36676b410b348c9c0e1befcf4b65 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerINTRINSIC_WO_CHAIN.cpp @@ -0,0 +1,27 @@ +SDValue XCoreTargetLowering :: LowerINTRINSIC_WO_CHAIN ( SDValue Op , SelectionDAG & DAG ) const { +MVT PtrVT = DAG . getTargetLoweringInfo ( ) . getPointerTy ( ) ; +unsigned IntNo = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +DebugLoc DL = Op . getDebugLoc ( ) ; +return DAG . getNode ( XCoreISD :: THREAD_POINTER , DL , PtrVT ) ; +SDLoc DL ( Op ) ; +return DAG . getNode ( XCoreISD :: EH_SJLJ_SETJMP , DL , MVT :: i32 , Op . getOperand ( 1 ) ) ; +return DAG . getRegister ( XCore :: G7 , PtrVT ) ; +SmallVector < SDValue , 16 > Ops ( std :: next ( Op -> op_begin ( ) ) , Op -> op_end ( ) ) ; +Ops . push_back ( DAG . getConstant ( Size , DL , MVT :: i257 , SmallTuple ) ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MVT VT = Op . getSimpleValueType ( ) ; +const XCoreTargetMachine * TM = static_cast < const XCoreTargetMachine * > ( & DAG . getTarget ( ) ) ; +TM -> getStrList ( ) -> push_back ( std :: string ( ( Twine ( "GCC_except_table" ) + Twine ( MF . getFunctionNumber ( ) ) ) . str ( ) ) ) ; +SDValue Addr = DAG . getTargetExternalSymbol ( TM -> getStrList ( ) -> back ( ) . c_str ( ) , VT , 0 ) ; +if ( isPositionIndependent ( ) ) { +Addr = makeHiLoPair ( Addr , XCoreMCExpr :: VK_XCore_GOTOFF_HI32 , XCoreMCExpr :: VK_XCore_GOTOFF_LO32 , DAG ) ; +SDValue GlobalBase = DAG . getNode ( XCoreISD :: GLOBAL_BASE_REG , DL , VT ) ; +} +EVT VT = Op . getValueType ( ) ; +const XCoreTargetLowering & TLI = DAG . getTargetLoweringInfo ( ) ; +MVT PtrVT = TLI . getPointerTy ( DAG . getDataLayout ( ) ) ; +auto & Context = MF . getMMI ( ) . getContext ( ) ; +MCSymbol * S = Context . getOrCreateSymbol ( Twine ( "GCC_except_table" ) + Twine ( MF . getFunctionNumber ( ) ) ) ; +return DAG . getNode ( XCoreISD :: Wrapper , DL , VT , DAG . getMCSymbol ( S , PtrVT ) ) ; +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b890e1021e91b8f2db6f900bf971b94653bb82a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerLOAD.cpp @@ -0,0 +1,35 @@ +SDValue XCoreTargetLowering :: LowerLOAD ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc dl ( Op ) ; +StoreSDNode * StoreNode = cast < StoreSDNode > ( Op ) ; +assert ( StoreNode && "Can only custom lower store nodes" ) ; +SDValue Value = StoreNode -> getValue ( ) ; +EVT VT = Value . getValueType ( ) ; +EVT MemVT = StoreNode -> getMemoryVT ( ) ; +assert ( VT . isVector ( ) && "Can only custom lower vector store types" ) ; +unsigned AS = StoreNode -> getAddressSpace ( ) ; +unsigned Align = StoreNode -> getAlignment ( ) ; +if ( Align < MemVT . getStoreSize ( ) && ! allowsMisalignedMemoryAccesses ( MemVT , AS , Align , StoreNode -> getMemOperand ( ) -> getFlags ( ) , nullptr ) ) { +return scalarizeVectorStore ( StoreNode , DAG ) ; +} +if ( StoreNode -> isTruncatingStore ( ) ) { +return LowerTruncateVectorStore ( Dl , StoreNode , VT , MemVT , DAG ) ; +} +EVT VT = StoreNode -> getMemoryVT ( ) ; +if ( VT == MVT :: i1 ) { +return LowerSTOREi1 ( Op , DAG ) ; +} +if ( VT == MVT :: v2f16 && ! allowsMemoryAccess ( * DAG . getContext ( ) , DAG . getDataLayout ( ) , VT , StoreNode -> getAddressSpace ( ) , StoreNode -> getAlignment ( ) ) ) { +return expandUnalignedStore ( Store , DAG ) ; +} +if ( VT . isVector ( ) ) { +return LowerSTOREVector ( Op , DAG ) ; +} +if ( MemVT == MVT :: f128 ) { +return LowerF128Store ( Op , DAG ) ; +} +if ( MemVT == MVT :: i64 ) { +SDValue Val = DAG . getNode ( ISD :: BITCAST , dl , MVT :: v2i32 , StoreNode -> getValue ( ) ) ; +SDValue Chain = DAG . getStore ( StoreNode -> getChain ( ) , dl , Val , StoreNode -> getBasePtr ( ) , StoreNode -> getPointerInfo ( ) , StoreNode -> getAlignment ( ) , StoreNode -> getMemOperand ( ) -> getFlags ( ) , StoreNode -> getAAInfo ( ) ) ; +} +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerOperation.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerOperation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..100cc6d313c3987ad9541075e5ac18a1a2eb5258 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerOperation.cpp @@ -0,0 +1,3 @@ +SDValue XCoreTargetLowering :: LowerOperation ( SDValue Op , SelectionDAG & DAG ) const { +report_fatal_error ( "unimplemented operand" ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6cc5fd48ab4e865959bd051d75abd8b25801c605 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerRETURNADDR.cpp @@ -0,0 +1,19 @@ +SDValue XCoreTargetLowering :: lowerRETURNADDR ( SDValue Op , SelectionDAG & DAG ) const { +const XCoreRegisterInfo & RI = * Subtarget . getRegisterInfo ( ) ; +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MachineFrameInfo & MFI = MF . getFrameInfo ( ) ; +MFI . setReturnAddressIsTaken ( true ) ; +if ( verifyReturnAddressArgumentIsConstant ( Op , DAG ) ) { +return SDValue ( ) ; +} +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +unsigned Depth = cast < ConstantSDNode > ( Op . getOperand ( 0 ) ) -> getZExtValue ( ) ; +if ( Depth ) { +int Off = - XLenInBytes ; +SDValue FrameAddr = lowerFRAMEADDR ( Op , DAG ) ; +SDValue Offset = DAG . getConstant ( Off , DL , VT ) ; +return DAG . getLoad ( VT , DL , DAG . getEntryNode ( ) , DAG . getNode ( ISD :: ADD , DL , VT , FrameAddr , Offset ) , MachinePointerInfo ( ) ) ; +} +return DAG . getCopyFromReg ( DAG . getEntryNode ( ) , DL , Reg , XLenVT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerReturn.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerReturn.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b46e7f2904872beff028810a63f56cf215e9d6ea --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerReturn.cpp @@ -0,0 +1,40 @@ +SDValue XCoreTargetLowering :: LowerReturn ( SDValue Chain , CallingConv :: ID CallConv , bool isVarArg , const SmallVectorImpl < ISD :: OutputArg > & Outs , const SmallVectorImpl < SDValue > & OutVals , const SDLoc & dl , SelectionDAG & DAG ) const { +auto * AFI = DAG . getMachineFunction ( ) . getInfo < XCoreFunctionInfo > ( ) ; +MachineFrameInfo * MFI = DAG . getMachineFunction ( ) . getFrameInfo ( ) ; +SmallVector < CCValAssign , 16 > RVLocs ; +CCState CCInfo ( CallConv , IsVarArg , DAG . getMachineFunction ( ) , getTargetMachine ( ) , RVLocs , * DAG . getContext ( ) ) ; +if ( ! IsVarArg ) { +CCInfo . AllocateStack ( AFI -> getReturnStackOffset ( ) , 4 ) ; +} +CCInfo . AnalyzeReturn ( Outs , RetCC_XCore ) ; +SDValue Flag ; +SmallVector < SDValue , 12 > MemOpChains ; +for ( unsigned i = 0 , e = RVLocs . size ( ) ; i != e ; ++ i ) { +CCValAssign & VA = RVLocs [ i ] ; +if ( VA . isRegLoc ( ) ) { +continue ; +} +assert ( VA . isMemLoc ( ) ) ; +report_fatal_error ( "Can't return value from vararg function in memory" ) ; +} +int Offset = VA . getLocMemOffset ( ) ; +unsigned ObjSize = VA . getLocVT ( ) . getStoreSize ( ) / 8 ; +int FI = MFI -> CreateFixedObject ( ObjSize , Offset , false ) ; +SDValue FIN = DAG . getFrameIndex ( FI , MVT :: i32 ) ; +MemOpChains . push_back ( DAG . getStore ( Chain , dl , OutVals [ i ] , FIN , MachinePointerInfo :: getFixedStack ( FI ) , false , false , 0 ) ) ; +} +if ( ! MemOpChains . empty ( ) ) { +Chain = DAG . getNode ( ISD :: TokenFactor , dl , MVT :: Other , & MemOpChains [ 0 ] , MemOpChains . size ( ) ) ; +} +for ( unsigned i = 0 , e = RVLocs . size ( ) ; i != e ; ++ i ) { +CCValAssign & VA = RVLocs [ i ] ; +if ( ! VA . isRegLoc ( ) ) { +continue ; +} +Chain = DAG . getCopyToReg ( Chain , dl , VA . getLocReg ( ) , OutVals [ i ] , Flag ) ; +Flag = Chain . getValue ( 1 ) ; +} +RetOps [ 0 ] = Chain ; +if ( Flag . getNode ( ) ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56326d00cd66b0f0e976f95bc11c011c6bf8b665 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSELECT_CC.cpp @@ -0,0 +1,5 @@ +SDValue XCoreTargetLowering :: LowerSELECT_CC ( SDValue Op , SelectionDAG & DAG ) const { +DebugLoc dl = Op . getDebugLoc ( ) ; +SDValue Cond = DAG . getNode ( ISD :: SETCC , dl , MVT :: i32 , Op . getOperand ( 2 ) , Op . getOperand ( 3 ) , Op . getOperand ( 4 ) ) ; +return DAG . getNode ( ISD :: SELECT , dl , MVT :: i32 , Cond , Op . getOperand ( 0 ) , Op . getOperand ( 1 ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..60807f16b06e0880ac28159e4c517095e8255fb4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSMUL_LOHI.cpp @@ -0,0 +1,24 @@ +SDValue XCoreTargetLowering :: LowerSMUL_LOHI ( SDValue Op , SelectionDAG & DAG ) const { +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +SDValue Ops [ 2 ] ; +if ( is32Bit ( VT ) ) { +lowerMUL_LOHI32 ( DAG , DL , ISD :: SIGN_EXTEND , Op . getOperand ( 0 ) , Op . getOperand ( 1 ) , Ops [ 1 ] , Ops [ 0 ] ) ; +} +else if ( Subtarget . hasMiscellaneousExtensions2 ( ) ) { +lowerGR128Binary ( DAG , DL , VT , XCoreISD :: SMUL_LOHI , Op . getOperand ( 0 ) , Op . getOperand ( 1 ) , Ops [ 1 ] , Ops [ 0 ] ) ; +} +else { +SDValue C63 = DAG . getConstant ( 63 , DL , MVT :: i64 ) ; +SDValue LL = Op . getOperand ( 0 ) ; +SDValue RL = Op . getOperand ( 1 ) ; +SDValue LH = DAG . getNode ( ISD :: SRA , DL , VT , LL , C63 ) ; +SDValue RH = DAG . getNode ( ISD :: SRA , DL , VT , RL , C63 ) ; +lowerGR128Binary ( DAG , DL , VT , XCoreISD :: UMUL_LOHI , LL , RL , Ops [ 1 ] , Ops [ 0 ] ) ; +SDValue NegLLTimesRH = DAG . getNode ( ISD :: AND , DL , VT , LL , RH ) ; +SDValue NegLHTimesRL = DAG . getNode ( ISD :: AND , DL , VT , LH , RL ) ; +SDValue NegSum = DAG . getNode ( ISD :: ADD , DL , VT , NegLLTimesRH , NegLHTimesRL ) ; +Ops [ 1 ] = DAG . getNode ( ISD :: SUB , DL , VT , Ops [ 1 ] , NegSum ) ; +} +return DAG . getMergeValues ( Ops , DL ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f5cb74c17dcdb18da089f3efe9371c427ee72385 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSTACKSAVE.cpp @@ -0,0 +1,5 @@ +SDValue XCoreTargetLowering :: LowerSTACKSAVE ( SDValue Op , SelectionDAG & DAG ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +MF . getInfo < XCoreMachineFunctionInfo > ( ) -> setManipulatesSP ( true ) ; +return DAG . getCopyFromReg ( Op . getOperand ( 0 ) , SDLoc ( Op ) , XCore :: R15D , Op . getValueType ( ) ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39e961cb5b3c120f02cfea8c58fca537f5300fbd --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerSTORE.cpp @@ -0,0 +1,35 @@ +SDValue XCoreTargetLowering :: LowerSTORE ( SDValue Op , SelectionDAG & DAG ) const { +SDLoc dl ( Op ) ; +StoreSDNode * StoreNode = cast < StoreSDNode > ( Op ) ; +assert ( StoreNode && "Can only custom lower store nodes" ) ; +SDValue Value = StoreNode -> getValue ( ) ; +EVT VT = Value . getValueType ( ) ; +EVT MemVT = StoreNode -> getMemoryVT ( ) ; +assert ( VT . isVector ( ) && "Can only custom lower vector store types" ) ; +unsigned AS = StoreNode -> getAddressSpace ( ) ; +unsigned Align = StoreNode -> getAlignment ( ) ; +if ( Align < MemVT . getStoreSize ( ) && ! allowsMisalignedMemoryAccesses ( MemVT , AS , Align , StoreNode -> getMemOperand ( ) -> getFlags ( ) , nullptr ) ) { +return scalarizeVectorStore ( StoreNode , DAG ) ; +} +if ( StoreNode -> isTruncatingStore ( ) ) { +return LowerTruncateVectorStore ( Dl , StoreNode , VT , MemVT , DAG ) ; +} +EVT VT = StoreNode -> getMemoryVT ( ) ; +if ( VT == MVT :: i1 ) { +return LowerSTOREi1 ( Op , DAG ) ; +} +if ( VT == MVT :: v2f16 && ! allowsMemoryAccess ( * DAG . getContext ( ) , DAG . getDataLayout ( ) , VT , StoreNode -> getAddressSpace ( ) , StoreNode -> getAlignment ( ) ) ) { +return expandUnalignedStore ( Store , DAG ) ; +} +if ( VT . isVector ( ) ) { +return LowerSTOREVector ( Op , DAG ) ; +} +if ( MemVT == MVT :: f128 ) { +return LowerF128Store ( Op , DAG ) ; +} +if ( MemVT == MVT :: i64 ) { +SDValue Val = DAG . getNode ( ISD :: BITCAST , dl , MVT :: v2i32 , StoreNode -> getValue ( ) ) ; +SDValue Chain = DAG . getStore ( StoreNode -> getChain ( ) , dl , Val , StoreNode -> getBasePtr ( ) , StoreNode -> getPointerInfo ( ) , StoreNode -> getAlignment ( ) , StoreNode -> getMemOperand ( ) -> getFlags ( ) , StoreNode -> getAAInfo ( ) ) ; +} +return SDValue ( ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9da77e1c2a6ead9df613a6f9d92d8b6be5007aa2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerUMUL_LOHI.cpp @@ -0,0 +1,12 @@ +SDValue XCoreTargetLowering :: LowerUMUL_LOHI ( SDValue Op , SelectionDAG & DAG ) const { +EVT VT = Op . getValueType ( ) ; +SDLoc DL ( Op ) ; +SDValue Ops [ 2 ] ; +if ( is32Bit ( VT ) ) { +lowerMUL_LOHI32 ( DAG , DL , ISD :: ZERO_EXTEND , Op . getOperand ( 0 ) , Op . getOperand ( 1 ) , Ops [ 1 ] , Ops [ 0 ] ) ; +} +else { +lowerGR128Binary ( DAG , DL , VT , XCoreISD :: UMUL_LOHI , Op . getOperand ( 0 ) , Op . getOperand ( 1 ) , Ops [ 1 ] , Ops [ 0 ] ) ; +} +return DAG . getMergeValues ( Ops , DL ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp new file mode 100644 index 0000000000000000000000000000000000000000..391509a77236693cf5d4f3418832b72c4c5686ab --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerVAARG.cpp @@ -0,0 +1,13 @@ +SDValue XCoreTargetLowering :: LowerVAARG ( SDValue Op , SelectionDAG & DAG ) const { +llvm_unreachable ( "unimplemented" ) ; +SDNode * Node = Op . getNode ( ) ; +EVT VT = Node -> getValueType ( 0 ) ; +SDValue InChain = Node -> getOperand ( 0 ) ; +SDValue VAListPtr = Node -> getOperand ( 1 ) ; +const Value * SV = cast < SrcValueSDNode > ( Node -> getOperand ( 2 ) ) -> getValue ( ) ; +DebugLoc DL = Node -> getDebugLoc ( ) ; +SDValue VAList = DAG . getLoad ( getPointerTy ( ) , DL , InChain , VAListPtr , MachinePointerInfo ( SV ) , false , false , 0 ) ; +SDValue NextPtr = DAG . getNode ( ISD :: ADD , DL , getPointerTy ( ) , VAList , DAG . getIntPtrConstant ( VT . getSizeInBits ( ) , getPointerTy ( ) ) ) ; +NextPtr = DAG . getStore ( VAList . getValue ( 1 ) , DL , NextPtr , VAListPtr , MachinePointerInfo ( SV ) , false , false , 0 ) ; +return DAG . getLoad ( VT , DL , InChain , VAList , MachinePointerInfo ( ) , false , false , 0 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25175128ece3327adc4cccc4c533f58b679e79e1 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/LowerVASTART.cpp @@ -0,0 +1,7 @@ +SDValue XCoreTargetLowering :: LowerVASTART ( SDValue Op , SelectionDAG & DAG ) const { +MachineFunction & MF = DAG . getMachineFunction ( ) ; +XCoreFunctionInfo * FuncInfo = MF . getInfo < XCoreFunctionInfo > ( ) ; +DebugLoc dl = Op . getDebugLoc ( ) ; +SDValue FR = DAG . getFrameIndex ( FuncInfo -> getVarArgsFrameIndex ( ) , MVT :: i32 ) ; +return DAG . getStore ( Op . getOperand ( 0 ) , dl , FR , Op . getOperand ( 1 ) , MachinePointerInfo ( ) , false , false , 0 ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/NodeType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a1ee15c8b3b2429e290055b06727738ecfdd0e4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/NodeType.cpp @@ -0,0 +1,30 @@ +enum NodeType { + FIRST_NUMBER = ISD::BUILTIN_OP_END, + BL, + PCRelativeWrapper, + DPRelativeWrapper, + CPRelativeWrapper, + ABS16Wrapper, + LDWSP, + STWSP, + RETSP, + OUTPW, + INPW, + LADD, + LSUB, + LMUL, + MACCU, + MACCS, + BR_JT, + BR_JT32, + FRAME_TO_ARGS_OFFSET, + EH_RETURN, + MEMBARRIER, + RETURN_REG_HOLDER, + STACKSAVE, + STACKRESTORE, + STACKUP, + STACKDOWN, + ALLOCA, + LOOPMARKER +}; diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..597c1ae775c31e9f33af30658fb40cb161b1c55e --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/PerformDAGCombine.cpp @@ -0,0 +1,5 @@ +SDValue XCoreTargetLowering :: PerformDAGCombine ( SDNode * N , DAGCombinerInfo & DCI ) const { +SDValue Val ; +if ( Val . getNode ( ) ) { +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56b3b1e6b9b0fe74f417152018ceede1d8d3fdf6 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/ReplaceNodeResults.cpp @@ -0,0 +1,225 @@ +void XCoreTargetLowering :: ReplaceNodeResults ( SDNode * N , SmallVectorImpl < SDValue > & Results , SelectionDAG & DAG ) const { +SDValue Res ; +if ( N -> getOpcode ( ) == ISD :: STRICT_FP_TO_SINT ) { +ExpandREAD_REGISTER ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: STRICT_FP_TO_UINT ) { +Res = ExpandBITCAST ( N , DAG , Subtarget ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FP_TO_SINT ) { +ReplaceBITCASTResults ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FP_TO_UINT ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: READCYCLECOUNTER ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: ADD ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerREM ( N , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: SUB ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerREM ( N , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: FSHL ) { +Results . push_back ( LowerVECREDUCE ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerDivRem ( SDValue ( N , 0 ) , DAG ) ; +Results . push_back ( Res . getValue ( 0 ) ) ; +Results . push_back ( Res . getValue ( 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: MUL ) { +Results . push_back ( LowerCTPOP ( SDValue ( N , 0 ) , DAG ) ) ; +Res = LowerDivRem ( SDValue ( N , 0 ) , DAG ) ; +Results . push_back ( Res . getValue ( 0 ) ) ; +Results . push_back ( Res . getValue ( 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: SHL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: ADD , XCoreISD :: SADDV ) ; +Res = LowerSADDSUBSAT ( SDValue ( N , 0 ) , DAG , Subtarget ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: SRA ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: ADD , XCoreISD :: UADDV ) ; +Res = LowerSADDSUBSAT ( SDValue ( N , 0 ) , DAG , Subtarget ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: SRL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: SMIN , XCoreISD :: SMINVV ) ; +ReplaceREADCYCLECOUNTER ( N , Results , DAG , Subtarget ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +return ; +} +if ( N -> getOpcode ( ) == ISD :: ROTL ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: UMINV , XCoreISD :: UMINV ) ; +return ; +return ExpandDIV_Windows ( SDValue ( N , 0 ) , DAG , N -> getOpcode ( ) == ISD :: SDIV , Results ) ; +} +if ( N -> getOpcode ( ) == ISD :: ROTR ) { +return ; +} +if ( N -> getOpcode ( ) == ISD :: SDIV ) { +ReplaceReductionResults ( N , Results , DAG , ISD :: UMAX , XCoreISD :: UMAXVV ) ; +return ; +} +SDLoc DL ( N ) ; +RTLIB :: Libcall libCall = RTLIB :: UNKNOWN_LIBCALL ; +if ( N -> getOpcode ( ) == ISD :: UDIV ) { +ReplaceCMP_SWAP_128Results ( N , Results , DAG , Subtarget ) ; +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: f128 ) { +return ; +} +if ( N -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: FPTOSINT_F128_I64 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: UREM ) { +LoadSDNode * LoadNode = cast < LoadSDNode > ( N ) ; +if ( ! LoadNode -> isVolatile ( ) ) { +return ; +} +if ( LoadNode -> getMemoryVT ( ) != MVT :: i128 ) { +return ; +} +SDValue Result = DAG . getMemIntrinsicNode ( XCoreISD :: LDP , SDLoc ( N ) , DAG . getVTList ( { MVT :: i64 , MVT :: i64 , MVT :: Other } ) , { LoadNode -> getChain ( ) , LoadNode -> getBasePtr ( ) } , LoadNode -> getMemoryVT ( ) , LoadNode -> getMemOperand ( ) ) ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , SDLoc ( N ) , MVT :: i128 , Result . getValue ( 0 ) , Result . getValue ( 1 ) ) ; +Results . append ( { Pair , Result . getValue ( 2 ) } ) ; +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: f128 ) { +return ; +} +if ( N -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: FPTOUINT_F128_I64 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: BITCAST ) { +ReplaceCMP_SWAP_128Results ( N , Results , DAG , Subtarget ) ; +ReplaceExtractSubVectorResults ( N , Results , DAG ) ; +SDValue Lo = DAG . getCopyFromReg ( N -> getOperand ( 0 ) , DL , XCore :: ASR23 , MVT :: i32 ) ; +SDValue Hi = DAG . getCopyFromReg ( Lo , DL , XCore :: G0 , MVT :: i32 ) ; +SDValue Ops [ ] = { Lo , Hi } ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , DL , MVT :: i64 , Ops ) ; +Results . push_back ( Pair ) ; +return ; +} +if ( N -> getOpcode ( ) == XCoreISD::GREVI ) { +LoadSDNode * LoadNode = cast < LoadSDNode > ( N ) ; +if ( ! LoadNode -> isVolatile ( ) ) { +return ; +} +if ( LoadNode -> getMemoryVT ( ) != MVT :: i128 ) { +return ; +} +SDValue Result = DAG . getMemIntrinsicNode ( XCoreISD :: LDP , SDLoc ( N ) , DAG . getVTList ( { MVT :: i64 , MVT :: i64 , MVT :: Other } ) , { LoadNode -> getChain ( ) , LoadNode -> getBasePtr ( ) } , LoadNode -> getMemoryVT ( ) , LoadNode -> getMemOperand ( ) ) ; +SDValue Pair = DAG . getNode ( ISD :: BUILD_PAIR , SDLoc ( N ) , MVT :: i128 , Result . getValue ( 0 ) , Result . getValue ( 1 ) ) ; +Results . append ( { Pair , Result . getValue ( 2 ) } ) ; +if ( N -> getValueType ( 0 ) != MVT :: f128 ) { +return ; +} +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: SINTTOFP_I64_F128 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +return ReplaceLongIntrinsic ( N , Results , DAG ) ; +} +if ( N -> getOpcode ( ) == XCoreISD :: GORCI ) { +ReplaceExtractSubVectorResults ( N , Results , DAG ) ; +ReplaceLongIntrinsic ( N , Results , DAG ) ; +if ( N -> getValueType ( 0 ) != MVT :: f128 ) { +return ; +} +if ( N -> getOperand ( 0 ) . getValueType ( ) != MVT :: i64 ) { +return ; +} +libCall = RTLIB :: UINTTOFP_I64_F128 ; +Results . push_back ( LowerF128Op ( SDValue ( N , 0 ) , DAG , getLibcallName ( libCall ) , 1 ) ) ; +return ; +} +if ( N -> getOpcode ( ) == ISD :: BSWAP ) { +EVT VT = N -> getValueType ( 0 ) ; +ConstantSDNode * CN = cast < ConstantSDNode > ( N -> getOperand ( 0 ) ) ; +Intrinsic :: ID IntID = static_cast < Intrinsic :: ID > ( CN -> getZExtValue ( ) ) ; +if ( IntID == Intrinsic :: aarch64_sve_clasta_n ) { +SDLoc DL ( N ) ; +auto Op2 = DAG . getNode ( ISD :: ANY_EXTEND , DL , MVT :: i32 , N -> getOperand ( 2 ) ) ; +auto V = DAG . getNode ( XCoreISD :: CLASTA_N , DL , MVT :: i32 , N -> getOperand ( 1 ) , Op2 , N -> getOperand ( 3 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +} +if ( IntID == Intrinsic :: aarch64_sve_lasta ) { +SDLoc DL ( N ) ; +auto V = DAG . getNode ( XCoreISD :: LASTA , DL , MVT :: i32 , N -> getOperand ( 1 ) , N -> getOperand ( 2 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +} +if ( IntID == Intrinsic :: aarch64_sve_lastb ) { +SDLoc DL ( N ) ; +auto V = DAG . getNode ( XCoreISD :: LASTB , DL , MVT :: i32 , N -> getOperand ( 1 ) , N -> getOperand ( 2 ) ) ; +Results . push_back ( DAG . getNode ( ISD :: TRUNCATE , DL , VT , V ) ) ; +return ; +} +LowerLOAD ( N , Results , DAG ) ; +if ( Res . getNode ( ) ) { +Results . push_back ( Res ) ; +} +LoadSDNode * Ld = cast < LoadSDNode > ( N ) ; +if ( Ld -> getValueType ( 0 ) != MVT :: i64 ) { +return ; +} +if ( Ld -> getMemoryVT ( ) != MVT :: i64 ) { +return ; +} +SDLoc DL ( N ) ; +SDValue LoadRes = DAG . getExtLoad ( Ld -> getExtensionType ( ) , DL , MVT :: v2i32 , Ld -> getChain ( ) , Ld -> getBasePtr ( ) , Ld -> getPointerInfo ( ) , MVT :: v2i32 , Ld -> getAlignment ( ) , Ld -> getMemOperand ( ) -> getFlags ( ) , Ld -> getAAInfo ( ) ) ; +SDValue Res = DAG . getNode ( ISD :: BITCAST , DL , MVT :: i64 , LoadRes ) ; +Results . push_back ( Res ) ; +Results . push_back ( LoadRes . getValue ( 1 ) ) ; +return ; +} +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/TargetLowering.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/TargetLowering.cpp new file mode 100644 index 0000000000000000000000000000000000000000..528e265e6742dd15a1c14b5f6494a0bcc27a8e7a --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/TargetLowering.cpp @@ -0,0 +1,42 @@ +XCoreTargetLowering :: XCoreTargetLowering ( const TargetMachine & TM , const XCoreSubtarget & STI ) : TargetLowering ( TM ) , Subtarget ( STI ) { +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setStackPointerRegisterToSaveRestore ( XCore :: X1 ) ; +for ( auto N : { ISD :: EXTLOAD , ISD :: SEXTLOAD , ISD :: ZEXTLOAD } ) { +} +setBooleanContents ( ZeroOrOneBooleanContent ) ; +addRegisterClass ( MVT :: i32 , & XCore :: GPRRegClass ) ; +TRI = STI . getRegisterInfo ( ) ; +computeRegisterProperties ( TRI ) ; +auto * RegInfo = Subtarget . getRegisterInfo ( ) ; +setBooleanVectorContents ( ZeroOrNegativeOneBooleanContent ) ; +setBooleanContents ( ZeroOrOneBooleanContent , ZeroOrNegativeOneBooleanContent ) ; +} +} +for ( auto CC : FPCCToExtend ) { +setLoadExtAction ( ISD :: SEXTLOAD , VT , MVT :: i1 , Promote ) ; +setLoadExtAction ( ISD :: ZEXTLOAD , VT , MVT :: i1 , Promote ) ; +if ( F16VT . isValid ( ) ) { +} +} +if ( Subtarget . atLeastM68020 ( ) ) { +} +setBooleanContents ( ZeroOrOneBooleanContent ) ; +setMinimumJumpTableEntries ( INT_MAX ) ; +setCondCodeAction ( CC , VT , Expand ) ; +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setBooleanContents ( UndefinedBooleanContent ) ; +setBooleanVectorContents ( ZeroOrNegativeOneBooleanContent ) ; +setMaxAtomicSizeInBitsSupported ( 0 ) ; +setStackPointerRegisterToSaveRestore ( XCore :: R14 ) ; +const Align FunctionAlignment ( 2 ) ; +setStackPointerRegisterToSaveRestore ( XCore :: R3 ) ; +setMinFunctionAlignment ( FunctionAlignment ) ; +setSchedulingPreference ( Sched :: Source ) ; +setJumpIsExpensive ( true ) ; +setLibcallCallingConv ( static_cast < RTLIB :: Libcall > ( I ) , CallingConv :: Fast ) ; +setBooleanContents ( ZeroOrOneBooleanContent ) ; +computeRegisterProperties ( ) ; +computeRegisterProperties ( STI . getRegisterInfo ( ) ) ; +setMinFunctionAlignment ( Align :: Constant < 2 > ( ) ) ; +setStackPointerRegisterToSaveRestore ( ABI . IsN64 ( ) ? XCore :: SP_64 : XCore :: SP ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..719f4f494556e7e5180fa3a3976a87840dc69030 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/computeMaskedBitsForTargetNode.cpp @@ -0,0 +1,170 @@ +void XCoreTargetLowering :: computeKnownBitsForTargetNode ( const SDValue Op , KnownBits & Known , const APInt & DemandedElts , const SelectionDAG & DAG , unsigned Depth ) const { +KnownZero = KnownOne = APInt ( KnownOne . getBitWidth ( ) , 0 ) ; +APInt KnownZero2 ; +APInt KnownOne2 ; +unsigned BitWidth = Known . getBitWidth ( ) ; +unsigned Opc = Op . getOpcode ( ) ; +EVT VT = Op . getValueType ( ) ; +Known . resetAll ( ) ; +if ( Op . getOpcode ( ) == XCoreISD :: REMUW ) { +KnownZero = APInt :: getHighBitsSet ( 32 , 31 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +} +if ( Op . getOpcode ( ) == XCoreISD :: DIVUW ) { +KnownBits Known2 ; +DAG . computeKnownBits ( Op . getOperand ( 0 ) , Known , Depth + 1 ) ; +DAG . computeKnownBits ( Op . getOperand ( 1 ) , Known2 , Depth + 1 ) ; +Known . Zero = Known . Zero & Known2 . Zero ; +Known . One = Known . One & Known2 . One ; +KnownZero = APInt :: getHighBitsSet ( 32 , 31 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +} +unsigned BitWidth = Known . getBitWidth ( ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getOpcode ( ) == XCoreISD :: READ_VLENB ) { +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +} +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +if ( Op . getResNo ( ) == 0 ) { +return ; +} +Known . Zero . setBitsFrom ( 1 ) ; +unsigned NumLoBits = Op . getOperand ( 0 ) . getValueType ( ) . getVectorNumElements ( ) ; +Known . Zero . setBitsFrom ( NumLoBits ) ; +if ( auto * ShiftImm = dyn_cast < ConstantSDNode > ( Op . getOperand ( 1 ) ) ) { +if ( ShiftImm -> getAPIntValue ( ) . uge ( VT . getScalarSizeInBits ( ) ) ) { +Known . setAllZero ( ) ; +break ; +} +DAG . computeKnownBits ( Op . getOperand ( 0 ) , Known , Depth + 1 ) ; +unsigned ShAmt = ShiftImm -> getZExtValue ( ) ; +Known . Zero . lshrInPlace ( ShAmt ) ; +Known . One . lshrInPlace ( ShAmt ) ; +Known . Zero . setHighBits ( ShAmt ) ; +} +ConstantSDNode * CN = cast < ConstantSDNode > ( Op -> getOperand ( 1 ) ) ; +Intrinsic :: ID IntID = static_cast < Intrinsic :: ID > ( CN -> getZExtValue ( ) ) ; +unsigned BitWidth = Known . getBitWidth ( ) ; +EVT VT = cast < MemIntrinsicSDNode > ( Op ) -> getMemoryVT ( ) ; +unsigned MemBits = VT . getScalarSizeInBits ( ) ; +Known . Zero = Known . Zero | APInt :: getHighBitsSet ( BitWidth , BitWidth - MemBits ) ; +return ; +unsigned BitWidth = Known . getBitWidth ( ) ; +EVT VT = cast < MemIntrinsicSDNode > ( Op ) -> getMemoryVT ( ) ; +unsigned MemBits = VT . getScalarSizeInBits ( ) ; +Known . Zero = Known . Zero | APInt :: getHighBitsSet ( BitWidth , BitWidth - MemBits ) ; +return ; +ConstantSDNode * CWidth = dyn_cast < ConstantSDNode > ( Op . getOperand ( 2 ) ) ; +if ( ! CWidth ) { +return ; +} +unsigned BitWidth = 32 ; +uint32_t Width = CWidth -> getZExtValue ( ) & 0x1f ; +Known = KnownBits ( BitWidth ) ; +Known . Zero . setBits ( 1 , BitWidth ) ; +if ( auto * ShiftImm = dyn_cast < ConstantSDNode > ( Op . getOperand ( 1 ) ) ) { +if ( ShiftImm -> getAPIntValue ( ) . uge ( VT . getScalarSizeInBits ( ) ) ) { +Known . setAllZero ( ) ; +break ; +} +DAG . computeKnownBits ( Op . getOperand ( 0 ) , Known , Depth + 1 ) ; +unsigned ShAmt = ShiftImm -> getZExtValue ( ) ; +Known . Zero = Known . Zero << ShAmt ; +Known . One = Known . One << ShAmt ; +Known . Zero . setLowBits ( ShAmt ) ; +} +Intrinsic :: ID IntID = static_cast < Intrinsic :: ID > ( Op . getOperand ( 0 ) -> getZExtValue ( ) ) ; +unsigned BitWidth = Known . getBitWidth ( ) ; +if ( VT == MVT :: v16i8 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 8 ) ; +Known . Zero = Known . Zero | Mask ; +} +if ( VT == MVT :: v8i8 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 8 ) ; +Known . Zero = Known . Zero | Mask ; +} +if ( VT == MVT :: v4i16 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 16 ) ; +Known . Zero = Known . Zero | Mask ; +} +if ( VT == MVT :: v8i16 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 16 ) ; +Known . Zero = Known . Zero | Mask ; +} +unsigned BitWidth = Known . getBitWidth ( ) ; +if ( VT == MVT :: v8i8 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 8 ) ; +Known . Zero = Known . Zero | Mask ; +} +if ( VT == MVT :: v16i8 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 8 ) ; +Known . Zero = Known . Zero | Mask ; +} +if ( VT == MVT :: v4i16 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 16 ) ; +Known . Zero = Known . Zero | Mask ; +} +if ( VT == MVT :: v8i16 ) { +APInt Mask = APInt :: getHighBitsSet ( BitWidth , BitWidth - 16 ) ; +Known . Zero = Known . Zero | Mask ; +} +ConstantSDNode * CWidth = dyn_cast < ConstantSDNode > ( Op . getOperand ( 2 ) ) ; +if ( ! CWidth ) { +return ; +} +unsigned BitWidth = 32 ; +uint32_t Width = CWidth -> getZExtValue ( ) & 0x1f ; +KnownZero = APInt :: getHighBitsSet ( BitWidth , BitWidth - Width ) ; +KnownBits Known2 ; +SDValue N0 = Op . getOperand ( 0 ) ; +unsigned NumElts = VT . getVectorNumElements ( ) ; +EVT SrcVT = N0 . getValueType ( ) ; +unsigned InNumElts = SrcVT . getVectorNumElements ( ) ; +unsigned InBitWidth = SrcVT . getScalarSizeInBits ( ) ; +Known2 = DAG . computeKnownBits ( Op -> getOperand ( 1 ) , Depth + 1 ) ; +Known . Zero = Known . Zero & Known2 . Zero ; +Known . One = Known . One & Known2 . One ; +APInt DemandedSrcElts = APInt :: getLowBitsSet ( InNumElts , NumElts ) ; +DAG . computeKnownBits ( N0 , Known , DemandedSrcElts , Depth + 1 ) ; +Known = Known . zext ( BitWidth ) ; +Known . Zero . setBitsFrom ( InBitWidth ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/enum NodeType.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/enum NodeType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b6a459394d7eea05a2ffde5ec5985951b1c56d39 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/enum NodeType.cpp @@ -0,0 +1,30 @@ +enum NodeType { +FIRST_NUMBER = ISD :: BUILTIN_OP_END , +BL , +PCRelativeWrapper , +DPRelativeWrapper , +CPRelativeWrapper , +ABS16Wrapper , +LDWSP , +STWSP , +RETSP , +OUTPW , +INPW , +LADD , +LSUB , +LMUL , +MACCU , +MACCS , +BR_JT , +BR_JT32 , +FRAME_TO_ARGS_OFFSET , +EH_RETURN , +MEMBARRIER , +RETURN_REG_HOLDER , +STACKSAVE , +STACKRESTORE , +STACKUP , +STACKDOWN , +ALLOCA , +LOOPMARKER +} ; \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1eb25c3c5251d071444e8e8d4613e46e22e17c58 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getJumpTableEncoding.cpp @@ -0,0 +1,3 @@ +unsigned XCoreTargetLowering :: getJumpTableEncoding ( ) const { +return MachineJumpTableInfo :: EK_Inline ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbb4b0f13c9c138b4feb398075a20011ab488f43 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getRegForInlineAsmConstraint.cpp @@ -0,0 +1,10 @@ +std :: pair < unsigned , const TargetRegisterClass * > XCoreTargetLowering :: getRegForInlineAsmConstraint ( const std :: string & Constraint , EVT VT ) const { +if ( Constraint . size ( ) == 1 ) { +if ( Constraint [ 0 ] == 'r' ) { +if ( VT . getSizeInBits ( ) <= 32 ) { +return std :: make_pair ( 0U , XCore :: GRRegsRegisterClass ) ; +} +} +} +return TargetLowering :: getRegForInlineAsmConstraint ( Constraint , VT ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35ca7a530662765a419db2d7e551075b87b88ea4 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getShiftAmountTy.cpp @@ -0,0 +1,3 @@ +virtual MVT getShiftAmountTy ( EVT LHSTy ) const { +return MVT :: i32 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp new file mode 100644 index 0000000000000000000000000000000000000000..47021ab56cd424d11745f79e585d63418a9b70f8 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/getTargetNodeName.cpp @@ -0,0 +1,63 @@ +const char * XCoreTargetLowering :: getTargetNodeName ( unsigned Opcode ) const { +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: BL ) { +return "XCoreISD::BL" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: PCRelativeWrapper ) { +return "XCoreISD::PCRelativeWrapper" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: DPRelativeWrapper ) { +return "XCoreISD::DPRelativeWrapper" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: CPRelativeWrapper ) { +return "XCoreISD::CPRelativeWrapper" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: ABS16Wrapper ) { +return "XCoreISD::ABS16Wrapper" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: LDWSP ) { +return "XCoreISD::LDWSP" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: STWSP ) { +return "XCoreISD::STWSP" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: RETSP ) { +return "XCoreISD::RETSP" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: LADD ) { +return "XCoreISD::LADD" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: OUTPW ) { +return "XCoreISD::OUTPW" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: INPW ) { +return "XCoreISD::INPW" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: LSUB ) { +return "XCoreISD::LSUB" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: LMUL ) { +return "XCoreISD::LMUL" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD::MACCU ) { +return "XCoreISD::MACCU" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD::MACCS ) { +return "XCoreISD::MACCS" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: BR_JT ) { +return "XCoreISD::BR_JT" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: BR_JT32 ) { +return "XCoreISD::BR_JT32" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: FRAME_TO_ARGS_OFFSET ) { +return "XCoreISD::FRAME_TO_ARGS_OFFSET" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD :: EH_RETURN ) { +return "XCoreISD::EH_RETURN" ; +} +if ( ( XCoreISD :: NodeType ) Opcode == XCoreISD::MEMBARRIER ) { +return "XCoreISD::MEMBARRIER" ; +} +return NULL ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1a53807ab7da8c662a375e13e2c469aba8202fa --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalAddImmediate.cpp @@ -0,0 +1,3 @@ +bool XCoreTargetLowering :: isLegalAddImmediate ( int64_t Imm ) const { +return isUInt < 32 > ( Imm ) || isUInt < 32 > ( - Imm ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9be697f819be3cc7ce7458aa6f2dcf430909212b --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalAddressingMode.cpp @@ -0,0 +1,16 @@ +bool XCoreTargetLowering :: isLegalAddressingMode ( const DataLayout & DL , const AddrMode & AM , Type * Ty , unsigned AS , Instruction * I ) const { +if ( AM . BaseGV ) { +return false ; +} +if ( ! AM . HasBaseReg ) { +} +if ( ! AM . BaseOffs ) { +} +if ( ! AM . HasBaseReg ) { +return true ; +if ( ! AM . BaseOffs ) { +} +} +return false ; +return false ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71be4c9132d277735ca37fdefc0c01134fa758ac --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/ISelLowering/isLegalICmpImmediate.cpp @@ -0,0 +1,3 @@ +bool XCoreTargetLowering :: isLegalICmpImmediate ( int64_t Imm ) const { +return Imm >= 0 && Imm <= 11 ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..54e37df98de8dfe47e478c494faf5c39926b96c3 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/EmitTargetCodeForMemcpy.cpp @@ -0,0 +1,17 @@ +SDValue XCoreSelectionDAGInfo :: EmitTargetCodeForMemcpy ( SelectionDAG & DAG , const SDLoc & dl , SDValue Chain , SDValue Dst , SDValue Src , SDValue Size , unsigned Align , bool isVolatile , bool AlwaysInline , MachinePointerInfo DstPtrInfo , MachinePointerInfo SrcPtrInfo ) const { +const XCoreSubtarget & STI = DAG . getMachineFunction ( ) . getSubtarget < XCoreSubtarget > ( ) ; +if ( STI . hasMOPS ( ) ) { +return EmitMOPS ( XCoreISD :: MOPS_MEMCOPY , DAG , DL , Chain , Dst , Src , Size , Alignment , isVolatile , DstPtrInfo , SrcPtrInfo ) ; +} +if ( IsVolatile ) { +} +if ( auto * CSize = dyn_cast < ConstantSDNode > ( Size ) ) { +return emitMemMem ( DAG , DL , XCoreISD :: MVC , XCoreISD :: MVC_LOOP , Chain , Dst , Src , CSize -> getZExtValue ( ) ) ; +} +return SDValue ( ) ; +return EmitTargetCodeForMemOp ( DAG , dl , Chain , Dst , Src , Size , Alignment , isVolatile , AlwaysInline , MustPreserveCheriCapabilities , DstPtrInfo , SrcPtrInfo , true ) ; +if ( ! DAG . getMachineFunction ( ) . getSubtarget < XCoreSubtarget > ( ) . hasBulkMemory ( ) ) { +} +SDValue MemIdx = DAG . getConstant ( 0 , DL , MVT :: i32 ) ; +return DAG . getNode ( XCoreISD :: MEMORY_COPY , DL , MVT :: Other , { Chain , MemIdx , MemIdx , Dst , Src , DAG . getZExtOrTrunc ( Size , DL , MVT :: i32 ) } ) ; +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0587bd3c5a6e1d08a2d4f0b49b12bf7e44b72955 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/SelectionDAGInfo.cpp @@ -0,0 +1,2 @@ +XCoreSelectionDAGInfo :: XCoreSelectionDAGInfo ( const XCoreTargetMachine & TM ) : TargetSelectionDAGInfo ( TM ) , TLI ( * TM . getTargetLowering ( ) ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f65393a6efa56a632ef84b54667a2fb848424b2 --- /dev/null +++ b/Scripts/Exp/ForkFlow/VEGA_Code/XCore/Selection/SelectionDAGInfo/~SelectionDAGInfo.cpp @@ -0,0 +1,2 @@ +XCoreSelectionDAGInfo :: ~ XCoreSelectionDAGInfo ( ) { +} \ No newline at end of file diff --git a/Scripts/Exp/ForkFlow/__pycache__/My_Difflib.cpython-39.pyc b/Scripts/Exp/ForkFlow/__pycache__/My_Difflib.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5741dfd0f8efed66c07859c7e83def1e2bf4b762 Binary files /dev/null and b/Scripts/Exp/ForkFlow/__pycache__/My_Difflib.cpython-39.pyc differ diff --git a/Scripts/Exp/ForkFlow/calculate_forkflow.py b/Scripts/Exp/ForkFlow/calculate_forkflow.py new file mode 100644 index 0000000000000000000000000000000000000000..d354205c794f4edb57f540e3d71acaeef0121efd --- /dev/null +++ b/Scripts/Exp/ForkFlow/calculate_forkflow.py @@ -0,0 +1,203 @@ +# -*- encoding: utf-8 -*- + + +from asyncore import write +import My_Difflib +from distutils.command.config import config +import os, sys,string,re,glob +import html +import csv +import copy +from tqdm import tqdm +import pathlib + +folder = str(pathlib.Path(__file__).parent.resolve()) + +Wrong_Dir = folder +Mips_Dir = folder + "/Mips_Code" +VEGA_Dir = folder + "/VEGA_Code" +Ans_Dir = folder + "/Std_Code" +count_wrong = 0 + +Mod_File_Func = {} +Mod_Result = {} + + + +def deal_dir(src_dir): + global Mod_File_Func + global Mod_Result + if not os.path.exists(src_dir): + return False + filelists = os.listdir(src_dir) + for eachfile in filelists: + tem =eachfile + eachfile = src_dir + '/' +eachfile + if os.path.isdir(eachfile): + deal_dir(eachfile) + elif os.path.isfile(eachfile) and ".cpp" in eachfile: + module = eachfile.split("/")[-3] + if module not in Mod_Result.keys(): + Mod_Result[module] = [0,0,0] + file = eachfile.split("/")[-2] + func = eachfile.split("/")[-1].replace(".cpp", "") + if (" ").join([module, file, func]) not in Mod_File_Func.keys(): + Mod_File_Func[(" ").join([module, file, func])] = [] + codes = "" + f2 = open(eachfile, encoding = "utf-8") + lines = f2.readlines() + + for idx, l in enumerate(lines): + if idx == len(lines) - 1: + codes += l.replace(" ", "").replace("\n", "").lower().replace("mips","").replace("xcore", "").replace("pulp", "").replace("riscv", "") + else: + codes += l.replace(" ", "").lower().replace("mips","").replace("xcore", "").replace("pulp", "").replace("riscv", "") + f2.close() + + if "/Mips" in eachfile: + Mod_File_Func[(" ").join([module, file, func])].append(["Mips", codes]) + elif "/Std_Code/" in eachfile: + Mod_File_Func[(" ").join([module, file, func])].append(["Ans", codes]) + elif "/VEGA" in eachfile: + Mod_File_Func[(" ").join([module, file, func])].append(["VEGA", codes]) + return True + +wrong_stmt = [] +def get_wrong_list(): + global wrong_stmt + with open(Wrong_Dir+"/wrong_list_all.csv", 'r', encoding='utf-8') as fcsv: + reader = csv.reader(fcsv) + for row in reader: + if row[0] == "idx": + continue + wrong_stmt.append(row[0].strip().lower() + " " + row[1].strip().lower() + " " + row[2].strip().lower()) + + + + +def duplicate_data(tar): + global wrong_stmt + global Mod_File_Func + global Mod_Result + + for kv in Mod_File_Func.items(): + module = kv[0].split(" ")[0] + if len(kv[1]) != 3: + print(tar + " " + kv[0]) + Ans = "" + Vega = "" + Mips = "" + + for codes in kv[1]: + if codes[0] == "Mips": + Mips = codes[1] + #print(codes[1]) + if codes[0] == "Ans": + Ans = codes[1] + if codes[0] == "VEGA": + Vega = codes[1] + + total = len(Ans.split("\n")) + #print(Mod_Result) + Mod_Result[module][0] += total + + vega_same = 0 + vega_modi = 0 + vega_add = 0 + Mips_same = 0 + Mips_modi = 0 + Mips_add = 0 + diff_vega = list(My_Difflib.Differ().compare(Ans.splitlines(), Vega.splitlines())) + + for idx, dv in enumerate(diff_vega): + if dv[0] == '-': + if idx < len(diff_vega) - 1 and diff_vega[idx+1][0] == '?': + vega_modi += 1 + else: + vega_add += 1 + elif dv[0] == '+': + continue + elif dv[0] == '?': + continue + #vega_add -= 1 + elif dv.strip().replace("\n", "") == '': + continue + else: + vega_same += 1 + #assert vega_same + vega_modi + vega_add == total + # if file_path.split("/")[-1].replace(".cpp", "").replace("_Wrong", "").lower() == "eliminateframeindex": + # for dv in diff_vega: + # print(dv) + if kv[0].split(" ")[-2].strip().lower() + " " + kv[0].split(" ")[-1].strip().lower() + " " + tar.lower() not in wrong_stmt: + #print(kv[0].split(" ")[-2].lower() + " " + kv[0].split(" ")[-1].lower().strip()) + vega_same = total + vega_modi = 0 + vega_add = 0 + Mod_Result[module][2] += vega_same + if Mips.replace("\n", "") != "None": + diff_mips = list(My_Difflib.Differ().compare(Ans.splitlines(), Mips.splitlines())) + for dm in diff_mips: + #print(dm) + if dm[0] == '-': + if idx < len(diff_mips) - 1 and diff_mips[idx+1][0] == '?': + Mips_modi += 1 + else: + Mips_add += 1 + elif dm[0] == '+': + continue + elif dm[0] == '?': + continue + #vega_add -= 1 + elif dm.strip().replace("\n", "") == '': + continue + else: + Mips_same += 1 + else: + Mips_add = total + + Mod_Result[module][1] += Mips_same + # if Mips_same == total: + # print(kv[0]) + # exit() + # print(Mod_Result[module][1]) + + with open(folder+"/forkflow_result.csv", 'a', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + avg_vega = 0.0 + avg_mips = 0.0 + for kv in Mod_Result.items(): + f_csv.writerow([tar.replace("PULP", "RI5CY"), kv[0], round(kv[1][1]*1.0 / kv[1][0], 3), round(kv[1][2]*1.0 / kv[1][0], 3)]) + avg_vega += float(round(kv[1][2]*1.0 / kv[1][0], 3)) + avg_mips += float(round(kv[1][1]*1.0 / kv[1][0], 3)) + f_csv.writerow([tar.replace("PULP", "RI5CY"), "Avg", round(avg_mips / len(Mod_Result), 3), round(avg_vega / len(Mod_Result), 3)]) + + with open(folder+"/mod_lines.csv", 'a', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + all_vega = 0 + all_mips = 0 + all_stmt = 0 + for kv in Mod_Result.items(): + f_csv.writerow([tar.replace("PULP", "RI5CY"), kv[0], kv[1][2], kv[1][0]-kv[1][2]]) + all_vega += kv[1][2] + all_mips += kv[1][1] + all_stmt += kv[1][0] + f_csv.writerow([tar.replace("PULP", "RI5CY"), "All", all_vega, all_stmt - all_vega]) + +if __name__ == '__main__': + get_wrong_list() + with open(folder+"/forkflow_result.csv", 'w', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + f_csv.writerow(["Target", "Module", "Fork_Acc", "VEGA_Acc"]) + + with open(folder+"/mod_lines.csv", 'w', encoding='utf-8', newline="") as f: + f_csv = csv.writer(f) + f_csv.writerow(["Target", "Module", "VEGA_Accurate_Lines", "VEGA_Manual_Lines"]) + + for tar in ["XCore", "PULP", "RISCV"]: + Mod_File_Func = {} + Mod_Result = {} + deal_dir(Mips_Dir+"/"+tar) + deal_dir(VEGA_Dir+"/"+tar) + deal_dir(Ans_Dir+"/"+tar) + + duplicate_data(tar) diff --git a/Scripts/Exp/Performance/BenchMark.xlsx b/Scripts/Exp/Performance/BenchMark.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..1be71b79bfc5b77a61f7023b72bdd3e320c991c9 Binary files /dev/null and b/Scripts/Exp/Performance/BenchMark.xlsx differ diff --git a/Scripts/Exp/Time/calculate_time.py b/Scripts/Exp/Time/calculate_time.py new file mode 100644 index 0000000000000000000000000000000000000000..2e6dc8996534d2b2db011203f3a6d58dc288ad8b --- /dev/null +++ b/Scripts/Exp/Time/calculate_time.py @@ -0,0 +1,36 @@ +# -*- encoding: utf-8 -*- + + +from asyncore import write +import difflib +import os, sys,string,re,glob +import shutil +import csv +import copy +import math +import json +import time +from tqdm import tqdm +import pathlib + +folder = str(pathlib.Path(__file__).parent.resolve()) + + + +def calculate_time(): + Target_Module = {} + Func_Lis = [] + for line in open(folder+"/../../../dataset/test.jsonl", 'r', encoding="utf-8"): + dic = json.loads(line) + if dic["Target"]+" "+dic["Module"] not in Target_Module.keys(): + Target_Module[dic["Target"]+" "+dic["Module"]] = 1 + else: + Target_Module[dic["Target"]+" "+dic["Module"]] += 1 + Func_Lis.append(dic["File"]+" "+dic["Func"]) + with open(folder+"/time_overhead.csv", "w",encoding="utf-8", newline = "") as f: + writer = csv.writer(f) + for kv in Target_Module.items(): + writer.writerow(kv[0].replace("PULP", "RI5CY").split(" ") + [kv[1], math.ceil(kv[1] * 25.0 / 256)]) + +if __name__ == '__main__': + calculate_time() \ No newline at end of file diff --git a/Scripts/UnixCoder/model_gen.py b/Scripts/UnixCoder/model_gen.py new file mode 100644 index 0000000000000000000000000000000000000000..ebdc913d9a49641ff037c36765a90bb246068243 --- /dev/null +++ b/Scripts/UnixCoder/model_gen.py @@ -0,0 +1,279 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + +import torch +import torch.nn as nn +import torch +from torch.autograd import Variable +import copy +import numpy as np + +class Seq2Seq(nn.Module): + """ + Build Seqence-to-Sequence. + + Parameters: + + * `encoder`- encoder of seq2seq model. e.g. roberta + * `decoder`- decoder of seq2seq model. e.g. transformer + * `config`- configuration of encoder model. + * `beam_size`- beam size for beam search. + * `max_length`- max length of target for beam search. + * `sos_id`- start of symbol ids in target for beam search. + * `eos_id`- end of symbol ids in target for beam search. + """ + + def __init__(self, encoder, decoder, config, mse_loss_weight=0.95, ce_loss_weight=0.05, beam_size=None, max_length=None, sos_id=None, eos_id=None, ): + super(Seq2Seq, self).__init__() + self.encoder = encoder + self.decoder = decoder + self.config = config + self.register_buffer( + "bias", torch.tril(torch.ones( + (1024, 1024), dtype=torch.uint8)).view(1, 1024, 1024) + ) + self.dense = nn.Linear(config.hidden_size, config.hidden_size) + self.lm_head = nn.Linear( + config.hidden_size, config.vocab_size, bias=False) + self.lm_head.weight = self.encoder.embeddings.word_embeddings.weight + self.lsm = nn.LogSoftmax(dim=-1) + + self.pred_dense = nn.Linear(config.hidden_size, 1, bias=True) + self.sigmoid = nn.Sigmoid() + + self.mse_loss_weight = mse_loss_weight + self.ce_loss_weight = ce_loss_weight + + self.beam_size = beam_size + self.max_length = max_length + self.sos_id = sos_id + self.eos_id = eos_id + + def forward(self, source_ids, exist=None, target_ids=None): + if target_ids is None or exist is None: + return self.generate(source_ids) + + mask = source_ids.ne(1)[:, None, :]*source_ids.ne(1)[:, :, None] + encoder_output = self.encoder( + source_ids, attention_mask=mask, use_cache=True) + # print("source_ids:", source_ids.size()) # torch.Size([56, 510]) + # print("exist:", exist.size()) # torch.Size([56, 1]) + # print("target_ids:", target_ids.size()) # torch.Size([56, 240]) + ids = torch.cat((source_ids, target_ids), -1) + + mask = self.bias[:, + source_ids.size(-1):ids.size(-1), :ids.size(-1)].bool() + mask = mask & ids[:, None, :].ne(1) + + out = self.decoder(target_ids, attention_mask=mask, + past_key_values=encoder_output.past_key_values).last_hidden_state + + # 先concat 再池化 + # print("out:", out.size()) # torch.Size([56, 240, 768]) + + lm_logits = self.lm_head(out[..., 1:, :]) + # print("lm_logits:", lm_logits.size()) # torch.Size([56, 239, 51416]) + + # Shift so that tokens < n predict n + active_loss = target_ids[..., 2:].ne(1).view(-1) + # print("active_loss:", active_loss.size()) # torch.Size([13328]) + shift_logits = lm_logits[..., :-1, :].contiguous() + # print("shift_logits:", shift_logits.size()) # torch.Size([56, 238, 51416]) + + shift_labels = target_ids[..., 2:].contiguous() + # print("shift_labels:", shift_labels.size()) # torch.Size([56, 238]) + + exist_labels = exist.contiguous() + # print("exist_labels:", exist_labels.size()) # torch.Size([56, 1]) + + # print("shift_logits.size:", shift_logits.size(-1)) # 51416 + # print("shift_logits.view(-1, shift_logits.size(-1)):", shift_logits.view(-1, shift_logits.size(-1))[active_loss].size()) # torch.Size([614, 51416]) + # print("shift_labels.view(-1):", shift_labels.view(-1)[active_loss].size()) # torch.Size([614]) + + pred_out = out[..., 0, :] + # print("pred_out:", pred_out.size()) # torch.Size([56, 768]) + pred_sigmoid = self.sigmoid(self.pred_dense(pred_out)) + # print("pred_sigmoid:", pred_sigmoid.size()) # torch.Size([56, 1]) + + # Flatten the tokens + loss_fct_code = nn.CrossEntropyLoss(ignore_index=-1) + loss_fct_pred = nn.MSELoss(reduction="mean") + loss_code = loss_fct_code(shift_logits.view(-1, shift_logits.size(-1))[active_loss], + shift_labels.view(-1)[active_loss]) + + loss_pred = loss_fct_pred(pred_sigmoid, exist_labels) + loss = loss_pred * self.mse_loss_weight + loss_code * self.ce_loss_weight + # loss = loss.to(torch.float32) + # loss = loss_pred + + outputs = loss, loss*active_loss.sum(), active_loss.sum(), loss_pred, loss_code + return outputs + + def generate(self, source_ids): + mask = source_ids.ne(1)[:, None, :] * source_ids.ne(1)[:, :, None] + encoder_output = self.encoder( + source_ids, attention_mask=mask, use_cache=True) + preds = [] + predicates = [] + zero = torch.cuda.LongTensor(1).fill_(0) + source_len = list(source_ids.ne(1).sum(-1).cpu().numpy()) + for i in range(source_ids.shape[0]): + context = [[x[i:i+1, :, :source_len[i]].repeat(self.beam_size, 1, 1, 1) for x in y] + for y in encoder_output.past_key_values] + beam = Beam(self.beam_size, self.sos_id, self.eos_id) + input_ids = beam.getCurrentState() + context_ids = source_ids[i:i+1, + :source_len[i]].repeat(self.beam_size, 1) + predicate = [] + for _ in range(self.max_length): + if beam.done(): + break + + ids = torch.cat((context_ids, input_ids), -1) + mask = self.bias[:, + context_ids.size(-1):ids.size(-1), :ids.size(-1)].bool() + mask = mask & ids[:, None, :].ne(1) + out = self.decoder(input_ids, attention_mask=mask, + past_key_values=context).last_hidden_state + # print("out:", out.size()) + # concat 池化 out + hidden_states = out[:, -1, :] + # print("hidden_states:", hidden_states.size()) + if out.size(1) == 1: + pred_sigmoid = self.sigmoid(self.pred_dense( + hidden_states.view(-1, 1, hidden_states.size(-1)))) + predicate.append( + pred_sigmoid.view(-1, pred_sigmoid.size(-1))) + #predicate.append(pred_sigmoid.view(-1, pred_sigmoid.size(-1)).cpu().numpy())# ZM modified + out = self.lsm(self.lm_head(hidden_states)).data + beam.advance(out) + input_ids.data.copy_(input_ids.data.index_select( + 0, beam.getCurrentOrigin())) + input_ids = torch.cat((input_ids, beam.getCurrentState()), -1) + hyp = beam.getHyp(beam.getFinal()) + pred = beam.buildTargetTokens(hyp)[:self.beam_size] + pred = [torch.cat([x.view(-1) for x in p] + [zero] * + (self.max_length-len(p))).view(1, -1) for p in pred] + predicates.append(predicate[0][0])# ZM modified + #print("ZM-Model_Debug_P_Each_Itr: %d, %d, %d" % (len(predicate), len(predicate[0]), len(predicate[0][0]))) + preds.append(torch.cat(pred, 0).unsqueeze(0)) + #print("ZM-Model_Debug_Predicate_Shape: %d" % (len(predicates))) + #print("ZM-Model_Debug_Codes_BeforeCat: %d, %d, %d, %d" % (len(preds), len(preds[0]), len(preds[0][0]), len(preds[0][0][0]))) + preds = torch.cat(preds, 0) + predicates = torch.tensor(predicates, device="cuda")# ZM modified + # predicates = torch.cat(predicates, 0).unsqueeze(0) + #print("ZM-Model_Debug_Codes_AfterCat: %d, %d, %d" % (len(preds), len(preds[0]), len(preds[0][0]))) + return preds, predicates + + +class Beam(object): + def __init__(self, size, sos, eos): + self.size = size + self.tt = torch.cuda + # The score for each translation on the beam. + self.scores = self.tt.FloatTensor(size).zero_() + # The backpointers at each time-step. + self.prevKs = [] + # The outputs at each time-step. + self.nextYs = [self.tt.LongTensor(size) + .fill_(0)] + self.nextYs[0][0] = sos + # Has EOS topped the beam yet. + self._eos = eos + self.eosTop = False + # Time and k pair for finished. + self.finished = [] + + def getCurrentState(self): + "Get the outputs for the current timestep." + batch = self.tt.LongTensor(self.nextYs[-1]).view(-1, 1) + return batch + + def getCurrentOrigin(self): + "Get the backpointers for the current timestep." + return self.prevKs[-1] + + def advance(self, wordLk): + """ + Given prob over words for every last beam `wordLk` and attention + `attnOut`: Compute and update the beam search. + + Parameters: + + * `wordLk`- probs of advancing from the last step (K x words) + * `attnOut`- attention at the last step + + Returns: True if beam search is complete. + """ + numWords = wordLk.size(1) + + # Sum the previous scores. + if len(self.prevKs) > 0: + beamLk = wordLk + self.scores.unsqueeze(1).expand_as(wordLk) + + # Don't let EOS have children. + for i in range(self.nextYs[-1].size(0)): + if self.nextYs[-1][i] == self._eos: + beamLk[i] = -1e20 + else: + beamLk = wordLk[0] + flatBeamLk = beamLk.view(-1) + bestScores, bestScoresId = flatBeamLk.topk(self.size, 0, True, True) + + self.scores = bestScores + + # bestScoresId is flattened beam x word array, so calculate which + # word and beam each score came from + prevK = bestScoresId // numWords + self.prevKs.append(prevK) + self.nextYs.append((bestScoresId - prevK * numWords)) + + for i in range(self.nextYs[-1].size(0)): + if self.nextYs[-1][i] == self._eos: + s = self.scores[i] + self.finished.append((s, len(self.nextYs) - 1, i)) + + # End condition is when top-of-beam is EOS and no global score. + if self.nextYs[-1][0] == self._eos: + self.eosTop = True + + def done(self): + return self.eosTop and len(self.finished) >= self.size + + def getFinal(self): + if len(self.finished) == 0: + self.finished.append((self.scores[0], len(self.nextYs) - 1, 0)) + self.finished.sort(key=lambda a: -a[0]) + if len(self.finished) != self.size: + unfinished = [] + for i in range(self.nextYs[-1].size(0)): + if self.nextYs[-1][i] != self._eos: + s = self.scores[i] + unfinished.append((s, len(self.nextYs) - 1, i)) + unfinished.sort(key=lambda a: -a[0]) + self.finished += unfinished[:self.size-len(self.finished)] + return self.finished[:self.size] + + def getHyp(self, beam_res): + """ + Walk back to construct the full hypothesis. + """ + hyps = [] + for _, timestep, k in beam_res: + hyp = [] + for j in range(len(self.prevKs[:timestep]) - 1, -1, -1): + hyp.append(self.nextYs[j+1][k]) + k = self.prevKs[j][k] + hyps.append(hyp[::-1]) + return hyps + + def buildTargetTokens(self, preds): + sentence = [] + for pred in preds: + tokens = [] + for tok in pred: + if tok == self._eos: + break + tokens.append(tok) + sentence.append(tokens) + return sentence diff --git a/Scripts/UnixCoder/run_one_model.py b/Scripts/UnixCoder/run_one_model.py new file mode 100644 index 0000000000000000000000000000000000000000..f203812dc7cd5c0440c1200cfe3bc473e886bd78 --- /dev/null +++ b/Scripts/UnixCoder/run_one_model.py @@ -0,0 +1,912 @@ +from __future__ import absolute_import +import os +from statistics import mean +import sys +from xml.sax.handler import feature_external_ges +#import bleu +import pickle +import torch +import csv +import json +import random +import time +import logging +import argparse +#from fuzzywuzzy import fuzz +import numpy as np +from io import open +from itertools import cycle +import torch.nn as nn +from model_gen import Seq2Seq +from tqdm import tqdm, trange +from torch.utils.data import DataLoader, Dataset, SequentialSampler, RandomSampler, TensorDataset +from torch.utils.data.distributed import DistributedSampler +#from sklearn.metrics import mean_squared_error +from transformers import (WEIGHTS_NAME, AdamW, get_linear_schedule_with_warmup, + RobertaConfig, RobertaModel, RobertaTokenizer) + +import pathlib + +folder = str(pathlib.Path(__file__).parent.resolve()) + +#from sklearn.metrics import mean_absolute_error, mean_squared_error +logging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', + datefmt='%m/%d/%Y %H:%M:%S', + level=logging.INFO) +logger = logging.getLogger(__name__) + + +divide_number = 6 +os.environ["CUDA_VISIBLE_DEVICES"] = "0,1,2,3,4,5,6,7" + +class Example(object): + """A single training/test example.""" + + def __init__(self, + idx, + source, + target, + cpuname, + funcname, + filename, + property, + vec, + exist, + module + # propertyposition, + ): + self.idx = idx + self.source = source + self.target = target + self.cpuname = cpuname + self.funcname = funcname + self.filename = filename + self.property = property + self.vec = vec + self.exist = exist + self.module = module + + +def read_examples_no_bracket(filename, is_function_test): + """Read examples from filename.""" + examples = [] + with open(filename, encoding="utf-8") as f: + for idx, line in enumerate(f): + if is_function_test: + if idx > 212: + break + line = line.strip() + js = json.loads(line) + # if len(js['Stmt_token']) > 300: + # continue + if js["Stmt"].strip()[0] == "}": + continue + if js["Value"].strip().lower() == "nothing" and '#' in js['FIR']: + continue + if '1' in js['Vector'][-97:] and '#' not in js['FIR']: + continue + if 'idx' not in js: + js['idx'] = idx + code = ' '.join(js['FIR_token']).replace('\n', ' ') + code = ' '.join(code.strip().split()) + nl = ' '.join(js['Stmt_token']).replace('\n', ' ') + nl = ' '.join(nl.strip().split()) + if str(js['Exist']).lower() != "true" and str(js['Exist']).lower() != "false": + if int(round(float(js['Exist']))) == 1: + exist = 1 + elif js["Value"].strip().lower() != "nothing": + exist = 1 + else: + exist = 0 + else: + if js['Exist'].lower() == "true": + exist = 1 + else: + exist = 0 + tem = list(js['Vector'].replace("|zm|","")) + vec = [] + for t in tem: + if int(t) == 1: + vec.append(1) + else: + vec.append(0) + pro = ' '.join(js['Value_token']).replace('\n', ' ') + pro = ' '.join(pro.strip().split()) + + cpu = js['Target'] + func = js['Func'] + file = js['File'] + mod = "" + if "Module" in js.keys(): + mod = js["Module"] + # propos = ' '.join(js['pp']) + # propos = ' '.join(propos.strip().split(',')) + # print(code) + # print(nl) + # print(pro) + examples.append( + Example( + idx=idx, + source=code, + target=nl, + cpuname=cpu, + funcname=func, + filename=file, + property=pro, + vec=vec, + exist=exist, + module = mod + # propertyposition = propos, + ) + ) + return examples + + +def read_examples(filename, is_function_test): + """Read examples from filename.""" + examples = [] + with open(filename, encoding="utf-8") as f: + for idx, line in enumerate(f): + if is_function_test: + if idx > 212: + break + line = line.strip() + js = json.loads(line) + # if len(js['Stmt_token']) > 300: + # continue + if 'idx' not in js: + js['idx'] = idx + code = ' '.join(js['FIR_token']).replace('\n', ' ') + code = ' '.join(code.strip().split()) + nl = ' '.join(js['Stmt_token']).replace('\n', ' ') + nl = ' '.join(nl.strip().split()) + if str(js['Exist']).lower() != "true" and str(js['Exist']).lower() != "false": + if int(round(float(js['Exist']))) == 1: + exist = 1 + elif js["Value"].strip().lower() != "nothing": + exist = 1 + else: + exist = 0 + else: + if js['Exist'].lower() == "true": + exist = 1 + else: + exist = 0 + tem = list(js['Vector'].replace("|zm|","")) + vec = [] + for t in tem: + if int(t) == 1: + vec.append(1) + else: + vec.append(0) + pro = ' '.join(js['Value_token']).replace('\n', ' ') + pro = ' '.join(pro.strip().split()) + + cpu = js['Target'] + func = js['Func'] + file = js['File'] + mod = "" + if "Module" in js.keys(): + mod = js["Module"] + # propos = ' '.join(js['pp']) + # propos = ' '.join(propos.strip().split(',')) + # print(code) + # print(nl) + # print(pro) + examples.append( + Example( + idx=idx, + source=code, + target=nl, + cpuname=cpu, + funcname=func, + filename=file, + property=pro, + vec=vec, + exist=exist, + module = mod + # propertyposition = propos, + ) + ) + return examples + + +class InputFeatures(object): + """A single training/test features for a example.""" + + def __init__(self, + example_id, + source_ids, + exist, + target_ids, + ): + self.example_id = example_id + self.source_ids = source_ids + self.exist = exist + self.target_ids = target_ids + + +def convert_examples_to_features(examples, tokenizer, args, stage=None): + """convert examples to token ids""" + features = [] + for example_index, example in enumerate(examples): + # source + func_tokens = tokenizer.tokenize(example.funcname) + source_tokens = tokenizer.tokenize( + example.source) # [:args.max_source_length-5] + pro_tokens = tokenizer.tokenize(example.property) + vec_tokens = example.vec + source_tokens = [tokenizer.cls_token, "", tokenizer.sep_token, ""] + func_tokens + [tokenizer.cls_token] + \ + source_tokens + [tokenizer.cls_token] + pro_tokens + \ + [tokenizer.cls_token] + vec_tokens + [tokenizer.sep_token] + source_ids = tokenizer.convert_tokens_to_ids(source_tokens) + padding_length = args.max_source_length - len(source_ids) + source_ids += [tokenizer.pad_token_id] * padding_length + + # target + # if stage=="test": + target_tokens = tokenizer.tokenize(example.target) + exist = [example.exist] + target_tokens = [tokenizer.cls_token, ""] + \ + target_tokens + [tokenizer.sep_token] + target_ids = tokenizer.convert_tokens_to_ids(target_tokens) + padding_length = args.max_target_length - len(target_ids) + target_ids += [tokenizer.pad_token_id] * padding_length + # else: + # target_tokens = tokenizer.tokenize(example.target) + # exist_tokens = tokenizer.tokenize(example.exist) + # target_tokens = [""] + exist_tokens + [tokenizer.cls_token] + target_tokens + [tokenizer.sep_token] + # target_ids = tokenizer.convert_tokens_to_ids(target_tokens) + # padding_length = args.max_target_length - len(target_ids) + # target_ids += [tokenizer.pad_token_id] * padding_length + + features.append( + InputFeatures( + example_index, + source_ids, + exist, + target_ids, + ) + ) + return features + + +def set_seed(seed=991105): + random.seed(seed) + os.environ['PYHTONHASHSEED'] = str(seed) + np.random.seed(seed) + torch.manual_seed(seed) + torch.cuda.manual_seed(seed) + torch.backends.cudnn.deterministic = True + +def is_valid_parentheses(s): + cnt_bracket_small = 0 + cnt_bracket_mid = 0 + cnt_bracket_large = 0 + new_s = "" + for p in s: + new_s += p + if p == "(": + cnt_bracket_small += 1 + if p == ")": + cnt_bracket_small -= 1 + if p == "[": + cnt_bracket_mid += 1 + if p == "]": + cnt_bracket_mid -= 1 + if p == "{": + cnt_bracket_large += 1 + if p == "}": + cnt_bracket_large -= 1 + if cnt_bracket_small < 0: + cnt_bracket_small = 0 + new_s = new_s[:-1] + #print(new_s) + if cnt_bracket_mid < 0: + cnt_bracket_mid = 0 + new_s = new_s[:-1] + #print(new_s) + if cnt_bracket_large < 0: + cnt_bracket_large = 0 + new_s = new_s[:-1] + #print(new_s) + return new_s + + +def rewrite_pred(pred, gt_pred, gt_source, gt_value): + re_pred = pred + if is_valid_parentheses(pred).replace(" ", "") == gt_pred.replace(" ", ""): + return True, is_valid_parentheses(re_pred) + if "zmtarzm" in gt_value and gt_source.replace("#", gt_value).replace(" ", "") == gt_pred.replace(" ", ""): + return True, gt_source.replace("#", gt_value) + return False, re_pred + + +def vega_train_main(): + parser = argparse.ArgumentParser() + + # Required parameters + parser.add_argument("--model_name_or_path", default=None, type=str, required=True, + help="Path to pre-trained model: e.g. roberta-base") + parser.add_argument("--output_dir", default=None, type=str, required=True, + help="The output directory where the model predictions and checkpoints will be written.") + + # # Other parameters + parser.add_argument("--train_filename", default=None, type=str, + help="The train filename. Should contain the .jsonl files for this task.") + parser.add_argument("--dev_filename", default=None, type=str, + help="The dev filename. Should contain the .jsonl files for this task.") + parser.add_argument("--test_filename", default=None, type=str, + help="The test filename. Should contain the .jsonl files for this task.") + parser.add_argument("--max_source_length", default=590, type=int, # 400 + help="The maximum total source sequence length after tokenization. Sequences longer " + "than this will be truncated, sequences shorter will be padded.") + parser.add_argument("--max_target_length", default=240, type=int, # 350 + help="The maximum total target sequence length after tokenization. Sequences longer " + "than this will be truncated, sequences shorter will be padded.") + parser.add_argument("--do_train", action='store_true', + help="Whether to run training.") + parser.add_argument("--do_eval", action='store_true', + help="Whether to run eval on the dev set.") + parser.add_argument("--do_test", action='store_true', + help="Whether to run eval on the dev set.") + parser.add_argument("--do_function_test", action='store_true', + help="Whether to run eval on the subset of the dev set.") + parser.add_argument("--no_cuda", action='store_true', + help="Avoid using CUDA when available") + + parser.add_argument("--train_batch_size", default=8, type=int, + help="Batch size per GPU/CPU for training.") + parser.add_argument("--eval_batch_size", default=8, type=int, + help="Batch size per GPU/CPU for evaluation.") + parser.add_argument('--gradient_accumulation_steps', type=int, default=1, + help="Number of updates steps to accumulate before performing a backward/update pass.") + parser.add_argument("--learning_rate", default=6e-5, type=float, + help="The initial learning rate for Adam.") + parser.add_argument("--beam_size", default=1, type=int, + help="beam size for beam search") + parser.add_argument("--weight_decay", default=0.0, type=float, + help="Weight deay if we apply some.") + parser.add_argument("--adam_epsilon", default=1e-8, type=float, + help="Epsilon for Adam optimizer.") + parser.add_argument("--max_grad_norm", default=1.0, type=float, + help="Max gradient norm.") + parser.add_argument("--num_train_epochs", default=30, type=int, + help="Total number of training epochs to perform.") + parser.add_argument('--seed', type=int, default=20230420, + help="random seed for initialization") + + parser.add_argument("--mse_loss_weight", default=0.9, type=float, + help="Weight of Mean Square Error Loss.") + parser.add_argument("--ce_loss_weight", default=0.1, type=float, + help="Weight of Cross Entropy Loss.") + + # print arguments + args = parser.parse_args() + # set log + logging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', + datefmt='%m/%d/%Y %H:%M:%S', level=logging.INFO) + # set device + device = torch.device("cuda" if torch.cuda.is_available() else "cpu") + args.n_gpu = torch.cuda.device_count() + args.device = device + logger.info("device: %s, n_gpu: %s", device, args.n_gpu) + + # Set seed + set_seed(args.seed) + + # make dir if output_dir not exist + if os.path.exists(args.output_dir) is False: + os.makedirs(args.output_dir) + args.model_name_or_path = folder + "/" + args.model_name_or_path + if args.train_filename: + args.train_filename = folder + "/" + args.train_filename + if args.dev_filename: + args.dev_filename = folder + "/" + args.dev_filename + if args.test_filename: + args.test_filename = folder + "/" + args.test_filename + args.output_dir = folder + "/" + args.output_dir + # build model + tokenizer = RobertaTokenizer.from_pretrained(args.model_name_or_path) + config = RobertaConfig.from_pretrained(args.model_name_or_path) + # import!!!you must set is_decoder as True for generation + config.is_decoder = True + encoder = RobertaModel.from_pretrained( + args.model_name_or_path, config=config) + + model = Seq2Seq(encoder=encoder, decoder=encoder, config=config, + mse_loss_weight=args.mse_loss_weight, ce_loss_weight=args.ce_loss_weight, + beam_size=args.beam_size, max_length=args.max_target_length, + sos_id=tokenizer.convert_tokens_to_ids([""])[0], eos_id=tokenizer.sep_token_id) + + logger.info("Training/evaluation parameters %s", args) + model.to(args.device) + + if args.n_gpu > 1: + # multi-gpu training + model = torch.nn.DataParallel(model) + + if args.do_train: + # Prepare training data loader + all_examples = read_examples(folder+"/"+args.train_filename, False) + train_examples = read_examples_no_bracket(folder+"/"+args.train_filename, False) + train_features = convert_examples_to_features( + train_examples, tokenizer, args, stage='train') + all_source_ids = torch.tensor( + [f.source_ids for f in train_features], dtype=torch.long) + all_exists = torch.tensor( + [f.exist for f in train_features], dtype=torch.float32) + all_target_ids = torch.tensor( + [f.target_ids for f in train_features], dtype=torch.long) + train_data = TensorDataset(all_source_ids, all_exists, all_target_ids) + train_sampler = RandomSampler(train_data) + train_dataloader = DataLoader(train_data, sampler=train_sampler, + batch_size=args.train_batch_size // args.gradient_accumulation_steps) + + # Prepare optimizer and schedule (linear warmup and decay) + no_decay = ['bias', 'LayerNorm.weight'] + optimizer_grouped_parameters = [ + {'params': [p for n, p in model.named_parameters() if not any(nd in n for nd in no_decay)], + 'weight_decay': args.weight_decay}, + {'params': [p for n, p in model.named_parameters() if any( + nd in n for nd in no_decay)], 'weight_decay': 0.0} + ] + optimizer = AdamW(optimizer_grouped_parameters, + lr=args.learning_rate, eps=args.adam_epsilon) + scheduler = get_linear_schedule_with_warmup(optimizer, + num_warmup_steps=int( + len(train_dataloader)*args.num_train_epochs*0.1), + num_training_steps=len(train_dataloader)*args.num_train_epochs) + + # Start training + logger.info("***** Running training *****") + logger.info(" Num examples = %d", len(all_examples)) + logger.info(" Batch size = %d", args.train_batch_size * + args.gradient_accumulation_steps) + logger.info(" Num epoch = %d", args.num_train_epochs) + + model.train() + eval_examples_all = read_examples(folder+"/"+args.dev_filename, False) + total_eval_all = len(eval_examples_all) + patience, best_acc, losses, dev_dataset = 0, 0, [], {} + for epoch in tqdm(range(args.num_train_epochs)): + # print(args.num_train_epochs) + + for idx, batch in enumerate(train_dataloader): + # print("##########Debug################") + # print(idx) + # print("###############Debug###########") + # if idx > 100: + # break + batch = tuple(t.to(device) for t in batch) + source_ids, exist, target_ids = batch + loss, _, _, mse_loss, ce_loss = model( + source_ids=source_ids, exist=exist, target_ids=target_ids) + + if args.n_gpu > 1: + loss = loss.mean() # mean() to average on multi-gpu. + if args.gradient_accumulation_steps > 1: + loss = loss / args.gradient_accumulation_steps + + losses.append(loss.item()) + loss.backward() + if len(losses) % args.gradient_accumulation_steps == 0: + # Update parameters + optimizer.step() + optimizer.zero_grad() + scheduler.step() + if len(losses) // args.gradient_accumulation_steps % 100 == 0: + logger.info("epoch {} step {} loss {}".format(epoch, + len( + losses)//args.gradient_accumulation_steps, + round(np.mean(losses[-100*args.gradient_accumulation_steps:]), 4))) + if args.do_eval: + # Eval model with dev dataset + if 'dev_loss' in dev_dataset: + eval_examples, eval_data = dev_dataset['dev_loss'] + else: + eval_examples = read_examples_no_bracket(folder+"/"+args.dev_filename) + eval_features = convert_examples_to_features( + eval_examples, tokenizer, args, stage='dev') + all_source_ids = torch.tensor( + [f.source_ids for f in eval_features], dtype=torch.long) + all_exists = torch.tensor( + [f.exist for f in eval_features], dtype=torch.float32) + all_target_ids = torch.tensor( + [f.target_ids for f in eval_features], dtype=torch.long) + eval_data = TensorDataset( + all_source_ids, all_exists, all_target_ids) + dev_dataset['dev_loss'] = eval_examples, eval_data + eval_sampler = SequentialSampler(eval_data) + eval_dataloader = DataLoader( + eval_data, sampler=eval_sampler, batch_size=args.eval_batch_size) + + logger.info("***** Running evaluation *****") + logger.info(" Num examples = %d", total_eval_all) + logger.info(" Batch size = %d", args.eval_batch_size) + + # Start Evaling model + model.eval() + eval_loss, tokens_num = 0, 0 + for batch in eval_dataloader: + batch = tuple(t.to(device) for t in batch) + source_ids, exist, target_ids = batch + + with torch.no_grad(): + _, loss, num, _, _ = model( + source_ids=source_ids, exist=exist, target_ids=target_ids) + eval_loss += loss.sum().item() + tokens_num += num.sum().item() + # Pring loss of dev dataset + model.train() + eval_loss = eval_loss / tokens_num + result = {'eval_ppl': round(np.exp(eval_loss), 5)} + for key in sorted(result.keys()): + logger.info(" %s = %s", key, str(result[key])) + logger.info(" " + "*" * 20) + + # Calculate mse + if 'dev_acc' in dev_dataset: + eval_examples, eval_data = dev_dataset['dev_acc'] + else: + eval_examples = read_examples_no_bracket(folder+"/"+args.dev_filename) + eval_examples = random.sample(eval_examples, int(len(eval_examples) / divide_number)) + eval_features = convert_examples_to_features( + eval_examples, tokenizer, args, stage='test') + all_source_ids = torch.tensor( + [f.source_ids for f in eval_features], dtype=torch.long) + eval_data = TensorDataset(all_source_ids) + dev_dataset['dev_acc'] = eval_examples, eval_data + + eval_sampler = SequentialSampler(eval_data) + eval_dataloader = DataLoader( + eval_data, sampler=eval_sampler, batch_size=args.eval_batch_size) + model.eval() + pp = [] + pr = [] + for batch in eval_dataloader: + batch = tuple(t.to(device) for t in batch) + source_ids = batch[0] + with torch.no_grad(): + preds, predicates = model(source_ids) + # convert ids to text + for pred, predicate in zip(preds, predicates): + t = pred[0].cpu().numpy() + #p = predicate[0].cpu().numpy() + p = predicate.float().item() + #print("ZM_Debug -- ppp: " + str(p)) + t = list(t) + #p = list(p) + tem_i = 0 + if 0 in t: + for my_i in range(len(t) - 1, 0, -1): + if t[my_i] != 0: + break + tem_i -= 1 + if tem_i < 0: + t = t[:tem_i] + text = tokenizer.decode( + t, clean_up_tokenization_spaces=False) + pp.append(text) + pr.append(p) + model.train() + + p_wrong_list = [] + v_wrong_list = [] + model_predicate = [] + groundtruth_predicate = [] + #edit_sim = 0.0 + total = int(total_eval_all / divide_number) + base_num = total - len(eval_examples) + EM = float(base_num) + EM_V = float(base_num) + EM_P = float(base_num) + cnt_v = 0 + cnt_p = 0 + cnt_iteration = 0 + for ref, gold in zip(zip(pp, pr), eval_examples): + cnt_iteration += 1 + pred = ref[0].strip() + predicate = ref[1] + #print("ZM_Debug -- predicate: " + str(predicate)) + if gold.property.strip().lower() != "nothing": + predicate = 1.0 + else: + pred = gold.source.strip() + if 1 not in gold.vec: + predicate = 0.0 + if 1 in gold.vec and gold.source.strip()[0] == '}': + predicate = 1.0 + if '#' in gold.source: + predicate = 0.0 + if 1 in gold.vec[-97:]: + predicate = 1.0 + gt_pred = gold.target.strip() + gt_predicate = gold.exist + + + if pred == gt_pred and int(round(predicate)) == int(round(gt_predicate)): + #print("Total correct, Inside this place") + EM = EM + 1.0 + EM_V = EM_V + 1.0 + EM_P = EM_P + 1.0 + else: + if pred == gt_pred: + EM_V = EM_V + 1.0 + else: + v_wrong_list.append([gold.filename, gold.funcname, gold.cpuname,\ + round(predicate), gt_predicate, pred, gt_pred]) + cnt_v += 1 + if int(round(predicate)) == int(round(gt_predicate)): + EM_P = EM_P + 1.0 + else: + cnt_p += 1 + p_wrong_list.append([gold.filename, gold.funcname, gold.cpuname,\ + round(predicate), gt_predicate, pred, gt_pred]) + + model_predicate.append(predicate) + groundtruth_predicate.append(gt_predicate) + # if len(pred.split(tokenizer.cls_token)) >= 2: + # if pred.split(tokenizer.cls_token)[0].strip() == gt_pred.split(tokenizer.cls_token)[0].strip(): + # EM_P += 1 + # if pred.split(tokenizer.cls_token)[1].strip() == gt_pred.split(tokenizer.cls_token)[1].strip(): + # EM_V += 1 + # MAE_P = mean_absolute_error( + # np.array(model_predicate), np.array(groundtruth_predicate)) + # MSE_P = mean_squared_error( + # np.array(model_predicate), np.array(groundtruth_predicate)) + # RMSE_P = np.sqrt(MSE_P) + dev_acc = round((100*EM/total), 2) + dev_acc_v = round((100*EM_V/total), 2) + dev_acc_p = round((100*EM_P/total), 2) + logger.info(" %s = %s " % ("Current Acc", str(dev_acc))) + #logger.info(" %s = %s "%("Current Edit sim",str(round(edit_sim/total, 2)))) + logger.info(" "+"*"*20) + logger.info(" %s = %s " % ("Current Acc V", str(dev_acc_v))) + #logger.info(" %s = %s "%("Current Edit sim",str(round(edit_sim/total, 2)))) + logger.info(" "+"*"*20) + logger.info(" %s = %s " % ("Current Acc P", str(dev_acc_p))) + #logger.info(" %s = %s "%("Current Edit sim",str(round(edit_sim/total, 2)))) + logger.info(" "+"*"*20) + # logger.info(" %s = %s " % + # ("Current MAE P", str(round(MAE_P, 2)))) + # #logger.info(" %s = %s "%("Current Edit sim",str(round(edit_sim/total, 2)))) + # logger.info(" "+"*"*20) + # logger.info(" %s = %s " % + # ("Current MSE P", str(round(MSE_P, 2)))) + # #logger.info(" %s = %s "%("Current Edit sim",str(round(edit_sim/total, 2)))) + # logger.info(" "+"*"*20) + # logger.info(" %s = %s " % + # ("Current RMSE P", str(round(RMSE_P, 2)))) + # #logger.info(" %s = %s "%("Current Edit sim",str(round(edit_sim/total, 2)))) + # logger.info(" "+"*"*20) + if dev_acc > best_acc: + #logger.info(" Best acc:%s",dev_acc) + #logger.info(" "+"*"*20) + best_acc = dev_acc + # Save best checkpoint for best bleu + output_dir = os.path.join( + args.output_dir, 'checkpoint-best-acc') + if not os.path.exists(output_dir): + os.makedirs(output_dir) + model_to_save = model.module if hasattr( + model, 'module') else model # Only save the model it-self + output_model_file = os.path.join( + output_dir, "pytorch_model.bin") + torch.save(model_to_save.state_dict(), output_model_file) + # with open(args.output_dir+"/p_valid_wrong.csv", 'w', encoding='utf-8', newline="") as fcsv2: + # writer = csv.writer(fcsv2) + # for wl in p_wrong_list: + # writer.writerow(wl) + # with open(args.output_dir+"/v_valid_wrong.csv", 'w', encoding='utf-8', newline="") as fcsv2: + # writer = csv.writer(fcsv2) + # for wl in v_wrong_list: + # writer.writerow(wl) + #print("ZM Debug--cnt_err_v: " + str(cnt_v)) + logger.info(" Best acc:%s", best_acc) + logger.info(" " + "*" * 20) + + + if args.do_test or args.do_function_test: + if os.path.exists(args.output_dir+"/result.jsonl"): + os.unlink(args.output_dir+"/result.jsonl") + checkpoint_prefix = 'checkpoint-best-acc/pytorch_model.bin' + output_dir = os.path.join(args.output_dir, checkpoint_prefix) + model_to_load = model.module if hasattr(model, 'module') else model + model_to_load.load_state_dict(torch.load(output_dir)) + + eval_examples_all = read_examples(args.test_filename, args.do_function_test) + eval_examples = read_examples_no_bracket(args.test_filename, args.do_function_test) + + + total_all = len(eval_examples_all) + base_test = total_all - len(eval_examples) + + + eval_features = convert_examples_to_features( + eval_examples, tokenizer, args, stage='test') + all_source_ids = torch.tensor( + [f.source_ids for f in eval_features], dtype=torch.long) + eval_data = TensorDataset(all_source_ids) + + eval_examples_idx_lis = [] + for ee in eval_examples: + eval_examples_idx_lis.append(ee.idx) + # Calculate mse + eval_sampler = SequentialSampler(eval_data) + eval_dataloader = DataLoader( + eval_data, sampler=eval_sampler, batch_size=args.eval_batch_size) + + model.eval() + pp = [] + pr = [] + start = time.time() + if not args.do_function_test: + print("Start Inferencing!") + else: + print("Start Function Test Inferencing!") + for batch in eval_dataloader: + batch = tuple(t.to(device) for t in batch) + source_ids = batch[0] + with torch.no_grad(): + preds, predicates = model(source_ids) + # convert ids to text + for pred, predicate in zip(preds, predicates): + t = pred[0].cpu().numpy() + #p = predicate[0].cpu().numpy() + p = predicate.float().item() + #print("ZM_Debug -- ppp: " + str(p)) + t = list(t) + tem_i = 0 + if 0 in t: + for my_i in range(len(t)-1, 0, -1): + if t[my_i] != 0: + break + tem_i -= 1 + if tem_i < 0: + t = t[:tem_i] + text = tokenizer.decode( + t, clean_up_tokenization_spaces=False) + pp.append(text) + pr.append(p) + end = time.time() + if not args.do_function_test: + print("Finished Inferencing: ", end - start, ' secs') + else: + print("Finished Function Test Inferencing: ", end - start, ' secs') + model.train() + EM = float(base_test) + EM_P = float(base_test) + EM_V = float(base_test) + p_wrong_list = [] + v_wrong_list = [] + edit_sim = 0.0 + total = total_all + res_dic = {} + + model_predicate = [] + groundtruth_predicate = [] + + for ref, gold in zip(zip(pp, pr), eval_examples): + pred = ref[0].strip() + predicate = ref[1] + if gold.property.strip().lower() != "nothing": + predicate = 1.0 + else: + pred = gold.source.strip() + if 1 not in gold.vec: + predicate = 0.0 + if 1 in gold.vec and gold.source.strip()[0] == '}': + predicate = 1.0 + if '#' in gold.source: + predicate = 0.0 + if 1 in gold.vec[-97:]: + predicate = 1.0 + #my_cls = tokenizer.decode([tokenizer.cls_token_id],clean_up_tokenization_spaces=False) + gt_pred = gold.target.strip() + gt_predicate = gold.exist + is_re = False + gt_value = gold.property + gt_source = gold.source + if pred == gt_pred and round(predicate) == gt_predicate: + EM += 1 + if pred == gt_pred and round(predicate) != gt_predicate: + p_wrong_list.append([gold.filename, gold.funcname, gold.cpuname, gold.idx, + round(predicate), gt_predicate, pred, gt_pred]) + if pred != gt_pred and round(predicate) == gt_predicate: + is_re, re_pred = rewrite_pred(pred, gt_pred, gt_source, gt_value) + if not is_re: + v_wrong_list.append([gold.filename, gold.funcname, gold.cpuname, gold.idx, + round(predicate), gt_predicate, pred, gt_pred]) + else: + pred = re_pred + EM += 1 + if pred != gt_pred and round(predicate) != gt_predicate: + v_wrong_list.append([gold.filename, gold.funcname, gold.cpuname, gold.idx, + round(predicate), gt_predicate, pred, gt_pred]) + p_wrong_list.append([gold.filename, gold.funcname, gold.cpuname, gold.idx, + round(predicate), gt_predicate, pred, gt_pred]) + tem_dic = {} + tem_dic["idx"] = gold.idx + tem_dic["vega_code"] = pred + tem_dic["ans_code"] = gt_pred + tem_dic["vega_pre"] = round(predicate) + tem_dic["ans_pre"] = gt_predicate + tem_dic["File"] = gold.filename + tem_dic["Func"] = gold.funcname + tem_dic["Module"] = gold.module + tem_dic["Target"] = gold.cpuname + res_dic[gold.idx] = tem_dic + + if pred == gt_pred: + EM_V += 1 + # else: + # print("TEST Wrong pred:", pred, " gt_pred:", gt_pred) + if round(predicate) == gt_predicate: + EM_P += 1 + model_predicate.append(predicate) + groundtruth_predicate.append(gt_predicate) + + # MAE_P = mean_absolute_error( + # np.array(model_predicate), np.array(groundtruth_predicate)) + # MSE_P = mean_squared_error( + # np.array(model_predicate), np.array(groundtruth_predicate)) + # RMSE_P = np.sqrt(MSE_P) + + dev_acc = round((100 * EM / total), 2) + dev_acc_v = round((100 * EM_V / total), 2) + dev_acc_p = round((100 * EM_P / total), 2) + # logger.info(" %s = %s " % ("Test Acc", str(dev_acc))) + # logger.info(" %s = %s " % ("Test Acc V", str(dev_acc_v))) + # logger.info(" %s = %s " % ("Test Acc P", str(dev_acc_p))) + # logger.info(" %s = %s "%("Test Edit sim",str(round(edit_sim/total, 2)))) + # logger.info(" %s = %s " % ("Test MAE P", str(round(MAE_P, 2)))) + # logger.info(" %s = %s " % ("Test MSE P", str(round(MSE_P, 2)))) + # logger.info(" %s = %s " % ("Test RMSE P", str(round(RMSE_P, 2)))) + # logger.info(" " + "*" * 20) + predictions = [] + + + with open(args.output_dir+"/result.jsonl", 'a') as f2: + for ee in eval_examples_all: + if ee.idx not in eval_examples_idx_lis: + dic = {} + dic["idx"] = ee.idx + dic["vega_code"] = ee.source.replace("zmtarzm", ee.cpuname) + dic["ans_code"] = ee.source.replace("zmtarzm", ee.cpuname) + dic["vega_pre"] = ee.exist + dic["ans_pre"] = ee.exist + dic["File"] = ee.filename + dic["Func"] = ee.funcname + dic["Module"] = ee.module + dic["Target"] = ee.cpuname + dic["Stable"] = "True" + else: + dic = {} + dic["idx"] = res_dic[ee.idx]["idx"] + dic["vega_code"] = res_dic[ee.idx]["vega_code"].replace("zmtarzm", ee.cpuname) + dic["ans_code"] = res_dic[ee.idx]["ans_code"].replace("zmtarzm", ee.cpuname) + dic["vega_pre"] = res_dic[ee.idx]["vega_pre"] + dic["ans_pre"] = res_dic[ee.idx]["ans_pre"] + dic["File"] = res_dic[ee.idx]["File"] + dic["Func"] = res_dic[ee.idx]["Func"] + dic["Module"] = res_dic[ee.idx]["Module"] + dic["Target"] = res_dic[ee.idx]["Target"] + dic["Stable"] = "False" + + json.dump(dic, f2) + f2.write('\n') + + + # with open(args.output_dir+"/p_wrong.csv", 'w', encoding='utf-8', newline="") as fcsv2: + # writer = csv.writer(fcsv2) + # for wl in p_wrong_list: + # writer.writerow(wl) + # with open(args.output_dir+"/v_wrong.csv", 'w', encoding='utf-8', newline="") as fcsv2: + # writer = csv.writer(fcsv2) + # for wl in v_wrong_list: + # writer.writerow(wl) + + +if __name__ == "__main__": + vega_train_main() \ No newline at end of file diff --git a/dataset/test.jsonl b/dataset/test.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..041d3bfa699feb064d769c0e6499d5436c6901d3 --- /dev/null +++ b/dataset/test.jsonl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a4340dee03184ebefe8fe632a9395be6c267aef8eb744ee906806bc5b904492 +size 27576775 diff --git a/dataset/train.jsonl b/dataset/train.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..2bcc80e7a57bb8179f6bc6af0de8925d3ce29d58 --- /dev/null +++ b/dataset/train.jsonl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b56b7cd69c8119cb41ef7eab286ca0f03b543621d32d62e15957d82cfce93f1 +size 84425254 diff --git a/dataset/valid.jsonl b/dataset/valid.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..7729370681170c0d444598cbcd32abe868ebf46b --- /dev/null +++ b/dataset/valid.jsonl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd9a4240629a6b53e168a735c93207560b90c92aa54ac4f79ad290d0830e2ee1 +size 41300618 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ddf51dfd7f73b794a9f23341374fd512baf2369f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +pathlib == 1.0.1 +tokenizers == 0.13.3 +transformers == 4.28.0 +torch == 2.0.1 +fuzzywuzzy == 0.18.0 +tqdm == 4.66.2 +python-Levenshtein == 0.25.1 diff --git a/run_fine_tuning.sh b/run_fine_tuning.sh new file mode 100644 index 0000000000000000000000000000000000000000..8c147b8bc7fb140f686123ee0c2ccc89e907bb21 --- /dev/null +++ b/run_fine_tuning.sh @@ -0,0 +1,16 @@ +# do train +python ./Scripts/UnixCoder/run_one_model.py \ + --do_train \ + --do_eval \ + --model_name_or_path ../../saved_models/UnixCoder \ + --train_filename ../../dataset/train.jsonl \ + --dev_filename ../../dataset/valid.jsonl \ + --output_dir ../../saved_models/New_Fine_Tuned_Model \ + --beam_size 4 \ + --train_batch_size 96 \ + --eval_batch_size 80 \ + --learning_rate 6e-5 \ + --num_train_epochs 50 \ + --mse_loss_weight 0.9 \ + --ce_loss_weight 0.1 +~ diff --git a/run_function_test.sh b/run_function_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..30be3be2a91c58ba57f2e48259325b87507c0c23 --- /dev/null +++ b/run_function_test.sh @@ -0,0 +1,15 @@ + +# do test +python ./Scripts/UnixCoder/run_one_model.py \ + --do_function_test \ + --model_name_or_path ../../saved_models/UnixCoder \ + --test_filename ../../dataset/test.jsonl \ + --output_dir ../../saved_models/Fine_Tuned_Model \ + --beam_size 4 \ + --train_batch_size 256 \ + --eval_batch_size 256 \ + --learning_rate 6e-5 \ + --gradient_accumulation_steps 2 \ + --num_train_epochs 10 \ + --mse_loss_weight 0.9 \ + --ce_loss_weight 0.1 diff --git a/run_test.sh b/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..cbb953b836fbcad9cac506bcf7fa2fab08242d42 --- /dev/null +++ b/run_test.sh @@ -0,0 +1,15 @@ + +# do test +python ./Scripts/UnixCoder/run_one_model.py \ + --do_test \ + --model_name_or_path ../../saved_models/UnixCoder \ + --test_filename ../../dataset/test.jsonl \ + --output_dir ../../saved_models/Fine_Tuned_Model \ + --beam_size 4 \ + --train_batch_size 256 \ + --eval_batch_size 256 \ + --learning_rate 6e-5 \ + --gradient_accumulation_steps 2 \ + --num_train_epochs 10 \ + --mse_loss_weight 0.9 \ + --ce_loss_weight 0.1 diff --git a/saved_models/Fine_Tuned_Model/checkpoint-best-acc/pytorch_model.bin b/saved_models/Fine_Tuned_Model/checkpoint-best-acc/pytorch_model.bin new file mode 100644 index 0000000000000000000000000000000000000000..d5b5997a6ddc5126eb0d3dec0e76b1ff62e49459 --- /dev/null +++ b/saved_models/Fine_Tuned_Model/checkpoint-best-acc/pytorch_model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:814d33f0ccb0c8336a4a82c03cd99ac1aa0d92187d7f5d21a9059b6a447b7bc7 +size 507267303 diff --git a/saved_models/New_Fine_Tuned_Model/.gitkeep b/saved_models/New_Fine_Tuned_Model/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/saved_models/UnixCoder/README.md b/saved_models/UnixCoder/README.md new file mode 100644 index 0000000000000000000000000000000000000000..154df8298fab5ecf322016157858e08cd1bccbe1 --- /dev/null +++ b/saved_models/UnixCoder/README.md @@ -0,0 +1,3 @@ +--- +license: apache-2.0 +--- diff --git a/saved_models/UnixCoder/config.json b/saved_models/UnixCoder/config.json new file mode 100644 index 0000000000000000000000000000000000000000..e65703ddf947d05150f3ba637d8592d669caceaf --- /dev/null +++ b/saved_models/UnixCoder/config.json @@ -0,0 +1,28 @@ +{ + "architectures": [ + "RobertaModel" + ], + "attention_probs_dropout_prob": 0.1, + "bos_token_id": 0, + "classifier_dropout": null, + "eos_token_id": 2, + "gradient_checkpointing": false, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.1, + "hidden_size": 768, + "initializer_range": 0.02, + "intermediate_size": 3072, + "layer_norm_eps": 1e-05, + "max_position_embeddings": 1026, + "model_type": "roberta", + "num_attention_heads": 12, + "num_hidden_layers": 12, + "output_past": true, + "pad_token_id": 1, + "position_embedding_type": "absolute", + "torch_dtype": "float32", + "transformers_version": "4.11.3", + "type_vocab_size": 10, + "use_cache": true, + "vocab_size": 51416 +} diff --git a/saved_models/UnixCoder/gitattributes.txt b/saved_models/UnixCoder/gitattributes.txt new file mode 100644 index 0000000000000000000000000000000000000000..64f23e0770da589d2949e1c24149405f5eda3d68 --- /dev/null +++ b/saved_models/UnixCoder/gitattributes.txt @@ -0,0 +1,28 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bin.* filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zstandard filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text diff --git a/saved_models/UnixCoder/merges.txt b/saved_models/UnixCoder/merges.txt new file mode 100644 index 0000000000000000000000000000000000000000..3f858fa9616e055207ec6c7dd516603eb4bc1b0c --- /dev/null +++ b/saved_models/UnixCoder/merges.txt @@ -0,0 +1,49626 @@ +#version: 0.2 +Ġ Ġ +ĠĠ ĠĠ +ĠĠ Ġ +ĠĠĠĠ ĠĠĠĠ +r e +i n +e r +o n +s t +a t +Ġ = +e n +t h +) ; +ĉ ĉ +o r +a r +a l +s e +ĠĠĠĠ ĠĠĠ +l e +c t +i on +d e +Ġ { +Ġ ( +u r +i s +a n +Ġ c +e t +i f +t e +- > +a m +u n +ĠĠĠĠĠĠĠĠ ĠĠĠ +Ġ f +Ġ th +/ / +- - +Ġ n +r o +c e +in g +re t +i t +Ġ t +ur n +en t +Ġ } +Ġ * +ret urn +Ġ p +( ) +in t +Ġ s +u e +s s +Ġ a +i d +l o +Ġ " +e d +i c +Ġ $ +p e +Ġ b +d d +c h +u l +Ġ m +at e +Ġth e +t r +u t +Ġ o +b b +ct ion +am e +st r +i l +e l +a g +g et +Ġ v +Ġ 0 +Ġ if +c k +Ġ ' +0 0 +ĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠ +p t +* * +c o +e x +a d +i g +ĠĠĠĠ Ġ +u m +" , +i m +Ġ w +-- -- +Ġ re +Ġ d +I n +e s +Ġ return +er r +o l +y pe +l a +Ġ in +e w +th is +se t +un ction +r i +ĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠ +o de +r a +u b +at a += = +: : +an d +o t +( " +i z +o m +Ġ S +i st +Ġt o +) ) +al ue +ĉĉ ĉ +R e +Ġ + +a b +Ġ T +u s +Ġ < +Ġ // +Ġ & +i le +at ion +a s +( ); +Ġ 1 +c on +h e +er t +a se +en d +v e +a p +Ġ C +bb bb +' , +ag e +e ct +iz e +u p +Ġ l +pt ion +ar am +ul t +e m +f f +Ġ : +o d +Ġth is +Ġ i +Ġc on +Ġ= = +l ic +Ġ ! +Ġ A +Ġ int +Ġ is +) , +ab le +Ġ st +C on +er s +al l +( ' +Ġf or +m ent +b j +Ġ h +S t +** ** +( $ +k e +str ing +Ġ e +Ġ err +E x +q u +o w +Ġ de +i r +Ġn ew +---- ---- +Ġ - +re n +f o +ul l +b u +ĉĉ ĉĉ +re s +t er +t o +te x +Ġ N +o id +ĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠ +E R +Ġo f +ub lic +u ct +a ck +at h +v i +p aram +or t +Ġf unction +ra y +ar t +m p +Ġ I +in e +dd dd +N ame +Ġ g +tr ing +el se +Ġ D +Ġ P +n ame +l i +f unction +o p +Ġ! = +bj ect +f or +Ġ _ +f a +tex t +Ġ [ +str uct +im e +Ġ r +ex t +Ġt r +Ġ u +p ut +Ġ* / +Ġ M +d ata +00 00 +h t +q ue +in d +T ype +/ * +un t +p ro +an g +v er +Ġ ar +) ); +Ġ | +s c +I N +Ġ F +p ublic +o s +p a +lo ck +o ut +G et +" ); +Ġv ar +Ġb e +al se +o c +ss ert +E n +a in +de x +bbbb bbbb +Ġ else +a ch +ke y +ig n +) . +a dd +D e +i th +ren t +o ur +Ġ ex +r r +R E +i p +t ype +S tring +or d +un c +T o +Ġ 2 +at ch +ro m +te st +l en +v ent +3 2 +la ss +de v +V alue +Ġ& & +== == +Ġn ull +v ar +E rr +v al +P ro +Ġre s +Ġ and +' ] +que st +Ġ se +te m +Ġ > +O N +le ment +at ic +ro w +Ġ: = +S T +u re +Ġ B +s h +A T +vi ce +Ġv oid +Ġ string +e ss +Ġ % +our ce +on e +de f +y te +g th +l y +Ġc h +it y +o int +a k +[ ' +R es +a ct +p er +an ce +i re +Ġ ) +Ġ get +I d +Ġ . +Ġ L +E N +il d +a x +s er +e st +p ort +ig ht +f ig +i al +o f +m o +] , +L L +p on +v alue +f unc +el d +an s +Ġf alse +Ġv alue +**** **** +Ġtr ue +ce ption +Ġ= > +ri te +a y +o re +i ve +Ġp ro +re ate +p r +< / +co de +i eld +g s +for m +' ) +// / +ĠĠĠĠĠĠĠĠ Ġ +Ġn ame +lo c +l l +Ġ O +e th +ce ss +Err or +un d +i x +ar y +s ize +b o +u le +Ġn ot +fa ult +Ġ( ! += " +o st +I D +re ak +" ) +it ion +k en +ĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +D ata +ption s +" : +re ad +S et +re ss +Ġ an ++ + +ct ed +-------- -------- +Ġ R +i v +] ; +f ile +or y +L E +Ġ set +p p +A r +Ġ # +dddd dddd +at or +ess age +Ġ U +Ġ it +eth od +um ent +C om +O R +qu al +L ist +C h +Ġerr or +ad er +Ġn il +b er +f e +6 4 +A L +te d +Ġ un +la y +Ġ| | +Ġ on +Ġ G +Ex ception +Ġ ); +re g +] . +Ġ E +u st +( & +a il +} , +o g +Ġar ray +c l +Ġ x +Ġd ata +ri v +i de +Ġ or +p l +at us +l ag +_ _ +p h +Ġb o +S E +Ġa s +Ġw h +re d +Ġc ase +Ġc om +p le +ang e +S e +Ġ W +Ġt ype +Ġ @ +// // +I T +() , +n ew +v oid +lo g +ff er +D E +se d +r y +p tr +p ath +re f +() . +O bject +ur rent +K e +ap p +M A +U LL +tr i +ff set +Ġ j +o unt +d ate +@ @ +as k +Ġw ith +or m +pon se +a c +Ġth at +p ert +lo w +Ġcon st +. . +Ke y +il l +Con t +() ); +c ase +st atic +re am +li ent +co l +ar get +Ġw e +re e +S ize +y n +Ġu int +b ack +st ance +m l +ro up +at ed +i es +) { +Ġo ut +an t +Ġs h +bbbbbbbb bbbbbbbb +) : +co m +en er +F ile +er y +A t +con t +s ign +t p +a st +in fo +Ġ test +U n +Ġ H +Ġ y +he ck +ĠĠĠĠ ĠĠ +' ); +Ġ< < +A dd +A R +i b +B u +o k +len gth +o ck +() ) +0000 0000 +in k +l ist +r c +us er +o le +In fo +on g +Ġa ssert +C ol +Ġcon t +i o +ar d +Ġ al +bu te +Ġ 3 +p riv +" ; +ode l +Ġ ? +Ġd o +pe c +or k +tri bute +um ber +p ar +C T +le ct +ĠN ULL +a ve +Ġ V +T r +Ġf ile +Ġ end +Ġs ize +Ġl en +ow n +Ġ / +S er +e c +ers ion +l f +Ġ Ċ +Ġ In +T ime +s g +ar g +1 6 +==== ==== +Ġf rom +lo ad +u se +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġb u +O M +Ġ at +s um +N ode +\ \ +[ ] +pr int +ul d +if i +d er +ĠT he +Ġ Re +Ġres ult +g er +co unt +T est +en s +m ap +In dex +lag s +Ġ+ = +o uld +y st +l ine +S S +r ame +p os +H E +de d +id th +od ule +m d +I C +Ġ /* +: " +ĉĉ ĉĉĉ +a v +lo at +T ext +. _ +Ġ( $ +e p +in dex +yst em +s p +H e +Ġ 4 +it er +err or +1 0 +n e +Ġ k +St ate +pert y +A n +E vent +b e +bu f +mo ve +1 2 +st art +u te +E qual +P oint +M E +Ġ en +n ode +sign ed +in al +Ġa dd +I tem +ir st +b yte +] ) +Ġch ar +ind ow +con st +Ġ im +w rite +Ġ str +as h +an n +ri pt +S h +b ase +P ath +m and +a ke +A A +n o +pt y +res ult +st ate +Ġb reak +C lass +Ġ key +i ew +and le +th er +Con text +A N +co mp +pe cted +Ġo bject +S c +um n +m in +us h +u g +ach e +I s +pa ce +P aram +Ġa re +******** ******** +c lass +E lement +A C +Ġ Q +c ur +O T +A D +c p +val id +and l +C ode +y le +g e +I S +t ing +Re quest +O P +Ġ le +ĠS tring +m ary +dddddddd dddddddd +ar ray +a ssert +( ( +E D +In t +s ub +Ġst atic +' ; +fa ce +p s +ra w +t ime +Ġl ist +ur l +B o +Ġth row +" " +F F +' : +b reak +et urn +la ce +T R +Ġ he +is p +es c +" > +il ter +C ount +L en +u d +Ġre g +T h +ct x +it s +le te +te mp +u th +all back +S I +Ar ray +Ġ id +L O +c cess +Ġ Get +ire ct +Ġ \ +f t +u al +Ġ( ( +Re g +F orm +Ġ ` +Ġbo ol +P E +sum mary +la b +d b +m b +o bject +le ction +on t +++ ) +n um +Ġ ret +m t +U N +al id +Ġar g +m a +Ġp ublic +Ġuint ptr +in it +Ġb y +o ptions +Con fig +Ġ= == +c reate +p re +# # +con fig +s a +r int +Ġc ol +Ġ up +Ġ} , +la st +Ġp aram +andl er +i se +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠ +od y +M essage +i tem +ist er +ro ll +", " +Ġ_ _ +y s +p c +Res ult +i te +am ple +yn c +t on +Q u +U R +Ġ struct +m ax +v el +lo b +M ap +d ir +qu ire +Ġs c +ch ar +U T +w ord +lo se +ER R +1 1 +add r +v err +ar ch +Ġre quest +ter n +Ġw ill +bu g +f s +l d +m em +Ġ} ); +oc ument +. $ +G E +Ġp a +//// //// +O f +w ork +s on +ub le +con d +ent ry +n ext +re quest +Ġ[ ] +verr ide +P I +ar k +j ect +Ġn ode +it ch +Ġ J +F I +ol d +A B +---------------- ---------------- +L oc +if y +ro l +p lace +qu ery +O r +o und +] ); +priv ate +V iew +g r +de fault +U p +' t +e e +Ġt ime +( ? +ren ce +Ġ all +ord er +Ġc an +ĠT h +an ag +0 1 +Res ponse +Ġ X +F ield +A s +ar gs +L ine +e vent +Ġse lf +ĠI f +ut ton +Ġde fault +a it +to ken +loc al +Ġ 5 +st atus +To ken +a pe +O ut +Ġp ar +F rom +f ield +0 2 +p i +Ġn o +in put +fe rence +l ink +p oint +T E +s k +Ġc heck +L o +e lement +w itch +Ser vice +bbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbb +[ " +t able +p ress +Ġp ath +em pty +Ġu se +o ffset +a ction +n s +c ord +Ġe lement +I ON +de vice +ect or +ur ation +En d +Ġst ate +r l +-> _ +a re +in ed +ĠĠĠĠĠĠĠĠ ĠĠĠĠĠ +P a +00000000 00000000 +at tr +n ull +ole an +Ġs er +ch e +U E +At tribute +P R +tr ans +Ġs pec +it le +L og +' s +int er +e b +i a +s pace +Ġ ro +f d +le d +P os +t ot +Ġc urrent +yte s +ann el +Ġst art +\ " +et er +d o +} ; +Ġin dex +lab el +d r +t x +u int +t tp +C E +anag er +i ct +Ġ> = +C K +Ġa pp +Ġm ethod +L e +Ġ us +Tr ans +p en +F or +pe ct +m atch +fo re +Len gth +(? : +m s +Ġo ptions +v ert +ut o +ag es +in s +che ck +Ġn e +W ith +p y +U S +Pro perty +n et +form at +re q +] [ +print f +Ġ} ; +Ġ 8 +ot o +N ot +g roup +ain er +Ġe vent +0 4 +ation s +at ure +Point er +M odel +ĠC on +en ame +b s +ting s +O n +con text +& & +b lock +C H +Ġc lass +ifi ed +> < +2 5 +at ive +I m +P tr +o bj +A pp +n d +St ream +Ġ z +a pt +Ġs ub +ic k +t ag +if ic +lob al +m ethod +ĠT HE +00 0 +c urrent +Ġst d +m at +ild er +un signed +M ethod +Ġ< / +ne ction +Ġ( ) +A l +Ġl ong +N ew +St atus +Ġ> > +Qu ery +Ġp re +l ate +B y +p o +)) , +c le +ic h +C lient +a ce +t arget +i able +f lags +Ġde f +Ġcon text +> ( +N D +tr y +i e +Ġre ad +m sg +Ġh as +ht tp +ile d +In stance +ens ion +S tr +ĠĠĠĠĠĠĠĠ ĠĠĠĠ +ri ption +pa rent +Ġtr y +able d +Ġsh ould +B e +ĠS et +Ġi tem +de sc +ust om +" ), +Ġh ave +al e +Bu ffer +Ġf ield +et ers +B lock +Ġl ine +() { +T he +Ġin put += ' +T able +app end +c lient +L A +Ġ log +tr ue +[ $ +W rite +sa fe +D ate +Ġin stance +( _ +ĠTh is +bu ffer +p ush +e qual +it or +is s +M L +m odule +m on +m essage +In ter +C reate +T Y +Equal s +Ġc all +j o +Re ad +que ue +D esc +co pe +IN T +Ġm ax +r iter +' ), +param s +G roup +ig h +m ode +St art +lay er +A g +Ġ" \ +c y +i ce +n ot +Ġn umber +c s +press ion +Ġ" "" +ref ix +en u +Ġ Ex +n er +O D +Ġp rint +et a +Cont ent +V AL +t il +M ode +Ġn um +M P +B U +O per +f ree +Ġm atch +S C +p age +ĠA r +te cted +Form at +l s +I G +Ġ lo +pon ent +======== ======== +in ue +P ar +ĠD e +h as +IN G +isp lay +Ġwh en +Ġ text +AT E +R eturn +E m +c md +Ġint er +Ġcon fig +U ser +il ename +S ub +bo ol +ad ers +W indow +id er +I O +Ġtr ans +I P +. +Ġp oint +c all +( * +ĉĉĉĉ ĉĉ +cont ent +op y +Ġsize of +ib le +Ġb ase +V ar +u de +ument s +E X +Ġc ode +EN T +st ream +} ) +Ġout put +ial iz +om ain +v ersion +Re f +f rom +pt s +st d +w idth +w h +C ON +Ġp os +se lf +Ġ_ , +te ger +Tr ue +B ase +Ġc reate +Ar g +f ind +pl it +O DE +re move +Ġt arget +Ġwh ile +r t +O L +Ġ q +C heck +im it +Ġto ken +Ġc ount +p ack +T H +Res ource +() -> +g in +c c +S Y +dddddddddddddddd dddddddddddddddd +se s +b l +De fault +He ader +ra ph +Ġs up +f n +S ource +Ġs o +or ted +N o +ar sh +ic s +Ġ 6 +d is +f loat +F unction +q l +el l +Ġr ange +F A +P re +par se +f alse +" ). +ĠS ystem +Ġ one +out put +Ġn ext +a a +vi ew +s rc +n ect +d ing +er o +Ġin it +lo t +T ag +D B +Ġan y +is h +ic al +F rame +g oto +Ġo ffset +Ġf irst +h w +O ptions +al loc +ifi er +ss ion +L T +ĉ ĠĠĠ +Ġu sed +ĠĠĠĠĠĠĠĠ ĠĠ +h ost +ĠA ssert +Ġb lock +S H +( { +Ġ* ) +Ġar gs +++ ; +ĠS t +u ccess +Ġ< = +p end +Ġ// / +b ar +he re +A P +Ġun signed +res ponse +In put +Ġm em +ra p +Ġn s +Ġa ct +Ġwh ich +ht ml +Ġm essage +Ġf loat +m u +s ource +Ġon ly +L ay +ent ity +N ull +bo x +TY PE +W idth +ce pt +co re +U til +g o +in es +up date +)) ) +Im age +un k +tot ype +m it +Ġbu ffer +ial ize +Ġ1 0 +O verride +ate g +irect ory +ir q +ĠF I +pert ies +y mb +d iv +1 5 +A ME +C o +V ersion +Ch ild +u id +a iled +ro p +if t +P C +O ffset +port s +o b +ymb ol +A ction +ir t +M em +iv en +p ost +9 9 +" ] +Q U +( [ +Ġs ource +* / +col or +return s +Ġvalue s +Ġ| = +Bo x +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +H andler +row s +m od +ct or +Z E +Ġm ap +st at +Ġc o +c a +y sc +I F +m m +am p +st ore +Ġv al +Ġf inal +Ġp er +b it +St yle +orm al +Ġres ponse +ain s +ock et +ĠR eturn +T ra +li b +w e +Ġ+ + +pro tected +N umber +re place +I mp +lic ation +ĠN one +lect or +N E +lic k +B B +Ġre f +ing le +) ( +Ġo ther +ĠI S +v m +ERR OR +to p +t mp +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠ +V ER +l at +E d +0 6 +ysc all +p an +ĠT est +Ġa d +S ystem +he ader +c lose +A ll +0 9 +f rame +cl ude +m ask +( ! +f irst +c ache +SE T +ist s +ap i +le cted +Ġv alid +Ġlen gth +ĠN OT +apt er +ch ild +A M +c i +Com mand +N um +F act +T arget +end er +Ġde vice +v ed +m odel +R ow +le ase +c b +w ait +b ody +Ġc al +temp late +el per +o u +l t +Bu ilder +Ġm ake +le m +H T +om e +def ined +} } +ate s +" )) +De f +im age +op en +v o +Ġh ttp +ĠP ro +Ġm ust +ro ot +'] , +Ġ , +ang ed +Ġfor mat +ab el +Ġ last +ĠA T +V alid +Ġt able +RE G +Col umn +pro totype +En t +R O +roll er +Ch ar +C all +Add ress +**************** **************** +s up +D I +ut ion +1 3 +Ġdo uble +Ex t +A ct +K E +m ark +## ## +he ight +Ġex pected +type of +2 4 +8 0 +R o +v ider +ri x +P er +Up date +st yle +Ġf lags +ER T +Ġreturn s +ĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠ +ro und +En try +li ce +M ax +n t +ment s +ĠL ist +Ġm in +Ġo per +G ener +d own +fo o +Ġr un +x y +Ġg iven +() : +Ġ! == +A d +o us +id get +co ding +Ġt ra +at er +at tern +ĠC om +} ); +, " +SI ZE +i str +c ast +Ġc atch +.. . +ĠĠĠĠ Ċ +An d +ug in +| | +im er +V E +He ight +n own +x x +d oc +Ġst atus +Ġne ed +Ġt ag +Ġb ut +id x +ol der +col umn +1 4 +act ive +w ith +chem a +//////// //////// +Ġbo olean +ĠC OM +in stance +Ġm ode +P age +P O +res ent +Ġ[ ' +B utton +reg ex +Ġ 7 +Ġo bj +ĠT r +Ġdo es +r ag +In it +a w +h andle +Ġb yte +o ption +m e +and om +T P +" }, +Param s +3 3 +s witch +ĠT H +Ġre quire +R ule +Ġint o +I L +r id +" )); +ad ata +l ang +U rl +M M +Ġs k +o te +Ġ( * +Em pty +re en +ix ed +S ON +Ser ver +Ġde sc +at tribute +ow er +p orted +Ġm e +res ource +5 5 +h er +if f +Ġw as +t itle +X X +S P +Ġp art +D R +f ilter +ER AT +Ġs rc +ript or +MA ND +cp u +F O +et adata +p art +j s +Ġa c +L abel +pa re +st ant +u ction +is ion +or age +s ole +de bug +T em +ĠB Y +Ġm odule +arsh al +Ġbu f +Ġpa rent +Ġg ener +Out put +Ġcom p +f g +Ġf ore +Ġ el +Pos ition +unt ime +Ġ1 6 +x ml +ĠD O +O K +@@ @@ +Ġo s +de st +ut il +ec ute +h ash +jo in +end if +ĠFI LE +le g +Cont rol +iz ed +0000000000000000 0000000000000000 +a uth +R ange +Ġv ersion +OR T +Ġus ing +Ġc ur +C urrent +Ġc lient +3 4 +tr act +b t +D IT +Ġst ream +B ytes +um e +ay s +1 8 +BU G +SY S +im ple +D is +c m +m iss +Ġw rite +3 0 +ĠU n +L I +ri ver +i ent +' )) +reg ister +M D +app ing +le t +Ġcom mand +Ġ ext +T I +Ġcont ent +t ach +Ġc allback +p th +Ent ity +Ġf ail +Ġth en +loc ation +um p +1 9 +F ilter +le ft +O p +ĠA dd +ĠO bject +c re +Ġn et +Ġin fo +le ar +pro cess +V ector +Inter face +o ol +A ssert +Ar gs +5 6 +Com ponent +read y +Ġf ound +S K +) | +Ġd is +struct or +Ġo ption +tern al +A G +un safe +res h +Ġb ytes +Ġp age +u res +ĠC reate +m ed +_ , +Ġup date +ĠG EN +Ġp ack +m y +ol ic +g ine +Ġspec ified +Ġfore ach +C ache +j son +n al +Ġ ra +S pec +r un +sh ow +Ġthrow s +o pt +n umber +ĠTH IS +irt ual +p u +t y +il ity +at al +P ack +ser ver +Ġ{ } +at ing +En um +u i +s or +/ ** +ERAT ED +Ġerr no +ĠI N +ĠT OP +ĠCOM MAND +Ġm sg +P l +u age +el p +B O +Ġpro cess +R L +A re +M in +d uct +se e +ĠE DIT +ĉ Ċ +Ġm odel +ig inal +r x +s plit +av a +U P +' ). +co der +u ch +in ition +ĠGEN ERATED +ĠW e +ig ger +r it +an k +in ce +it ies +w o +Lay out +Ġres ource +C ase +Ġim age +Sc ript +U M +C A +Ġt mp +Ġh andle +Ġ entry +en v +Ġg roup +H ash +N one +M atch +t om +P art +M o +ult ip +N ext +Ġw ork +AB LE +form ation +se lect +byte s +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +w w +D ir +H andle +g g +Ġ ] +M S +f low +IN VAL +s o +o se +s d +Ġa b +s end +2 8 +Ġat tribute +Ġcont inue +ss ign +ss word +r ight +ph p +s pec +C OM +C P +Ġb ack +tr a +5 0 +Le vel +ar ning +at rix +D raw +B ack +com mand +Ġo ld +Ġre p +Ġo verride +l ight +co py +h a +E T +AA AA +re ct +Lo ad +Ġs witch +id d +d a +u ff +U I +1 7 +e ar +C R +Ġ Z +Ġc l +le vel +Ġ local +l ong +Ġin d +sk b +c ry +ch ed +olic y +i ction +th e +HE CK +o ver +he ad +Ġpar se +ail able +D o +u a +il t +H P +f ilename +De vice +ateg ory +Ġ ; +N O +et r +B A +t s +Ġ ed +ial og +2 2 +* ) +MA X +List ener +b ind +to col +op s +Ġ" % +R un +{ } +Ġa fter +Ġe ach +ent er +[ : +o ok +op er +b y +se cond +re quire +V al +str uction +Loc ation +ch annel +C L +qu ence +1 00 +GE T +Col lection +P A +a int +Ġ url +Ġn on +s m +cle ar +T O +UR L +IC Ag +c al +d ma +E M +Ġf ind +N AME +Ġerrno Err +re l +4 0 +) -> +ST AT +Ġ( " +Type s +b r +Value s +In valid +M enu +ĠF ile +ĠReturn s +', ' +un lock +Fact ory +ĠC heck +O ption +m ain +ĠI D +assert Equals +ot al +V is +ex p +R ole +Ġthe re +ST R +ĠT ype +EN D +of t +Set tings +E E +à ¤ +A c +8 6 +f er +F B +Ġ row +V er +se ssion +C ur +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ +s b +Ġf rame +C C +Ġch ild +O bj +ug h +Ġp ort +pos ition +ens or +g round +T ask +W riter +c ul +B ody +L ink +c ard +Ġ K +Ġm ay +er ge +F alse +Ġde st +ĠC h +ific ation +s n +Ġcol umn +C allback +Ġde v +M odule +Ġb it +A uth +O F +p x +M od +ip p +B yte +de lete +Ġro ot +C I +s ert +n g +d ocument +Ġex p +ff ect +s i +Pro cess +w indow +Ġ load +do uble +As ync +Ġ query +AT A +Ġ ], +t d +c d +Ġo k +Ġbe fore +value s +Ġc or +ice s +ess ion +s ave +a red +Pro vider +; \ +ang le +H elper +N et +o ff +Ġadd ress +in ary +Ġ em +Ex pression +g ress +Ġs ign +Ġs ame +Cont ainer +' . +Ġ Y +Pa rent +Ġd ocument +M I +y y +Ġ label +ann ot +se arch +A ccess +vi de +Ġ Exception +Ġhe ader +D O +Ġa ction +en cy +Ġarg uments +com ment +Com p +p op +ix el +W R +ĠAr ray +Ġf unc +S A +2 3 +y m +Ġ empty +Name s +" ], +ot tom +dddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddd +an y +ud io +mu tex +Ġo p +og le +Ġm o +Ġo ver +miss ion +Ġm od +ck et +Ġg o +c or +SS ERT +0 3 +T op +D ocument +be gin +Re ader +add ress +Ġn p +AC E +se c +ä ¸ +> > +To ol +b utton +St ore +n il +ast er +d omain +Ġf mt +0 8 +sc ript +F S +Ġ' / +V M +De cl +ct l +r ate +Loc al +Ġcol or +Ġre q +Oper ation +K ind +) ] +he aders +wh ile +Ġ" " +Con nection +S ign +Par se +Ġ En +d ition +H ost +to String +Arg ument +Ġparam s +Ġit er +o o +I ter +Ġp l +Ġ} ) +Ġ temp +e ach +ail s +p b +Ġin st +Ex p +s w +m i +Ġ Error +as ic +Ġc opy +key s +I f +s ys +ul ar +De bug +r ule +st ack +Ġde lete +6 6 +r ange +t ab +St ack +F loat +pro perty +et ch +ch ip +ĉĉ Ċ +im um +is set +w n +ro y +A Y +Q L +Ġ' \ +c ap +ust er +str aint +ĠH T +ri es +De lete +C opy +c mp +Config uration +la s +Ġ Value +ĠRe g +Ġ -- +c ss +ser vice +Return s +iv ity +a uto +Ġa uto +d f +s l +Ġv iew +cont rol +ac cess +Ġreturn ed +A S +b a +iz ation +Ġf ilter +ĉ Ġ +up le +x ff +i ag +H as +ss oc +w ise +T ree +re set +er n +] )) +ĠO n +Ġ. .. +S up +S B +Ġreg ister +Util s +C O +N ULL +ex ception +w ard +') : +2 9 +) ? +ĠT R +f ull +Ġc ache +l n +Ġth an +L ock +item s +ur i +Ð ° +par ser +0 5 +t ask +Th read +Ġs end +Ġl ink +and ard +ĠD E +P AR +ins ert +Ġcont ain +S ession +Ġparam eter +cont inue +c r +Ġ qu +Ġal ready +Ġ ~ +t ml +Ġ. = +im es +. \ +Ġv er +or ld +8 8 +ch o +sh ould +AN D +p refix +' )); +Ġal low +Re ference +an e +ON E +Ġo pt +] + +t en +ach ine +es h +h andler +p ri +ĠĠĠĠĠĠĠĠ Ċ +p ol +Ġser vice +s ing +Ġhe re +Con stant +Ġw ant +Ġvar iable +-------------------------------- -------------------------------- +)) ); +ver y +ance l +Ġcal led +L ast +r ad +ad apter +p k +t t +u x +LO CK +w eb +> (); +ign ore +Reg ister +v is +Ġfile s +Ġim p +d rop +OR D +con f +con n +Ġw here +) } +W ork +ĠS e +f mt +DE BUG +m ac +g l +ph a +OR M +Ġs uccess +Ġc re +Time out +RE AD +a ded +ult i +riv ate +Ġelement s +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġ order +ic on +f p +Ð µ +f l +k nown +st amp +ĠTr ue +ch ange +b its +low er +M ock +Le ft +Th is +Ġg lobal +Ġ1 00 +Ġinter face +Ġc md +th ing +f c +file s +ã ģ +g lobal +2 00 +IT E +To String +F unc +c an +le ss +I R +Ch anged +Ġbe en +Ġ" , +'] ; +Ġ ctx +cl k +in ish +ĠI s +ĠS yscall +s z +M sg +Pro perties +Ġre move +C al +IN E +Q ue +at s +i que +in ation +Ġex ist +. ", +ind ing +Ġ 32 +ir on +ĠB u +ĉĉ ĠĠĠ +an ch +LA G +Com ple +Ġparam eters +Ġcom ple +Ġinstance of +.. / +Ġtype of +rap per +P ort +Tem plate +h dr +D et +En abled +Item s +Or der +S end +ĠM ath +AC K +X T +cp y +ab s +yn am +ch r +Ġ ), +LO G +c fg +iction ary +t ree +Ġh ost +B it +ĠS er +d ay +C l +Ġ/ ** +Ġhe ight +b us +@@ @ +Ġra ise +he ther +n ow +. ' +d isplay +Ġst ore +en c +ĠD ate +M on +r am +Ġi o +] ] +Ġd on += % +CT ION +re gs +f inal +pro to +b ers +W idget +Ġ>> > +ol low +Ro ot +C lose +a f +F R +(" . +sh ape +w are +Ġ( ' +v c +i as +ess ages +inter face +i pe +Ġex pect +Ch ange +Ġp h +3 5 +Ġ{ \ +cont ainer +ang es +Ġ- = +bo ard +In st +mem ber +P h +t ax +p m +Ġr c +ĠT o +ĠD ata +3 6 +c ent +Ġd one +D ATA +ok ie +tot al +ve ctor +Ġle vel +Ġh andler +en e +sp an +E L +Ġfor m +er ic +Ġ" / +Param eters +W N +Ġr ight +F P +st op +Ġse ssion +d s +c at +Ġn ow +ĠC ol +set tings +Ġre ference +th read +Se lect +Ġadd r +s ide += { +MA SK +im al +ol ume +FA ULT +Window s +la sh +O ST +M ODE +Ġc ustom +S k +G B +S R +la p +idd en +he et +Ġle ft +Ġm ain +Ġ$ . +r q +sign ature +Desc ription +K ER ++ " +Ġj son +F irst +Ġto p +Ġre l +C F +en able +Ġpa ss +ĠS h +r m +Ġt ask +2 6 +Ġse cond +D own +Re move +Ġpar ser +le an +AR T +stat s +P P +Ġc ls +H ttp +ch an +il er +In teger +F e +p dev +al k +err u +ce l +Ġst yle +ri e +lat form +iz er +Ġch annel +N S +f lag +Ġcon nection +ĠF or +cur ity +en ted +Ġit s +Ġ{ @ +O UT +In d +im ation +O C +B ar +c lick +l imit +l ish +3 1 +ample s +== = +A LL +7 7 +Ġd ate +I E +i an +to ol +App end +n p +time out +Ex pr +re c +igh light +CE SS +ph y +Ġ ent +Ġj ust +f ont +IN FO +lt a +re p +al ar +en code +Ch annel +ca use +Ġ" ", +Ġs p +ver se +Ġassert Equals +FI LE +OD O +im ension +Ġoper ation +TE ST +} \ +Ġre cord +ed ia +pre v +Desc riptor +S D +Oper and +m an +Ġresult s +Se arch +las ses +s oft +'] ); +ri be +ig in +( - +Ġ1 2 +Ġl ib +iv ed +< < +E INVAL +Ġex ception +Ġbu ild +Ġpoint er +Ġd b +g ment +ĠU p +iter ator +in ode +pe ed +i ant +Ġm ask +x is +ex ists +st ep +po ol +vo ke +A PI +R T +Ġf e +T ER +sc roll +str act +Ð ¾ +C ustom +Ġen v +inter nal +Ġst ack +r v +or ity +Are Equal +'] [' +th row +D el +8 9 +d one +2 1 +ĠL og +se mb +ssoc i +Ġmem ory +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠ +m ake +ynam ic +v b += > +ĠA n +Add r +U RE +ic ro +Ġs ome +Rule s +m enu +row ser +#### #### += \" +v ers +Ġ RE +ern el +Cont roller +lay out +aa aa +gg le +c ustom +ic le +Ġim port +m eta +Ġin formation +F LAG +ex ec +Ext ension +Ġd st +var iable +C D +F ont +ultip le +"}, { +================ ================ +und s +4 3 +ĠF alse +type s +re r +s ql +cry pt +A X +fa il +T ab +W h +r ing +Ġun safe +Ġ( _ +ist ance +d ict +th rows +J SON +field s +ĉĉĉĉ ĉĉĉĉ +an el +se q +il y +Var iable +ro ugh +P AT +Ġa g +Ġp o +re cord +ex it +et ry +app ly +Act ive +Ġre n +Attribute s +ializ ed +ĠI O +Ġo ff +in st +S pace +ent ial +ex pect +de c +r b +G R +Ġ' % +F atal +F ind +Ġun defined +ĠĠ Ċ +Ġarg ument +ar n +w ays +D irectory +us b +esc ape +F E +Ġf ilename +e k +C an +s ort +TI ME +as sed +isp atch +Ġstring s +/ > +Ġ queue +lab le +Ġb ody +Ġ/ > +ĠB yte +sh ort +size of +Ġbe cause +h s +ach ed +se ction +sh ift +w s +Ġs ys +Ġd irectory +pre c +Ġse arch +equal s +P refix +M ask +d u +z ero +test ing +Que ue +reg ion +3 9 +S p +P RE +Ġ$ ( +. "); +7 6 +Ġal loc +Ġdef ined +L EN +ĠI t +tr igger +Ġ' < +g ing +U se +Par ser +N OT +Ġ\ " +Ġth read +Con vert +em it +am ed +pro p +d m +und le +t l +ĠF ALSE +Imp l +Ġl i +A SSERT +Ġ[ ]; +Ġ2 0 +or s +ub lish +P H +Ġs ingle +en um +Ġle t +Def inition +Ġ lock +point s +C lick +. " +00000000000000000000000000000000 00000000000000000000000000000000 +sc ale +Ġnull ptr +as on +` ` +b c +med i +val u +l ines +pos it +Ġe v +) \ +ĠA R +. * +Ġm y +Ġd oc +Ġre ce +Ġat tr +if def +25 6 +P r +name s +iron ment +g p +O ne +Ġa uth +O ver +Ġp ost +STAT US +S O +Com ment +Ġex ec +Field s +D isplay +m arshal +Key s +Ġ& = +i od +AT ION +in her +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠ +R ight +id s +Ġex cept +Ġw ord +D oc +Ġs pace +ang uage +def ine +A GE +Ġerror s +() )); +Ġreg ex +er m +M T +Ġw hether +we en +Ġin valid +Ð ¸ +5 4 +FI G +r ary +Ġc a +im g +Pro ject +ĠRe ad +Ð ½ +g en +: [ +M ark +N on +desc ription +S ymbol +Ġd ir +P L +Ġch ange +ĠP HP +tr ace +P U +ter m +I M +pro ject +G lobal +con nection +T y +0 7 +ĠAr g +ĠIn t +o in +O B +Ġrep resent +N T +ĠD o +5 9 +Ġp refix +Ġf lag +ĠE X +Ġ' ' +G U +Ġa p +t c +M etadata +Ġtype s +rom ise +Sh ow +par ator +C ell +s ync +( \ +t imer +ĠP ar +ï ¼ +{ " +Ġs cope +Ġ' '; +F ailed +Ġel if +J son +8 02 +Ġf act +arg uments +F C +am l +end ing +R el +c lo +3 8 +Ġ template +Ġt x +l im +(' . +ext end +X ml +Ñ Ĥ +f r +Ġa ccess +e red +ĠA l +Ġt wo +g b +L ong +St orage +Ġf ollow +print k +() )) +ĠC ont +T itle +ĠG L +w d +j ust +4 4 +X G +Ġv is +Ġf ull +I con +( [] +Ġs nd +in clude +S cope +f b +Ġstr ict +F ull +" } +Ġa wait +am b +h d +S chema +p v +on ent +EX T +M atrix +I B +S ER +S u +Ġ# # +G raph +Enum er +r s +at ures +At tr +pc i +] * +I H +B Q +Ġcont ainer +U ri +ur face +_ . +De st +Ġ' . +C ore +c nt +On ly +comp onent +] -> +Ġt otal +S L +12 8 +s lice +le ep +etr ic +Reg ion +:: $ +V T +Ġm ark +ing s +In ternal +Bu ild +B IT +": " +Trans form +Ġt itle +D ialog +P olicy +e ad +ee k +ĠN ame +R ender +ib ility +D S +o pts +Ġl l +Ġor iginal +P ost +&& ( +arsh all +pa y +w p +ut f +3 7 +Str uct +Sh ort +ide o +g t +el y +Ġg ot +d p +Ex ec +) / +bu ff +en ded +Mem ory +qu i +ç ļ +C lo +ex ports +erru pt +net work +Ġ$ _ +in valid +å ı +Text ure +En gine +yn tax +bo olean +A uto +File s +çļ Ħ +c ip +ol ver +Ġp r +ol ution +ĠT ODO +M ath +Ġcont rol +P ool +istr y +Sc ale +Ġav ailable +d river +.. .. +Ġact ual +C HECK +Ġkey s +ĠL o +ĠS T +d ated +get Name +Ġb et +er a +C re +Ġo c +ce d +(" \ +ĠA pp +ĠIn it +Ġo pts +Ġw ait +w ner +ĠJ SON +En v +Ġrequire d +Ġfield s +4 8 +te p +ent ic +U s +ĠUp date +D b +t ip +Ġin teger +ipp et +(' / +G V +ĠW rite +B l +IC E +al low +! = +M eta +n ormal +F lag +ializ er +IN IT +S ocket +F ail +ched ule +a z +lang uage +ilt ers +Ġref lect +ĠA PI +Ġitem s +en se +Ġd isplay +F ORM +: % +P layer +Ġde bug +Se lected +ar r +f ul +d om +Ġpack et +set s +> \ +ha vi +Ġcom ponent +---- - +re lease +Ġb its +ST ATE +Ġlo op +Iter ator +im ary +Ġ[ " +Ġ ^ +Ġthe m +SI ON +m all +Ac count +pi pe +Ġname s +g ed +Ġs um +Re p +Z X +//////////////// //////////////// +ist ory +arg in +on ly +C ODE +d i +on ce +Se cond +def er +Ġf ree +ĠTR UE +Ġr ule +M O +i us +1 000 +W e +key word +Ġal so +posit ory +im p +Ġset tings +He aders +ic ode +N d +O FF +ren der +Ġcon vert +Re ce +Ġp assed +p id +DE V +uff ix +ition al +S rc +f ix +Ġpre vious +w r +f x +am ily +Ġt ree +Tra ce +Ġpro to +Ġn ormal +---- -- +` , +Ġc pu +Bu f +Form s +OR Y +Draw ing +ĠE vent +T X +ve c +ith er +ICAg ICAg +al ign +Ġm on +Ñ Ģ +Ġsh ow +d raw +h ide +m c +le x +Ġre set +Ġc lose +v as +ff ff +index Of +Ġ 64 +Ġen code +attribute s +arg v +E ach +R I +)) . +l g +ã Ĥ +Ġs ystem +B E +pa ss +un it +"" " +App lication +Ġc b +From String +0 64 +de code +iter al +. __ +Ġtime out +F ound +ĠC HECK +Ġz ero +Ġc lear +cur s +De c +D D +W AR +ch unk +Ġ te +P ORT +Node s +Ġid x +E V +Se ction +x u +N e +Ġc ref +G o +'] )) +l p +Ġsh ift +P ER +ĠV ector +Z W +G rid +" + +child ren +Ġs ure +TE XT +Ġse e +am era +U SE +Ġex pression +Ġsup port +] = +lic it +x FF +f ill +const ant +D omain +s v +chr on +b order +Ġ am +dr v +oper ator +lo y +Ġd if +() ). +O G +Ġ" - +p attern +Trans action +w here +Ġd own +b n +} . +at om +Role Size +s ocket +pack et +h i +Ġo ur +Ġen um +rag ment +Pack et +w in +W ORD +å Ī +ir m +l ing +Ġ' ', +ay load +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Element s +4 2 +P S +Ġsh ort +p g +H ER +g or +ĠN o +Mem ber +Id x +Ġhe aders +SU C +Ed itor +A v +Ġconfig uration +ww w +Ġ" # +Tra ck +Ġv irtual +Ġde c +ĠT ask +ac y +X ML +R et +ĠN ot +L S +] [' +Cont ains +N UM +S ingle +Ġin clude +Ed it +w ay +U int +Ġf n +dis able +Ġb l +db g +un defined +UR I +ute s +Ġ ignore +la in +W E +set up +Ġt f +Ġ" < +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠ +Ġ" . +t ail +ã ĥ +vi ded +sup port +p ed +Se lector +th on +ss ible +get Value +ĠT ime +L INE +Ġst ep +sh ot +ion s +d t +L ower +Ġobject s +pl ugin +Ġs ince +Ġ' , +Ġoption al +i ted +P anel +d at +pro xy +de rer +9 6 +ĠC ON +Ġ(! $ +d w +ord in +pa ir +mo ved +` . +fore ach +E Q +U D +VAL UE +d c +n r +g ra +Ġsk ip +( __ +U L +P UT +ex ample +Ġre place +Net work +ce ll +V o +ol y +Ġcon sole +cul ate +Ġsup er +res p +Q T +gor ith +7 5 +ert ific +802 11 +ire d +Re quire +ĠS ee +B its +Ġv ector +M C +__ , +B Y +ĉĉĉ Ċ +HT TP +Ġthe y +pro duct +Ġdoes n +or ies +Ġe qual +fe rent +Nd Ex +r andom +à ¸ +im s +i i +arg e +Pro p +: ' +Ġ' " +t f +RE Q +dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd +ĠS D +M apping +) * +St op +M B +av ed +G e +iss ing +al t +Ġsh ape +apt ure +Ġother wise +ad min +L ib +ol ute +Ġd irect +ĉĉĉ ĠĠĠ +N C +s lot +tx t +) ", +D C +ll ation +) [ +http s +ializ ation +c x +Se lection +ĠO P +Ġimp lement +est ed +Ġen coding +ed it +ĠN ote +red ential +pl at +Ġcont ains +s ample +Name space +Ġ und +sc an +Lay er +OP T +Ġa ut +ke ep +in ner +dest roy +PE CT +ĠP y +Ġcre ated +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠ +Event s +Ġ' - +ĠU RL +A pi +R aw +Ġ[ ], +yn chron +ĠĠĠĠĠĠĠĠĠĠĠĠ Ċ +A b +re ference +leg ate +Pl ugin +Ġ{ }; +E CT +HT ML +Ġs ave +Ġd omain +b ed +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠ +Not Null +WR ITE +ne g +Ġchar acter +pp ed +In s +Ġst op +m erge +Ġcon nect +Pro file +ip s +em ail +b ottom +Ġbe ing +2 01 +CT RL +res sed +{ @ +mon th +bo ok +ĠB O +Bo olean +ex ecute +4 6 +B L +chem e +Ġg l +ut able +At A +ab ility +to ggle +n b +pa ssword +J ob +s ig +se lected +An y +Ġcontain ing +C ategory +S imple +Ġex it +s ystem +j Query +re al +s ince +Ġsc ript +s uccess +mo use +name space +Ġad ded +mo ck +C M +Ġ1 5 +c n +F T +leg al +cont ains +ance llation +b in +v ision +pro c +Ġl ines +I I +9 7 +Result s +Ġ raw +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +ee ded +trans form +amb da +im port +et ime +event s +ad ow +Ġsup ported +ĠO ut +Ġact ive +M an +R ed +DE FAULT +Ġth rough +s ock +Pa ir +Ġ` ` +g raph +G F +DI R +Ġpro perties +Ġ[ [ +æ ľ +Ġc annot +LE CT +Mo ve +Ġdef ine +M ENT +s q +NE L +act ers +ĠS k +: { +CT L +add ing +tr l +comp lete +Ġren der +SUC CESS +con structor +com mon +Ġh elp +app lication +trans ition +') -> +S ave +8 5 +Sc roll +PO ST +Ġse lect +LE D +f in +a de +D IS +Ġcol lection +B r +4 5 +ĠU se +$ { +Do uble +icro soft +a fe +a fter +Sh ould +8 7 +cre ment +E S +T x +f w +B inding +St andard +inher it +ĠDe fault +result s +Al ign +() ), +E C +A fter +ĠHT TP +Ġ Key +Ġ( ); +de red +" /> +Ġag ain +z z +4 7 +t m +pro m +at tach +IT Y +Ġp attern +Bo ol +Ġcor rect +d ig +cle an +v es +Ġli ke +Ġattribute s +code c +th en +Ġwith out +A CT +Sh ape +S uccess +' re +b atch +mo unt +PAT H +Ġch unk +it ive +sc ription +tr ack +Ġx ml +******************************** ******************************** +C MD +, - +Th at +J S +auth or +t a +M IN +6 0 +param eters +a j +ater ial +ĠP aram +le ted +E l +P ri +Ġs b +Ġnode s +c ing +etr ics +gorith m +error s +av ig +gn ore +Ġse lector +Imp ort +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠ +AD D +Ġas ync +Ġse ction +W ord +Ġpro ject +con v +De pth +h r +ator s +p d +Ġpro vided +[ ^ +u ally +de lay +C ap +\ ": +C lear +Ġw riter +Con dition +Ġex ports +Ġse lected +s ymbol +MA P +valid ate +ĠT ext +Ġbe gin +bo se +Ġr andom +Ġsc ale +resh old +as ync +IN S +lo op +R X +z one +Ġb r +match es +VER SION +ap shot +Ġg oto +Ġb utton +ĠA t +s r +Ġinst ead +ĠC ode +Y X +li de +P ers +Ġi p +Date Time +W rapper +Ġc lean +Ġs ocket +Ġ entity +en abled +p ret +In sert +ac ity +ry pt +arg ument +Ġbet ween +ĠQ String +be fore +C md +b p +Data base +ĠTr ans +Ġse quence +Ġal ways +add Class +ic ate +MS G +D F +s ure +H ighlight +Ġ1 000 +ĠN ode +node s +Ġinter nal +I VE +å IJ +ul ate +end s +c v +i k +A I +Ġw rit +(" / +pend ing +Ġex ists +d irect +---------------------------------------------------------------- -------- +p loy +Ġp latform +ertific ate +s chema +Id s +F ree +A V +"> ' +for ce +Ġre ct +P rivate +M edia +Ġun it +l ation +Point s +Ġ' ') +Highlight Rules +g a +W A +Child ren +ro ute +Bo und +Ġapp lication +Ġtest s +D ay +An not +MA C +ĠO pen +u ted +Per mission +Ġin te +PR O +ĠRe quest +R ad +ĠS QL +k t +ro id +Ġr v +medi ate +ĠC al +ind ent +) }, +Ġdesc ription +E B +dis abled +Ġa bs +Ġb atch +Ġchar acters +th em +P y +Ġmo ve +ĠP R +Ġent ries +ĠV alid +Re set +a ff +Ġp red +Ġp ri +Ġy ield +S w +Ġa ss +Ġcon s +j ava +ĠI R +l legal +[ \ +By Id +p red +inter val +C RE +g le +á ĥ +l x +M esh +QT tBQUN +pc m +En able +Det ails +check ed +ĠH e +I X +UN T +S o +t le +PI O +act iv +( : +St ats +ax is +D MA +Ġex tra +Menu Item +Ġj Query +Un marshal +Ġto o +te ct +Ġs plit +S yscall +Ġto ol +ĠX XX +Ġelse if +Ġu i +ens ure +{ $ +Ro ute +m apping +Set s +rt l +ra ce +y p +Ġe very +z e +Trans ition +h idden +la ck +Ġm an +Ġd river +qui res +8 3 +Row s +Ġtra ck +al ias +im pl +ar ted +E P +lo aded +O wn +: / +Ġthe se +H A +Ġ until +N ONE +gr id +æķ ° +Ġapp ly +Ġpack age +Ġpo ssible +m er +Tag s +app ed +Ġde pend +") ] +Ex ists +tr im +la use +mat rix +B T +Ġv m +Ġhttp s +Al low +v id +p ower +ĠP L +w m +S ql +Lo op +Ġb ar +RE E +ro t +ĠVAL UE +Pa ssword +for Each +l er +h elp +up lic +V ec +ĠSt art +In struction +sc ri +v irtual +J oin +S ort +s u +D T +æ ĸ +Ġspec ific +Ġarg v +Ġ{ { +P ublish +IG HT +user name +... ) +Constant s +ĠBO OST +Ġp ool +part s +Re port +QTtBQUN BO +Ar ch +v ok +Ġ" [ +Enumer able +Ġmatch es +Ġwith in +A UT +P ixel +str ict +ĠIn valid +ĠRe move +S lot +W orld +m aster +Ġa ssign +Frame work +ĠS ub +rie ve +Ġ' _ +A ssign +e ff +v d +comp are +ces sed +co okie +Ġcon n +Ġind ent +Ġem it +o ugh +S plit +pay load +P HP +idd le +f req +Ġmethod s +Ġd w +Ġ' # +lo ader +A bs +oriz ont +R andom +ĠIn teger +Ġch ain ++ = +Fe ature +ĠLo ad +Cl uster +Ġh igh +re mote +Ġc ell +Ġen abled +V olume +pro file +token s +Ġdesc riptor +Ġde lta +Ġd ig +S V +Ġconst ant +and s +is Empty +Ġd iv +Require d +End point +Ex ecute +var iant +ĠDe lete +im ate +M achine +Ġre port +Ġll vm +jo b +c er +Ġm ock +(". / +Ġcom mon +r p +rid ge +N ative +se g +Control s +V ert +US ER +Ġs ender +] : +ann er +INS ERT +tri b +Ġsk b +L anguage +Ġ{ " +t w +n l +Ġind ic +* ( +Lo okup +ĠS o +create Element +Ġs printf +" == +ĠO p +group s +I gnore +O b +å ħ +havi or +ĠH ttp +ex tra +Ġs lot +iz es +ent s +a ut +v ance +Y W +St atic +Ġset ting +d l +lay ers +v ing +Ġe cho +Gener ic +m anager +Ġde pth +Ed ge +Ġis instance +ent ries +QUFD QTtBQUNBO +Ġf ill +Ġf ix +lo or +Ġs yscall +h ook +FF FF +Bo unds +un ct +Y Y +Ġus b +Gener ated +inish ed +Ġreg ion +Ġc lock +and id +OFF SET +Ġe lem +: ! +option al +sup ported +Ġ :: +p ers +BA SE +Mon th +get Id +IF T +ĠF orm +H elp +Ġfail ure +en ers +At tach +v oc +Ġf in +x c +y cle +0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 +de cl +object s +en ch +Em it +aaaa aaaa +Ġ keep +al f +Ġd iff +G l +! == +De code +orizont al += ! +n one +bu ilder +( [' +N ow +ĠA ct +ith ub +Re lease +Dis k +IN K +i oc +ĠCom p +\ / +UE ST +[ - +Ġ Res +ĠG FP ++ ' +Ġpl ugin +je ction +Ġp ipe +ĉ ĠĠĠĠĠ +7 0 +ĠA S +**************************************************************** ******** +M ac +ĠJ S +Ġwh at +Be an +Ġcur sor +T F +T ry +g ative +ent ral +Ġgener ated +Arg uments +Ġa pi +à ¥ +ag ic +h ci +Ġ -------- +Ġsign al +pa ren +O wner +5 8 +L D +il li +ab c +t im +Ġcall s +t b +ĠM em +ĠI d +E lem +ĠB lock +P M +Ch ain +(" ../ +Th row +H R +7 8 +R en +Ġt ab +i ed +g c +valu ate +B ind +sum er +er min +Un expected +param eter +ĠR aw +a N +atal og +PAR AM +p f +w riter +Ġ" + +ĠF ield +er red +ut down +i NdEx +Ġo b +Ġin ode +Ch unk +tri es +. , +A F +Object s +Ġm eta +de pend +Ġpro tected +T e +F ix +); \ +d n +d im +require d +ĠP re +pre pare +E ffect +requ ency +Ġp riv +Column s +Ġcont roller +Ġp resent +cl us +B LOCK +un ique +~ ~ +M ulti +n v +å ® +Ġre moved +ĠReg ister +get Instance +An imation +entic ation +Ġt uple +Ġp ixel +5 3 +ure d +inst all +pro tocol +Ġs ent +ĠW indow +Ġm enu +Ġvalid ate +Ġ" ) +Event Listener +point er +content s +C UR +c enter +Ġ$ { +pe ll +W IN +our s +V R +write l +EV ENT +am pl +B C +Ġ( [] +d irectory +h c +ç Ķ +Y ear +id ent +Ġpro tocol +Id entity +ĠL OG +TH OD +d ist +block s +Ex it +k it +Ġp layer +Ġ et +Ġp s +Ġvariable s +De pend +F rac +DE F +f il +ser v +B inary +Valid ation +M ON +SU LT +ĠM ethod +ed ge +um b +Ġs uch +Group s +k g +Status Code +c f +Fail ure +($ _ +ul lable +ID E +Ġm etadata +TR ACE +ĉĉĉ ĠĠ +FF ER +Comple te +I MP +Ġs ig +' => +SU B +w atch +as c +SH IFT +r pc +Ġpar sed +ĉĉĉ Ġ +G en +gener ate +c ancel +> , +om eth +ateg y +Ġtra ce +enc ies +on y +KER NEL +AR G +_ ( +> . +ometh ing +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠ +D irect +wh ich +riter ia +Re pository +I t +Ġed ge +Back ground +Ġp ayload +al let +Ġex tract +Ġus age +bo ve +8 2 +R ot +h ex +C ancel +ĠN umber +on es +w ill +not ify +Ġj ob +++ ] +D river +cur r +con sole +d ot +ĉĉ ĠĠĠĠĠĠ +ro ke +######## ######## +F LO +c atch +ĠS C +n a +Ġ' ) +v p +Ġa void +con cat +Ġv ec +D OM +r ong +Ġcor respon +mem set +k ely +prec ated +9 2 +No te +ĠBu ild +Ġst ill +bu cket +log in +h igh +drop down +Ġr untime +Ġpa ssword +Oper ator +G RO +BY TE +? ( +ĠH ash +V ideo +or th +F ALSE +ĠRe set +ed s +cl one +ĠA ND +A xis +n n +C or +Ġar ch +} " +G ER +Ġj ava +Ġn ative +h older +C AP +An gle +g ot +ĠA SSERT +> " +s ym +bo ot +Test s +å Ń +B undle +ol ved +HER E +Ġb us +L ines +Ġ" ; +Ġmem ber +è ¿ +Method s +p lay +Ġf d +rep ly +Ġr ad +Ġtag s +W in +ĉĉĉĉ ĠĠĠ +Ġ1 4 +Ġm at +P red +cl u +Com pare +cess ary +ĠR T +(" # +U V +co gn +Z one +attr s +Ġallow ed +Ġt ri +num eric +sign al +Ġ1 3 +Ġim g +} ), +Ġrepresent ation +ite space +Ġ ct +5 09 +L Y +o ted +c lasses +un ch +Ġ rows +Ġc m +Ġf printf +Ġp ci +Ġw ay +x l +Ġid entifier +Ġthe ir +ch art +:" \\ +5 1 +T ick +up per +ĠF ROM +Event Args +Ġed itor +ĠDe bug +ĉĉĉ ĠĠĠĠĠĠ +tem pt +Ġs q +ched ul +Ġ} \ +Ġ{ ' +fact ory +module s +/ , +? " +li ke +ĠM MM +cbi Ag +Ġre lease +w rit +F ilename +Un lock +ĠC lose +sp i +C ast +SH A +Ġh app +Ġs imple +them e +istr ib +O pt +Ġc c +h elper +St d +to k +Us age +\ ", +Ġrel ative +e cho +Ġs chema +D irection +ĠOut put +Ġon ce +p ixel +g d +а Ð +alle l +G A +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ +Ġat tach +е Ð += $ +o ot +D M +Ġver ify +Ġmatch ed +ME THOD +Ġhe ad +ĠSer ver +P lay +V irtual +CF G +t k +ĠR un +In str +Ġ la +Ġcontent s +ĠDate Time +ĠV iew +Ġmon th +pan el +ĉĉ Ġ +padd ing +ĠIN TO +TR AN +start s +P ush +U LE +B ottom +res ses +g reg +NE T +A ST +Ġw arning +S ite +Re al +Ġle ast +L AN +column s +ĠE d +Ġtra in +Ġap pro +ĠJ son +' .$ +== " +us age +co very +M ake +J ava +ase s +Ġs ock +pk t +Ġt imer +li te +Sh ader +c ut +. ( +H W +s in +ĠWh en +s peed +6 8 +d irection +Ġs z +if est +Ġrun ning +element s +d uration +)) { +Ġt imes +e val +Com mon +ex pression +in line +H AND +ĠD MA +li ct +re v +S heet +Ġr ate +^ \ +Ġdis able +: ` +Ġdest ination +F ill +RE T +Set up +t ick +Ġw ire +Ġl ua +Ġse c +Pro ps +F ixed +DB G +sub string +'] . +web pack +Ġ3 0 +: ] +str cmp +ex ist +; } +N N +ĠL L +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠ +Ġm essages +al ert +7 1 +Ġt s +å Ĭ +net dev +U B +Ġl p +ĠCon text +imit ive +t ure +Auth or +Ġfor ce +test s +ac cept +D ictionary +In formation +C ATE +ĠC H +DE X +p olicy +clu ded +method s +FI X +z er +LE TE +RE SULT +ĠPro cess +Ġh w +, ' +Ġs u +Ġwe b +Second s +ĠD is +f lat +Is Null +Ġs lice +Ġ low +M aterial +Ġneed s +Ġsc an +Re mote +we ight +B atch +em on +Mark er +art y +Ġ lower +SS L +D ig +pro gress +Ġpro gram +ĠCon sole +SC R +z A +id i +h o +s oc +Ġk ernel +LO B +it ude +Ġblock s +Mod ified +s y +Pre v +Ġd imension +CON TR +E ST +QU AL +At om +Con sole +g on +atom ic +rypt o +ĠVALUE S +9 3 +9 8 +at t +ĠS ource +ro ad +ub e +ĠO ther +th at +string s +gra de +r f +Ġm ight +ĠValue Error +Sh ared +age ment +Ġb inary +rel ation +m ath +ĠP CI +Ġassoci ated +) - +] ", +ĠD OM +Ġ< - +Not Found +Ġan other +om ent +A udio +fr ont +ser ialize +ä º +Ġbu ff +BU FFER +Ġv ert +V O +t ion +istrib ution +9 5 +B ig +Ġuse s +en coder +Ġc p +ĠV er +Co unter +col lapse +ĠI mage +Ġdef inition +F ace +Ġd id +Ġ layout +Ġs im +Reg istry +ĠOption al +if orm +6 5 +i om +Ġint errupt +re ater +Ġmax imum +å ¤ +channel s +z ure +\ ' +> '; +Ġg en +Ġchild ren +Ø § +S M +:[ { +inherit doc +Ġfin ally +Ġoc cur +default s +e f +ut or +ul ator +Loc ale +> (" +ch anged +CP U +) " +EL D +h l +è ® +l ua +se lection +ĠArray List +TR Y +se ed +Ġar r +> = +mark s +L iteral +9 1 +& # +d ays +re ce +us ers +Ġrequest ed +Ġ# { +com mit +a u +Ġ5 0 +12 3 +Ind ent +ys is +anag ed +ĠU N +Ġtr igger +v n +UR CE +CLA SS +Ġc ore +Ġme ans +ĠBu ffer +D rop +Ġm ac +comp ile +/ { +Ġy et +H igh +T ile +Ġro ut +b le +M erge +ip her +ĠM I +un try +An chor +ĠL e +pl an +F ocus +Ġid ent +Ġv ia +Ġ' ; +Sc ene +Ġsc roll +in c +æ ĺ +ist ic +Ġd ist +Ġsub str +p lot +d ent +CL K +m ented +Get Type +Ġ Result +g ame +Ġev en +in te +" ]. +vis ible +Ġp ers +T S +has Class +ĠInit ialize +Ġb ad +ĠS ize +SU PP +ph ys +la ve +Ġ' [ +i ro +et te +Ġlib c +get Operand +H ex +Function s +æ Ī +out er +Ġinit ialize +U G +Ġk now +Ġ er +ig r +m k +comp ress +6 3 +P TR +pect or +Time stamp +Ġc fg +Service s +Ġs s +par ison +F amily +N s +7 2 +Ġ ensure +d ispatch +Ġat om +if o +time stamp +ĠS end +__ ); +Ġcom pare +Own Property +ĠCol or +) + +Su f +de ep +ang ular +unct uation +Ġse lection +unk nown +8 4 +Ġc ast +------ - +l m +Pro gram +ver ify +ĉĉĉĉ Ġ +Ġ ). +Ġresource s +G EN +Ġpart s +ĠIn dex +Ġa bove +Ġm s +ed i +Ġp ush +Ġ* = +R M +Ġs ide +b inary +P od +U INT +k s +Ġlist ener +Ġd irection +FLAG S +| \\ +SER VER +is c +> :: +D iff +OB JECT +Or igin +D AY +Ġbe st +Ġwe re +R V +! ! +Ġup dated +GRO UP +doc s +r dev +Env ironment +pro be +append Child +-- - +medi um +fe ature +AR D +ex port +IN D +] )); +x pr +ĠPHP Excel +SO URCE +up load +d x +ri ve +A SE +ic ient +Ġch anges +An im +RE D +} ] +Av ailable +RE F +Ġe ffect +or ig +ist ics +. """ +In voke +s ame +Ġno thing +Ġun ique +trans action +Ġt ensor +ĉĉĉĉ ĠĠ +Style s +UR N +im ages +Un m +drv data +Sign ature +ath er +sub mit +] ], +ord s +Y PE +ĉ ĠĠ +Ġg rid +Set ting +ĠQ t +pe er +Ġ1 02 +s f +st a +Ġp t +N ODE +Ġm p +T erm +R S +al led +s imple +6 2 +Ġcl uster +LO C +ĠRaw Syscall +c g +n ippet +Ġtoken s +G uid +Ġp romise +O k +Ġfe ature +ĠM y +ĠTo ken +c ert +Ġb t +] ( +CA LL +F N +Ġd rm +u tex +ĠA d +Ġd at +ateg ories +h p +Se gment +m alloc +Ali as +Ġpro xy +ver ted +ra ise +){ " +Ġp adding +Ġd rop +Ġde lay +CO UNT +Ġd uring +Ġassert That +end or +il ities +b eta +Ġcolumn s +Ġs ql +r ont +D one +Ġre mote +ĠSer vice +ul k +C ulture +Ġ Response +li es +Ġ uri +V AR +com e +ĠJ ava +Ġg e +z on +b ine +d y +De legate +9 4 +co ut +Ġadd itional +(/ \ +Ren derer +l c +if ies +() } +ĠA ction +ref s +Ġcurrent ly +C ard +m r +ĠC C +m argin +Ġcomp ute +str len +REQ UEST +istr ation +ul a +path s +Ġspec ial +am d +Ġlabel s +DEV ICE +prec ision +PA RE +Ġr x +Ġco unter +S ock +Ġa cc +Rece ive +C enter +Sup ported +def inition +s printf +ĠX ml +Ġ( (( +D P +w er +Ġp ad +label s +co s +dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd +M IT +Ġro t +Valid ate +j d +Print f +Su ite +PA GE +Re c +He ad +Ġm ost +b g +Ġ" _ +o op +.... .... +Del ay +pan ded +D st +Ġ2 56 +e ded +ĠP er +, \ +fa ctor +Ġst orage +M essages +b at +ĠU SB +00 1 +CATE G +m esh +Ġin ner +Ġ ----- +ĠO per +Op code +(" < +Ġde cl +ĠE lement +av ailable +Char acter +Ġimplement ation +g ate +(' \ +Ġm issing +Ġs mall +ĉĉ ĠĠ +PH Y +or igin +' + +al ette +Ġre ason +Ġab stract +ra cket +ĠParam eters +F low +t wo +Ġmatch ing +al th +m ulti +Em ail +Ġiter ator +I A +****** / +Ġl anguage +' ", +pan ic +Ġ icon +Ġm d +use s +TI M +C AC +)? | +err no +Lower Case +f ixed +ĠM achine +99 99 +d ialog +f ilters +B ACK +ilt in +Ġenum er +ĠM ock +. ', +B order +set ting +M icrosoft +IR Q +Dec imal +ĠC opy +un register +ĠIR Q +Ġd type +Ġc ard +get Line +PR OP +t ile +F W +AR RAY +Ġlo aded +init ial +ĠP rint +Ġ* ( +C SS +EX PR +full y +Ġa ws +N il +Ġd ay +kw args +PR OT +S ound +n av +ns nippet +i os +Ġne cessary +G TH +ra pped +x a +Ġcon structor +04 3 +aw s +Ġp c +Ġis s +get Message +av ing +AN CE +Check ed +@@@@ @ +In to +se quence +Ġ esc +// ------------------------------------------------------------------------ +resource s +Ġor g +set Value +ĉĉĉ ĠĠĠĠ +Sel f +ep Copy +Ġh old +COM P +std out +w b +(' < +P ut +ss l +Ġen gine +ĠO r +H istory +En tries +B reak +ore st +P oly +B ad +H J +RE CT +w x +a o +cl uster +P latform +Ġad apter +D iv +Ñ ĥ +avig ation +f older +loc ity +B ER +Ġc s +Ġd ma +Ġpro vider +PR INT +7 4 +Up per +Ġv ideo +h y +fe ed +. '); +Ġl ater +Ad min +us pend +expect s +ser ial +ĉ ĠĠĠĠ +Ġh ard +Ġpro vide +CATEG ORY +get Attribute +Ġim s +F ragment +ordin ates +trans port +LO AD +uplic ate +Ġde termin +V F +Ġ util +co ver +Ġr t +3 00 +xx x +Ġse q +Ġf ace +config uration +pe g +SS ION +curs ive +us ing +Var iant +P ipe +v f +Ġ' ( +O pts +I pv +ib ling +ĠCon stant +Ġne gative +v olume +m V +get Data +SE L +t uple +Ġme an +ĠFI X +t bl +Ex tra +get Parent +L ONG +is match +Ġret val +T ex +pl ugins +iv ely +D imension +Ġ" ") +w orld +Ġcase s +ĉĉĉĉ ĉĉĉĉĉ +P resent +Test Case +Log in +Ġend point +W here +Init ialize +Lib rary +r on +C ould +Ġpro file +N aN +se ss +7 9 +f rag +Ġb ottom +vo ice +rad ius +ĉĉĉĉ Ċ +Ġch ip +ĠGo ogle +ĠP l +Ġg p +f ire +DE D +H ook +Ex port +U sed +Ġw orld +trans fer +x e +t ty +quest ion +Res olver +RE AM +A MP +has OwnProperty +U ST +Valid ator +Ġi eee +Ġd ynamic +Ġin side +çĶ ¨ +Ġl ang +Ġpro per +pa ct +Ġregist ers +F X +mission s +G LOBAL +ĠCh ar +ipp ing +Ġv o +in ux +Ġ' { +ĠTh read +Act iv +ver tex +de s +Ġc x +Ġse ed +A K +Ġs afe +m ix +int errupt +dis k +Ġex pr +la im +irt y +Ġun set +A rr +se gment +Fact or +ench mark +red irect +pp ing +Ġ" -- +prevent Default +a e +ĠF irst +Ġcl k +get Current +C annot +Ġrule s +Ġup per +GU IC +pe xpr +IT H +input s +IsNull Or +Ġl ambda +Ġed it +uc ce +let ion +> ", +Ġinput s +VE L +c lip +ĠM O +it al +Graph ics +/ ******/ +ĠA c +x s +pa use +wh en +ĠM arshal +D ynamic +S witch +ir d +Ph ys +re peat +ne ed +Bit map +o v +s lide +r ic +rom e +H I +clean up +am ount +Ġf il +Ġde termine +Sec ret +Align ment +ĠT EST +id entifier +s id +Ġco okie +æ į +Ġp in +> ', +X Y +Get s +Ġinst all +COL OR +e ffect +Ġ. . +As set +Ġstart ing +ap on +s urface +UN K +b rowser +In ner +ok ies +sub ject +du ce +ĠT ra +ĠRe f +ĉĉ ĠĠĠĠ +N V +ĠV is +Ġb order +Al pha +/ ************************************************************************ +Trans fer +Ġc lick +Ġf older +Sign al +GUIC trl +he el +trans late +Ġre quires +Gener ate +Ġc enter +Ġs l +cry ption +Ġagain st +US H +it tle +ĠWindow s +rad ient +e ver +par a +sc ape +n c +LT ER +illi seconds +cry pted +Ġ escape +App ly +1234 56 +. (* +Ġlog ging +Ġg r +Ġin s +H H +str ide +P romise +Ġs ite +Ġse g +I AL +Ġus ers +eth er +b as +ĠAt tribute +Ġp atch +Ġ es +con s +SI GN +P riv +Ġ{ }, +EN C +u ce +G ui +pol y +T imes +Ġenv ironment +Option al +Ġf ixed +Ġword s +Token s +R U +st er +ag on +Ġ4 0 +exp and +Ġp olicy +ĠT able +ty p +Ġor igin +ar ies +frame s +Ġp ages +in voke +H OST +ĠL ook +Ġf lush +n i +G O +an it +lo ss +desc riptor +er ies +se p +Wh en +M s +) $ +h ello +Ġt im +Ġg ame +R l +HEAD ER +Sum mary +Char s +Ġmo use +ĠAdd ress +Ġre d +f amily +comp ute +W est +Ġp oly +pk g +ĠM atch +Pl an +N I +ĠMMM M +Ġs y +ĠN O +te am +clus ive +W eek +Pro c +n orm +x d +Pri ority +\ "> +f lash +list ener +ĠG ET +:: ~ +d imension +Ġc ancel += - +s core +a ult +ĠS w +% % +mit ted +Label s +Ġz ip +text ure +AT OR +Ġdefault s +Input Stream +P ayload +Ġn amed +ĠP a +Ġm ulti +art icle +VAL ID +fa ke +in f +cl uding +By Name +Ġact ually +c ached +Annot ation +s ome +Ġtext ure +ĠS imple +ĠThe re +Ġtrans ition +R PC +S peed +Ġ" : +Ġen ough +I p +Un able +) ', +PO S +ĠS ec +æ ł +* \ +p ub +Ġd uration +CON NE +igh b +En ter +S uffix +Com bo +Ġdirect ly +UT E +Rel ative +havi our +][ $ +sh ip +t pl +sp y +ly ing +Ġ% # +Ġtime stamp +str ap +> "; +Ġ'' ' +Ġs d +Ġcur r +se m +Pri ce +f ifo +ĠW M +Ġw atch +s ent +OP EN +cap s +ZER O +ĠP AGE +Ġm esh +Det ail +irm ware +H V +G C +r g +ĠY ou +c li +u v +Ġm edia +dat etime +Ġf low +ĠString Builder +sec ret +Ġd yn +ĠS tr +I Z +Ġc ategory +Ġre maining +Ġm ath +Ġs a +ĠM odel +log y +connect ed +pro b +F ore +D lg +Ġd ump +Sub ject +XX XX +Ġhapp en +b ig +see k +ĠType Error +b ot +Ġn v +Ser ializer +pa cing +a bb +< = +j ax +char set +message Info +r w +================================ ================================ +ul ated +ĠW ait +Ġd ialog +S ide +Ġs omething +Ġth ose +Id ent +6 9 +se curity +s leep +pri ate +( () +t un +Ġj oin +ĠValid ate +] ? +In clude +D ispose +Sn apshot +irq save +mark er +Ġw ell +Tr igger +Ġ* _ +get Mock +ue st +( [" +Ġ Resource +Ġp b +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠ +part ial +P eer +F oo +Ġback ground +arg c +A p +ĠC urrent +C V +ĉĉĉĉ ĠĠĠĠ +Per iod +Ġbu cket +Clo ud +cord ing +Ġrecord s +file Name +w ake +c ity +f printf +Action s +\\ . +is Array +ĠU RI +Con v +ĠFIX ME +Ð » +ri er +Code s +ĠSh ould +cul ation +Or iginal +Code c +Ġim ages +H int +al es +pl ane +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠ +G T +Go ogle +d istance +i w +pr ag +} ' +Ġcreate s +t or +Process or +ind er +L y +f loor +s amples +Ġ( ($ +Ac cept +ĉ ĠĠĠĠĠĠĠ +Ġcon version +ĠC ur +B us +R GB +Extension s +Ġp id +Ġc ached +ĠEx pression +m f +De v +ĠS V +(& _ +ver bose +ach ing +ĠĠĠĠĠĠ Ċ +Ġper iod +ra se +Ġp e +Ge ometry +al i +Convert er +qui val +T uple +D L +prag ma +spec ial +p lain +H O +ĠA P +++ , +d type +ĠW ith +ĠD ep +C lasses +Ġm m +] \ +V P +Ġm anager +Ġact iv +Sp rite +enar io +M ail +Ġ1 7 +}) } +Ġn one +at ile +ST D +Ġj s +Ġse par +se udo +cont act +Ġbo unds +_ ) +H B +Ġi NdEx +å ¼ +Ġret ry +R W +Ġ2 5 +Vis ual +back drop +get Text +Read y +x C +Ġstr ide +Ġcl one +S ym +NUM BER +Ġex act +Ġb inding +Work er +rel ative +s ender +Desc ribe +bl ue +em bed +$ _ +inter pret +cur rency +> & +dir fd +Q UE +Ġs peed +G PIO +el ls +FR AME +") : +dir ty +Or d +Event Handler +ot a +ar row +cs i +SCR IPT +et s +Ġan imation +Ġexp licit +Str ategy +Ġal ias +B I +, { +get String +sum e +Mon itor +Ġr s +component s +sc si +ĠA uth +Tr im +ra ft +rit ical +w rapper +in o +sub scription +p w +p ublish +w alk +Ġv olume +Ġ1 9 +Ġad just +P LAY +al an +ĠEn able +s uffix +p reg +t imes +S F +Int Ptr +W ID +Ġ[ (' +z y +A CTION +CON T +sh a +ys ql +pi res +Ġh elper +fa st +ĠPro perty +co ll +Ġk nown +ĠSe arch +/ . +ma j +Output Stream +T ensor +Ġt ermin +p ll +DE LETE +Ġver tex +Ġor ig +link s +c am +pri ce +com ments +c ision +Ġpre vent +Ġprocess ing +G u +ĠC o +ĠInt Ptr +ĠS Y +me an +. ") +Ġcheck s +Ġmod ified +D N +S ig +c pp +Null Exception +normal ize +Ġpart ial +LE VEL +" ]; +Rel ation +B lob +Ġ1 8 +P adding +m gr +un map +ri end +de on +Ñ ı +Rece ived +ĠEx ample +Ġregist ered +Ġexec ution +Not ify +Map per +f h +For ce +Ġal gorithm +ĠPy thon +âĢ Ķ +Ġt akes +ans wer +MA GE +ĠL ink +fold ing +g it ++ - +Ag greg +ĠD on +ĠS pec +CAC HE +Ġ& $ +aj ax +Ġde l +char At +Ġre store +Ex pect +Cal led +y e +Ġb asic +ODE V +6 00 +m F +Res olve +br anch +int r +ĠU int +S N +Rad ius +Ġ( ; +assert False +' ll +W V +is Valid +Ser ialize +æĺ ¯ +sh adow +ĠM age +ĠAR M +P ending +lap sed +ĠS to +Ġ angle +in v +Ġch o +Ġappro priate +Ġ4 2 +IT ION +Ex tract +P ay +ĠForm at +ĠSe lect +He ap +Ġre ject +i sed +D ist +USE D +LO W +Lo aded +p ing +Ġet c +Ġt w +à ® +Ġnum bers +n ic +MOD ULE +o verride +Ġattr s +ĠS ET +D ot +Ġy y +Ġ-------- -- +å ľ +Ġde leted +* )( +Z end +re m +code s +C lean +Ġb in +gr ad +åı ĸ +l k +Instance s +Bo ok +Ð ² +Ġqu ote +ĠI ter +Operation Exception +Ġ ĉ +encode d +Ġr b +ĠN V +4 00 +la re +vent ory +Br anch +dr ag +å º +Pr imary +o x +t ensor +Ġb ig +Ġi r +Ġr tl +yy yy +M X +Ġn r +ï ¿ +Ġignore d +Ġ( - +in cip +Ġit self +Ġ ERROR +Ġto k +S afe +Ġlib rary +Ġarray s +Run ner +(' _ +sw ap +> () +Ġ' : +T LS +col s +Ġm er +ins n +Ġ ON +ĠW ork +over flow +Ref resh +Ġw rapper +Ġoper ations +custom er +Unexpected EOF +un likely +sub stream +igr ation +RO W +fa de +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ċ +u ous +Ġcommand s +N ullable +mo st +Part s +ĠL T +gener ator +ific ations +Ġfail s +Ġc op +s im +ĠL ine +rel ated +ĠReg Exp +F d +Ġk w +pe ated +P ref +COM PARE +o ct +(( * +z alloc +ill is +w ire +as y +ind ices +Ġ'/ ' +t id +Default s +Err UnexpectedEOF +Ġexp lode +on al +r gb +o res +ic ator +rad io +at ient +M aster +Ġm aster +Ch art +Ġt yp +Ġt re +12 7 +Ser ies +ĠS ave +Ġ ERR +i ally +Group Name +m g +W M +B AD +Abs olute +Can vas +ĠGener ate +er ialize +Ġinter val +Ġind ices +ĉĉĉĉ ĠĠĠĠĠĠ +b um +ĠP ack +We ight +Ġf uture +7 89 +Ġde s +Per form +Ġauth or +gener ic +ĉĉ ĠĠĠĠĠ +AN GE +x D +m ultip +ï¿ ½ +le v +ub y +B US +set Text +ĠS L +M BB +Rep ly +ag raph +h istory +ĠD ocument +b asic +Ġan not +Ġc v +" ]) +down load +A IL +P G +h our +W rit +tool tip +S mall +get Num +In te +L ow +l v +Sh ell +Ġr and +yn th +AT H +w t +x b +lock ed +Print ln +Ġfor ward +FLO AT +ĠP romise +æ ī +Ġtrans fer +Z ip +se ctor +ĠP os +an o +F inal +all en +pro vide +Custom er +ate way +unc ate +VER IFY +O RE +Ġsum mary +Sh adow +Byte Array +pro d +ic ense +can vas +Ġp eer +k a +re ason +ED IT +Comple ted +ST REAM +R B +er ase +End ian +Ġ" { +M argin +File Path +reg ist +Ġd f +Ġp lay +run ning +re verse +Comp iler +en o +m id +or ing +Up load +ä» ¶ +am ma +Ġclean up +P ag +Ġex ternal +R G +parent Node +ĠN ow +Allow ed +Ġass um +ĠS ign +is m +EN ODEV +Ġgener ator +P ower +ĠIn d +H older +ref lect +b est +id ing +Ġp ref +Dis able +ĠLoc al +st it +dec imal +S cheme +a ise +Y ou +ĠCont ent +A IN +act ivity +Mem bers +v r +E ast +Ġget s +Ġd i +top ic +Un ique +Ġim mediate +process or +Ġgo ogle +Ġlocal e +ĠEd itor +Ġsuccess ful +Ġj o +n x +( ", +9 15 +Ġ ord +Ġ KEY +il ation +AP P +car ousel +FR OM +Index Of +SS AGE +Or g +E F +Ġe val +s un +D ll +Type Id +PO INT +ĠM ain +Ġ^ = +if act +ĠU TF +Ġext ends +tag Name +W nd +f it +Ġser ies +Is True +p resent +"> < +AAAAAAAA AAAAAAAA +vent ion +Ġcre ating +19 2 +Ġn d +Ġs oft +S m +MON TH +Ġp p +Reg ex +ĠAR RAY +Qu ote +char acter +Ġrece ive +m oment +Ġdis k +Ġaut omatic +w ind +s aved +Pa int +Ġ ]); +Sh ift +ra in +') ]) +Tab Index +//////////////////////////////// //////////////////////////////// +ĠIN T +L ua +ct r +s With +Se q +F etch +data set +Ġiss ue +L K +IsNullOr Empty +p df +Ch o +Cur ve +Ġre direct +[] ) +ĠP age +CE PT +Ġclo sed +cal c +de tails +Ġread ing +é Ģ +ge red +OPT ION +Ġdata set +s cheme +)] ], +ToolStrip MenuItem +ĠN ext +m ul +Ġbit map +\ . +Ġ ul +ĠVer ify +ĠRe ct +ĠG roup +Ġuser name +_ ); +Ġd ot +ĉĉĉĉ ĠĠĠĠĠ +Ġe st +ve red +W OR +Ġ} ). +IN PUT +ĠĠĠ Ċ +Vis ibility +SUPP ORT +Ġto uch +eric ht +Ġex tern +J l +Ġh it +mu x +o pe +gr p +____ ____ +RE S +/ ", +06 27 +} ). +quival ent +rie f +MA N +à ¡ +co ur +Ġpar sing +M ore +m v +Ġcon v +h ome +l igh +ĠO R +ces ses +FUN C +b ank +le ms +ĠU INT +ĠA b +as ing +ĠF rame +Wh ite +âĢĶ âĢĶ +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +å ½ +Co ord +ĠM T +Ġrep ly +ORD ER +bind ing +Equal To +Ind ices +Re ason +Ġ3 1 +Get String +pop over +/* ! +F G +Ġread y +Ġcal culate +ĠI Enumerable +. % +u f +urn al +ĠM odule +Ġmem cpy +la red +Ġt urn +istr i +Ġ Entity +w g +Ġpart ition +dest ination +Ġs amples +Down load +Ġgroup s +FI LTER +ĠB IT +Ġclass Name +m ay +Ġl in +ĠM in +SC II +Comp ute +. ) +ç ½ +ig gered +su ite +Unm arshaller +Ġ ic +UP DATE +Ġc ar +ĠG lobal +iff ies +de p +pos ite +Ġca use +Ġ2 3 +ser ies +Ġre mo +AR CH +am age +ĠAn y +ĠP h +to lower +L i +D X +ll vm +co res +List eners +T ip +P ress +") { +an imation +( ` +C apture +OL D +c apture +v g +RET URN +Run ning +ab ort +H ello +10 1 +string ify +V S +ĠApp lication +æį ® +Ġrece iver +Fe ed +arch ive +Ġcheck ed +BIT S +ĠB ig +å ¯ +TIME OUT +Ġwe ight +b undle +tr fs +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠ +Ġ" ( +Ġac cording +Ġallow s +service s +C lause +al ing +Ġ~ ( +Us ers +T alk +Ġs uffix +Ġl arge +ad just +source s +ĠN e +add EventListener +[ _ +ĠC ustom +F lush +ĠM AC +P ur +Ġvis ible +Ġt ick +Ġover flow +Per cent +Ġabs olute +Al gorithm +ä¸ Ģ +Ġd x +Com mit +ĠA ST +d ummy +Init ial +PR OM +g uid +[ [ +ĠL ong +Ġa udio +de coder +Ġcomponent s +Ġrepresent ing +} { +C ss +ĠT X +ba z +For ward +Ġn orm +Ġwrit ing +if ace +T M +value Of +ampl er +EN TRY +id ual +AR M +Ġf l +Part ial +ĠS ND +Ġn ested +Ġ" "); +Ġpr imary +Ġar ound +Ġc rypto +ĠC R +Ġgener ic +ĠC entral +up dated +T im +ct ure +d ll +Ġcol l +Ġnum py +aj or +' d +Load ing +P atch +ĠLL VM +======== ==== +IO Type +'] [$ +Ke ep +Ġpro c +ak ing +Ġse curity +Ġany thing +Ġ? ? +wh ite +Ġm ultip +M g +b and +B S +i q +Test Method +get Class +valid ator +ĠB asic +IN ST +Ġsu ite +ro s +ĠD raw +ĠR ed +SE P +Ġdec imal +H z +b io +/ ' +ĠH as +h ave +de tail +IN TE +ĠV M +WA IT +w i +66 7 +ĠV ersion +Ġph y +device s +NE W +ĠM VT +us r +d isp +Ġf ilters +io v +Ġ' & +v cpu +l an +C ID +Ġw alk +k m +valid ation +æĸ ĩ +Ġs size +x fer +Ġi b +Ġinstance s +Ġd ue +ĠF ilter +(' - +vis it +Br ush +x fs +Ġl im +R etry +lem ented +M utex +j b +th reshold +å į +ĠD ictionary +SizeIn GB +LE MENT +//------------------------------------------------------------------------ ----- +- % +ab ly +per m +mo us +conn ector +B AB +Ġframe s +semb ler +anch or +NO WN +Inst all +; ) +ens ity +Ġz one +Ġhandle d +ĠH ex +fail ure +get Node +Enumer ator +P ane +Ġ[] * +um bn +eff icient +str ong +Cal endar +F ACE +ĠMem ory +Key word +cre ase +Ġchannel s +Ġrel ated +starts with +L F +Ġcom ments +ĠIn sert +ins ic +Ġsc alar +Ġarch ive +fin ity +ON T +min or +T MP +ĠG UI +IL D +erru pts +Task s +ĠAl loc +Ġmin imum +t ers +q r +op code +B P +ĠEx p +Access or +ony mous +CT OR +S im +M any +8 00 +Ġmod ify +ĠG raph +reg istry +ity Engine +ic ally +og raph +frame work +T mp +AA A +Ġcon struct +H ub +Ġfe atures +Ġm et +Ġcom m +sm all +Ġre c +Ġp sz +R ound +s ensor +an ization +le e +10 24 +E IO +m ine +Pop up +Ġalloc ated +serv able +ĠS ymbol +Table s +B N +dig est +Ġ qual +il ar +SE SSION +G IN +sc alar +Error Code +ĠRe cord +à © +=" ' +Ġ' .$ +type param +Ð º +ol ine +work er +T wo +reg map +inher its +LE FT +l ator +To Array +av es +Ġkey word +ĠA CE +Ġ ctrl +Ġv f +C LO +aaaaaaaa aaaaaaaa +vid ers +u k +ĠP ost +lib rary +D WORD +Ġa gg +at ter +L ex +E MP +Ġv a +ach able +ĠR ange +Match es +c id +H orizontal +Part icle +L M +Ch anges +maj or +line ar +Ġ! $ +(" { +Ġde ep +o i +n def +R out +Ġcon verted +Ġc nt +Ġcan vas +The me +Ġdest roy +d if +C lock +u zz +Q k +Ġp ol +Ġwire Type +Ġh idden +Ġp rom +x A +Ġc ancellationToken +ul se +for ward +Ġex port +UN IT +reser ved +N l +__ ) +Ġp lot +T W +h ip +Dest ination +Ġt p +Read Only +Ġm achine +l ambda +Ġr ing +Ġ_ . +Ex ample +ct ype +Ġfact or +AUT H +Data Type +ĠT YPE +J y +Ġab ort +ĠA L +E q +PC I +Ġ$ ('# +j query +ME SSAGE +tool s +AUT O +a X +ic ast +S core +", { +incip al +g reen +Fold Mode +K ernel +Ġ2 2 +I ss +Ġs pan +Ġ ---------------------------------------------------------------- +Ġb lob +With out +ĠDe epCopy +CRE ATE +S ender +(" $ +bo unds +agent o +Ġ= ================ +Ġsupp lied +target s +06 2 +Part ition +j avascript +ĠBu ilder +| " +p od +Def ined +prom ise +or ph +\\ \\ +[: , +per cent +ad ded +Ġass ume +Th an +Ġd y +b rief +Pre pare +LI MIT +An aly +V ICE +M ult +ĠL O +Util ity +Ñ Į +Request s +amp oline +: ", +I FI +M ultiple +\": \" +å ° +spec ific +J s +, _ +Th rows +Pr imitive +So uth +ĠComp ute +Conf lict +ĠS P +2 000 +Ġo mp +Z IP +AR Y +(' % +ä ¿ +Ġchar set +lement ation +ar b +å Ĩ +Ġv p +Ġc lip +SO CK +Ġph ys +alloc ate +Ġcomple ted +EN CE +Ġsuccess fully +H D +Imp lemented +Ġoper and +qu ant +Ġim ple +Se g +Ġ æ +Ġaut orest +ml ink +part ition +er ms +AME TER +ID s +Ġ! ! +ynchron ous +b log +F ake +sq rt +Ġpri ority +ant s +er Name +é ĩ +Ġ* , +in ate +to Be +ser ted +P LL +C LE +act or +im ize +ar ing +Ġver bose +Ġgo og +Color s +_ -> +Ġnet dev +Ġpre pare +Ġ[ { +ut ation +Ġb p +LI B +get C +W ire +Ġs core +Out dent +Ġo ps +A zure +H andlers +r ank +V ol +Ġm b +Ġd iag +ĠD ec +ĠM on +Un icode +(? = +Ġp d +D W +Ġstd out +Ġh andling +Ġc e +fo ot +table s +å ĩ +OK EN +g i +Ġle g +Dis abled +r ss +N ested +P t +Ġs ym +ĠC O +un icode +local host +Ġimple mented +( . +o sed +Tool s +ĠE C +Ġg reater +Comple x +deep Equal +D ump +ap er +vi e +Ġwork s +11 11 +o th +Ġf inish +st or +Ġcom mit +mon itor +Ġ8 0 +ĠIllegal ArgumentException +EE K +Ġbuff ers +E A +ĠO ffset +D at +pl us +la zz +writ ten +inte l +> ) +Ġa cpi +Ġat tempt +Ġl arg +Ġinit ialized +AL IGN +un ion +ĠHe ader +Ġd a +ĠP TR +ĠE qual +d iag +(' [ +Ġm lx +N ORM +sc ene +Ġp kg +" % +Ġres pon +Ġsub ject +pa red +ph one +ĠG ame +v irt +ĠDe f +Ent ities +ce pted +s ip +re po +uc er +Th reshold +Ġset Timeout +S em +á ŀ +P IN +ĠT ag +m n +f A +Ġhard ware +P ages +U F +Ġgo od +x p +con struct +ĠIn struction +T ON +() ] +? \ +Ġs chedule +B F +io us +al g +Ext ended +extension s +mo re +bo ost +Transition End +ĠN ET +ĠDe vice +D V +py thon +Ø ± +Ġprob lem +ĠDE FAULT +if s +DE SC +arch y +TE MP +ce pts +QU I +PR I +G P +Ġbe havior +Ġm t +xff ff +command s +ĠS O +? . +W ER +ĠTh row +Ġact ivity +ĠC l +� � +ak en +H it +Ġm ade +Ġsq lite +Coll ision +Y P +variable s +ak er +Ġem bed +aff ix +Out Of +Ġun icode +Ġstr conv +Ġf ast +Ġaction s +ä¸ į +ç½ ® +F ilters +R UN +M ULT +) (( +or dered +Ġ' + +at ibility +Ġe ar +" }; +og ram +view s +struct ure +Depend ency +Ġn b +ag ation +AC H +IS D +ĠEn sure +WID TH +mo b +get Context +Ġstr ip +RE C +ĠPHP Unit +A ctor +F MT +OUT PUT +Que st +Ġpair s +DI V +ent ion +RE SOURCE +Ġdevice s +re marks +N EXT +iom em +T ODO +Ġd c +i eee +Ġu id +sh ader +ĠSo uth +color s +Ġ{ $ +ĠSk ip += _ +ST OP +N AL +mod ified +CONNE CT +c dev +ffff ff +N ON +Match er +Ġfe ed +Component s +S te +R ATE +pro g +res ume +Ġrout ine +V V +(/ ^ +Ġmark er +Ġ' * +Ġsup ports +NotFound Exception +em u +ĠCom ponent +ĠI E +е н +ĠCom mon +de cor +(' : +Record s +up ted +a ssoci +Ġupdate s +ang ing +u ages +st e +is o +m ime +Sub scription +Ġch an +Me asure +cm V +us ic +ug gest +. ') +on om +Ġf all +ĠQ COMPARE +Un its +C nt +v or +ĠS I +po sed +Ġ*) & +sm arty +Sup press +Ġcorrect ly +k b +__ . +Ġ0 0 +Ġm ult +O ps +DI RECT +sp lice +IT EM +Ġdown load +n el +ON LY +R atio +Ġwe ights +PE G +get Key +Ġ5 00 +FORMAT S +~~ ~~ +) }} +C NT +Ġcomp iler +AT ED +c rc +Al ert +Com parison +åŃ Ĺ +d h +f m +Ġ2 1 +t ol +Ġp anel +Le g +Ġfile Name +Clo sed +u Z +Con sumer +getElement ById +scri ber +Ù Ħ +LOC AL +W F +/ ', +Is Valid +Up dated +attach ment +AR GET +Ġpart ic +Be havior +Ch an +abs olute +list en +e valuate +Ġp m +< >(); +comp os +U C +ĠA MD +il la +' > +m ust +ĠO K +at ar +ĉĉĉĉĉ ĠĠĠ +COM MAND +Ġm x +ä¸ º +CA SE +&& ! +if ndef +BO OL +at ie +TEXT URE +se parator +iv ot +Ġexp and +ĠIn st +' ve +ward s +ĠP ers +Ġc r +æķ° æį® +CON F +Ġconnect ed +cogn ized +20 12 +Variable s +Ġ2 8 +At t +Ġtarget s +Call ing +Ġap pear +Cl one +ex ternal +condition s +: ]) +Config ure +St ub +Ġdesc ribe +Vis itor +' " +TRAN S +Ġf ragment +ph ase +PRE FIX +r sp +g ICAg +ust ers +k ill +UT TON +Ġpar allel +cs v +comp ressed +Ġcomp ile +Ġchar s +er ial +H Z +Cont ain +get Property +AT URE +G PU +() }, +Ġtest ing +ĠA nd +a ux +Ġc apture +Ġd en +Ġsc pexpr +re ject +Ġ ath +DIS ABLE +cur l +alan cer +Ġdes ired +SE C +ĠCon nection +e at +g Size +Ġle ading +SI G +ĠC ount +State s +ĠSt ack +Ġs f +q s +C redentials +SC A +dr m +Ġd ummy +re vision +as ci +L a +Ġp ur +leg acy +v Z +Ġf c +ĠI B +Oper ations +ĠConfig uration +P o +Ġre ally +(" _ +Ġf ake +ĠDo uble +G r +P ub +un re +Ġre verse +Ġs in +iss ue +ren derer +Ġreg ular +h z +an te +on s +ĉĉĉĉĉ ĠĠ +ss id +t cbiAg +i ance +post s +Ġmodule s +Ġbo ot +state ment +Ġimp lode +Ġd ispatch +Track er +ĠR et +M R +h andlers +Ġbl k +E W +Constraint s +K it +ls o +ra sh +ĠS top +i um +str n +Ġtable s +tr ampoline +ĠF loat +buff ers +Trans lation +../ ../ +ĠS SL +h cd +ine ss +it ter +] } +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠ +Ġlong er +ate st +Stack Trace +ĠSto re +UNK NOWN +ro om +ĠEx it +æ Ŀ +Ġin crement +Data Source +date picker +ing er +Ġsynchron ized +M ultip +ĠW P +ip v +QU F +ist ogram +Ġinstruction s +ret ry +_ [ +umbn ail +Ġinit ialization +un pack +Ġ' .' +ĠDesc ription +Ġc ss +get Time +s lave +ACT IVE +@@@@ @@@@ +Ġpro cessed +m agic +ud c +Ġinst alled +RE L +is ode +Hash Code +æ ŀ +ĠD I +clo sed +Ġrad ius +ĠR ender +ĠR X +An alysis +A m +Ġbo ost +ap s +C atalog +Diagnost ics +S ent +UT C +Ob server +Ġi x +un set +(" + +parse Int +is a +l r +\", \" +E p +Com bine +SR C +Ġv e +lim iter +g lyph +Ġuse ful +Ġse parator +Ġbu g +ĠDE F +Content Type +, & +Ġs urface +Ġh alf +Pre vious +00 01 +state s +ar ia +cal culate +co st +AC CESS +En c +Ġl iteral +ĠCal culate +Pro totype +nb sp +u art +ĠD est +Ġb undle +Model s +Ġad min +Ġh dr +dig it +asm ine +velo per +am az +Ġversion s +ĠD es +ĠL en +ĠA lso +thread s +MP LE +ient ation +Permission s +N db +ĠSet up +[^ \ +ĠM ust +ĠS yntax +v if +C LI +function s +check box +/ " +T V +Red irect +co vers +Ġw on +Ġs vn +valu ation +HE D +Ġret rieve +ĠC lo +pro t +av ail +ĠP op +back end +mem bers +cal led +ata ble +Ġg lyph +min Int +he ap +s vc +Mod ifier +Z oom +[ ], +Ġf w +Public Key +max Frac +R IGHT +pos Pre +min Frac +Ref lection +K nown +ĠT w +Ù Ĩ +n amed +lg Size +pos Suf +neg Pre +neg Suf +Attach ment +MEM ORY +/ ^ +et ype +q t +crypt o +Ġc y +Ġ/ = +b w +ĠPl ugin +ampl ing +int f +able s +x E +åIJ į +web kit +? ) +c amera +ĠI EEE +ation al +Exp and +Ġf it +Match ing +N A +Ġc f +H ours +ĠPro ject +an ted +cour se +Ġi pv +Pre view +Ġc out +Ġal t +Im ages +f name +un ce +X F +Cap acity +ri ent +Ġx xx +close st +PA SS +ĠJava Script +ĠAC PI +mat erial +E scape +should Receive +ĠUn known +x attr +CT X +123456 789 +Ġn l +TH READ +return Value +Ġid s +Ġlo ader +Ġmem set +Ġd ays +ĠA ccess +A u +PI PE +ĠM ark +exist ing +Ġc ycle +ĠParam eter +Ġsend ing +ĠT ree +ĠS mall +U sing +ac pi +ag ing +regex p +T D +Type Name +ĠT I +è İ +init ialized +Top ic +Fe atures +Ġvis it +e g +C ost +Ġexec uted +U CT +obj Writer +Ġreturn ing +25 0 +M G +po ch +F ac +o ch +Des ign +As m +ĠEx ecute +mo v +Te am +> (). +bb le +Ġth reshold +b ined +Int ent +P ad +h over +M ust +Create s +IG H +Ġautomatic ally +ur ity +Ġe q +D ays +M U +' m +TH ER +asci i +Ġload ing +S pell +Z S +le af +sh utdown +Ġst arted +Ġp an +Ġm iddle +Debug ger +Ġlist s +inner HTML +C Q +v endor +ri ev +amaz on +Ġs at +ĠE mit +st roke +Ġ2 01 +Ġ*) ( +G lyph +ĠC ache +m achine +ced ure +s To +Ġ' '); +rtl priv +h int +Ġnot ification +b ridge +s il +Man agement +S ink +id le +Ġdomain Object +Ġ ------- +Ġh ide +ĠG PIO +ab stract +put s +SE D +Rect angle +à ¦ +] | +Sup er +h old +ĠNOT E +Ġre gs +k l +Comp ile +IE W +Ġser ial +Ġtrans port +ext ent +M illis +pl ural +J an +ca iro +; ', +unt u +Ġthrow n +)) )) +RO OT +Ġp ix +ik i +i ence +Ġf old +Instance Of +ĠF ree +el ine +t ls +s yscall +ĠH W +C entral +h Y +Ġoutput s +file path +ĠMo ve +iz ing +ĠDe code +if etime +Un ix +Ġcomple x +å® ļ +Check s +ig he +èİ · +w ifi +ch k +* > ++ ") +vl an +map per +ir ation +Ġp ick +will Return +g ether +un expected +Tag Name +Reg Exp +S amples +Ġ@ " +Var s +Ġtemp orary +D i +eter mine +De cor +ĠC S +ĠM atrix +pay ment +Ġout er +d ap +I llegal +R A +Ġc redentials +St arted +Combo Box +W ITH +Ġen c +Ġup load +V IS +Ġin voke +Ġwork er +r atio +Ġs cheme +Ġcheck ing +2 02 +up al +g K +Ġin cluding +Ġreference s +Pers on +sub dev +ĠCom ple +ALL OC +ĠST AT +le ave +H ide +U K +Ġconfig ure +Ġat t +h al +de precated +T w +Ġ__ ( +Command s +In variant +Ġwh ose +Ġgoogle api +col lect +ĠC SS +ĠB ack +fd s +M AL +n V +Ð ¼ +Ġ' @ +Struct ure +st ub +Ġt m +Ġc amera +z oom +T T +Ġch art +ro pped +Ġt d +ĠA uto +Ġmem bers +cal endar +A ssoci +ab ric +box es +Ġ utf +F ront +Ġd rag +b fa +in i +Auth entication +model s +Spec ial +ug ht +ĠCol umn +Sh own +Dispatch er +ĠThe se +ex e +Ġl at +set Timeout +Back end +ĠArgument NullException +V C +Ġc mp +Ġf b +uff le +dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd +ue ss +ĠA WS +D isp +d ash +comp lex +ADD RESS +get Default +Ġbegin ning +window s +BO X +Print er +Ġi i +" ', +m any +Comple tion +map s +Ġpixel s +L V +Ġreg istry +io ctl +ĠCont rol +ur ope +T OKEN +PAR ATOR +IE S +i et +Ad ded +å ¾ +$ ( +B and +GU ID +X P +Ġm ail +Re gs +g ain +WOR K +ä¸ ª +tr insic +IS C +ĠV ER +I MAGE +Ġc os +sv g +func s +D em +Ġlog in +Ġthread s +Ġd m +Sh are +CON TEXT +FI RST +bu iltin +) & +step s +" )), +E FAULT +Ġoc fs +Ġcal cul +m q +Frame s +t z +op acity +x FE +S ibling +tem pts +O c +Ġd l +` ) +Ġ( __ +get Int +ct p +Module s +f ragment +Ġp g +da i +an a +Ġnot ify +FI FO +Ġp i +Ġop code +Ġpre cision +Ġd im +D AG +Ġ Entry +ĠSh ow +cre te +Ġc li +f un +Ġh int +ĉĉĉĉ ĉĉĉĉĉĉ +Ġv s +Con d +M arshaller +- . +al ed +Full Name +im ag +Ġ enter +GLOBAL S +ĠEvent Args +pret er +output s +h icle +Qu ick +U A +Ġtrans late +ENT ER +Ġwait ing +ĠPoint er +pa city +anit ize +st ar +Ġr ank +Ġf lat +Ġs i +Ġlink s +ĠS up +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠ +lic a +ex panded +Ġgp io +Ġpos itive +Ġent ire +R R +Ignore Case +B G +Ġan im +Ġbet ter +Ġadd resses +un ded +Ġf ocus +ĠH H +Ġdesc ri +un used +sh are +== =" +e ch +Info s +A SS +To k +Ġe c +pre view +PO WER +P D +ĠS IGN +N U +ID X +ĠS H +Ġparse Int +V y +ĠF rom +Ġco ordinates +PC M +Ġh andlers +) ' +ug e +AB A +R x +ict ure +g z +m ultiple +Publish ed +? : +ar f +List View +å Ģ +Ġm argin +Ġin cluded +ĠS p +config ure +W U +Ġproper ly +scri ptions +Ġtype def +comm ended +æľ ī +P AD +Se p +] ', +ĠF unc +n able +ĠRuntime Exception +S PI +dir s +M agento +Ġ utils +host name +In crement +a ssoc +Ġt ol +O VER +Ġt y +L X +, % +L ive +Ġ" \" +CS R +[ % +ĠUn icode +Ġs ucce +Ġal ong +W T +ca ption +flat ten +v ma +(" ", +Ġch r +Ġte am +Ġoccur red +1 0000 +ĠC lean +ĠM ode +Ġsc ene +Author ization +ठ¾ +')) . +ĠU ri +Ġmon itor +IST ER +it o +Ġgo ing +CON ST +99 9 +Ġlog ic +so ap +20 16 +Ġlo ss +str iction +ĠA mazon +and sh +Ġnormal ize +l ated +L AB +and roid +ĠHex agon +F ast +Ġimmediate ly +m es +MO VE +sl ug +Ġ )) +Ġ ub +AT T +PAR AMETER +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġf inished +Ġk zalloc +d entry +Ġ ]. +De ad +'=> ' +Ġsn apshot +ob ile +Reg ist +F uture +ust ed +n ested +Dis card +Q g +Ġstd err +tr ait +ĠS ession +AT OM +Ġset Up +PAT TER +P lain +ĠH ow +cip ient +Over lay +ĠD AG +n dev +strict Equal +de g +::$ _ +Ġs pi +Ù ħ +æ İ +Un der +p ic +align ed +not ification +ĠPro to +H ave +To List +vance d +")) ); +D ock +red uce +in y +Connect ed +ĠR aise +Is NotNull +H AL +Ġtask s +B in +Ġstart s +name of +Un iform +ç Ľ +ĠC L +do jo +Dll Import +Attribute Value +Ġevery thing +é Ļ +sec ure +ĠP HY +ĠSD L +} "); +Ġt ty +Ġoc curs +enum er +ex cept +l bl +et ween +p Z +ĠD WORD +æĹ ¶ +Ġde ad +Ġt ail +ATTR IB +Ġsh ell +XX X +in crement +M er +n es +sub scribe +Ġf ac +Mod al +C at +Ġs leep +Button s +Vis it +cept or +Ġmay be +æľ Ī +S oft +X C +To Int +ĠW hether +proto buf +U i +fa c +a head +33 3 +ĠL abel +LA SH +r sa +ĠEn v +8 000 +a con +Pro b +Ġ[ % +a dev +in struction +an im +ĠB inary +velo pe +pos ing +Ġadd s +ICAgICAg ICAgICAg +Ġ[ ]) +Ġper cent +e ast +H idden +IO Exception +rc u +ad ap +St age +Sl ider +Cal culation +Com pact +Q P +n ed +Ġ END +Com ments +OT HER +ligh ter +pc a +d en +Poly gon +Ġspace s +Ġapp lied +Ġf i +bas ename +Ġv ery +Ġrel ation +sup p +Un ityEngine +IDE O +n f +Ġde tect +å Į +Ġo map +Ġservice s +Ph ase +W P +Ġal location +Number Of +F ire +i ation +Ġde legate +Ù Ĭ +Ġm aterial +Ġse m +EDIT OR +Ġ2 6 +de tach +A mazon +C U +get Content +OP Y +ĠM D +Ġwh ole +y es +ot g +)( \\ +mi um +Com m +m ixed +qu ent +à ´ +h ard +X B +am ing +in str +KE T +O rient +BB B +NORM AL +Con version +M ay +h h +Ġref resh +er ance +Ġatom ic +rok er +n op +Ġs ur +P lot +Ġun pack +Ġint errupts +ĠP K +Ġ" * +mb ed +q q +: ], +IS O +Ġ} )); +ong o +Ġo ct +W C +Ġg ive +Warning s +at ype +G D +ER Y +( \\ +j k +] - +Ġf rag +Ġr gb +ĠE m +è § +max imum +rot ation +Ġed ges +Ve locity +Ġd istribution +F M +Ġconfig ured +De ployment +X V +EN O +F inished +ĠL ay +P END +Ñ ĭ +as is +Ġsource s +Ġadd ing +IC ATION +Line ar +CHAN NEL +se cs +N L +SE PARATOR +Pl ane +DEFAULT S +RE ST +Arch ive +Ġinte l +User Id +ĠTem plate +B IN +File Info +th rough +sn printf +ĠArgument Error +k v +le ter +ĠB y +pe ek +Ġh istory +Ġ>> = +onom y +()) -> +t age +TIM ER +) }; +Ġ& ', +comp letion +Ġs g +': ' +I LL +We apon +Ad just +Ġres olved +Ġab le +OB J +key down +quire d +Ġcolor s +ĠOper ation +ĠS ql +Ġf requency +clo sing +as set +ĠE ast +task s +Z SB +Ñ ĩ +èİ· åıĸ ++ \ +T CP +T OP +Ġd isp +He alth +M ar +ĠD isplay +Ġpl ane +ut ing +g m +D LL +ĠR o +Ġs yntax +Ġtop ic +Ġnum eric +Ge o +Ġtra iling +Message Window +################ ################ +åŃ ĺ +et ic +angle s +Vert ices +Ġf ig +ĠI mm +WIN DO +Ġm akes +zer os +l and +Ġp lt +li ve +ctx t ++ / +ĠRe lease +at ial +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +s ch +Ġ ri +ĠS rc +EN V +Ġan chor +im ent +D irty +MA IN +ĠRe act +Ġc url +ĠS TR +mm c +um es +ĠCh ange +Ġd p +EX IT +ĠS ince +ĠRe place +AN K +' }, +Ġalign ment +Ġformat ted +W H +LL VM +Ġwh itespace +i cted +opt Params +ĠT ABLE +O V +æ Ķ +Ġth ings +on gs +p ur +ĠR FC +b lack +Ġtest Get +åľ ¨ +om ial +m apped +è¡ ¨ +ĠE ach +Ġc ertificate +Ġre pository +ENABLE D +Ġindic ating +h ot +m irror +Ġper f +Ġp od +ठ° +Pipe line +re maining +vert ices +s ound +is Default +ild card +we ights +C mp +Ġr r +mo z +Qu ant +y b +st age +ä ¼ +Link s +Ġo bt +W L +to Array +ĠM A +dis c +co untry +Ġde coder +sh ell +O IN +out b +Ġph ase +l iteral +Dig est +] ]) +() + +ul ong +P rom +ĠA D +Ġcode c +ad r +Ġres erved +if e +Ġ*/ \ +PR OC +Ñģ ÑĤ +f lex +pa int +ex clude +net if +read l +Ġextension s +Ġkw args +06 31 +ãģ ® +lib c +h id +Ġser ialized +ap ache +Ġfile path +W allet +To ggle +Se ek +PI X +EX P +Ġc ost +Ġcomple tion +.* ]] +um an +ĠSet tings +Mon o +D Y +ra b +Ġf req +Annot ations +Write String +log ical +QUE UE +ĠEx pr +F ULL +Ġev t +Pers istent +A UD +as ses +Ġ/ ^ +Callback s +ed ges +Ġm alloc +ĠD ATA +-------------------------------- ------------------------ +[ \\ +Ð ´ +en crypt +z c +Ġbound ary +ĠO ne +qu ot +Ġ5 12 +Ġext end +Ġm id +') ], +HA SH +Ġm ount +ĠCh r +Ġagg reg +Ġf ire +ĠT ool +s x +AC PI +define Property +< > +ret ty +) && +V k +Ġstate s +Text Box +ur able +Ġid entity +man ual +ap sed +W O +1 10 +Ġs il +el f +e a +un link +N orth +Ġm k +(' -- +} : +c atalog +ĠB utton +form ed +) ]; +Ġbl ank +Ġm uch +(" : +D iag +in ject +Man ifest +wh itespace +Ord inal +ä¸ Ń +p wr +Ġf lash +Ġm etric +Ġpartic ular +ver ity +Ġa st +ighe st +å ī +Ġb trfs +sp rite +es is +P F +Ġm apped +Sock len +In f +St ar +url s +J oint +V oid +ĠN ull +Ġ ut +Ġ2 7 +over lay +/ \ +ĠRe ference +ĠIn stance +T ermin +ame l +sn apshot +ĠS PI +f id +format s +M ount +Ġde cor +Con s +ĠLog ger +Or Default +get S +back up +ar ante +)/ , +Ġp ast +Ret rieve +ff ic +æĪ IJ +Ġre po +Ġsepar ate +é ¡ +("../ ../ +IN TR +andsh ake +Log ic +record s +m etric +m icrosoft +ĠN UM +=" " +Res ize +Ġ\ ' +ĠE V +UM ENT +IC K +c ategories +Ġe quivalent +Ġ" & +S Q +Ġst mt +Ġ& ( +Table Name +c info +ĠEx ec +Ser ialization +ge ometry +EN U +Ġ' ? +) \\ +M ime +D a +TE X +Ġsw ap +åĽ ŀ +t ures +url Params +default Token +Ġb tn +Ġprevious ly +'] : +offset s +Ġcont act +form er +an aly +cel er +ffect ed +Attr s +FLO W +B ag +Ġto ggle +ĠM icrosoft +") }, +Vert ical +get Item +ro tt +ĠD L +er os +ER TY +imp ly +Ġindic ates +Ġt or +cs r +Ġen coder +ĠR ule +G ateway +ĠI gnore +ĠL ast +in ted +|| " +ĠDis able +Ġ art +H AS +Ġag ent +ier archy ++- +- +Ġse en +om ap +ch a +Ġ[ $ +Un supported +ĠH ost +i ate +Lay ers +oper and +Ġl ight +Ġc lause +As String +Ġsh ader +Prev ented +S Z +a wait + +ĠR el +ĠP art +Ġsign ed +else if +ĠVar iable +Ġle x +re pository +lo ok +get Reg +d q +k control +ĠGet s +C riteria +X J +av g +ME DI +ĠQ ue +C ycle +B ericht +Ġtr iggered +z en +Ġtrain ing +S tri +N avigation +') [ +ĠS m +ĠC K +co un +04 30 +Ġw a +ĠDesc ribe +ä ¹ +H i +Ġm etrics +s lash +f requency +v v +O SI +Ġp ie +Ġm ix +Un defined +ĠClose MessageWindow +S leep +æ Į +Im g +Sign ed +ĠSL OT +log ging +comp atible +Ch at +P N +ĠM IN +Emit ter +Trans late +PT X +Do es +" === +str pos +Ġreplace ment +Ġout side +Ġc ross +é Ĺ +IC AL +}) }, +conf irm +ig en +Un til +und er +Sw ap +ens upport +de tect +Ġstr pos +Pred icate +B ridge +ĠA F +Ġr g +ĠĠĠĠ ĉ +Word s +ĠHash Map +Ġf ront +get Elements +Pre mium +EX EC +~ \ +RO G +Ġenumer ate +($ " +olic ies +........ ........ +iv ing +base d +Ġ* >( +B J +ĠC P +if rame +T U +null ptr +Ġ'- ' +S ur +Project s +st and +Ġde tected +Ġth ree +EMP TY +S END +Ġ tex +Ġdimension s +G M +Prop agation +ch at +Ġun expected +Ġiter ation +Ġun marshal +y d +L im +Ġoffset s +Num eric +Ġc ps +Ġbo ard +ĠDesc riptor +Ġwork ing +ST EM +VO ID +IP S +res olved +è¡ Į +p itch +process ing +d ns +}, " +== ' +ĠDe cl +A ut +Max imum +c annot +Des erialize +User name +Fold Widget +wh at +Help ers +ad v +Ġb b +scroll Top +sc r +Ġde precated +status Code +@@@@ @@ +g be +one y +R AM +Ġc i +Re store +ĠO UT +0 10 +ic ation +Ð ¿ +AC KET +On ce +Pl us +ro ken +hw nd +Key board +å¯ ¹ +late st +Ġto gether +Ġr hs +Lock ed +ĠCreate s +ĠNet work +re ed +C ached +To o +Ġme asure +} ' +v let +Ġse ctor +Ġdid n +Buff ers +in uation +Ġdat etime +ĠSIGN AL +Ġ' ); +h n +BE GIN +ad s +Script Value +($ { +ep och +Ġsec ret +ĠE urope +MA LL +bus y +LE T +rout er +ĠCall ing +tod ay +c ross +n once +Ser ial +Ġpl an +" ' +D K +") [ +N R +Ġthe me +Ġg c +ĠA zure +user Id +SE CON +ce ed +H C ++ ( +Ġle ave +Z l +as d +" ]); +æ ³ +and box +ist or +un its +ib ly +F inish +day Names +T B +A Q +rece ive +AS N +V K +s uspend +mo oth +â Ķ +Ġh ad +Ġ4 00 +handle d +12 0 +ĠArg uments +INTE GER +Ġattach ed +UN USED +Call s +Ġvert ices +Ġst uff +Ġdocument ation +co ord +rc v +place holder +rot ate +ĠF ix +Ġhandle s +Ġf allback +ĠP r +ĠO ptions +") } +Data set +P OL +pol ation +RE QUI +ant ic +Ġdo ing +Ġdig its +Ġget ting +"} ], +A cc +Ġper missions +Tool bar +15 0 +Ġcop ied +Ġp kt +d og +', $ +View Model +Ġper m +Ġde vm +depend ent +Ġre cv +ĠQue ue +Operand s +M ul +H dr +UM N +Ġdepend ency +\" \ +du ced +Clo sing +h it +Ġser ialize +Ġx fs +in ct +ĠApp end +M OT +æĸĩ 件 +TR A +C WE +064 5 +button s +pu ted +RE SP +16 0 +n m +T ARGET +vi a +Ġp k +Ġm c +G S +L B +entic ate +A bb +format ter +IN F +ĠI L +r um +ĠImp ort +è ¾ +Global s +Re vision +are st +Z a +064 8 +Ġcur ve +seg ments +/ ( +W D +raise s +() ){ +Ġt cp +mt d +Ġclo sing +la x +] ' +project s +d get +St roke +PROP ERTY +sv n +Ġper mission +ren ame +L m +h dev +H ome +ĠF e +ar i +Ġ_ (" +Ġm v +Ġimplement s +d v +C XX +pa ign +Is Premium +Publish erName +x B +em s +ĠB B +ĠD irectory +Pay ment +front end +LAB EL +M V +b ulk +s pe +Ġext ent +count s +H Q +SY M +Sock addr +g ui +St amp +ig uous +Ù Ī +Ġp ublish +fin ite +ĠChr Talk +C String +f lip +() - +Request ed +Err Code +_ % +Ex act +Last Error +O LE +k p +l int +INIT ION +Ġh y +è ½ +Res olution +ĠSD Value +Ġp ag +c wd +list s +tab s +T ax +ĠG e +Ġt b +E OL +her it +N av +Ġsymbol s +Ġpoint ers +Ġmodel s +en ant +ush ort +slot s +env iron +mb us +A ge +Mod ify +g Y +Ġsock addr +Ġc info +Al t +read able +str al +G radient +] " +ge o +Ġpa int +{ \ +abc def +our se +Ch r +CLI ENT +Ġfile Descriptor +wp db +Ġst ub +ĠA DD +tod o +Ġcol lect +M LE +F eb +P e +m ysql +un shift +B racket +op le +po ssible +get Path +isDefault Prevented +z h +re vi +ĠAlloc ate +enc il +Ġb el +re at +Ġread l +az y +W I +ĠCh annel +go ing +ĠAl low +E LEMENT +Ġin f +DE P +text area +âĢ ¦ +CONT ENT +r ink +ĠP M +ĠB inding +mo ves +Ġ"- ", +riev es +F s +Ġsp rite +pi e +Assign ment +ĠAb stract +FFFF FF +ret ch +y l +Ġwh ite +Ġstep s +K T +Ġw rapped +resh ape +Culture Info +P atient +Ġst age +vert ical +De ep +p ull +C ross +l w +fix ture +f v +Ver bose +ĠL P +Ġ urb +ĠL E +* , +is k +ĠT ensor +Ġauth entication +iagnost ic +Ġd AtA +D if +S py +H M +Lat in +ĠP ort +IO C +d ating +Ġsh adow +Ġh i +Ġb and +ĠP ut +regist ered +Ġbo ok +ur ther +Ġf f +per f +dis miss +Ġ angular +Ġinclude s +] ]; +GUI Layout +un e +09 6 +el if +ĠS M +xu ICAg +P ol +Ġro om +Con struct +Sub mit +Back up +we ak +M illiseconds +11 1 +CA ST +Ġresult ing +qu oted +Ġm i +ir y +ater n +ĠV K +mm io +Ġ Enum +Ġcom put +J ul +ĠD et +p te +ĠS ome +ĠD ispose +Ġco ordinate +u ck +un iform +ĠM an +B AR +s ur +n an +ren gth +Ġo l +' } +Mac ro +:" \ +J ap +Ġs imply +ĠW ord +de legate +Ġ Info +D ONE +M et +è ¦ +soft c +K V +ĠEnv ironment +Z V +Ġprob ably +Ġconstant s +Ġexplicit ly +Ġ? > +SER VICE +v dev +Ġm ismatch +CHAN GE +boot strap +rie ved +Icon Uri +ĠSet s +C aching +Ġdepend encies +In vok +BYTE S +B M +ĠP AR +Reg istration +Invalid ArgumentException +ĠT race +Ġread only +w heel +Ł ¥ +ir c +ĠC URL +ad j +m box +Ġc ipher +ĠU Int +ĠIP v +ss h +l st +Q W +Ġcheck sum +æ ģ +De leted +Ne gative +o auth +and Return +ĠWeb Inspector +ĠC M +Inline Data +tr ip +h alf +has Next +Min utes +åħ ¥ +andid ates +Ġqu ant +i A +il ine +ĠS chema +vis itor +ĠAs ia +ĠS tep +Y PT +AB C +Ġre vision +ĠPro perties +ĠIS D +co in +Sub string +template s +allen ge +ZX J +b x +Re act +c art +ann ed +GB E +Ġcondition s +em y +L IT +bu ted +instance s +_ ' +Lo ok +Ġi de +Ph one +ĠM OD +Key Value +D H +L arge +get Object +is Shown +Com puted +M iddle +style s +is Null +SU M +)? )| +. < +Ġcomp uted +um ps +[] { +d rive +*) & +ĠApp ly +Ġr ather +Format s +ĠUn marshal +n ight +ĠC E +Pro d +env ironment +File System +Update s +Ġth ing +ĠG rid +time zone +p adapter +Reference s +n od +Map s +ializ es +Ro om +064 4 +1 32 +v x +n ers +ee prom +Ġnd array +ro py +d printk +ut ter +b alance +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġ- -> +Ġb c +Ġd uplicate +Stream s +Cur rency +Ġexact ly +A sc +pa que +// ================================================================ +of s +match er +Ġesc aped +10 2 +load s +æ Ģ +ase d +Ġc are +U l +ĠD b +} | +ex c +sc ratch +ĠU sed +Ġsub scription +Be haviour +sum ed +Process ing +K ill +Ġ layers +ĠC MD +Ins ensitive +SD L +38 4 +Ġs ound +Check Box +field Name +PR IV +ĠT CP +Ġdig est +Ġp ub +re start +Id le +Ġdirect ories +assert Equal +Ġas set +List s +Ġrepresent s +V D +cont ain +ĠUtil s +Ġ} ), +а н +Pa ren +View er +Ġres ize +s yntax +} () +H DR +Ġp oll +33 33 +edi um +q c +SE Q +N ING +ĠSTAT US +ĠE TH +cur acy +Min imum +ĠAct ive +Ġdecl aration +per form +ad c +char Code +Bl ue +ĠM S +co ped +ter ms +D im +ĠV T +; ' +ç § +, ( +N b +Ġl ive +P icker +Ø ¨ +Symbol s +N Y +ol ation +> '); +Ġcode s +Ġam d +Set Value +ĠPy Object +c rop +Ġa sc +d ater +cur ve +k d +Inte gr +ĠDB G +R ew +at trib +AD ER +z a +cap acity +Ġent ities +chem as +W ifi +en a +åĬ ł +Ġp ot +Act ual +get Param +S y +? ? +en us +ĠD S +Tem pl +ĠLe vel +Ġ9 0 +Stat istics +B race +: - +D r +Ġs ensor +E val +Ġn fs +Co verage +j ar +C ar +Ġgu arante +a ud +m iddle +- ' +ĠF ailed +ĠRE T +S at +b ias +ĠD rop +to UpperCase +F ROG +fil tered +ç ± +(); "); +lic ations +F mt +set Data +E AR +Ġg id +la ps +CO RE +La unch +Published Date +Ġpred icate +ill ing +Ġex clude +Ġin ject +ser ialized +Ġp ay +X N +Tri ple +D ial +ĉĉĉĉĉ ĠĠĠĠ +Ġr anges +Ġpacket s +Ġkey words +Res pon +R SA +Ġput s +Ġext ended +out ine +iv ers +Jap an +j u +de leted +ĠSec urity +Ġhe ap +Ġtry ing +ĠC F +E mbed +get B +out line +Ġr d +C Y +Ex change +Ġren derer +T K +Ġm agic +R ANGE +ch anges +Ġs izes +ag ger +LA SS +04 4 +Au stral +add itional +m time +Ġco efficient +-> __ +w char +match ed +parent s +request s +CLO SE +ĠCom pare +Ġun used +Ġpri or +ĠP RI +tern ate +ar c +AT IVE +ializ ing +ĠM P +Ġe ps +C ls +ĠS ort +Ġ"# { +Ġs olution +W W +ĠÐ ¿ +MO V +op a +STAT IC +yn omial +table Name +with out +prom pt +Ġinvok ed +P Y +gre es +u w +Ġw m +pop up +s izes +One of +ag greg +1 80 +g if +d yn +Ġ(! _ +Ġs sl +Ġres olution +tri bs +mt u +Pl ural +Image Family +Ġs ip +Ġ" ." +key Code +Ġin str +ann ing +section s +201 7 +or row +F lat +' )), +Ġpy thon +A U +Ġre peat +ĠT IM +Ġc ut +de ad +entic ated +ER AL +node Name +SU RE +Runtime Exception +Ġlist eners +c w +B UTTON +n var +Ġ} . +Ġe th +Ne ed +ĠRect angle +++ ); +ĠR C +Ġp res +ĠF ill +E G +Sc enario +Ġtrans lation +Ġp ow +pl ug +w as +Value Of +ĠS ingle +token ize +Priv acy +Ġw s +åī į +Ġm arshal +Version s +CI MAL +ç± » +an imate +vis ibility +un i +æģ ¯ +L n +Ġs heet +Ġre sc +Ġan aly +file Path +Ġinte gr +ĠO bj +Buffer Size +bar s +ĠHow ever +D en +ĠF LAG +get State +atern ion +To Lower +Ġind icate +A wait +S izes +d sp +Ġvar s +ent ities +Ġmonth s +a use +PROT O +annot ation +Ġi e +Ġrun e +Ġo verr +Def ine +le s +? | +Exec utor +] "); +an ity +Ġb ot +re load +pro cessed +ĠB T +ĠRe ce +as sets +foot er +( (" +V OL +ĠT op +ĠSND RV +FO RE +f ony +pop r +ser ve +J K +data Provider +ĠNot Implemented +SC AN +xx xx +Ġr atio +S ome +Offset s +ĠW R +Ġg lob +getElements By +Ġte ll +Austral ia +lin ux +Ġ answer +En crypt +De epCopy +ĠE XT +ĠN ormal +level s +Fore ign +right ness +N F +m arshall +Co untry +Iss ue +Q Q +'] ), +Re fs +ĠP lease +STR UCT +RE LE +SA FE +ren a +ĠM E +Vo Collection +In v +Ġin stanti +/ ? +Ġsh a +per iment +xy z +mob ile +N B +m dev +Base d +ĠSe ction +y ield +QU ERY +ord ers +.' / +Ġb g +Ġsoft ware +Register Type +is er +buf s +Ġs lave +} "; +Ġu v +Error Message +call s +do es +r uby +Sh utdown +Diagnost ic +Sh arp +tim ing +Ġ \\ +document Element +US Y +ĠU ART +Ġdecode d +Java Script +] () +ĠC re +Rad io +ĠD IS +Target s +Ġconnection s +Grid View +Ġread s +Track ing +Ġrun s +F printf +H CI +Ġb s +ighb or +Ġt aken +LE S +format ted +ram mar +P an +P df +lim its +OM E +C LOCK +Ġw arn +Ġwarning s +Ġfull y +A SCII +ST ER +script s +tr ail +FO UND +: # +V IDEO +expected Exception +Ġacc um +im m +domain Object +N X +Ġreplace d +ĠEx tract +ĠLoc ation +ach es +ans ion +åĪ Ĩ +F il +L ambda +h ba +ĠT y +CL R +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +h ow +Draw able +i pt +f y +Ġ3 00 +mt x +PHP Excel +ĠVis it +P en +Ġmer ged +get User +sb i +istri bute +w pa +Ġspec ifies +Object Meta +Ġlarg er +ĠString Ref +jo urnal +me asure +R pc +ss ibly +lu ent +'] -> +Test ing +co ords +Ġvis itor +Re moved +ĠN on +set Name +A RE +Det ect +t ake +query Selector +q e +Ġs om +P ix +Http Request +G h +Ġ' __ +Ġas ynchronous +W alk +xu ICAgICAg +Fix ture +ĠN ative += / +C ancellationToken +ĠP I +Gener al +Dimension s +f rm +Ġf ar +ĠSt andard +Work flow +At trib +et ter +L ess +Event Type +Ġf irmware +no Conflict +Ġb fd +ĠEx amples +Pixel s +i h +In ventory +b one +Anchor Styles +ĠU ns +Contains Key +Com posite +Pl ugins +ĠG C +F l +ĠF ail +," \ +scroll spy +åĢ ¼ +OSI mage +" ))) +ä¸ Ĭ +Ġformat s +Bl end +SY STEM +pro x +ex pires +V z +Ġc andidate +Add resses +google api +mod ify +ĠA tom +bi os +C am +A VE +first Child +201 4 +Ġresc ue +Ġre interpret +06 28 +Ġimp licit +READ Y +s ol +Ġsh are +E st +ĠR PC +Ġget Name +par k +print Line +hd mi +Ġwindow s +064 6 +Ġcomp atibility +get Next +con sumer +ca de +re es +ĠEn code +check sum +D NS +se quent +** * +Ġfil tered +Cont inue +Ġ/ \ +P ACK +Logical SizeInGB +per mission +Spec ific +term inal +co okies +Add s +ĠT ri +' < +Ġmap s +Ø ¯ +ĠSY S +Definition s +ĠF UN +Ġun ion +it r +M ATCH +ĠW in +DE CIMAL +Ġindex es +Sk ill +")) . +bl ur +k lass +ff f +RT C +ĠDEF INITION +U U +s mp +Ġpl ugins +S q +pan y +get All +neg ative +row se +Value Type +(" -- +Ġconstraint s +Ġj asmine +Ø ª +ĉĉĉĉĉ ĠĠĠĠĠ +Ġre start +Single ton +ĠT O +hook s +V A +ĠQ VERIFY +get Field +X R +ĠF oo +Ġperform ance +Ġp v +cul ar +ç ¬ +on ed +Aggreg ate +Ġb lack +pect rum +version s +let ter +Ġe poch +Ġqu oted +Ġxml ns +Ġ1 0000 +IO S +Condition al +Ġin serted +Code Mirror +roll ers +C MP +Ġ ONE +ä¿ ¡ +ib r +DO UBLE +Display Name +Ġr pc +2 04 +iz ations +ĠData base +Ġannot ation +Meta Data +ĠA udio +Ġ$ " +Imp lementation +B alancer +Ġp x +out il +P alette +Ġc am +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +al ity +Pub Key +Ġcap acity +ĠU s +Index es +WINDO W +INTER FACE +Ġre duce +D AT +ĠClo ud +Un signed +Ġlist en +è® ¾ +Property Name +Ġseg ments +Î µ +ar ound +Ġnormal ized +f ld +UG IN +Ġn n +SPE ED +ĉ ĠĠĠĠĠĠĠĠĠĠĠ +re cursive +ĠRo ute +DR M +value Object +ph rase +I ll +f atal +æ Ń +, . +include s +O WN +bound ary +f tp +W EEK +g lob +s as +}; \ +Encode d +offset Width +un ity +Ġexception s +N eeded +R ank +Ġc red +Get Name +([ ^ +Ġdig it +get Opcode +Re po +str cpy +(& $ +E K +s yn +v ity +Ġren dered +v k +Ġd er +Ġb ank +A pr +C ipher +] ): +04 40 +åIJ ¦ +IP v +a udit +tf m +')) ); +ĠRaise s +packet s +Lo gs +Message Box +icon s +curs ively +to ur +to Equal +ig gers +Input s +iz ard +ĠN AME +Ġshould n +ĠProto Message +H ard +Ġin correct +// ---------------------------------------------------------------- +ĠMO Z +Find er +B IG +à ¹ +ĠS ys +M ismatch +ĠD omain +al gorithm +ang er +ĠC PL +S pe +); } +Ġf loor +am ps += \ +orth and +ĠLen gth +Ġchunk s +at ory +ĠEqual s +F requency +Wh ile +Ġget attr +Î ± +N z +in ite +Ġsmall er +M Y +Ġin coming +S cheduler +ĠF S +"] [" +Bound ary +Ġt erms +al ways +ĠA ss +Del im +ĠCal led +Ġf ew +2 64 +C AN +est ing +Ġa ff +Re peat +j oint +Ġd ash +Ġadd ition +Ġ à +it able +s ched +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġre m +Ġ\" % +b racket +DE LAY +ĠSmall Vector +Ġm oment +up s +Get Instance +RE EN +f inished +Ġ3 6 +min imum +Ø ³ +Array List +ĠG ot +oc ab +bb ox +av en +m isc +No Error +R outer +ĠT x +J J +Ġfollow ed +ĠA nal +C OR +E H +Source s +y B +Ġcount s +ĠGener ic +OP CODE +Ġbox es +co uld +ĠPos ition +ĠR ow +Time val +f ollow +in ing +d ocker +trans lation +[] [] +P B +Ġmin or +ĠCode Mirror +DATE TIME +v q +Ġg radient +Ġassert False +Ġmin utes +x i +Ġcal c +è¦ ģ +ĠM ay +ali ases +Text String +F lash +pro j +Ġdef erred +ĠN db +ĠC V +Ġas sembly +ĠW IN +opa que +div idual +ins ide +! -- +I Q +is Function +d ark +View s +tick s +RE SH +ĠSD K +this file +? > +l arge +AN G +depend encies +ĠG uid +CEPT ION +S olver +ude lay +H y +Conn ector +Ġlock ed +Ġ++ $ +Ġsim ilar +Add itional +se par +ep i +control s +5 64 +INTER NAL +u er +10 10 +be at +W x +Ġover write +ĉĉĉĉĉ Ċ +ĠOr der +_ * +ĠC WE +Ġas k +ener ated +Conf irm +INST ANCE +W a +g hi +SA MPLE +With Error +AD C +Ġsc ratch +Ġhapp ens +ATOM IC +Ġs lash +tern ative +ĠDefault s +U b +A J +ĠV al +ĠPer form +Ġ* */ +ST ORE +Bo ot +pri se +a at +Ġ ]) +mk dir +l ations +-------------------------------- ---------------- +n fs +DR OP +P ressed +T abs +Gl vb +ĠIn voke +Init ialized +queue s +PO LL +keyword s +chunk s +Ġb i +$/ , +Depend encies +F IN +inger print +EX PECT +Re view +NAME SPACE +p alette +(! ( +Ġstyle s +Ġcons ider +(?: [ +Ġgener al +Ġe valuate +A q +Discard Unknown +AL PH +Ty ped +) == +Ã Ń +FE ATURE +CURRE NT +K B +Ġi v +Ġt i +O ID +s quare +Ġget ter +ĠP layer +æŀ ľ +N a +w all +n th +R anges +j it +D AC +s at +12 5 +Ġk vm +S lide +a ir +Un ion +E TH +Cre ature +f allback +ç ī +ĠV ec +Ġhas attr +ĠTem p +r n +eld ing +12 2 +as List +Ġs vc +Ġ% ( +ER IC +ĠM B +Pro jection +SUPPORT ED +N orm +Access ible +Ġ% % +Ġre ached +p ick +ĠGo String +R ING +< >( +Ġm icro +Ġim pl +group Box +Ġhigh er +T ING +ĠM M +cell s +ĉĉĉĉ ĉĉĉĉĉĉĉ +ĠS ocket +Ġstr tolower +**************** ******** +U tf +Min us +Ġcon cat +constant s +j iffies +p al +align ment +l paren +Ġprovide s +starts With +d id +NC Y +S OR +URI Component +^ ^ +c redentials +Ġtx t +Ġd entry +K G +Ġd r +Ġd irty +Ġf urther +os en +Ġal i +ang o +Ġformat ter +Ġ% . +ard s +aut orest +, \" +Ġ ans +comp ar +rt w +pair s +Term inal +CE E +gener al +in ical +ĠC ore +ĠN PT +> ()); +k er +m w +Ġalign ed +F y +å¼ ı +e le +pa used +Up grade +('. / +0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +ĠA v +ĠB ytes +10 3 +I Enumerable +Z G +V l +ĠS upport +Ð ± +Ġx s +pc ie +res olver +Exception s +ĠRe quired +ĠO THER +Z U +callback s +Exist ing +ST ACK +ĠV irtual +b os +ic ip +! ", +mod ifier +Mapping s +ĠL inux +ACT IV +es p +EB USY +ĠTh en +r ates +ĠD el +vert s +ĠF ound +Ġcheck er +Bl ank +Ġv i +C ells +Back Color +L un +Im mediate +ĠP ur +ĠB LOCK +ab out +ve y +AC L +desc r +Ġcontain ed +D Q +f an +ur st +Ġcom edi +print StackTrace +T REE +em ulate +VER T +Ġre v +assert InstanceOf +Loc ations +View port +ind io +Res erved +å ij +Ġsn printf +ie ve +g fx +ĠF ont +Ġdisplay ed +Ġvol atile +spec ified +Ġa ck +D ao +then Return +ĠM ulti +In finity +el low +la vor +Ġcom pression +Ġle af +Ġl atest +Start Time +B g +loc ations +List en +Position s +Ar n +" / +exception s +side red +State Exception +.* ? +remove Child +ĠM BB +ĠL ib +ad get +vers al +Ġv c +PO INTER +Cal culate +Ġf amily +ĠD T +Cap abilities +x mit +Ġs rv +get File +ĠPre pare +er ce +v Y +) ], +ĠB E +Ġdif ference +b ss +co v +writ able +D URATION +ĠConfig ure +Ġf r +child Nodes +0 16 +åĪ ° +à ¤ +Ġe valu +mm etric +g ree +A ug +Ġ' &# +_ ]+ +Ġel s +len code +ĠB ody +oper ations +Ġ<< = +. / +Ġj iffies +ĠC OL +Ġint ent +Ġa pr +DO C +pers on +node Type +Role s +ॠį +Binding s +ar ity +Obj C +q b +ĠTime Span +ĠSQL Exception +wr ong +g f +Ġcert ain +Ġt id +Ġret rieved +ins pect +Suppress Warnings +get Request +ĠP O +Ste ps +num py +Ġu uid +Ġu c +EN SION +Ġmark ed +j peg +LA ST +lev ant +âĢĶâĢĶ âĢĶâĢĶ +H our +Assert ion +ool s +x path +get M +J ax +init ializer +Ge om +direct ive +Col s +ï¼ ļ +Par allel +Ġaut og +l cd +up ported +EX IST +get Target +Ġ( ++ +STAT S +Ġaddr len +ĠEm pty +With Context +Run e +x or +Ġpro be +Ar row +) &&( +S ID +ic ates +tr as +lement s +C AL +L CB +L R +ĠD etermine +in et +ce eded +-> $ +Type Of +å · +off s +Ġ' = +f ence +u dev +Ġex c +set Enabled +sup ports +wd t +And roid +ĠRe port +Ġ* > +BU ILD +D amage +C b +P ie +COL UMN +ĠAT A +Ill um +S pacing +Thread s +ent ly +Is Empty +in ity +Ġm anaged +esc aped +o e +Ġtr unc +w iki +Lex er +")) { +Ġth ough +Ġre cent +delay ed +Ġge ometry +é Ķ +C OPY +Ġdirect ive +r ans +ir cular +Ġc rc +T ail +th umb +Ġposition s +ĠPar ser +Can onical +Get Current +Private Key +Ġh aving +k i +Ġpost Index +, ! +Ġs olid +s rv +Ġconf lict +get Child +ĠP RO +b ra +Ġt v +co d +man ifest +B ra +xff ffffff +C red +é Ŀ +Ġlet ter +ne eds +alloc ated +ĠE OF +Page Token +mi i ++ ) +Clean up +Ġ" __ +String Ref +U ses +EX PORT +d ie +b ut +Ġnew line +*/ , +V G +Re verse +x hr +Ġw i +n or +å ± +ALL OW +L inux +q d +train ing +Co ords +ĠAS N +ĠH tml +k obj +Ġlook ing +High lighter +n id +ĠP ORT +cal lable +is or +ĠArgument Exception +ĠErr Invalid +e h +not ifier +METHOD IMP +Phys ics +RO UND +Max Length +stit ution +Z T +clus ion +cur rence +OC OL +Ġt un +Node Type +Ġoper ands +cho ice +G it +ĠJ ust +Cur r +rece ived +åı Ĥ +() ]; +Ġr sa +g ap +G X +Ġ' (' +p io +} ], +ĠC or +ĠN aN +Ġj ump +Stri ct +ãĥ ¼ +A ck +Ġ{ }) +IMP ORT +D ummy +Ġpro totype +dd r +ls l +P lease +Ġf our +"] ', +A DE +:" [ +sh own +Ġin c +Li ke +track er +ec ause +t gt +ur lencode +. "; +е ÑĢ +ĠI X +Ġa way +ĠUns upported +current Time +Ġg it +è¿ Ķ +Ġ ata +Pa use +Num bers +ĠArray s +sh ost +ĠO b +Un ary +B IND +Ġend s +G iven +ra deon +Ġcon d +ĠNV PTX +P x +charCode At +get Column +f cp +p wm +TA SK +Ġsub process +CR YPT +' ))) +G I +ick y +æł ĩ +ore d +h orizontal +al formed +tr ap +get X +ĠMem ber +m icro +Disk Configuration +P ID +el s +Ġse p +ĠTra ck +ud ent +iss ues +Ġopen ed +ĠA fter +Ġde pending +Cor rect +C ritical +getElementsBy TagName +Ġsub mit +gate way +ĠTrans action +Short cut +E lt +t ics +Th umb +tx q +Ġprocess or +De leter +Alloc ator +riv ers +Ġfil led +Get HashCode +ĠTrans form +Ed ges +may be +Click ed +Ġman ifest +F J +th ers +MLE lement +h u +R AW +C li +comp leted +El se +ĠO ver +Ġvert ical +P ull +V U +Bound ing +Ġpipe line +ĠID C +S id +t ar +Ġres pect +comp at +++ ]; +Ġlog ical +ĠIter ator +XXXX XXXX +ç Ĥ +:" + +201 5 +ml me +extend s +ap is +ĠO PT +Ġs low +ĠHash Set +Rece iver +ĠStr uct +al og +Dat um +Is Nil +'=> $ +P PC +Templ ates +D id +role s +dispatch er +In vocation +00 02 +Î ¿ +RT L +Ġc d +ĠX FS +U ART +QU OT +M k +append To +riend ly +P USH +Ġpred iction +Ġsat is +Device s +D to +Ġl ittle +Ġwh o +F x +pen ded +SL OT +" && +è¯ · +ĠM ac +Ġi outil +ĠIn trinsic +Account s +Ġw l +po logy +ãĤ Ĵ +st arted +F allback +è ´ +Ġcon sidered +for um +d word +ĠReg ion +io addr +In c +ĠSt orage +Ġperform ed +r anges +or ientation +ãĤ ĭ +Ġ ------------------------------------------------------------------------ +Ġ) : +оР² +ĠU SE +ci pe +Type Error +Ġg ithub +scal ed +un ix +Ġsq rt +Ġl s +R ing +ro zen +g og +ĠHttp Response +Work space +D ash +ĠSt yle +ex act +ite cture +re moved +h m +n at +m eth +V I +00 3 +b G +ar ily +ĠJ ob +H w +M K +ĉĉĉĉĉ ĠĠĠĠĠĠ +ĠEn coding +com bo +eter min +MAG IC +um ask +per missions +V s +o logy +graph ics +en queue +Ġh a +t g +ag ed +ĠAT TR +region al +) ]) +rr or +Ġk ill +ĠS W +r type +m vm +opt im +; " +/ ); +YP TO +S ING +å ¸ +)* ( +Z Z +t if +Decl ar +* . +Ġ2 9 +stream s +get Sub +ĠP ublic +p Value +B QU +j ump +Ġp ull +re w +Is Not +Token izer +## # +author ized +Phys ical +Ġcur rency +Ġcomp iled +R Q +En cryption +err al +ail ability +Rot ate +* \\ +ĠC ar +Ali ve +gu ard +Art icle +B ank +p mu +&& " +Ġpers on +; ", +ST Y +E valu +Connection s +/ \\ +Component Model +exp ire +Ġautog enerated +---------------------------------------------------------------- ------ +Ġcon sumer +L ite +ĠPro gram +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġk v +V X +pi cture +mode s +ffff ffff +B lack +ĠH elper +Ġa verage +Ġor dered +fore ign +PC L +ns I +Illum inate +is EqualTo +ĠJ OIN +N M +å ¦ +04 35 +Ġphys ical +Le ave +Sup p +ĠB r +ctr ine +ĉĉĉĉĉĉ Ġ +ST A +il on +ĠI F +VAR I +u D +de mo +ĠP ass +ĠS can +Ġrect angle +Ġv irt +Ġ> ', +tr uncate +ET CH +in p +uple x +D istribution +Ġdef ines +RELE ASE +Ġm ime +Ġbutton s +Ġb as +ĠA LL +Ġ-- - +Config s +help ers +=- =- +P icture +Ġreference d +m h +设 ç½® +U id +Ġz oom +Ġback up +f irmware +p md +Ġt ip +b roadcast +H RESULT +Ġcol s +re lax +F req +Se e +C ircle +m idi +39 0 +ĠC ALL +Se ed +now led +Ġ Values +Le af +ic mp +ener gy +E ula +Out er +Ġc ells +Ñ ĸ +ĠD own +xu IC +BL IC +Ġglobal s +Ġph p +Ġin sn +ĠA Arch +A ss +p q +W l +de ps +ĠF F +RE V +we ep +Sc aling +Sk in +Throw able +C ategories +е ÑĤ +(' ', +Data Set +Ġdeep copy +M ajor +Ġ2 000 +note s +ĠC ancellationToken +EE EE +ä¸ ĭ +compress ion +Ġs yn +A ES +UP T +CURRE NCY +min ute +sl ider +Ġng x +00 2 +A O +un ted +TA IL +BO OST +r hs +OP ERAT +sess ment +ĠH E +View ById +Test er +pipe line +H d +b v +Ġlevel s +ĠValid ation +Ġ Ñģ +e fx +ra ct +ĠQ ual +æĺ¯ åIJ¦ +ĠImm utable +I VER +ĠR TC +Ġ$ ("# +Ġcomp ressed +symbol s +Ġvalue Object +SOCK ET +Decimal s +in ym +get Length +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĊ +inym ce +q h +sh op +list eners +te ll +Gener ation +ĠB ut +c ircle +ĠL ock +æĸ ¹ +// /// +b fd +b k +": { +semb le +im ap +dy lib +Invariant Culture +ER S +comp iled +not ice +Ġmatch er +ht able +Ġcontrol s +RE PL +Jo bs +H alf +Str ide +Qual ified +A x +P SB +=" # +co vered +RO LL +side bar +Ġinte rest +S quare +Ġ" @ +el t +Dig it +D EN +SCA LE +i ke +ĠV AR +i or +er gy +ic ol +ĠM at +fs m +Ġgener ation +ĠLook up +reference s +T Z +PRO CESS +Un do +ĠCollection s +Ġf name +m ib +er p +SD K +ĠSw ift +Ġsh utdown +Ġh ours +pc s +Ġapp lies +J NI +st s +CL U +depend ency +Ġterm inal +if ec +Ġ question +ist ence +S ector +be ans +desc ribe +ab lish +leg end +Pur ifier +DE C +æĸ ° +éĻ ¤ +AUD IO +Compact TextString +R oll +ĠD oc +å ¹ +[ @ +Ġa ux +Re commended +abcdef ghi +ĠCon nect +tick et +Ġins pect +ĠJ ump +grad ient +Ġs ink +`` . +termin ate +cor relation +Ġvector s +Pair s +â µ +pe l +S ince +ĠPro duct +Ġ" :" +Ġ1 80 +W ill +co verage +impl ify +M AT +Ġd vb +path name +AA C +Ġg uid +ends with +pr ing +rg ba +{} { +J ump +Ġ", ", +istri buted +get Config +Ġun ix +2 24 +Cre ator +ĠH D +Ġactiv ation +Ġvalid ator +B alance +Ġ1 23 +çĤ ¹ +è¿Ķ åĽŀ +match ing +ĠTR ACE +re ction +pl ine +par m +Stream er +add Child +edit able +av or +åĩ º +ifec ycle +d z +last ic +Ġbl ue +ĠT ab +Te ch +R ay +Û Į +ĠÐ ² +æĪ · +re et +ĠEn ter +( \" +] [" +Ġ3 3 +ĠC LASS +get As +Ġcomp atible +Ġcan onical +getCurrent Token +Ġb box +ĠE E +Start ing +sn ap +m nt +CR C +s ink +str tolower +Ġw allet +lip se +ĠBe gin +AAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAA +B est +long Date +ec c +Ġ( ), +Loc ator +Att ack +_ { +Ġdefault Value +H ero +er v +ĠT WO +åĽ ¾ +Ġ__ (' +Ġmo ved +C atch +Get Object +F ee +Back ward +w ave +Ġ1 27 +req Headers +Ġexec utable +ĠC A +fer red +M ass +De fs +month Names +F Q +Ġax es +m ad +qu ad +ir cu +TRANS ITION +G ra +is NaN +to Int +New Line +ĠG iven +8 99 +Count s +Ġlo gs +Ġpy test +ĠB N +Ġret Val +I EEE +White Space +mark up +W K +In coming +S uspend +ĠS IG +sm tp +Ġg t +ID LE +sk in +D uplicate +d ic +ll x +ç ¤ +out dent +ĠS ER +ENO ENT +ĠA SCII +Ġear ly +ke le +Layout Panel +Ġf t +Dir s +N j +MAR Y +N P +ud p +M agic +red is +P oll +Ref Count +ĠM EM +:" # +Ser vlet +Ġd ie +EX CEPTION +Ġh eld +Ġopen ing +ializ able +ĠCalling Convention +Ġm ag +Does Not +error Code +Out come +Ġprom pt +case s +Ġac ross +Ġbe an +% = +ar mon +Ġcom ma +iom mu +V i +c ms +key board +alloc ator +Ġlocal Var +m map +'] ] +Int Overflow +UN LOCK +get Last +ĠA rr +S orted +Ġdoc s +S ensor +ĠS plit +Sc anner +Tick s +OLE AN +f ew +Show In +B OT +ĠT EXT +Call er +De precated +123456789 0 +ĠP C +ĠM PI +HE IGHT +normal ized +Ġplace holder +T AB +ĠErr IntOverflow +err ain +ĠM erge += ", +а ÑĤ +F rag +de crypt +RG BA +Imp licit +ĠA CT +Set ter +d g +Py thon +Be en +pri o +H L +db c +Anim ator +Tool tip +Pr incipal +) (), +d j +å ŀ +Ġh orizontal +à ¯ +R P +ro utes +The re +ĠM e +2 10 +Ġ4 5 +Char set +G G +W rong +c I +ĠUn it +æĹ ¥ +Ġtool tip +Def erred +ĠTo String +Ġ ign +ĠR O +LO OP +CB C +Ġs lide +Ġ READ +Ġs ctp +(@ " +Ġar m +Get Data +ا ÙĦ +B K +å¦ Ĥ +DE S +ab ling +sl iding +y o +Ġla unch +ĠL I +Ep isode +pixel s +ver sed +Opt im +Of Type +ĠID s +Ġf raction +Clo sure +l z +th r +A w +As sembler +}) \ +ĠA pi +respon d +sub scriptions +. + +Check sum +Host Caching +V m +und o +inte gr +DEP TH +s ense +Quest ion +h ist +ãĢ ģ +åıĤ æķ° +illi second +avig ate +Tri angle +ance stor +() ", +Configure Await +Ġst ores +index es +Ġ6 3 +e of +Big Endian +m arshaller +Ġp lease +ot or +Ï ģ +ĠT C +Ġac cepts +________ ________ +; & +id ence +ĠS ync +å½ ķ +Try GetValue +Par sed +Pers oon +P ACKET +n u +al so +@@@@ @@@ +e ction +Ġr p +DE SCRIPT +get Width +ĠU UID +Ġ roll +al ive +COM MENT +Y m +Ġp f +Ġ// $ +ä¿¡ æģ¯ +j an +ç Ń +ĠPro tocol +Ġrender ing +M anaged +Ġex ponent +Ġpass ing +æ Ł¥ +Ġiter ate +pack ages +Ġhelp ers +S EN +ĠZ ero +u pt +mix er +n y +еР´ +S ENT +ĠR F +Tool Tip +L U +M otion +ĠL D +Sh ip +f uture +Ġqu ick +le ting +Ġf un +OutOf Range +ATTRIB UTE +S aved +Ġb n +ĠLay out +ĠF ull +String Value +ID I +ĠS K +N ER +Ġsection s +Ġ 99 +ĠSer ialize +SHA RED +B etween +PAR T +ext ended +Ġq p +Ġexpression s +c andidate +ĠM ips +CNT L +Ġn c +ĠField s +ST AND +g able +tool bar +n and +un able +e E +Or ig +Append Line +è · +c go +Ġar bit +User Name +J E +h and +(' '); +m peg +Ġr f +Ġv b +Ġen crypted +Ġmac ro +xu ICB +Ġra ised +ALPH A +un def +ĠH elp +Ġk malloc +åı ¯ +Ġpan ic +ĠRe al +Ġ3 5 +velo p +CON N +user Agent +ut c +:/ \ +7 00 +Ġh d +Ġc ancellation +la zy +Ġde p +ĠP IX +work space +P res +dec lare +r ating +Ġc le +de li +Ġerror Response +Ġstr cmp +ĠO pt +R aster +ĠG u +01 4 +app s +Wh itespace +ĠD iag +ĠCon dition +mes a +Ġdo jo +ĠS cal +Handle s +d ispose +r ng +co eff +iz able +¨ ¡ +Ġqu eries +Ġassign ment +set opt +Render ing +Ġh ton +lo pe +scan f +ĠN L +A jax +} ` +Qu ad +link name +ĠErrInvalid Length +G ED +g h +Max Value +2 34 +db gs +Ġvis ual +; / +Ġde t +ch arge +get ter +Ser vers +ĠSc roll +s dev +run ner +Level s +Request Id +æİ ¥ +"} ] +ce il +ready State +e y +n itude +Ġs v +ile ge +OD ING +ĠQ Test +åĬ ¨ +pos able +( ** ++ =" +ire cted +ĠOP EN +ms gs +vol atile +Ġm ut +Ġ( -- +pre pend +config s +è ĩ +Ġid le +R AD +multip ly +Ġlink ed +h f +A ff +PCL ZIP +A H +e gid +PAR SE +4 56 +V ID +OF T +Ġon to +Re ject +addr len +Ġc lazz +cc b +sys fs +Tree Node +Ġn a +gog o +post Index +resent ation +Ġd erived +:" ", +p key +s pell +G ID +Ġa ren +oper ands +transition ing +Seg ments +el ist +Th en +V d +Privacy Uri +P refs +>> > +o bs +OR ITY +ĠR HS +List Item +Ġfiles ystem +ap r +IB LE +ĠS HA +h ore +wq e +Ġi io +ĠB enchmark +move To +ĠMod al +ar ded +ĠR oot +m ing +p at +M n +ne eded +() }; +short Date +Ġn f +emulate TransitionEnd +N PC +U tc +ĠFLAG S +k vm +ch mod +Ar c +ĠU P +Ġcal endar +13 4 +ve st +Ġi wl +EN A +(' $ +Ġb eta +ag er +Ġfloat ing +' / +Alloc ate +H o +Ġse ek +Ġl n +Ġm ajor +short Time +Ġre cursive +ĠPa rent +ĠW est +Ġm aint +Sub scriber +Object Type +l hs +": {" +Is False +E mp +al bum +ĠChar acter +å½ ĵ +ĠD irect +h ub +IC ON +N K +store d +06 33 +get Header +iz z +oc used +ST S +Ġil legal +d ictionary +Field Name +Ġth ird +cur se +)) } +uplic ates +ĠM ANY +dig its +++ ++ +Ġtor ch +er ve +ertific ates +wh o +O pacity +H and +se en +ex amples +Ġpoly gon +n ullable +ID ENT +comp act +Bl ur +Ġstat istics +REC ORD +aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa +ph an +resource GroupName +Ġreg istration +Ġ' ] +ĠT AG +strn cmp +G reater +em ent +sg e +F r +T G +M ag +Re cogn +Ġspec ification +. "," +ĠB ad +ĠInvalid OperationException +in a +get Height +({ " +IP V +ĠHTML Purifier +cp us +First OrDefault +ĠSV G +Ñ Ĩ +Script s +sc b +com es +ĠST ATE +; \\ +ro gate +é ¢ +EN UM +P WR +" }); +Ġ" .", +Ġpro g +ser ved +AG AIN +art beat +BUS Y +EN SURE +ĠF W +MB OL +Ġhold s +Rout ing +get Table +TH ROW +B ot +G INE +C redential +str icted +ul let +Ġm sm +D IG +ĠQ ScriptValue +or b +Ph p +Ġse ss +Ġ' [' +UD P +ARG S +I ME +content Type +z Z +10 4 +Ġconf irm +SHORT MONTH +Ġiss ues +full Date +chedul ing +ĠThrow able +V L +i ow +re o +rel u +ĠP LL +En sure +ĠText ure +I g +ress ion +VER BO +Ġfix ture +ml x +AMP MS +du ces +vis ual +Game Object +SHORT DAY +pe v +Ġget VF +ff s +Cal cul +åĪ Ĺ +ĠSm arty +ĠP OST +Ġcom e +AC C +Writ ten +CEE DED +ss ian +F raction +Ġ ctor +}} ); +la ims +ĠS B +stop Propagation +Ġequal s +Ġname of +ĠAl ign +medium Time +medium Date +F ault +iss ion +Ġ[ : +if p +t ions +m ic +(' { +RE MOT +ĠCont roller +//////////////////////////////////////////////////////////////// //////// +plural Cat +çIJ Ĩ +K S +t u +he alth +J O +In stanti +all ery +Ġse ems +(/ ^\ +Ġbound ing +S uch +Assign able +Command Line +rott le +I W +Ġin verse +Times pec +mg mt +Mod ifiers +Ġlook s +Ġg reen +r k +ĠD R +ĠP attern +Write Byte +F it +Ð · +Ġcom press +ph ab +padd r +Ġde tection +st amps +Ġad vance +n h +wait For +q K +[ * +P ick +w rapped +li ps +Non Null +SIGN ED +CLE AR +æ³ ķ +16 8 +ĠMessage Box +P V +j ac +as sembly +X d +m el +Ġels if +Ġ) -> +ĠL et +ĠR x +M j +Re cv +lic able +Tree View +Ġgr unt +Ġ3 4 +! ( +set State +H N +Ġde li +ĠGraph ics +Ġch rome +TO OL +а ÑĢ +C r +s data +Ġs pell +ĠF EW +b old +ĠF lags +ĠRes olve +p et +go og +200 7 +åIJ İ +Ġin dividual +_ " +Ġin crease +W rapped +C pp +s parse +user id +00 5 +fin ally +Ġc at +Ġ ĉĉ +Ġinte gers +Q S +regist ers +Ġdec lared +foo bar +Ġport s +Sec ure +ĠF P +j q +ĠW AR +ib l +ON SE +20 11 +Ġim m +/ # +Temp orary +J C +IT CH +is ing +PER M +PROT OCOL +M u +ĠM sg +sock opt +ĠD C +head ing +Ġmod ifier +region s +Ġ(; ;) +STY LE +et c +Re cursive +func PC +Ġob server +h ours +F i +L azy +L W +Ġun lock +ST EP +Int n +Register Info +related Target +Ġident ify +k o +ĠFI FO +ev en +ĠBit map +Property Changed +Ġmapping s +arb age +Con cat +> ()) +ĠPack age +uff icient +ĠBY TE +Ġser vers +a es +ç ł +Ġcustom er +W ide +b z +n R +m ips +ĠNe ed +ĥ ½ +Ġw ake +Ġp dev +U g +chart s +qu ick +Ġ um +B i +O s +Return Type +Ġpop ulate +c lause +r fc +lim ited +ĠM ouse +N IC +GV y +* (\ +at ives +Ġreg exp +([] ) +curs ion +D er +Ġ ke +ĠS uccess +X HR +AT AL +DE CL +F ETCH +count ers +Ġpl us +Writ able +get P +INT ERR +Ġvis ibility +ĠF L +Go od +Should Be +method Name +gl ish +INIT IAL +get Start +(' \\ +Ġc g +to upper +Ġn db +ad vance +**** / +T or +D SP +ittle Endian +Ġamd gpu +Access Token +Ġp thread +LE X +NO RE +Data DiskConfiguration +Un safe +14 7 +R HS +hd l +Ġ$ ('. +V J +Ġover lap +b mp +Ġco okies +exec utable +Ġres olver +Mark up +" != +L HS +am a +ĠO F +ud y +Instance State +DIRECT ORY +h v +Ġu art +ĠM ask +bt ree +Ġobt ain +o ss +) ") +H ot +fil led +Ġbas ename +S SE +res ented +Ġg rad +}} } +Ġiter ations +Ġe qu +Default Deleter +(" \\ +Comp ound +invalid Params +U J +ShowIn Gui +Ġc riteria +Ġh ack +Ġco ords +Bo ard +Web Inspector +de limiter +as cade +\/ \ +check er +Des er +Ġ$ (' +Ġc rash +li ance +event Name +property Name +R a +" }) +L ATE +Y WN +Ġto String +ĠC AN +Ġb fa +)) -> +ĠH AL +Ġman ually +N r +def s +Ġframe work +M edium +w allet +'] )); +Model Index +lib System +ĠNotImplemented Exception +cond itional +Ġval s +1 99 +ser ializer +Ġup on +/ + +im ator +widget s +qu ared +ar ter +TestCase Operation +ĠS witch +ĠM V +F H +$ $ +get Computed +ard own +d sa +ig id +Ġg tk +H andling +Ġsub sequent +C laim +v port +Ġdir name +Ġmsg len +POS ITION +g iven +Ġ(( * +ircu it +U uid +Ġre main +ĠH RESULT +ĠD ir +Ab ort +co p +use c +ĠP latform +[: - +vol tage +Ġb ail +MA PP +k Z +YY Y +ast e +un bind +Ġm ysql +ĠL icense +no ise +ĠString Comparison +Ġp n +Note s +C y +W as +get Resource +Ġover lay +chan ism +] ++; +Ġpop up +× ķ +Ġg ain +Ġcalcul ated +Ġser ializer +pg id +S olution +ĠInt ent +ĠF OR +mi os +S lash +pack ed +Ġint val +... \ +cred it +ĠS EC +... "); +(" ' +xu XG +al ic +Ġs it +ĠS ample +files ystem +ĠCH K +Ġp seudo +ĉĉĉĉĉĉ ĠĠ +ĠSe cond +voc ab +) > +IL ITY +client s +Normal ize +er ature +Ġh ome +Dis covery +G x +ĠR GB +cl r +Ġ* [ +os er +getMock Builder +! " +E O +M usic +Ġre name +End points +VM Size +R y +dis posing +COMP LETE +global s +Ġm aking +Ġpro jection +Ġpa ren +ype s +(/ .* +F a +ar Down +Ġh ot +ĠSV N +æ Ľ +PR OG +Ġne g +cmd s +lang uages +debug fs +Quant ity +D erived +M i +Ġe ff +Auto Size +Ġ" ," +NE G +ul p +M obile +g w +Next Token +text Box +201 3 +next Token +09 2 +Ġcoll ision +J ar +end ian +Full Year +get Option +ast ic +Ġresponse s +ĠG r +ĠPur pose +W arn +jo bs +ite s +ĠTh at +Link ed +WA RE +Ġrg ba +Ġsh orthand +in formation +str ategy +hw fn +Ġwork space +List Call +Scroll bar +dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd +e uid +Sym fony +(', ', +il i +ĠF B +reg ular +Ġurl s +Spec ifier +ĠRe mote +Value Ref +Supported Exception +Ġh ighlight +inst alled +class List +ĠCom ment +Qual ity +Off ice +Ġremo ving +) || +ĠD W +SH OW +get Code +Sockaddr Any +Ġ{ }); +ĠD ynamic +pl its +Transform er +r val +re quires +Ġt z +Ġwh y +Al location +BB BB +Ġcon tract +he rent +fo x +=[ ]; +Ġ Keep +Ġl st +Ġemit ter +W REG +qu ential +ll u +ms m +âĶ Ģ +s pawn +ĠG em +err s +Par sing +P itch +ss ize +Con current +\" ", +Ġm utex +ĠS im +Ġde tail +ĠE VP +å Ŀ +queue d +C t +F ollow +Ġio ctl +con trib +Output s +acc um +W ave +Ġp data +Ġg ra +Char acters +cm nd +poly gon +DO UT +8 25 +Ġany way +wake up +ä» ¥ +Ġclo ud +Ġs ense +Ġl hs +bb er +ir ing +ĠAc count +pre p +09 0 +å ¿ +l ined +ĠC I +pred ict +~~~~ ~~~~ +az ure +Ġrot ate +con sume +G ot +ĠST ART +F ri +Ġs parse +SS H +ĠCh anged +Ġappro x +Ġo dd +query Parameters +b idden +YX J +Doc s +rows ers +Pro j +get Base +ĠS leep +sc pexpr +`` , +k r +Ġre use +Of Week +de serialize +ĠTH REE +Ġdefinition s +Ġt ax +single ton +ĠTw ig +Ġa f +MA IL +get Location +ist ency +ĠCOM P +IN ED +Ġres ume +éĹ ´ +p du +Dig its +Ġinterface s +[ { +is r +=" '+ +Ġcho ose +ore map +Big Integer +De p +Ġpack ages +ĠDes erialize +ĠSt at +× Ļ +} '. +is ation +d ac +ig rate +Analy zer +([ \ +stit ute +be an +åį ķ +New Request +02 5 +Ġm u +get Date +A udit +rec ip +ad o +Ġ( { +Ġg em +ay stack +={ }, +Art ifact +ĠIX GBE +tt l +å § +A ri +de t +Recommended VMSize +la unch +ĠIS O +kele ton +Ġf close +std in +P W +Ġif ace +Ġsk ipped +Ġhook s +ĠErr Code +lo ut +Ġex panded +ĠBO OL +Ġst roke +ĠIN TE +d istribution +ĠI List +ĠP S +author ization +Ġattach ment +Ġn x +Ġfig ure +L IGHT +M vc +to s +ref lection +rece iver +ĠWR ITE +$/ . +Ġis l +Ġan onymous +ighb ors +Ġconvert s +p assed +Ġb roadcast +ch rome +R m +Service Client +Ġq t +Ġinit ializer +e i +Associ ation +Ð ¡ +Index ed +Ġlog ged +scal ing +Ġclose st +qual ity +po ses +Ġassum ed +ĠU rl +Start Marker +Bind er +Ġe as +Ġin cre +į ç½® +Ġshort cut +Ġcoefficient s +æ ı +Marshal er +L etter +add All +Set Error +E qu +Time Span +A verage +Ġb d +)) ), +to a +Ġf x +IT LE +e per +17 0 +coun tered +ru pt +be acon +Ġpro duce +R SS +io base +Ġm td +Ġde limiter +Ġs olver +add ir +case cmp +NN P +/ >< +AL G +Ġj oint +Un i +Rep orter +ĠSc ale +pp os +AR B +Re cipient +Ġac cepted +Sign ing +lo rer +Cl amp +] *) +**** * +ĠB uff +ra id +3 000 +Com press +ĠR CC +bt Scalar +n Z +QU ENCE +Ġdebug ging +Ġar c +Or dered +Ġ6 55 +({ ' +tr ac +get s +ĠP PC +UL ONG +S a +Ġll db +Ġ* ** +ĠSe lection +En ergy +Ġc ategories +ĠS PE +ĠS em +MI ME +ord inal +k top +Ġimport ant +åĪ Ļ +10 7 +r dma +Î ¹ +Ġpart icle +Ġpri ce +X M +de sign +g ray +As pect +Disp osed +ĠC T +reg istration +last IndexOf +Ġvar ious +3 64 +ĠD ialog +ĠO pc +Com pression +bos ity +Ġstate ments +pth read +ĠNote s +Res p +AM D +m al +n ick +Response Writer +av atar +her ited +çł ģ +Ġan alysis +ge e +] [] +Ġr m +ram er +i S +F K +Qu ota +ĠA UT +Test Suite +Ġ( )); +ĠP ush +AB I +Ġnumber Of +M ut +W heel +b dev +get Method +Ġleg acy +lic ense +Ġmode s +ch ant +n pc +Ï Ħ +et ched +x r +Ġb at +ss i +Ġa err +Ġstop ped +post Body +Q R +ph oto +(?: \ +Ġde ployment +AB ORT +- ]+ +ub ic +IH tcbiAg +U k +can onical +PRE C +p Y +http Request ++" / +ĠC ulture +s pacing +spec s +Mg mt +Hash Map +ठ¿ +_ : +Ġh ighest +ĠB ind +sector s +Decor ator +sys nb +n oc +Com parator +W AY +errupted Exception +Ù ĩ +Ġm igration +ĠP rivate +q a +Ġsequence s +Par agraph +- ( +ren d +ot ing +Ġint r +Ex panded +s olver +part icle +Ġ ray +Ġa i +ĠA ssign +Ġref er +R v +m anaged +met ic +ĠA B +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +By b +armon y +bl end +Cap s +ind ic +Ġchain ed +ĠC G +ĠF ast +Has Key +qual ified +E sc +e qu +Ġde sign +Case s +ys q +Ġpre view +VE CTOR +f q +b la +Get Method +host s +Ġh older +Ġe asy +que e +Gener ates +9 00 +Ġc n +Ġreg ions +ge om +åĨ ħ +Ġembed ded +Un re +Op Codes +q os +Order By +Regist ered +is In +(& ( +Ġspecify ing +ĠLink ed +comm end +# [^\ +ĠT imer +*/ ) +il led +Val s +," % +pol ate +Ġs pe +ĠT itle +Ar m +SC HE +sm c +ĠSh ort +Ġas m +defer red +ip hy +ms leep +b ination +Ġp retty +ob server +Ġgener ates +à ° +sd l +ST AMP +Click Listener +оР» +( < +ve locity +ĠP ER +ì Ŀ +Ġ* ************************************************************************ +SE ARCH +Ġat oi +call er +sk top +folding StartMarker +ver al +Ĺ ãģ +Ġs lim +IN C +Ġdescriptor s +Pro be +At tempt +ç¬ ¦ +interface s +(" @ +ĠE FI +page Size +N ano +Section s +Ġpattern s +ivers al +ĠA re +! =" +(/.* (?= +c mb +Ġtrans mit +ul er +End Of +assign ment +Ġso v +IN ode +Ġcho ice +get Title +ĠS ha +Ġit r +bu ilt +ph i +Activ ate +Answ er +m ach +Ġ'\ ' +Re quires +(/.*(?= #[^\ +ĠA ws +Ġl d +D rive +ĠH andler +Watch er +- ", +Ġtw ice +ĠY YYY +ag ate +Ġclient s +C od +N OP +Ġ1 50 +List Options +lex er +ĠM LX +pret ty +DU MP +J B +Ġ" .$ +ĠInter face +s chemas +" ][ +ĠDo es +Ġup grade +sd p +Q E +sd ay +l bn +St udio +get Parameter +C ARD +]) << +pp c +set Visible +token izer +**** */ +Break point +code mirror +Format ting +] ){ +z o +Ġn t +bo th +RESP ONSE +un ication +Ġread able +Sp in +u fact +constraint s +in uous +Ph y +, ) +r h +ĠP lace +L d +ax es +start Time +con version +ĠM SG +ms r +ĠMachine BasicBlock +p H +=" % +Ġkey board +ĠAMD GPU +DeepCopy Into +SPE C +Y es +od ies +Ġst a +ĠRe ader +o ve +Ġlocal es +im x +Ġ1 20 +] == +4 000 +S MB +i op +Ġcar ry +�� �� +l li +Ġm asm +20 10 +Ġtre at +Z k +Ġf m +Ġh s +ĠK ind +Ġsend s +() / +Ġth us +ĠT urn +Al ready +R ename +CONST ANT +vers ation +Ġpro cesses +Ġ= ~ +w f +Ġnot ice +PRI ORITY +ĠG D +" ? +get Bytes +(); \ +SECON DS +IG Z +Org anization +B one +h Wnd +ad apt +Pre cision +pop ulate +RE GE +bt Vector +up grade +Exp licit +Ġt abs +Server Response +Ġf a +Ġtra cing +SE G +cm F +f uzz +DE ST +ĠExt ension +ĠC ook +C X +or n +( /* +Ġ ctl +al go +ĠC ell +ph ba +L icense +v h +CAP T +REQUI RE +CT P +äº Ĩ +W X +con tract +WE BP +ĠAct ivity +is l +Get Item +igh ted +é ħ +ĠF act +ĠCon struct +Ġp cm +s anitize +Key words +Ġ3 8 +] ]. +vo te +Ġnew ly +AB AB +un checked +MAR K +Or Create +VO KE +MA STER +Prom pt +pos al +) _ +F ooter +Ġa udit +get Tag +ĠS um +"] '). +IN V +Ġp alette +cl ang +mem cmp +ĠMA SK +get Comment +second ary +B w +Get Bytes +SET TING +ĠArr ange +mp i +Wait For +TR I +$ )/, +ĠFor ce +Ġtransaction s +Ġslot s +Ġv ocab +pa res +5 000 +D ST +in verse +hi er +Ġscript s +w ater +coll ision +ver b +D ocker +i ator +Ġo thers +We ak +get Style +ĠM etadata +qu eries +ĠD ump +c data +t inymce +Add Range +åħ ³ +Ġo cc +Ġco ord +subscription Id +Ext ent +Ġs sh +ĠG en +Y A +p ch +Ġrep la +ibr ation +new line +ms i +ĠSet ting +lo s +Stop Marker +P DF +ff t +pl ist +l Y +Element Type +Token Type +tun er +Ġix gbe +Ġin vocation +ĠCal endar +Ġsent ence +() ): +Ġv id +Ġch anging +g v +Ġb racket +Send Message +={ }; +Ġsh own +Ġcor ner +ĠC allback +W HERE +Ġg uess +C c +local s +ĠDeepCopy Into +Ġun able +insert Before +ĠRET URN +ific ant +B RE +} )); +æ ¨¡ +Ġs py +SI L +AC CEPT +From File +Ġ' | +ynam ics +Ġno ise +TH RESH +O O +ri ces +Reg Class +ĠIs Set +f time +bucket s +un wrap +Ġif rame +DR IVER +Ġex amples +Ġph i +ibl ings +c ertificate +is Active +ic ult +read only +F ade +ĠG MT +re loc +ĠCh ild +set Style +contains Key +Compare r +Ġb io +p Data +Ġ|| = +: "); +ur a +Inter preter +f raction +part ment +Ġpo ssibly +Ġt ar +Ġassert ion +dis card +Ġel apsed +Re peated +d pa +Re start +Context Menu +Ġsig ma +à ¼ +us pended +J Q +j Z +p seudo +get ID +)) }, +)| (?: +t urn +Ġremo ves += */ +Da emon +($ ( +lin eno +" ` +pe ction +apt cha +DIT ION +Ñ Ī +pers istent +l ane +et imes +Ġp itch +ĠP lay +') { +Descriptor Proto +ĠL ive +web site +PRINT F +ĠCommon JS +folding StopMarker +* ', +IM IT +ĠF E +ठ¨ +H over +log o +Ġ ens +Ġn ullable +Char Code +Ġarbit rary +s ynchron +ch own +), " +Ġc rop +Ġl v +Py Object +H ierarchy +par ing +space s +] || +decode d +d G +Get Int +Pack ed +Ġtri angle +V N +' }} +ap d +mo ving +pect ive +Ġ20 12 +Dlg Item +ĠDep end +Ġst e +revi ated +Ġcom bined +Plain Object +H F +t body +ç» Ħ +Ġ5 9 +get Response +n z +Ġn la +Ġ}; \ +ĠHe re +P ow +Ad apt +ĠNot ify +invalid ate +assert Null +Url s +COM Ptr +} }; +Ġ' =' +ve al +) << +set Default +Ġun supported +Ġdis card +Be Null +to c +Z WN +associ ation +('. '); +A cl +get Image +Ġmo ving +y a +er g +fo ur +J U +al one +Ġt ls +ĠS R +ĠAssert ion +Ġbuild ing +f rac +ä½ ľ +M ach +set Color +Ġav g +pred icate +ĠMarshal JSON +ĠGUI Layout +çĶ¨ æĪ· +Ġtre ated +MEDI A +ĠE ffect +ĠG it +Slot s +DIS PLAY +REF ER +Ġtim ing +Ġf reed +Reg ular +account s +Ġpar agraph +P ing +iow rite +ĠU sing +E valuate +f re +ĠO MAP +ĠByte Array +à ½ +IF ICATION +Second ary +0 11 +get Is +ĠSpec ial +[' _ +B W +Ġp df +Ġc ent +Th rough +) }) +Ġ4 4 +Present ation +velop ment +å Ļ +Ġ" ] +yst ick +Ġident ical +Ġb ridge +Ġget Type +CR IT +etermin es +Ġview s +? ", +Ġ5 6 +и ÑĤ +ĠO GR +link ed +éĩ ı +; &# +Ġo bs +toggle Class +Ġrep resented +ĠAdd s +WR AP +m Z +gram mar +Ġsu itable +be haviour +Ġt l +um per +Min or +PRIV ATE +j j +scroll Element +scroll Height +è¿ ĩ +Ġiter able +Ġda emon +/************************************************************************ / +M PEG +a res +ir th +Stream ing +rok ken +V endor +q i +Ġor ientation +T enant +Ġw char +Ġindex ed +vis or +K SB +get Model +get Indent +ĠC PP +ĠF lag +min us +fix up +Ġre ported +br ush +Comment HighlightRules +n om +Ġ*/ , +Ġcop ies +OutOfRange Exception +u ary +:[ ], +recip ient +Ġla zy +co ordinates +ĠP o +Has Value +C andidate +ab uf +s alt +ĠE INVAL +OPTION S +WEBP ACK +add Action +T k +x h +Ġi w +get Y +Ġact or +g db +fix tures +relax ed +// ! +Ġg rpc +Q s +d vb +cons istent +ç º +Ġformat ting +L l +Ġdis connect +rb d +). ' +Ġrun ner +cl usters +OP E +Ġb roken +Dis connect +ent ially +Ġ" (" +Re m +AL T +X Path +h ar +Interface s +Ġve locity +Ġfilename s +Ġus ually +So ap +int Value +addr s +Ġcon sume +Net Device +vide s +Func s +å İ +Instr Info +Ġtemplate s +num bers +Ve hicle +Ġns COMPtr +H ID +", ! +(' " +Delim iter +Ġne ar +ĠInit ial +AP TER +ĠY ii +Ġ* \ +ĠM UST +no op +Ġs quare +of day +Ġstr ategy +import ant +ĠSet Chr +b re +en te +D rv +Ġs cheduler +Ġb w +ठķ +Y U +Bus y +H U +S uggest +Comp ilation +e X +P X +Ġre peated +Ġflat ten +unre cognized +th umbnail +Port s +ĠLoc ale +è ± +add resses +ĠB ound +' "); +> >( +l vl +Pro tection +ĠExp and +str dup +/** */ +Ġauthor ization +I j +ĠRe store +Ġn avigation +Ġ', ' +M igration +Pack ages +et ag +Z C +ĠAuth or +M ENU +E CD +SING LE +Ġm is +Ġw c +imag ick ++ ". +; "); +Ġ{ ! +SY MBOL +ĠLO CK +Ġand roid +ĠO RD +Ġup dating +M ixed +Enumer ation +Re cent +tun nel +e ql +Ġx x +IC S +Ġsc aled +ufact ure +ad oc +ا Ø +en g +Qu oted +Ġpre c +('_ '), +ĠA M +t ap +Ġex pires +de cess +ul ative +Ġg ui +ĠM eta +HO O +j ul +Ġ0 1 +Ġt ries +P KEY +place ment +annot ations +PK T +ĠSE LECT +Ca ption +/ _ +ĠC md +Ġs id +ç ® +Is Enabled +vm x +Document s +ĠO ld +Cal lable +IZ ED +Ġle d +VERBO SE +gorith ms +M icro +get Query +m os +Ġb m +Ġencode Varint +G reen +ret t +Callback Impl +get End +effect s +sc anner +.. ) +****** * +Ġaggreg ate +8 01 +c ancellationToken +e asy +Ġexp ired +è ° +Ġprob lems +ĠSI ZE +Ġmin ute +Stop ped +Ġdepend s +is Object +Is In +Ġgo es +trans lator +RE MOVE +ĠAc cept +ĠF etch +block ing +Ġconn ector +g adget +Ġf lex +Leg acy +text Content +GR AM +G ain +10 5 +Ġsc aling +ĠO B +Argument NullException +O i +S US +b ian +T urn +at tribs +th eta +get Result +Ġdetermin ed +Ġre load +nd array +Ġgu ard +Ġx y +Effect s +al ter +ĠCh ain +ograph ic +Ġd ocker +('/ ^ +23 1 +åĻ ¨ +time ofday +wait ing +In former +Regist ers +I CT +Widget s +v fs +assert NotNull +lf w +Det ector +Ġrad io +Ġs pawn +Work ing +par allel +ĉĉĉĉĉĉ ĠĠĠ +SK IP +* $ +ĠTR AN +Ġw r +ve mber +| $ +Ġa ffect +Ġh id +(? ! +P olicies +ap pro +gs ub +default Value +Iter ation +ĠG R +ĠBasic Block +PRO FILE +HAND LER +Ġs x +add Reg +ĠA sm +Work Item +ãģ Ļ +36 0 +Ġm r +inter sect +Pref erred +ĠAd just +Ġ ig +get Url +ĠP ri +l it +Ġconvert er +77 7 +S OL +Ġf ault +Read Int +ĠSO CK +ãģ « +Pop ulated +UST OM +Ġg d +ZX R +ĠIllegal StateException +IFI ER +L ittleEndian +ĠMachine Instr +Ad res +A Z +min utes +Ġnon ce +éĿ ¢ +Ġ ì +v ic +icol on +c err +c alloc +write Attribute +Ġview port +Ġf aster +st p +ul ary +a co +col lapsed +st able +w ide +or ient +SA VE +re view +hold ers +riter ion +c G +L RS +Ġloc ations +CO UN += [' +E LE +u u +AD MIN +DO MAIN +st one +er ical +Ġt bl +AT FORM +ĠBinding Flags +C ut +z i +Ġs ay +Ġquote s +to o +" ( +C op +cp s +W k +о ÑĢ +T d +RE PORT +Ro utes +Ġ[ ( +ĠMath f +pm c +N PT +W ater +sc l +PEND ING +ĠId entifier +b ond +q la +tem ber +MI I +Ġre cipient +HAND LED +D UP +yy y +Ġpa use +P ose +ĠIN VALID +Prepare r +ĠB M +ä¸Ģ 个 +Ġpie ces +Ġ{ | +igr ations +9999 9999 +AT ER +ens it +a id +lic as +dec ay +Q y +V H +get Block +Ġn bytes +E v +Ġb ulk +pos itor +String Builder +AV AIL +: \ +man agement +SER IAL +Ġaws err +M IC +p V +< - +Pos itive +d uplicate +Ġcl amp +Ġp en +Ġcount ers +Ġpack ed +Full Path +Place holder +S ucce +ar s +Pointer Exception +z u +Ġdocument s +19 0 +sel ves +RE AL +if old +ate ver +Ġre levant +ast ype +Ġreg ulator +BO OLEAN +ĠCook ie +Ġp ll +On Error +Embed ded +LE EP +set Header +rss i +In Progress +we et +ĠS n +ĠS cope +ac quire +Ġpr imitive +CH IP +s olution +ĠString Utils +x en +Pro cedure +Ġqueue d +Ġca uses +Foreign Key +man age +(" ") +S parse +æ ĭ +de ploy +Al ways +ing ular +Ġde coding +Q X +|| ! +face s +Math Jax +Ġc od +IH Ro +B X +Ġ> :: +Ġcheck point +Run s +s cores +position s +an izations +04 42 +SS ID +Method Impl +mask ed +Ġde tach +ĠM AP +Pro viders +Ġs un +s ampler +DISABLE D +IMPORT ED +ĠUnsupported OperationException +Ġdescri b +ul us +ĠORD ER +ä ¾ +() \ +mo used +ME MB +Ġstr cpy +Ġq emu +Ġde ploy +D OT +Ġdir s +M a +ĠC ould +ced ence +mer ged +end ant +sh ipping +Co okies +Ġfail ures +Pl ug +Co ordinates +wl an +st ype +Ġ# => +pred iction +A SC +ND ER +publish ed +G PR +T UN +av ax +Bl k +ĠRet rieve +OD Y +auth entication +Ġoption ally +Ġwi ret +it ation +get Status +ĠT ile +Ġtest ed +Ġo pacity +ĠS oft +ä½ ¿ +h ind +av ctx +p ure +ysq li +4 01 +D J +Ð Ł +ol ang +DI ST +b race +v addr +Ob servable +al ready +Ġlp fc +Gu ard +Ġsub set +Prob lem +Ġc ourse +ĠM ODE +SUC CEEDED +à ¶ +To Object +Ġrespon d +'' ' +é » +av adoc +Out line +trans pose +od b +R H +R k +Ġe ver +ĠN T +200 8 +Ġh p +Ġbe come +Request Marshaller +Al bum +u ve +ch rom +Ġrout er +Ġcle ared +Ġco ver +get Session +mail box +ĠSTR ING +m ce +namespace s +F ONT +Node Id +as p +B AA +D G +is Not +are r +Media Type +ant ics +Ġat tempts +Me an +B LE +Inter ceptor +Pattern s +ĠT mp +F LASH +T ake +event Object +new s +Ġ<< < +offset Height +ĠOp code +C RL +ĠPack et +n sec +Ġlim its +N k +Ġr tw +ĠR ole +BO ARD +// # +Ġn av +ref count +Ġde al +fil p +èĩ ª +p res +Ġcal culation +Fil tered +Ġpot ential +Ġc sv +AL I ++ )? +G FP +Ġp reserve +ĠC RC +qu it +get Index +Ġse veral +Ġph one +w ra +lookup s +L ifetime +Ġmap per +ĠT otal +Ġpro t +ED GE +A WS +á » +Ġget Default +Ġman agement +ĠBuff ered +b enchmark +ar ange +Response Unmarshaller +tp g +scope s +Ġsepar ated +ĠEditor GUILayout +ĠO ps +Ġen cryption +W ay +Ġ" ), +67 08 +sy mlink +Ġcomp ilation +f use +æ µ +pattern s +. '. +Ġin herit +Ġ1 000000 +âĶĢ âĶĢ +z ier +em o +p or +E lapsed +ĠCur sor +S un +Ġapp ended +COM M +md b +Web Kit +ĠCH AR +Ġstruct Pointer +Trans lator +bit rate +j p +inter p +Dem o +ĠRef lection +} ". +attach ed +JS Context +index ed +cap abilities +alle st +L CD +e ase +lock s +0 12 +is String +g ICAgICAg +AC CE +pre ted +Lo ss +G a +fo pen +200 1 +St encil +Ġ3 7 +=" ", +SE QUENCE +d ro +WH ITE +] \\ +im ated +pr im +([ ], +cy cl +ma ss +ĠRe p +B ulk +int ent +cal cul +Activ ation +x m +get In +2 20 +De ploy +P ED +T erms +sh ips +Ġenumer able +Ġc ircle +hl js +ĠCulture Info +R FC +z t +FI LEN +Ġart ifact +Ġf lip +and atory +Ġcons istent +l Z +ĠA X +exp licit +Comp at +Data Provider +ĠR ight +Mo vie +FR AG +tl v +`` ` +ĠBlock ly +Ġra ce +l h +st ation +th esis +FF F +Ġcondition al +åº ¦ +at tempt +ĠDI RECT +ĠAl ert +DR V +66 59 +s low +ĠUn ix +76 8 +fe e +O id +TR ACK +W xl +tr action +L G +åı ij +Ġpre ce +Ġe g +Dec lared +REMOT E +- * +C rypt +MI X +================================ ================ +Ġassum es +ĠFUN CTION +ĠG PU +re peated +Ġe valuation +f irm +as sembler +Form ula +g reater +ag ram +ter y +en crypted +dl m +Illegal ArgumentException +Ġwrit able +Ġsp in +: ( +sub s +uto ff +Comp ressed +Ser ialized +Ġannot ations +co lour +F REQ +Ġhold ing +array s +O SS +p M +ĠB ar +ĠH igh +Thread ing +Ġ( ~ +set Up +CALL BACK +åĮ ĸ +Ġ × +or al +æī Ģ +Quote s +ĠF C +Ġ3 9 +Ġn or +%% %% +3 04 +ĠS EEK +CK EDITOR +Assignable From +T ol +s omething +info s +tep ret +elem etry +re pr +Ġmo v +Selected Index +Rep lica +"] : +Rel ated +Get Component +Ġp asses +ĠQ Variant +Ġ{ : +Clip board +Check box +CT YPE +Co ins +Pix map +context s +ठ® +D w +Ġis o +Ġg ives +ĠS ite +T ITLE +date s +"} }, +Ġ---------------------------------------------------------------- ---- +Ġ4 096 +R z +ret rieve +ch g +Vo ice +è ĥ½ +SD Node +对 象 +Tr unc +order ing +Ġmod ifiers +tx n +rep orter +ĠC AI +æľ ¬ +ĠC LI +ठ¸ +ĠEx port +FL USH +quote s +L and +X IO +Ġs alt +k y +Ġ... ) +Ġtol erance +Sn ippet +Ġd rv +start up +User Data +FILE S +1 12 +Ġget Value +Ġreg ard +(" ( +', \ +'), (' +ĠNo Method +å » +Ġco lour +W B +Ġb nx +comp uted +tl b +8 192 +S OFT +final ize +c lazz +REG ION +Web API +dat um +Deep Equal +ĠL IB +"/> . +Ġstart Index +Ġinter n +Clo ser +prod uction +Brace Outdent +x z +Ġnv km +Ġ' ! +Ġr id +n B +ĠT II +ST E +Ġ` , +interrupt ible +Ġv x +r st +Ġp ivot +G ap +ang ent +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Col lect +Ġund o +Middle ware +Ġ' -> +C ENTER +Ġdescri bed +ĠByte Buffer +PATTER N +æ ± +new Row +Change Listener +æĮ ĩ +uve au +compar ison +: ") +ĠMock ito +Ġlarg est +special chars +Design er +P k +Ġ(( ! +} \" +aa a +ĠPIX EL +i ans +ex ponent +ĠEX IT +b trfs +Ġis Valid +x el +st ock +Ġpref erred +b pp +| ^ +b ssid +Comple tions +striction s +Ġar row +alar m +Get Property +Bu g +o ken +s cheduler +ld ap +I K +Read s +Hook s +G lob +{{ .* +Respon der +debug ger +Ġqual ified +T s +AL EN +Ġhow ever +pers ist +ĠT erm +V ED +Ġm mc +ĠC X +By Index +10 8 +Ġp ress +ĠL HS +Ġen countered +Ġ'_ ' +Absolute Path +p O +Ġas pect +ole te +ĠAr ch +en et +Ġ2 50 +END OR +tepret er +ĠPL UGIN +Ġreg map +'] [] +? , +ind icator +Drop Down +De leg +oct et +v in +var iance +Pag er +ENT ITY +ub er +add Column +Ġsystem s +Ca use +P seudo +Ġth ink +get Arg +C ANCE +Ġq s +Service Name +z il +de lim +Ġd up +ĠSha red +n N +Ġ ][ +ĠSh ape +ĠExec ution +gr unt +Ġtrans formation +ed er +Ġg amma +Ġear lier +string stream +Ġen crypt +stand ing +Ġrespon s +PIX EL +r nd +IC MP +E AGAIN +ir s +An g +* ? +S z +PR OB +Ġ) ( +Ġ($ _ +tmp l +en ance +Ġx range +Time Zone +sd k +Ġce ph ++-+- +-+- +ĠP P +IP HER +| "+ +get Month +ĠAt tach +Ġback wards +bind ings +Ord ers +a ug +TR ACT +$ ('# +F V +log ic +ne igh +Mon ster +gu ide +er c +ĠQ ByteArray +Ġg s +md io +Exp iration +ub untu +ile s +tr unc +Flag Set +=> $ +Fac et +T od +AP PL +compos ition +in vocation +Text HighlightRules +C AM +Ġmod al +get Cursor +In tepreter +ac cel +A SH +L in +Ġf abric +ĠAl ways +cg i +ol ar +ĠC ancel +ĠEd it +Q j +Ġ7 0 +Fold ers +Primary Key +IG NORE +Ġd ns +back trace +ĠJ c +Has Prefix +ĠAtom ic +C x +G rammar +ipher al +co exist +Ġto do +Re load +Ġdecor ator +à µ +Ġali ases +__ (' +File Sync +Text Node +ĠBo x +F ER +Ñ İ +Ġp ch +Sw ift +D ark +set Content +qu ota +get Entity +cl Zip +Ġget Instance +ĠR ot +åĬ Ł +> ') +get Hours +Web Socket +ac le +ZW F +b id +оР´ +Cor ner +)), " += [" +th ree +Ġr te +ĠO Auth +par s +Ġrelease d +JNI Env +ĠD st +Ġmark up +Ref erral +Ġlocal s +priv acy +ĠCon tract +DEF INED +J un +(" ( () +Ġdraw ing +Ġdw arf +ĠPro file +ch arg +ĠT e +Ġtrans lated +L j +x sd +st uff +es Module +ĠW ITH +iagnost ics +LAN G +Marshal To +) % +er as +Ġro utes +Schedule d +10 6 +Pa inter +Wait ing +æ ® +Read Write +ĠÐ º +ĠC UR +_ $ +Ġm f +ĠRE Q +gt k +Descriptor s +ĠGener al +int p +Ad vanced +Ġresource GroupName +Ġproperty Name +Sp here +Tra in +Byte Buffer +moused own +ĠI I +No v +) }); +d umps +get Pointer +ãĥ ³ +Angle s +New Error +B SD +Ġcomplete ly +l us +; // +Q z +in ally +ĠA E +decl aration +bo unce +Date Format +on load +an cy +еР¼ +m usb +Ġoverr idden +currentTime Millis +indic ators +: \\ +H K +Z z +Ġsim d +Port al +f ol +ar ations +Ġn at +par ms +)} ), +H istogram +v ue +OR AGE +) +" +h x +å¼ Ģ +â ķ +è µ +sub tract +Par m +Exec utable +PHP Unit +dash board +ĠC ategory +ĠDef ine +set Current +M W +db l +phy dev +Aggreg ation +8 31 +da emon +Det ection +IS R +ĠFact ory +C e +Ġt ot +Sub target +32 0 +Sub scribe +" .$ +E VT +Ġv t +ĠM aterial +enumer able +L IC +LOC ATION +" ": +SI MPLE +om p +Ġc atalog +as pect +md p +Small IconUri +Group Id +separ ated +C art +D TO +String Len +in voice +sh m +ĠFile s +Asc ii +With in +ĠCheck s +09 4 +Ġpost s +pear ance +è° ĥ +er ator +IN LINE +Qu eries +ex tern +Code Attribute +ĠC FG +pos er +S izer +Ġlo ff +Ġeffect s +FOR CE +Ġtim ed +ĠE l +Ġpay ment +) ((( +Ġl icense +Rec order +in vert +Ġnamespace s +ãĢĤ \ +å½ĵ åīį +Pro files +Text View +OP ER +d on +ĠC ODE +Buff ered +F m +xFF FFFFFF +nowled ge +In sn +Ġv endor +ĠT imes +N t +vi al +sh int +Convert s + ł +à º +Ġinter ceptor +ĠW ill +connection s +TR UN +Ġback ward +Ġoverride s +M utation +") ? +DR AW +J q +Ġfile Path +() == +cre ation +vi ct +Ġg db +AI LED +s mbus +Ġre cover +I OD +Ġbit cast +Ġtool s +PAT CH +Edit able +ĠR UN +jd Glvb +in ja +J IT +mod ifiers +des ired +MM MM +ĠTime stamp +C tor +áĥ ĺ +pe m +hs otg +Ġcollection s +å¤ § +åĪł éĻ¤ +Ñ Ħ +ĠI ND +Ġsl ider +re write +add Listener +b W +ĠR S +ç İ +Ab out +Page Size +sig ma +Ġ3 60 +аР² +a verage +In jection +ĠN amed +Relation ship +Space s +NOT ICE +ĠAs set +C ube +c ern +mask s +ĠCl uster +n function +ĠB l +ĠL ED +uc ene +Ġde ps +dev s +Ġint ended +S ales +Ġind irect +Ġcom es +INTER VAL +Ġp ts +ĠFunction s +P kg +SA S +Sp ot +c sum +ĠA N +ĠB rowser +PK CS +Ġoptim ization +Ġeps ilon +Ca ret +sp ot +ĠAr t +ठĤ +Region s +Sel fer +N AM +(" & +M illisecond +] }, +n bytes +ĠP H +print er +cho ices +Cap ability +ĠW C +game Object +Ġr q +Could n +pipe s +tom orrow +d ss +Ġ& _ +E valuation +H OME +N W +un load +Ġ> ( +ĠRun nable +I am +Ġnorm ally +Min ute +Ġg row +imp licit +M enus +ou ch +88 59 +Ġform ula +ĠSource Location +ĠComple x +Ġb h +fe at +An ce +P assed +Ġer ase +K X +Ð ³ +ĠV ideo +Transaction s +Ġ} } +Ġstart Time +ch n +INTERR UPT +Ġge o +http Response +çĶ Ł +Ġ9 6 +c laim +Multip ly +En velope +äº İ +Ġbe g +imple mented +One Of +Ġin i +Depend ent +phab et +WAR F +assign ed +icip ant +Source Map +ĠI W +Ġd g +om inator +ĠPop over +Ġd ropped +ĠC Base +N Z +Ġ` $ +H istor +jk lm +Ġ' ( +Ġload s +ven ience +使 çĶ¨ +Ġre cursively +pro f +add Widget +BO OT +remove All +10 9 +find er +To File +D etermine +p mlme +Ġe fx +check Outdent +Ġexec uting +YY YY +ĠErrInvalidLength Generated +U t +Ġt st +Async Result +ĠVis ual +Ġf o +/ **************************************************************** +de veloper +quest ions +st ors +EE PROM +Ġvis ited +Ġte gra +b cd +r us +id r +Ġr w +Log Level +ĠDE SC +CE V +F w +PRO JECT +x k +Ġbefore Each +Ġinvalid ate +Pre set +> * +work flow +E cho +YX Rl +GT K +? "); +Ġsub class +get Document +Re v +Ġim ported +ĠLOG GER +ifi able +definition s +get Root +pro jection +ĠEE PROM +ãģ Ħ +('/ ', +Ġdec lare +ol r +Ġtuple s +Err no +SC REEN +m is +la pping +Ġr val +Ġpro cedure +NOT E +Ġt k +block size +p refs +R ating +ĠI ss +Attach ed +ĠN DB +SE CTION +C pu +Ġ0 2 +Ġpar ses +Layout Params +Load Balancer +Ġun marshaller +ers core +Ġlo ops +Ġrelated Target +dap m +V Z +il io +ĠC B +ĠSQL ITE +parse Float +J z +å Ĵ +FIX ED +Ġqual ity +- " +Create Instance +è¿ Ļ +ho od +M z +ç ´ +ĠHe aders +i ated +ĠI T +type Name +Ġpath name +lo it +Ġh l +table LayoutPanel +ĠAP Int +is csi +ĉĉĉĉĉĉĉĉ ĉĉĉĉ +Type Info +U W +R aise +u A +Column Name +Ġl r +ex change +ail y +compare To +> % +c map +We ights +g x +y ond +ag o +ĠS A +ĠPI PE +prob lem +TR IES +P DO +Ġfield Num +ĠReg ex +:" % +co herent +Des ktop +sub type +åı · +)) * +ç±» åŀĭ +n avigation +Ð ¹ +In verse +velo pers +) ') +Ġpol ynomial +ĠP tr +EV P +c uda +rett ify +P s +12 1 +ĠId x +ĠU LONG +O E +B IO +I METHODIMP +r port +M ISC +IF S +(' ../ +ĠB IO +Ġset ter +k bd +CP P +Font Size +n api +Ġfield Name +Ġparent s +Ġ7 5 +Ġenv iron +um ented +Col lapsed +Resume Layout +Ġw ave +tmp dir +RUN NING +add Element +DI AN +qr st +tol ua +Ġfunction ality +Ġg ateway +ĠCon st +Ġgraph ics +Suspend Layout +ĠT M +ĠEx pect +Get Next +============ == +Ġb one +In ject +read cr +Ġs cores +DB B +phys ical +Ġord inal +C s +Ġf g +check Position +ĠF AILED +Ġh al +Ġ` `` +201 8 +=\ "" +F Y +get Connection +( ; +ers hip +Ġcom bine +201 9 +rag ma +| % +Attribute Checker +v Ly +Ġp eek +Ġ" // +ĠW LAN +Ġstr n +r ust +on us +or a +ĠF R +req s +New Reader +VER TEX +T m +dr upal +Ġpers oon +Instance Ptr +Plural Rule +ACTIV ITY +Ġexpect s +F o +E s +æ ¬ +Bu iltin +G tk +Ġsc anner +S ynchron +b ag +io unmap +DI M +equals IgnoreCase +AL TER +cal lee +ĠP SU +ear ly +J i +pr ime +C DATA +arg ins +domain s +Ġinsert ion +M apped +th resh +Ġqueue s +ĠA ff +d B +x mm +ĠB ool +* $/ +n am +Tra iling +BRE AK +Ġfilter ing +Tim ing +cycl er +k k +IS H +see also +good s +BIN ARY +ĠName space +Ġh ierarchy +ill s +Ġre write +ĠM CS +Bra zil +Ġlast Node +u tr +ĠIN IT +Ġexec utor +Non User +( ($ +A ws +ĠIN DEX +Av ailability +Ġdepend ent +Ġ article +ip y +Ġex change +Min Value +Std err +strn cpy +cl amp +Ġsec ure +C he +SI X +Publish er +Ġindent ation +pr imitive +Ġassoci ation +(* ( +V ENDOR +ç © +co ef +MEMB ER +gd G +x n +Q Object +Ġtable Name +writ ing +South east +Ġd ial +: $ +è Ģ +ream ble +S yn +at in +G data +å ĵ +FI LL +Ġb f +get Selection +Icon s +ॠĩ += ', +AP H +ĠC amera +comp ose +scal er +ĠTI ME +Ġtrack ing +b ench +Ġstatus Code +ĠSe lector +el come +Rep lication +Com ma +ï¼ ī +> : +E OP +Ñ ħ +mp df +Pro filer +Ġbus y +ĠSign ature +ĠInput Stream +re interpret +-------------------------------- -------- +cre ator +User Agent +ab i +ĠTime out +Ġuser Id +Ġblock Size +Connection String +dd y +ĠS F +ï¼ Ī +VIS IBLE +collection s +d ial +Ġc pp +set On +ens us +55 55 +ĠA CL +p wd +Ġsc enario +dispatch Event +ĠW atch +FA ST +) '); +d W +Ph oto +ĠOPT ION +ĠCar ousel +Ġfor ms +Ġlo st +ĠAn not +M b +F p +f all +ĠC annot +b rightness +Select s +Ġactiv ate +Ġv an +Ġ{} ", +EXT ENSION +Ġmethod Name +ou ted +au ssian +w av +x o +ä¼ ł +l on +t sk +} _ +Ġsn ippet +Ġschedule d +start ing +Sk ipped +ĠB C +mt ab +T HE +Ġw or +set Type +Feb ru +S UR +ĠY AML +ĠV P +Ġk s +v ga +Ġf ine +Ch ip +aggreg ate +å® ¹ +Ġembed ding +> ") +Ġr l +Ġpur pose +Instance Id +~ / +ĠObj C +Ġ ur +ep s +convert er +test er +============ = +Ġ" = +Ġ и +in ventory +V LAN +Ġsy mlink +string Value +atal en +Part y +Play ing +l q +ॠĢ +Ġmk dir +ĠC ast +play back +Ġget Id +Key Down +F U +Ġg fs +ufacture r +get Active +ot os +Lower ing +Ġs uspend +ic o +Can ada +" ", +3 02 +jklm nop +b an +ĉĉ ĠĠĠĠĠĠĠ +free ze +remove Listener +ut ive +add on +ĠPers oon +Ġhas n +bm N +Ġmean ing +Ġc k +Ġsort ing +{ ' +read Int +sk y +J Z +V IR +Ġb rowsers +In et +ĠT S +6 55 +Field Value +ĠAct iv +stop ped +Ġcom pact +PI E +Contain ers +Move ment +w nd +Ġstart up +TYPE S +Record ing +activ ation +Ġ- ( +Or Update +PROG RESS +w ers +Ġmask ed +INIT Y +om b +ĠC XX +ĠNot ification +s pa +h at +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +is F +() * +å® ŀ +G OT +Test Data +CO VER +еРº +An onymous +C ms +| _ +md c +ĠQ T +Ġcontent Type +åº Ķ +ĠErrIntOverflow Generated +Convert To +ĠPa ir +Ġc lang +Re moves +P i +ĠE S +ĠSc reen +Ġ" =" +mo vie +DA O +g mt +Ġun re +cy c +izz le +ĠAnal y +A st +m ci +pen ame +O Auth +V ote +Ġb enchmark +Ġb alance +week day +Ġty ped +Ġo paque +FF IX +Ġ}, \ +(" * +Unm arshall +ig ure +Ġ") "); +M PI +U ME +ĠS CR +ĠPro gress +Ġappear s +(). (* +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Host name +Ġjo urnal +v out +Ġtr uncate +Ġstd in +Vector s +åŃŠ符 +ĠĠĠĠĠ Ċ +entic ator +data Type +Ġ4 7 +f k +ĠK ER +H old +ĠD at +ĠS eek +ĠLe ft +ĠP atch +track ing +rout ing +Ġsatis fy +as i +yn os +SET UP +conf lict +assert Not +COM PRE +C Sharp +en ses +ind irect +04 41 +Ġtermin ate +P eek +Ġcont inuation +ĠM II +ĠF ace +Ġdec ide +Ġre strict +vector s +x dr +c amel +Ġ Ø +ĠVer tex +** / +Ġde grees +ĠN E +Ġpr inted +g pi +SI M +exec utor +Ġ16 0 +ĠSw ap +s mb +Ed m +Ġab orted +B h +==== == +Var P +CSS Prefix +80 80 +D ns +ĠM anager +S SED +ad b +======== = +Auth ority +G RE +p Src +ra ck +Ġm ul +imp lode +MULT I +è· ¯ +Ġf ifo +36 5 +ĠQString List +u ar +et rokken +int val +Ġ[ [' +pa st +% ( +3 86 +in el +MI SS +d ense +ĠQ Latin +Ġjo bs +date Format +create Mock +Std String +ĠTr igger +Ġ12 34 +} )) +Ġint ro +V Q +un pin +Require ment +s ap +áĥ IJ +ο Ï +ĠM s +AS M +ĠUs age +11 4 +Base Path +NOT SUPP +ĠEd ge +Des ired +S olid +Type Def +Ġle ad +first Day +LI CT +Ġwork flow +Ġlow est +base CSSPrefix +P rettify +tr ast +Ġp ing +key up +EN DIAN +ĠQ U +Call Option +S MALL +Ġh armony +ĠP F +unit test +ĠCol lapse +ARG UMENT +Ġlength s +Ġ& , +msg hdr +um ulative +sl id +get Max +AL AR +user data +bat tery +Ġ4 04 +quant ity +ĠAdd r +Ġtermin ated +R ob +ĠPro xy +Ġun iform +(_ (" +LC J +c bl +/ },{ +g row +Ġ ist +ializ ers +Parse Error +ends With +è¯ ¢ +B ANK +G J +Ġ( @ +ĠB R +Ġim pro +DI FF +EN DED +B roker +ĠD P +Import s +Ġbel ongs +ensit ivity +Ġl c +Invalid ate +Domain s +L atest +U r +C AA +ĠC GF +G ate +un supported +Product s +G ro +T OM +PU BLIC +Simple RefCount +Direct ories +g Z +| [^ +un ref +CO LL +direct ories +b cs +et ing +vok ed +uber net +Set String +<< " +ri ptions +Value Pair +trans parent +14 6 +ĠW S +equal To +MAPP ING +h ed +ĠIn clude +b etween +n J +Ġc anceled +ĠT T +Le ast +Ġq l +Ġ"- " +BL K +Lim its +Ġst and +SIGN AL +check s +Ġaws util +vi se +int o +Ġd istribute +As sessment +K i +ubernet es +ĠP ipe +ĠAs sembly +/ $ +to pology +Input Service +15 4 +C W +ĠD A +M d +CRE F +CAPT URE +ub i +handle s +rol led +Tx t +ĠC ard +Ġg rab +Ġbu iltin +Ġ[] ); +ĠPers on +Ġc wd +erg ency +ren dered +ĠW idth +Le ader +Ġpers istent +( ++ +Ġ: ' +}/ { +Ġy es +IC Y +Multi Line +S ampler +Ġ? > ; +an c +00 4 +add Item +EN XIO +raw ler +76 2 +Ex clusive +11 3 +Write s +Read All +))) | +Ġg st +Ġport ion +XY Z +SECON D +Ad vance +Face s +CONNECT ED +Red uce +C anceled +List Box +ĠH Z +SY N +pref erred +h mac +m log +PO OL +é»ĺ 认 +, , +T ue +Ġhint s +St ock +Ġdestroy ed +Ġan imate +COM MON +ploy ee +SW AP +2 32 +MA CH +Boot strap +D ie +Ġ/ ^\ +d rain +Message Type +Ġ1 92 +Ġweek days +IO CTL +pag ination +f abric +æł ¼ +p atient +vi ation +Ġex cluded +sent ence +ĠI o +ME T +Ġre covery +CO OKIE +Red is +Ġol der +Ġ( )) +ĠF LASH +], " +Ġtransition s +Ġge om +celer ation +EN GINE +Ġns I +ठ² +wifi ex +n pos +Ġth eta +4 43 +ĠS afe +è¯ ģ +TEMP LATE +th ca +ĠC ase +oc fs +To End +Ġ/** \ +)} }, +ĠMemory Stream +H l +ĠAss ume +é ª +jklmnop qrst +Ġo id +ile ges +о ÑĤ +Vert s +C are +str m +Ġre pr +09 30 +Ġobt ained +p ins +Un used +F loor +Ġun link +Perform ance +trip le +Ġ$ ('< +ĠSec ure +re aded +Ġtr ust +ĠE P +c ma +ĠH AVE +:" ^ +Remove All +Prototype Of +Ġne arest +æ ¯ +re cent +ĠNew Populated +ĠSh ift +Ġw ide +form ula +new Value +h ance +Ġmet av +n ock +Ġin finite +D s +Ġgener ating +ap ic +Link age +ĠSouth east +Ġo t +00 7 +Single Value +ĠDIRECT ORY +Ġd ro +bar rier +ĠIO RESOURCE +Ġ? : +Ġspec s +r te +Exp ired +ip c +next Sibling +Dis position +Ġbreak point +z s +css Text +Ġref ers +" +" +/* ------------------------------------------------------------------------ +(_ . +Result Set +Handle d +C USTOM +Un pack +Ġthere fore +Ġin variant +Ins pect +PLAY ER +éĢ ī +C ity +Ġsh all +dw c +Ġ( / +real m +Ġsub tract +ĠLine ar +o dd +te ctor +Ġlua L +g zip +ĠD ispatch +get Position +ĠO FF +Store d +AL OG +Ġ:: = +] ))) +Count ers +6 000 +an alysis +Ġun register +Instruction s +OR S +fe rer +Ex ponent +ĠU SER +Com put +list ed +Ġsys fs +P al +sw ig +ĠDest roy +. "), +T Source +ĠL IMIT +Ġcon sumed +iv ative +s olid +ther net +ĠLe g +> } +SF ER +te l +EN SE +Ġy yyy +Î ½ +shape s +Ġre cogn +Ġtime zone +Rout ines +ç© º +F lex +Ġ$ $ +s al +Cre ating +à ¨ +NewErr Param +le ading +cc w +ne ver +NOT IFY +google apis +ate ly +Ġo mitted +re strict +Ġd v +Ġget Data +order by +J R +m pt +lo om +Local ized +Under lying +Ġcycle s +] && +Å ¡ +gin es +Scope s +Ġpie ce +OW ER +pub key +ct ime +è¿ Ľ +ĠGame Object +Entity Type +Ġclo sure +CONNE CTION +Ġ( ` +Ġsynchron ous +Ġ\ $ +Debugger NonUser +in ated +ON CE +E ye +s ibling +ĠA gg +Ġinter preter +Http Response +Non ce +Ġcomput ation +base line +cc c +dat atype +Default Value +ĠNo thing +st h +Ġoper ators +ãģ Ĺãģ +V el +Ġm ed +get Options +ĠE valuate +f X +l ittle +UT DOWN +u control +/* . +r ds +ĠM esh +Ġ ancestor +task let +ĠO ff +æ Ĭ +Trans parent +clear Timeout +Ver ification +Logic Exception +flat er +book mark +ç « +En emy +OT AL +Client s +To Be +Class Loader +ĠN FS +oo th +d to +ĠOb servable +div ider +7 54 +Ġ= & +Ġis a +ĠQ ModelIndex +bb y +h om +ĠKey Error +om ation +Ġwas n +SUB TEST +Acc um +M N +replace ment +ACT ER +| - +ce mber +Av g +eat While +, [ +M SK +Ġ unc +*) ? +Dead line +ĠEV ENT +Ġens ures +US R +ĠErr no +Gu ide +ret ries +dec lared +Q o +ĠB ecause +sw ing +/ ******************************** +I l +lips is +ĠB us +i very +]; \ +AR GE +Ġend ing +ĠZ STD +cor ner +è½ ¬ +Ġh uman +sub process +Q l +Y y +Percent age +Ġa ffected +und ay +2 16 +; }. +Ġget id +ty ped +un less +RE CTION +L z +T N +sub set +Z y +ch i +ĠCurrent ly +rep lay +f ib +Ġd lg +Add To +SE EK +pb m +Ġa a +ĠOPEN SSL +m otion +MI SSION +Ġdb g +vi o +Ġ`, `, +Text Field +Ġwx T +Ġoptim izer +ap ing +[] > +m mu +ĠW riter +Iter ations +Ġteam s +ĠPK IX +Ġs aving +De fn += {} +get View +Ġ1 01 +æ® µ +Query String +Ġc rtc +Script Engine +O U +moz illa +æĪIJ åĬŁ +CR YPTO +ignore d +Ġign oring +z ones +ĠA DC +Tick et +Ø ¬ +str ain +n avigator +Inst alled +abcdefghi jklmnopqrst +mo o +Ġcom parator +iter able +Db Type +DEF INE +Top Level +Conv ex +lat in +ĠConvert s +tr ig +ĠR ADE +ĠS UB +display Name +Ġcould n +VARI ABLE +k ref +End Point +ĠRADE ON +d cb +de ployment +)) ? +Ġsc atter +ĠC D +no b +u lo +out s +ĠB FA +Ġend if +IG F +} [ +åĬ ¡ +i am +native Obj +R and +Ġsh uffle +cycle s +Ġd rbd +Ġnot ifications +PA Y +z illa +Not ifications +rx q +Y z +ĠP olicy +Ġ{} ". +Ġint s +4 96 +Z v +get Version +COMP ONENT +M age +Ġ# % +iter ations +Db g +Normal ized +j ack +lo od +col on +Ġwe ak +ĠPh ys +Instr ument +ен и +ĠUn i +Ġpl ural +P FN +Ġin p +Ġst m +sc i +ĠCPP UNIT +add To +Ġcom bo +01 00 +sd io +Al arm +ĠRed irect +24 00 +Ġdelete s +need le +p B +(" // +Ġ}); \ +org anization +M UX +Y EAR +Ġ â +start Element +get Total +Ġnote s +m ip +ĠS ym +ĠF ake +Ġbuff ered +p nt +y ellow +Back drop +Ġprob ability +O paque +el i +KeyValue Pair +None Match +ĠP x +iter ation +Ġperform s +ĠQu ick +U m +um bs +J D +ly r +è¾ ĵ +ĠQ List +% ; +Ġf ired +spin lock +py x +L ed +is Directory +com ma +Cal lee +g ent +Ġ} ] +Se verity +F b +k u +et ooth +Co ver +Ġexecute s +P AN +ĠMod ify +rl imit +y er +ri p +p ivot +Use VisualStyle +st m +Ġre fs +ph pcs +B enchmark +a q +Ġtype Name +CH K +CON TA +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ex clude +ĠH AND +ĠRe st +aff ixed +Wire Type +еР» +UseVisualStyle BackColor +} ( +end Element +02 54 +Auto Scale +Sm art +erv ation +get Client +Ġte arDown +* = +Ġb a +cent ral +ĠTrans late +Marshal JSON +æŶ éĹ´ +Edit ing +Qual ifier +Prod ucer +qt script +decor ation +p db +type ahead +12 9 +Ġ5 000 +Extract or +By Version +Block Size +Roll back +J T +S dk +01 7 +Co in +ĠP CL +*)( \\ +ĠĠĠĠĠĠĠ Ċ +AP B +Ġurl lib +à § +md ir +Ġ6 5 +M IPS +a rena +ĠG ST +assert Array +assert Count +COM PAT +200 4 +ĠDepend ency +e lems +ĠString Buffer +tim ings +Ġ5 5 +Ġser ialization +22 1 +Ġc andidates +Ġc he +col laps +Ġs impl +ĠF D +roll back +Ġc ulture +RE NDER +us p +par agraph +Ġel f +R AND +Ġc ritical +*(\ /\ +X S +is Enabled +Ġch ance +view er +DebuggerNonUser CodeAttribute +ĠL ONG +ĠO k +SI O +New Source +S sl +l ng +config ured +Z j +n la +h ole +get Decl +as n +J P +p Device +2 13 +e very +PL ATFORM +G ray +аР» +Ġ ---------------- +Text ures +Ġhy per +Se par +c db +AD APTER +Account Id +E FF +Run nable +ĠRef resh +mem o +ĠSh are +YW x +Ġa ge +Align ed +Ġf fi +Ġ" ? +Ġdata store +lat ency +W ed +/ : +3 06 +sh uffle +Ġfore ign +Ġr ng +ĠH R +do ctype +Non null +compos ite +Ġcom pared +P sr +p ressed +())) . +field set +icult y +Ġmat ter +Unm anaged +Ġhost s +F ATAL +Cl usters +éľ Ģ +Mult icast +"], " +g pr +Ġac cessed +EOP NOTSUPP +list Of +å¤ ± +getFoldWidget Range +CS V +å¤ Ħ +C Base +O iB +Context s +Ġinter mediate +Ġinter polation +Ġre member +Ġin dependent +"> '; +get Error +yst ate +Field Type +Ġsub stream +Lat ency +ĠNVPTX ISD +N m +ĠW idget +Rew rite +ĠĠĠĠĠĠĠĠĠĠ Ċ +Rep resentation +ĠD river +======== === +Namespace s +error Message +a G +ĠP oly +DB F +Te le +15 2 +Ġrequire ments +ctl r +BL ANK +Ġdat um +par c +Has Been +å° ı +Î ¼ +im c +ĠE D +s se +d lg +Ġv ma +SW ITCH +Q V +ĠP clZip +ĠT alk +ç» ĵ +4 40 +IT S +85 00 +} |\ +ore ad +Read ing +B s +F ar +base Url +R SP +Ch anging +- _]+ +N i +]. _ +Ret rieves +w id +ME TA +Ġbel ong +Ġtrunc ated +ĠA ssoci +block ed +C IPHER +fig ure +Ġm eth +Th ing +ĠSc ene +ident ifiers +Z Y +pt ime +: , +m cast +Per f +Ġaff ix +root Scope +Feed back +Ġs age +R c +dd ata +I Ch +Ġv lan +Ġw ildcard +Re ports +SH ADER +go al +Ġdelay ed +supp ly +w ik +Inter sect +mar ies +f ers +Sh ipping +Query Interface +el m +D t +REG S +Ġplatform s +ĠMax imum +x X +at i +Ġf atal +ĠM MC +Ġq Debug +g ene +Ġt ap +Ġde ser +Ġget Parent +Ġg uest +De crypt +Ġun wrap +Expression s +Ġb ericht +Ġm ux +(" > +str ipe +noc ache +getValue Type +Ġpur poses +cl inical +pag er +C os +F un +W izard +Ġlist ed +NewError WithError +S ong +Ġwe bs +D SS +ĠA ES +C AT +ol t +bat on +ĠR D +no thing +UN SIGNED +mb x +order By +Ġapp licable +x id +Ġpred ict +ĠA I +PR OD +response s +Ġrelation ship +D ense +str ftime +éª Į +V W +E Y +per ms +NET WORK +Ġtyp ically +c group +Server Error +st retch +Ġ# ## +Pie ce +Ġcom bination +ĠQ Point +Sub net +Ġtensor s +Ġbe yond +TIME STAMP +оРº +âĢ¦ âĢ¦ +Cam paign +DOC UMENT +-> {$ +th ird +ab y +Ġsh ard +Ġ"_ " +Ġcl oned +Copy To +ĠQ Object +ĠD uration +ĠP U +R Y +z m +File Type +File Size +Greater Than +K ILL +At Index +ĠURL s +we apon +22 22 +Ġtrack er +co up +Get Call +ĠR ound +Format ted +QU FB +Ġ32 0 +rout ine +A mb +C URL +ठµ +Ġassoci ative +Ġn ice +ĠA li +Ġstd Class +MM C +Ġel t +g ested +tr c +Ġw anted +> ` +e ol +ul ted +sm art +Ġplace d +cbi Aq +P id +re alloc +is Open +S il +em place +AR C +ane ous +class name +Ġcorrespon ds +mix in +Ġch at +amd gpu +IS ION +30 8 +Ver b +(" __ +Sc ratch +ĠAT OM +Ġle ak +ĠJ an +d pm +Ġgo al +J ust +set Visibility +ĠT Arg +dd d +n est +CD C +Check ing +)/ ( +Cancel led +atter y +p us +ĠW alk +13 5 +v w +Ġex clusive +REGE X +b urst +Ġlin eno +Tx n +Per m +B ODY +port al +ĠO verride +ठ¤ +p reserve +set Position +stanti ate +)} . +åIJ Ī +is True +ĠM k +hint s +re pos +:" - +Block Comment +ĠInt errupt +Tile s +p gs +str l +sm i +s amp +Reg istr +Line Number +fire Event +in coming +Ġ' } +imit ives +l id +Ġis p +//// /// +Ġtri ed +, // +C k +K o +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +Ġex ported +Ġblock ing +ĠL PC +ĠQ Widget +Ġi a +St and +Ġest ablish +F lip +t iny +open ed +l port +l ifetime +return ed +R igid +T rie +Th umbnail +Try Parse +l ru +In i +Ġr k +Ġbt Scalar +T ap +Ġrole s +ap sz +AME S +`. ` +ĠAttribute s +g olang +ĠLay er +Ġg round +CH O +Emp loyee +Ġn ic +Ġcon current +Ġad v +mouse up +f ps +Ġq ed +Qualified Name +C ent +ĠD iagnostic +map hore +TER M +mail er +(' * +Owner Id +st o +Ġp ng +Ġs oc +End Time +semb lies +ĠCAI RO +C i +it ness +Ġno op +M oney +ens ible +page Y +op p +Get Size +56 5 +Index er +TER NAL +Ms Rest +u char +x html +Ġb asis +Info f +Oc currence +W ildcard +d io +the re +sec utive +TRAN SFER +Ġf avor +Bucket s +Ġhton s +phpcs File +UT IL +Ġcap abilities +ograph y +D n +En crypted +CH UNK +MO USE +87 23 +log ged +ic ing +Get All +ĠB SON +Ġx t +Init Struct +fil ing +ĠId entity +f ar +AB S +qui et +ĠQ R +get Color +Ġtag Name +s am +A abb +M CE +in b +ĠD irection +MA KE +App s +Ġsignal s +P layers +In correct +jac ent +Ġcap ability +activ ated +ĠC mp +serv ation +e hci +n fd +Property Value +Al go +B Z +" < +Y our +Format Exception +M ID +Arg v +ĠP DF +ĠType s +Vol umes +Ġ") "; +ĠSC IP +OPERAT ION +THRESH OLD +\\ - +Ordinal IgnoreCase +ĠStack Object +G rpc +Ġth umb +Re covery +Pro vision +Ins ights +!! !! +Ġ% + +bt coexist +ĠHe ight +Ġweb kit +Tol erance +Ġbe haviour +Pointer Type +Enumer ate +xpr t +R ULE +w iphy +Ġvert s +ĠF AIL +imp lementation +Throw n +iter ate +Generic Type +Com position +Sn ap +o ob +Ġs vg +ph dr +Ġdet ailed +s addr +Return ed +ĠData Type +ĠD NS +y ou +Ġe le +ĠU TC +ri j +Spec s +ch ieve +r paren +Ġ ÑĤ +Ġright s +Ġs ays +lin ing +Ġstr ong +d addr +Evalu ator +og n +He ading +tw ig +A k +q n +Ne ver +ur ator +Ġc laim +Ġd lm +ll db +Ġbl end +Trim Space +h k +Dif ference +In tern +Ġclose s +car rier +Ġoptim ize +REQUI RED +ĠS lot +Web hook +Ġman ual +à § +Ġc aching +Ġde letion +Ġ4 3 +mark down +ï¼ ģ +Ġintern ally +Ġwx String +owner Document +api Version +Ġorg anization +ĠD rag +Ġsign ificant +| < +ĠTrans fer +N ATIVE +ĠBuild MI +Ġhe alth +ä¼ ļ +OR IG +Ġblock ed +Co eff +X ATTR +Less Than +ĠWeb Socket +Hash Set +Send Fields +d ib +Ġd amage +14 4 +c as +de sktop +16 9 +76 7 +Right s +çŃ ¾ +ĠInvalid ArgumentException +: . +Ġ amb +x fe +en tered +Ġm otion +88 88 +Ġsearch ing +PARE NT +get Store +ID S +OD ER +D y +te e +Front end +m as +t an +c rt +11 5 +Ġco eff +1234 5 +TI FF +uff man +Sp atial +U CH +ĠBe fore +'] .' +ĠSign al +w y +draw able +Hex String +t ain +ĠAuth entication +pl t +Mismatch ed +Q n +response Text +è½ ½ +he id +ĠJ oin +ex istent +ol ated +Ġr dev +âĢĶâĢĶâĢĶâĢĶ âĢĶâĢĶâĢĶâĢĶ +Is Set +ĠIN PUT +nV uY +Value Object +... " +tab Page +ital ize +en ger +==== = +Ġadjust ed +p D +at tle +Ġd ates +Ġfor k +æ± Ĥ +Match ed +Unix Nano +ĠCon s +IL Y +ãģ Į +get Address +Ġal ter +Container State +Ġr sp +02 2 +04 32 +Ġme chanism +IsNullOr WhiteSpace +c ake +M CS +Ġpro j +write w +Ġappend Varint +ĠC lock +Init ialization +C v +s rb +Ġm map +co e +Fd Set +L ab +ĠAttribute Error +String Utils +Ġ' ^ +Ġ0 3 +o q +Ġsign ing +ç¼ ĵ +ens ive +Original Constructor +Y UV +ant is +' [ +DE L +st rength +Ġde gree +pos ure +write Int +Cl inical +æĢ § +positor ies +Y ii +Ġ Keys +Ġf read +Ignore d +) })} +get Loc +Ġclear Timeout +") && +Ġassert ions +ĠCon v +200 6 +font s +32 1 +Up dater +ME SH +MS R +L PC +pro files +ĉĉĉĉĉĉ ĠĠĠĠ +At las +() ))); +lo ver +fe ren +Ġx fer +Imp ulse +ĠComp iler +æ ² +Not Implemented +=== // +A SYNC +IC ODE +For Each +No ise +Ph i +Host s +ĠSer ial +re covery +I i +£ Ģ +ĠDec imal +pur ge +> ] +Ġr tc +Ġapp lications +ĠIss ue +(' @ +ĠThe y +ho ud +ot ify +Ġoff s +Ġh ole +node Value +buff ered +CONT IN +PRI MARY +f z +ĠW arning +orm ap +AD V +codec Selfer +rect angle +SCRIPT ION +ĠD one +Ġ*/ ) +pa rency +о н +Protocol s +v ha +Ġdetermin es +R om +> { +Ġ` [ +('. ', +B old +Ġmodel Builder +8 0000000 +å ķ +æĸ¹ æ³ķ +M m +ĠAd min +Ġs ampling +EN OT +ĠR ad +Ġcomp at +Ġ'. / +:` ~ +Ġpercent age +St retch +not ifications +Op Code +37 5 +M ed +[ / +g IH +Ġend ian +MM M +Ġpr incipal +periment al +} }) +ar de +] > +E PERM +is dir +is Visible +Hint s +INF INITY +ent ropy +Ġ" ^ +Mod ification +éĢ ļ +ten ant +EL F +Ġ' '). +PHY S +XC J +get Z +Ġcom bin +ok emon +Cred it +g us +u ced +get Mode +ĠPR OT +Len um +ĠS ame +U AL +// === +ab fd +sc m +find ViewById +sh rink +IF MT +par able +PASS WORD +In herit +od ium +ir ks +ĠTest s +hard ware +Ġerror Code +77 6 +ist ed +Get Service +25 2 +PRINT K +M alloc +Ġest imate +Ġs uggest +li bs +tri angle +IS P +ĠSw agger +ĠDown load +Ġ8 5 +Not Modified +ce eds +ss o +]* ? +(' ') +[: ] +tim eline +SEL F +Force SendFields +e ck +case Insensitive +Dif ferent +d ag +ĠT E +ĠP ixel +Lang uages +ĠF ORM +pp id +Ġtime val +ĠEx ternal +Ġconfig urable +CON STR +ãĤ ¹ +Ġface s +full screen +fac et +Ġs ibling +event Type +b all +ĠT Value +Method Name +Ġgu ide +ĉ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġs ix +Go al +sh ard +ĠL UA +On line +un read +Ġde crypt +Ġ') '; +F ocused +x v +date Time +Ġequal ity +Ġd iagnostic +Ġl and +ĠA jax +). > (); +| __ +å° Ĩ +*)(\\ ()", +B ORDER +Ġw heel +Ġle arning +åĪ ¶ +t q +Ä ± +Ġc rypt +B AND +db us +AX IS +Replace ment +% ", +get Page +ĠS chedule +Ġi os +Ġh aven +FA LL +access or +Activ ities +y Z +ĠS UC +n fc +Ġre commended +Ġio addr +Contain ing +M ATH +St ation +30 7 +Ġo ss +ĠM RI +sub scriber +ĠOper and +am il +read ing +Add on +c ue +Ġh istogram +Ġ6 00 +4 28 +L Q +Ġ Resources +Ġpro ceed +Ġca used +Partial Eq +Ġ{} '. +Ġx or +)| ( +q string +get Logger +Ø ´ +Background Color +Po ssible +è ģ +c style +u FF +Par ses +Ġalloc ator +ĠTime Unit +Ġbinding s +O X +ë ĭ +ĠF ixed +Get Num +Ġstr m +ĠSup er +} - +Ġ% {{.* +ĠCh o +Cho oser +B rowse +d uplex +SH UTDOWN +OPER AND +LIT ERAL +NAM IC +int s +ĠC OR +ç¼ĵ åŃĺ +14 0 +Ġab ility +Ġprediction s +< !-- +ĠW EB +ÑĢ и +oint ment +Azure Operation +Ġex e +Ġvalid ated +service Name +Ġrece ives +ĠAssertion Error +n pm +al ty +Ġret ries +abc de +get Count +set Defaults +Ġbuf len +ĠRece ive +:' "', +k x +tr iggered +Ġres ol +G row +Ġrc u +tim ed +Ġoccur rence +] '); +é ĥ +em e +g ro +by name +Render Target +HW ND +r upted +con c +Ġun changed +Byte Stream +GU AGE +un y +ĠB son +G SI +Z ones +Ġ} ], +), ( +Ġwork around +dm x +Log ged ++' " +Ġbt Vector +Status OK +Ref Expr +sa a +ĠDrop down +) ** +, * +pa ste +ep silon +bas is +ĠD ict +loc ator +md W +25 8 +En g +Ġ4 1 +Ġel im +ĠD ummy +Request Metrics +N u +Ġpro tection +AVAIL ABLE +F luent +ĠA NY +FL G +Ġident ifiers +J Y +un aligned +Ġdef er +Files ystem +л и +M eter +Contact s +frag s +le ad +ĠN EW +ĠP lain +Expected Exception +w il +3 50 +g as +Ġg sp +CON DITION +Members hip +Ð Ĵ +11 9 +o gs +] }} +pe ople +(" ^ +Unmarshaller Context +ĠB lob +P si +se ll +Ġ* ******************************** +In trinsic +ĠG UID +pre set +ĠPR OP +LD AP +de queue +Ġp ret +Ġtr an +Tra iler +tc bl +Full Screen +ten ded +d td +Ġerr s +CH ILD +Ġdiv isor +xml ns +Ġwatch dog +y c +Float ing +Ġqu ot +Split ter +qq string +2 15 +E TIME +Ġtra kt +Shape s +Ġn m +Order ing +UG H +æĢ ģ +00 9 +off line +ck o +iet f +Increment al +s pr +By Key +inf late +Ġsaf ely +' - +O ffer +os b +RL ock +KEY S +Spe ech +m usic +Service Provider +r ich +Child Nodes +Ident ical +Mime Type +ag s +00 6 +Comp iled +Ġre dis +aring Type +N H +Ġb son +BIT MAP +CN F +And Args +Ġg or +16 6 +auth enticate +V Y +IMP L +ER AN +flatten SingleValue +Ġget Current +PROB E +d X +al er +ĠN PC +]) / +Client Config +BO UND +fold ers +ĠLL DB +L Z +l ut +sup press +f write +ĠN GX +gs l +multip lier +st al +Ġ); \ +Ġmask s +Ġplace ment +) != +ĠC Script +pie ces +ĠEN V +Ġvo ice +s is +t cb +de mux +SL CR +plain text +M H +Ġf ooter +ic ated +ĠCO UNT +L IN +ç Ļ +Ġs as +Test Model +Base Type +@ " +ance stors +Ġsub string +åŃ IJ +ĠĠĠĠ ĉĉ +re pl +ri ed +log its +be g +Ġhash Code +cl p +Ġenumer ator +4 20 +Ġp index +ãģ ª +attach ments +Ġsucce ed +Ġs anitize +mp s +No vember +Ġ++ ) +Ġ!! ( +ĠNull PointerException +O l +as px +List er +AD ATA +ELE M +Ġx en +VE C +Man ual +? $ +RE N +list ing +TR FS +04 00 +I List +Ġp pc +ĠD AC +ĠIn s +I jo +P ivot +m en +Tra its +B id +Ġ< ? +௠į +Ġst ar +LO OK +13 9 +Ġexp ansion +pass wd +ĠLI KE +APPL ICATION +ystate change +ra cle +IO U +Ġport al +ĠLE FT +co ordinate +T i +f cs +He re +30 3 +ERAN AMES +Get Field +Ġal arm +Ġ7 2 +Ġmultip ly +L ucene +p j +Ġtrans parent +Ġver b +Ġ". / +ठ¬ +w mi +ing Mode +Ġsub stitution +just ify +CLE AN +per ature +ĠL W +Ġun i +Ġro bot +I MM +[ ++ +tp s +Man age +md s +ag ain +Ġcomplete s +Ġnil fs +Ġ? , +orph ic +Ġ204 8 +get Layout +19 7 +B log +un s +prefix es +$/ ', +ct s +aW Y +su cc +Pod s +ĠCONF LICT +ĠIn finity +RO LE +Ġexp ire +(/ [\ +Ġman age +BIND ING +C MS +os d +Ġsl ug +Config File +Ġroot s +ĠCol lect +Ġprod uction +at ts +ĠN B +work queue +Ġpad ded +ĠPa ssword +ĠEnter prise +dr am +Bit Width +Ġprefix es +Ġpref er +C d +Y G +Ġf id +Ġ4 9 +ĠGL uint +ĠRuntime Error +us c +Ġs mb +set Title +buf len +May be +iz ers +OD B +Ġim x +Ġdist inct +Ġasc ii +F h +g uess +Ġ( # +Ġbreak s +ZX h +copi ed +N J +ĠA void +Ġat trib +ĠJSON Object +q m +Leg al +tr ust +ĠP T +'] ], +Le ase +åŃĹ æ®µ +o y +BL END +Ġf la +ular ity +Ï ĥ +Ġw ater +:" @ +å ¥ +Ġguarante e +Client Rect +pie ce +R ol +Node Name +ig er +Mo ved +B k +t len +LL OW +Y ES +Tra cing +b illing +Key Name +year s +ple vel +Ġsp atial +SizeIn Bits +æĿ ¡ +SCHE MA +T un +ĠG P +D c +event Data +trans lated +Ġsm allest +HAL F +z Y +Ġin b +data sets +ĠEx act +di rent +ad vert +Ġeffect ive +mult icast +k mp +document s +List Result +Exec uting +tr uth +read ystatechange +Package Name +ĠP E +Ġcol on +Ġdw c +Machine BasicBlock +Ch rome +Cont inuation +Ġsql Command +Ġ% - +æ ¶ +ĠI SCSI +Get Bool +) < +Ġm andatory +Ġif f +]) [ +Or Equal +F oot +M utable +set ter +Ġyear s +ĠTest ing +us able +per ience +Get Hash +VOL UME +4 17 +A o +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĊ +ĠM ore +": [ +Ġerror Message +sub class +quee ze +Ġ' '. +be low +custom ize +æĪ ĸ +ĠP MA +Ġout file +The ory +Ġprint er +GU g +ॠĭ +v reg +Ġw f +Un available +Ance stor +\ "" +In voice +h or +get Component +Ġwe apon +Ġrece iving +ॠģ +Ġns result +// } +is RTL +b iz +Ġ energy +ĠA xis +Set Name +STAND ARD +tr usted +ER A +Sup ports +s olve +ad vanced +Ġsm art +{ ` +IT AL +Status NotModified +åŃĺ åľ¨ +v cc +p I +get Simple +ro te +ff i +ĠN ODE +ĠP rop +ĠL imit +max Length +Ġub ifs +ĠBr ush +Stream Reader +anit izer +B IOS +lo red +11 8 +Ġbl ur +Tex Coord +E ar +Sub tract +Ġeff icient +J k +Ġb mp +cd c +Ġp ip +Ne eds +lp fc +e z +p S +Ġs olve +f ort +Ġp as +ĠI PS +){ } +N FS +ĠI MP +ĠM aster +Ġcol lected +Ġbound aries +D Array +ip ment +оР± +Ġwiret ag +pmlme priv +th an +ole d +attribute Name +@ + +Ġch k +UP D +DIS P +å¤Ħ çIJĨ +n Q +v ch +Ġd uplicates +ĠMan agement +it ored +ĠD ay +ĠIn line +rel se +Full y +M l +× ¨ +UT ES +af ari +Ġsingle ton +ĠS y +44 4 +=-=- =-=- +â ´ +ĠE mail +bs d +B RO +re ports +ä¸ ² +PH I +ĠId ent +y i +in cluding +lash es +Ġboot strap +') ( +Ġim ag +áĥIJ áĥ +u str +NE SS +Ġexp iration +Win API +D d +L ng +al con +Ġqu ad +е Ñģ +ĠTri ple +CUR SOR +INST ALL +$ ("# +L H +temp ted +rt s +HV y +ĠP HI +Ġr am +86 01 +IFI ED +D ed +group Id +PL UGIN +ĠMay be +A way +com bined +M ess +il s +ĠE T +Ġne ighbor +PL AN +. ` +M SI +ENC Y +c msg +e ap +let ions +in u +ĠS pell +? ', +J v +Ġ* ', +** */ +im ized +Radio Button +li pped +R u +éĥ ¨ +H andshake +D ER +ĠP ay +pa c +Ġon line +ĠT AB +Ġpage Size +End sWith +Ġemit ted +F k +P aste +MALL OC +RE SER +PRE SENT +OV ERR +create TextNode +obj s +ĠInt erruptedException +J A +J OIN +W ra +Window Size +SP ORT +')-> __(' +Ġmaint ain +background Color +åĪĹ è¡¨ +Read Byte +Ġprotocol Marshaller +C Ptr +s ales +ĠH ID +ĠCO LL +S low +Ġc sr +ĠS ound +(), " +N at +() ))) +Get File +ĠHAND LE +ì Ľ +Ġ: , +ĠR ename +sk u +d fs +and as +Trans ient +Ac cepted +Exit Code +Ġsov Generated +æ¬ ¡ +U x +q id +Ġo w +Sample OneOf +ĠT D +Ġdo ctest +HE X +éªĮ è¯ģ +A INT +k zalloc +Class ifier +Query able +U Z +Ġg arbage +IM G +ut y +mac Frac +embed ding +ĠM ongo +arn ess +ãĥ « +Final ize +cmd line +inher ited +C w +get FullYear +em pt +qu ares +ĠIter ate +Ġlat ency +æĶ ¯ +Un checked +20 6 +Ġtemp erature +Font s +C ourse +ĠUn ique +mo ke +Domain Name +get From +ML X +ĠCont act +Ġno uveau +Trans formation +pci dev +r gid +Size of +Code d +=' " +associ ate +x cbiAg +á Ł +vest ig +4 76 +b el +\", \ +ĠT F +! ', +ĠCon sume +ĠRE ST +em p +set Error +Ġg pu +for ced +). \ +Ġget All +.$ . +k ms +current Index +hw mgr +y res +AC HE +fb i +Execution Context +? ' +K W +String To +At tempts +AA E +Method Call +crim inator +de compress +Ġb la +ĠTest Utils +ring s +ĠMon o +ASS IGN +": [" +('/ ') +Ġlower case +ĠL ang +12 00 +Ġll c +Ġtick et +Adjust ment +an on +Ġtrans l +äº Į +c j +res id +GR APH +Ġhtml specialchars +MA JOR +Ġassert Null +Ġen ded +äº ĭ +c xx +Pro g +multip art +Ex pires +Ġ3 600 +ĠIn c +Pr im +Ġun checked +aw k +Su cc +ĠItem s +æŁ¥ 询 +/ ) +T Result +c ube +de b +ĠW here +Send ing +prec ation +Ġarch itecture +Ġ' >' +roll ing +ĠSt d +6659 7 +(" | +log rus ++" \ +ĠWh at +under line +G amma +Bad Request +k le +im mediate +ot s +Aug ust +decess or +ठª +Ġrout ines +F inding +j z +Block Index +Ġc ircular +Ġd istributed +IP Address +cr on +Hex agon +next Tick +Ġproto buf +V t +() ` +il legal +... , +super class +ĠDep rec +Ġreturn Value +Ġh t +sc enario +Method Info +Ġloc ated +ER P +Ġtag size +Ġms gs +contact s +ĠD om +State ments +Code Gen +ĠPer mission +Ġtest Set +chron o +g lfw +Ġt gt +PA USE +([] * +ne cessary +lear ning +Ġproject s +ĠCopy right +m Data +work ers +Ġlo t +è´ ¥ +pan e +cipher text +éľĢ è¦ģ +str casecmp +12 12 +åĪ Ľ +SIL ON +ĠCode Gen +Abb r +L N +{ ", +)/ . +Ġimplement ations +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Dec ision +y r +Ġn es +Ġm arshall +Ver ifier +Bounding Box +A z +Ġoper ating +ru ption +*\ * +Ġpot entially +BOT TOM +D on +S coped +Mouse Down +ĠDet ect +C ED +watch er +E lastic +Ġg ax +ä¿ Ŀ +J d +Ġcase Insensitive +Inter section +draw ing +deli very +Deser ialization +E Z +ĠRe pository +ms ix +Off line +Ġb old +ĠT ARGET +20 3 +ĠV ert +M aint +len ame +") }; +ĠR ate +Ġf write +Ġf ade +88 8 +Ġim ports +compos er +G rad +Bu dget +the ses +ĠK nown +Ġdi vide +r strip +ing u +Ġso on +. ; +A sp +M ER +UT ION +I OM +ĠA ut +Ġres erve +part y +J t +Ġg fx +Ġde mo +Get Resource +") -> +log out +ĠRed is +get OwnProperty +FF S +m fc +ĠS UP +An no +Domain Object +åĨ Ļ +E poch +de mod +di vide +_ (" +fd t +'] ( +tri e +j asmine +o hci +s rq +Ġst ops +80 8 +Trace Source +失 è´¥ +en sed +Un handled +ĠEx cel +get Section +//// // +Termin ator +ss ip +usb dev +P or +read s +ĠV olume +o sc +Property Type +ĠParam s +de reference +ĠC ms +Ġmo ves +SD Value +WE B +T TY +has Attribute +SP LIT +EN DR +Key Event +Client Exception +Java Bridge +R j +Ġs ol +bo b +Ġg m +=" ${ +Ġpar a +Ġaccess ible +hd w +Ġs aa +ĠA U +Th ink +97 0 +Ø ¹ +ĠL OC +/** \ +ĠI C +ĠB ook +stream ing +å Ł +į ä½ľ +project Id +THREAD S +th ough +fl u +ch allenge +module Name +Dis posable +r df +Web Service +ĠIO Error +dXJ u +R N +LINE AR +000000 01 +OLD ER +Ġ5 7 +THE ME +Ġf abs +ç¼ ĸ +ĠE UAP +B t +E very +Ġj int +un ordered +De ps +account Id +(. *) +[ , +sw f +请 æ±Ĥ +get Offset +pre ferences +Rout ine +um a +Ġw ifi +the ad +Ġs pu +St ores +est er +lev ation +Ġm ess +To Remove +Ġj peg +Test Result +AA AC +9 05 +A bove +Ġ*/ : +Up Down +=' ', +Found ation +un iq +par sing +Ġm w +ĠUpdate s +imp orter +Play back +Ġt om +ĠP OWER +ĠScroll Spy +OutOfBounds Exception +Ġcon struction +26 5 +U z +mp l +Ġstr dup +Ġb log +IN ER +Ġpro x +set Id +Ġcon sum +ĠO MX +=" "; +... ") +V h +Ġ64 0 +ĠV S +ĠPro vider +w string +GetType Id +eli hood +c ifs +co ex +ç§ ° +r usage +DB C +Bus iness +id en +S in +ĠC AM +Last Modified +Q i +Ġ1 10 +tw itter +DAY OF +wa iter +G k +Status Bar +Set Up +cp umask +ĠCR YPTO +V ENT +NE ED +m ss +ĠS G +Ġtr iggers +03 1 +Has MaxLength +Ġlock ing +Ġlang uages +J u +is Debug +str str +AR N +Prop hecy +Ġenumer ation +E FI +Animation Frame +Ġclick ed +ĠSp rite +q w +ĠP df +success ful +0 123456789 +P g +Msg hdr +ID C +"] ] +ĠGD AL +ĠH P +Sim ulation +Ġincrement al +ps b +Client Id +self Closing +Open ed +clk s +Fac ade +Ġc q +Ġmark s +Ġg yp +ĠD imension +14 8 +Ġ" .. +(?: (?:\\ +eX Bl +E I +ĠService s +ĠInst ead +ĠSyntax Highlighter +N AN +ĠS SH +Vo Bean +X f +Ġe igen +No Such +pri or ++ . +o va +SC ROLL +éĩ į +pv t +real path +Sort Order +Real m +DESCRIPT OR +ĠH OST +Iter able +Ġproduct s +ĠC SV +Un load +are Equal +U mV +ĠF M +Ġx i +Pa used +ĠM apping +ĠPr imitive +Y ield +u info +get Function +get Decimals +Ġutil ity +Ġof ten +CT S +idi em +ĠOper ator +Ġu a +\\ / +B z +I STR +IS HED +anag ers +FD C +r at +is ite +Ġt a +get Buffer +ĠInter val +C AR +G t +c ck +Ġs pacing +get Service +ign er +Ġ5 3 +Ġinter pret +ak a +Q ix +h ouse +bu dget +start Index +Q M +Ġp fn +ul ner +put c +Ġget Decimals +("_ "), +" +DAYOF WEEK +Ġ} \\ +Ġ" << +ĠCh unk +LAY OUT +1234567890 1234567890 +g res +à « +ĠTR I +S ITE +Node List +ĠP CM +ĠB L +VM Image +, )) +ĠL ower +sing ular +Ġ'\\ ' +M ob +e on +Ġcontain ers +vn ic +åĪĽ 建 +Load s +Doc CommentHighlightRules +Ser ve +Ġcode cs +Pre pared +gICAg ICB +close Text +Ġac quire +ãĤ ¤ +MULT IP +elding en +C ancellation +c ia +h andshake +ms v +J I +Ġb id +Ġset Name +P IC +O bs +W t +De veloper +u h +pg d +ĠState ment +ANG LE +es ize +ĠNDB T +ĠR AM +open ing +Ġcapture d +æ · +Ġx dr +Ġal ternate +FA M +Border Style +n printf +o h +ĠS CTP +list View +04 34 +ĠAgg reg +ot ype +Ġstr toupper +Q A +W hether +W arm +tx d +/ ), +Ġf uzz +Bar rier +Validation Error +* (( +mark ers +ĠNot SupportedException +|\\ - +O w +Ser ializable +147 48 +collaps ing +S LA +dd ir +J a +pol ator +F RE +Ġe i +Ġ++ ; +pk ts +aut os +Succe eded +M ip +im a +OM P +Ġ'" '; +Particle s +MP T +]] : +. = +04 31 +Ġgsp ca +f at +à ² +Ġg zip +Ġar ia +break point +HJ vc +" !== +Ġp te +(" ; +ĠA bs +mouse over +Ġt enant +(" \" +Ġcontext s +ĠOB JECT +7 46 +Ġqu it +K K +Ø £ +qu id +Ġident ified +m Stack +s mooth +de velopers +Ġ' ` +state ments +04 38 +Ġprint s +Ġold Value +F IND +a void +i dev +Error Exception +Ġsup press +ĠCo unter +V ault +ar ma +OD M +cam paign +g ather +Ġf requ +next Text +havi ors +FIRST DAYOFWEEK +ç ķ +Ġs ufficient +ĠEx tra +site s +CRIT ICAL +ther mal +PRE SS +li ant +ĠTy ped +WEEK ENDR +WEEKENDR ANGE +j Y +j v +if r +ĠDep th +k in +mp z +RO UP +SK B +p State +ro d +13 6 +Rep licas +Ġct ypes +dif ference +un marshal +Test Utils +12 6 +Ġlist Of +Override s +str ained +Ġcre ature +PC IE +ĠSwagger Doc +le et +CT R +const s +end points +Delete s +Gr ant +ĠUP DATE +' }) +Ġ' .. +Ġon Create +ĠIn str +Ġ` % +Par a +c it +M ost +Stream Writer +ĠPro b +Gl z +Ġp icture +OT H +top ics +")) : +ĠArgument OutOfRangeException +H its +FORM ATION +Ġs mooth +ĠDE SCRIPTION +Ġinvalid Params +ĠGener ator +Ġm gr +(). ( +Ġsome one +ìĽ Ķ +ĠS u +p z +Ex amples +ber n +feren cing +Ġcon vention +to i +. '; +M UL +g allery +Ġre cursion +Ġe lems +buf size +CA LE +å¤ ļ +f abs +File Dialog +ĠC apture +sp dif +Ġbuild s +Ġw b +Ġw pa +ĠText HighlightRules +Ġdisp osed +a ffected +Ġw ish +EN CRYPT +Test Category +erm al +=" '.$ +"," ", +ĠThere fore +æĿ ¥ +ST ORAGE +ĠE igen +25 4 +trail ing +Ġ( [ +ER E +Desc r +cord ion +Ġ{} ), +car ded +get Action +ob serve +GF X +åº ı +' "; +u an +Ġs Log +get Form +ĠG tk +ĠV k +ĠPR INT +ĠN AND +block Size +Ġtoken izer +No thing +V w +r fd +Ġp Device +Ġ'* ' +R d +vb i +get text +sg i +6 56 +ĠD iff +signal s +: "; +g old +Ġnot ifier +Ġen tered +format ting +Ġq real +Function Index +finish Node +Am mo +B ias +Ġs mp +Ġe h +Ġex ceeded +ordin ator +Matching BraceOutdent +) ` +: \" +on error +Pro cesses +Ġsc anning +ĉĉĉĉĉĉ ĠĠĠĠĠ +LI M +is MultiLine +Ġ. / +OP S +19 8 +j l +Ġo sc +f la +Ġwhen ever +U an +ed ac +ĠFile System +ZX I +Ġpag ination +end p +Object Name +Get Key +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +k es +bo ss +f wd +Ġ/> '; +ĠComple te +ar se +Ġd ims +Ġdescrib ing +- $ +book s +Ġinstanti ate +a ight +x sl +ĠC ASE +eth e +N Q +ld r +man ent +×Ļ × +ss p +as array +Tra it +2 11 +all close +ĠB I +Success or +Ġtermin ator +Ø Ń +um ed +Frame buffer +Ap pearance +Ġconstruct ed +f pu +Ġst ation +//////////////// //////// +S ORT +ĠS pace +7 29 +M isc +Ġre duced +ĠF inal +Ġne ither +Sheet s +EL DS +Ġpr im +re connect +Add ing +Tr uncate +O CT +U Y +"] )) +Sub set +scroll Left +Art ist +ä¾ ĭ +ĠM issing +Ġassert s +AC HED +Ġscope s +Play list +ĠAV ERROR +et ition +SO UND +Site s +get Lang +) >> +h ad +» åĬł +Ġth r +Ġprevent s +Reject ed +æ¶ Ī +q ty +è Ĭ +pp y +af b +ĠAnnot ation +at an +lat er +ĠCH IP +D PA +end ers +ĠO BJ +Ġn op +cp uid +ĠHandle s +P Invoke +ĠÐ ¼ +MISS ING +re veal +Ġpro tect +face book +ĠTrans port +Ġp al +Ex ports +package Name +> ]* +k n +get Ndb +Mix in +SUS PEND +] /, +(' & +ĠF old +ĠMe asure +ĠF X +ĠL INE +Pod Auto +D AB +data s +ĠPro c +//================================================================ ========== +k ern +UL D +ĠQu aternion +Ġmat rices +on Error +Ġ% } +Test Class +Ġconfig s +A ir +Key Id +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +ue l +"); \ +str cat +ep isode +AC COUNT +)) ). +CR T +Can Be +d ropped +ĠL ight +mV ud +h alt +Ġis su +Not ifier +æī § +ĠFail ure +åĽ¾ çīĩ +cur ate +App Domain +Th ird +Ġtra verse +Present er +Ġlog its +Ġsup posed +71 10 +combo Box +RE CE +find all +SI MD +ãģĻ ãĤĭ +Ġ' +' +set Field +De ath +Ġevent Name +(* ) +à ¸ +ĠA cpi +Ġde leg +Exec uted +Debug Info +Ġc u +и н +Alloc ated +o up +Ä ĥ +Ġ Endpoint +j me +SETTING S +I w +m ol +em b +Pers istence +J PEG +ĠF older +ha ir +è¯ ¯ +hier archy +inter net +Require ments +ĠS N +ĠADD RESS +á º +ĠH y +Over lap +Ġp Data +QL atin +IMP LEMENT +Ġe ax +Start Element +z n +Ġj am +AD J +XG I +ĠBo th +] ') +th metic +Hash es +Ġ1 00000 +PREC ATED +Ġto day +b Is +Ġt tm +Ġslice s +Ġmult icast +L ifecycle +Ġsh rink +C ron +G REEN +15 9 +embed ded +glyph s +Ġh andshake +Time zone +Ġcol lapse +ĠRE S +VALUE S +Ġbase line +ĠGe o +V ud +Ġ ushort +is Undefined +set Max +na am +p C +ert ia +Exp orter +CO ORD +Pred iction +arb on +S PR +m ess +ĉĉĉĉĉĉĉ Ġ +Ġ'/ '); +qK io +T OTAL +c ml +Ġp Item +Ġset attr +Ġstr totime +06 0 +Ġbucket s +B d +Y AML +Ġ ------------------------ +// -------------------------------------------------------- +Ġd ock +ab r +ac curacy +instance of +Xml Node +n sp +p Sheet +Ġ" ?" +Ġto pology +Ġany more +Http StatusCode +trans lations +Imp orter +A ware +H h +ro bot +il ers +E J +length s +be red +ĠH i +f read +Ġst ale +F our +set Layout +Ġpre pend +æĮ ģ +å± ŀ +M w +ĠL azy +ĠRead s +ch ors +; / +r mi +AR GB +line Number +me ga +Ġstream ing +ur day +-- */ +ĠT B +ĠAff ix +R AT +in de +Ġ: ] +ĠIN FO +ĠS MB +Read File +Reference d +remove Attr +Ġauth enticated +Ġleg end +ĠTI FF +os h +Termin ate +y ml +æ ĥ +ĠB G +Handler Context +CANCE L +Ġ{ % +([ ^\ +transition end +ĠMI ME +1 00000 +track s +Ġassum ing +s mu +Ġce il +j t +List ing +ev sel +PROT ECT +g J +LAN GUAGE +^^ ^^ +I toa +Check point +MD P +Ġext ents +Ġeas ier +Column Index +Ġex ceeds +áĥ Ķ +LO AT +W m +lo ops +ĠL M +active Target +R b +ĠU ses +Ġas sets +Attribute Name +Graph ic +le ast +is Defined +Ġh its +Query Builder +åĩ ½ +æī§ è¡Į +M ongo +at o +ĠM ix +Exp ansion +ĠD etermines +Sc aled +Ġprint ing +focus in +]| [ +f lt +ĠOUT PUT +set Is +iter items +*/ ); +Dis assembler +dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd +Ġn id +ip ath +ĠB ASE +аРº +o ber +Ġh ist +AG ENT +reference d +ĠInput Option +analy ze +æ² ¡ +Ġs ynth +Document ation +instruction s +Blue print +æĵ įä½ľ +64 0 +:" '", +Ġdig ital +ĠWord Press +error Response +ĠAdd itional +Match ers +ng x +Effect ive +Week day +k h +em ap +to Object +auth ors +Ġrout ing +test Case +port ion +ĠFile Utils +ĠSource Map +X L +] ") +Ġa cl +ĠSe gment +Attach ments +ĠK ernel +id ian +Array Buffer +NO W +æŀ IJ +ĠN F +Or More +? [ +Ġcmd s +Ġpe ak +( ...) +/ \/ +N w +RE TRY +se verity +ĠL ow +Ġbus iness +Priv ilege +ad ic +Ġrep orter +New object +Ġencode URIComponent +id ers +Ġ// } +Ġround ing +t st +ĠT drError +Ġj avax +Ġconvert ing +single Line +Abb rev +)? " +MG MT +Ġsem antics +ĠAv ailable +Auth enticate +ĠY A +ĠAnal ysis +, ", +A UX +U o +Ġg lsl +ĠP NG +par ity +Dis c +S HE +b es +get Host +Ġco in +in x +Col lapse +Ġb az +MC U +termin ated +G AC +ĠTA SK +% " +Ġprint k +gl m +prev Text +è®° å½ķ +m ong +ur y +SA MP +If Needed +Ġgl m +Ġde structor +Ġre cognized +Ġ}, { +Ġq la +ed id +Cycle s +get env +get AbsolutePath +ĠP G +By ID +find One +13 1 +Ġsin on +M aker +R g +Ġa u +el ix +Ġfunction al +Ġse em +k c +gl Get +ภĻ +got iation +2 18 +Ġv ch +05 00 +åº ĵ +Sem antic +åĩ½ æķ° +get Minutes +]. [ +Ġx mm +Syntax Error +nod oc +Event Source +Oc cur +XXXXXXXX XXXXXXXX +P cd +y ii +Ġsh ut +Internal ServerError +åŃĹ符 串 +] & +ĠĠĠĠĠĠĠĠ ĉ +ĠIn crement +write reg +Ġcol lector +Ġi om +Con sume +Ð ľ +ll Get +ĠQ wt +Ġ ENT +Ġp layers +Ġtest Case +dis covery +Delay ed +Soft ware +Base line +Ġdecl arations +ĠP refix +}, _ +PIN VOKE +################################ ################################ +G ATE +R p +is Number +Ġ5 4 +Unmarshal er +åIJį 称 +Tra ining +d amage +ĠA TH +ĠOS Error +Test Runner +First Child +ĠST REAM +or ian +AL WAYS +GE TP +Ġapp s +Relative Path +utr al +re mainder +ib rate +Ġdom Map +Ġvo Collection +State ful +ĠSe lected +Sl ug +Ġsom ew +DESCRIPT ION +Tra cer +tr av +ĠCon straint +Mock ery +SQL ite +tile s +============ === +Ġke pt +strl cpy +( [$ +K Y +n do +de tection +bu gs +ĠM ultiple +SC ENA +Calcul ator +is Error +(' __ +inal ity +Hash Table +foc used +lin enum +ĠA SC +xuICAg IH +ĠA CK +ĠD ist +"," % +pc ap +Ġeth tool += [] +i oremap +Ġt g +get Raw +mo val +hy per +T l +Ñ Ĭ +Ġmsg AndArgs +UD A +set Item +rc mf +WOR LD +Ġdiag onal +V a +Ġmin us +{} {} +ĠMake Scenario +ĠMakeScenario Flags +Ġb pp +da o +limit ers +åĪ ¤ +" &&( +Ġnot ation +ĠG V +ick s +s ms +): ( +ĠString s +G H +Ġa z +ĠS ide +folding Rules +F u +Ġle aves +Ġi ps +index er +Ġ' ~ +In complete +ĠS AX +ĠQ Rect +Ġoptim ized +"," . +æķ° ç»Ħ +h its +v node +y un +if Error +ĠS csi +17 9 +ppos ite +× IJ +Ġc err +Ġfind ViewById +200 5 +ĠBu iltin +GROUP S +ĠConstant Int +14748 364 +From Value +19 3 +CS Function +000 3 +40 3 +ĠOr iginal +schedule d +Ġsucce eds +b rowse +| > +Ġt rie +hy ph +Qk FB +Ġd u +ĠD ial +mark et +p Info +protocol s +Ġband width +re addir +Ġresult aat +.$ $ +MT U +Ġremo val +Analy tics +N avigator +] ]); +assertArray HasKey +z Index +Ġcon venience +Ġ20 16 +6 16 +d sn +st ones +(' + +Http Context +S AM +ĠR en +dimension al +g utter +in cluded +Get Default +ĠF inally +Ġinit ializes +Protocol Test +Item Type +y x +bb on +con verted +ma int +("% # +æĺ ¾ +Proc Address +F c +Ġth umbnail +R ates +Per Page +ep age +12 71 +AA D +Ret ries +ch ans +che str +Ġpublish ed +S ampling +Ġc ity +Ġp refs +Ġ1 99 +up d +Ġx p +P WM +ĠT REE +File Stream +Imp lements +outer Height +Ġrequire ment +ĠEN C +Walk er +g lo +Ġhappen ed +public Request +SY SC +full name +Servlet Request +de activate +Ġin herited +Ġh is +Com bined +"] ( +Ġh v +Ġgp Globals +L ife + Ħ +re main +ex cluded +:" < +Ġad j +SR V +Writ ing +All Types +mouse wheel +c ub +Con cern +Ġk rb +touch es +s In +Ġm ip +ĠD BUG +AP IC +file size +Ġal ive +Ġraise s +% . +R ich +s ong +Ġl t +A ffected +Ġbu dget +Group ing +phan um +Ġb ra +ĠG ra +Ġcal lee +z ed +ĠP ull +Ġon click +Ġpre ference +Ġinvok es +k mem +Ġs ingular +ĠR ew +00 04 +PE ER +D og +S aving +ĠA UD +ĠD em +istr ator +Ġman ip +Cmp Inst +) ]); +M v +S MP +St udy +OF DM +FIX ME +Ġs dk +ĠCont inue +cod ers +v tx +Ġdetermin ing +S team +Ġ[] ( +Sub scriptions +spe ak +16 3 +CH AIN +EX TERNAL +Ġinstall ation +Associ ated +34 5 +uc v +comm erce +deg ree +æłĩ çŃ¾ +Ġ èİ·åıĸ +get Seconds +element ptr +And Get +tra verse +н о +Ġ1 04 +O LL +Ġd ib +Not Equal +COM MIT +Ġ"' "); +decor ator +ĠTw ine +K D +s ures +v ram +'] } +gr d +Send Request +"/> . +ĠC RE +Ġstruct s +ld HVy +PL US +Pop ulate +ĠSec ret +Ġrespons ible +L ARGE +W s +Ġb ond +Base URI +Server Name +C CK +a ver +get Imm +Ġref lection +ital ic +Ġprod ucer +é ļ +(" "), +Ġ" )) +ĠReg ist +ĠKey board +Get Window +sub mission +Ġtoken ize +Ġshow s +dayNames Short +K L +PO SIX +Ġw Param +ĠC ss +Ġde velopment +mp ath +ĠM ult +From Parent +FA CTOR +tim ers +Ġ': ') +init With +run s +Changed EventArgs +sort able +ĠAl pha +ab ove +ĠUn expected +or arily +to List +ign um +ARE A +l uc +m oney +s iz +ç Ĭ +Ġa ir +Ġb pf +Ġup loaded +ĠGit Hub +: < +(\ ' +report ing +Ġtrace back +Ġwidget s +N vb +Ġfrag ments +Ġlisten ing +Ġdat atype +Ġ> , +CC C +(?= \\ +H al +ur sday +Ġl an +struct ured +Ġs ch +14 9 +aked irs +bu st +([ - +," ", +ĠWrite s +\"> < +Ġof s +ĠM utable +ĠDe veloper +Ġrad ix +ĠChar Set +Ġ"' " +Ġide a +ĠSub ject +Ġ Results +ĠT og +ĠG ROUP +Ġper ipheral +Imp orted +R am +16 5 +Comp atibility +Ġent ropy +Ï Ģ +Ġre curse +Ġbuffer Size +Ab ility +OVER FLOW +Ġa h +Ġh o +Ġde lim +ĠJ NI +jo y +auth ority +Leg end +L AT +To Map +SI Z +ĠValue Object +S b +qu enc +ĠF n +Ġlib raries +HD MI +Ġ âĢ +ĠR R +Ch allenge +ĠUn safe +Ġquant ity +Brows able +O H +ĠH ide +Write To +Ġexpect ing +ภ¡ +aff s +ĠA BS +Qu it +replace All +Display ed +Ġve hicle +t rees +soc ial +ICAgICAgICAgICAg ICAgICAgICAgICAg +Ġget elementptr +ĠI con +Auth enticated +AV A +Ġ') ' +ĠAd apter +ĠA p +add Error +| @ +de e +qu is +Set Item +PRO GRAM +gK i +* |\ +I SE +X FS +() ]); +col lector +ĠThe me +install er +S IC +Pro f +etrokken heid +ig a +ĠRe moves +DY NAMIC +g IC +To Add +DO CTYPE +/ ; +rom an +): " +CH R +tra de +END POINT +GR A +Gro ep +33 7 +Ġedit ing +OPERAT OR +ili ary +r sc +Ġm alformed +Asp Net +Ġ( < +//------------------------------------------------------------------------ ------ +one g +SI ST +}} ), +Ġl inux +Ġh ang +ĠNormal ize +Ġd ensity +De letion +Ġsh util +ĠID ictionary +get System +ĠArray Ref +WA KE +ĠEditor GUI +*\\ /", +Ġj q +Ġj shint +L SB +TW O +x g +read Line +Bu bble +Vol atile +ĠDel ay +C laims +p T +Ġf ri +Desc riptions +Tra ffic +lat itude +j un +Ġ" ../ +ĠO DM +ĠWAR NING +Ġassert Same +Ġdec ay +num s +Bl it +ĠRes erved +Ġeditor Cell +Ġpol ling +Ġend Row +ĠDE VICE +cycler View +K y +string Len +Ġhash es +indent ation +ĠCOL OR +monthNames Short +u der +on ym +ĠCL R +( .* +Ġde fs +Ù Ĥ +ĠT K +æīĢ æľī +C rash +ĠCom posite +vi ction +ĠF ilename +break s +Par ms +Ġmeta var +v allen +al most +Ġv cpu +up dater +S AT +get H +Con cept +ON TH +re y +Se quential +sk ill +Tag List +SU FFIX +rule set +HOR IZ +G Z +g ender +t sd +irection al +get Boolean +ĠGL int +get Long +err str +Ġnew lines +Ġ'? ' +ĠLD AP +Ġbeg ins +Ġclean ed +Git Hub +At Time +m illiseconds +u etooth +Ġ ë +ST M +plot lib +VIS ION +Row Count +NAME S +P j +st icky +te si +dom Node +Ġtip c +F lavor +al ternate +Ġwatch er +w af +ĠI FF +Source File +ĠRT L +ĠImport Error +n im +ĠE GL +Ġconcat en +& ) +ĠP ID +R limit +a ac +querySelector All + ĥ +Resource Name +s uch +pa che +REFER ENCE +d istribute +start Node +sub net +Ġsub mitted +ĠDE V +M idi +s weep +base Path +let ters +ภģ +cred s +Ġplay back +fto ver +J OB +\ ") +Ġr trim +pr m +Un def +sub dir +34 1 +Ġcancel led +ĠFUN C +N v +Ġg rammar +Ġas n +D IF +G AME +Ġch rom +Not SupportedException +sw ift +Json Object +æĺ¾ ç¤º +ĠU B +get Output +get Identifier +Data Row +Normal s +c rit +For bidden +Ġsys vicall +G Q +ĠG O +Ġdiv ision +Type Meta +ĠF ilters +out come +sur f +ĠDIS ABLE +S AME +ĠF igure +ma i +MI LL +gs i +ĠE VT +GUICtrl ListView +mime Type +æĶ ¹ +Ø © +Are as +Root s +G b +T ube +p layers +get Metadata +Ġd asd +Ġout going +ĠObject s +oo ted +Debug f +Ġvm w +P retty +Ġj avascript +PR IM +Width s +h op +ĠNo Such +interpret er +ĠC U +ĠIn ner +b cm +ĠĠĠĠĠĠĠĠĠ Ċ +Ġno except +en force +Ġi oremap +Ġ! _ +KE EP +ĠIN S +æı IJ +j Q +m Image +ĠV F +ĠCh art +ĠRel ative +æĸ Ń +cer pt ++ ? +ĠC riteria +ठľ +èģ Ķ +Ġn y +ĠL a +Ġ'< ? +ĠHttp Request +Detect ed +W i +w ol +Ġf etched +ex tr +'; \ +Ġsupp ly +Re striction +Ġline Number +dm Fy +ĠPU BLIC +(?:(?:\\ \\. +Ġr ds +sa f +Invalid OperationException +ONT AL +p DM +Ġst oring +open id +æ³ ¨ +H ARD +ĠPro pel +ĠNum eric +éĶĻ 误 +W y +Ġs andbox +::_ (' +Ġartifact s +f ish +create From +User Info +un icate +Get DlgItem +20 8 +è® ¡ +é ĺ +ide d +ĠReg istry +th rottle +get Info +19 1 +[: ]) +LT A +AG ER +head s +Ġallow ing +Xml Element +ĠLib rary ++ )\ +Ġat mel +middle ware +_ '.$ +get attr +==== === +Ġloc ator +Ġfind s +Ġmo vie +ĠBE GIN +c sk +(' // +RE A +amazon aws +D DR +next State +Ġex ceed +Ġdiff er +article s +; ; +H IST +ĠC RM +Ġl ic +UN DEFINED +Ġdispatch er +X aml +55 2 +Ġpatch es +set Checked +static Class +Ġden ied +H k +To Read +Bo th +Ġinter vals +ĠU DP +Sc ena +exp ired +Persistent Volume +: /// +print able +Ang ular +F AN +Ö Ģ +Ġtrans lator +Ġsys ctl +OPTION AL +epoch s +Ġ ing +Ġarg parse +cert s +A y +end o +Ġu dp +Ġle ts +Max Size +week Header +Table Model +G w +W Z +get Event +After Year +Î º +Ġ dddd +ĠP ublish +work s +M ux +S andbox +g log +Ñ ī +data Table +pr incipal +Ġmeasure ment +ä¸Ĭ ä¼ł +++++ ++++ +Un iversal +Jan uary +Ġfold ers +. ')); +R Z +Ġfor ced +Ġk b +RO UGH +Ġbind er +Iss uer +, ), +E ven +AB ILITY +IG lm +EX TRACT +4 096 +E quivalent +ĠR etry +Ġun def +\\ [ +t ur +Ġl bl +ah c +ic ount +In tr +set String +item ap +ĉĉĉĉĉĉ ĠĠĠĠĠĠ +IF IC +ĠWork er +U w +Ġc alloc +ĠB order +Ġfind ing +W Y +iss uer +Ġ655 35 +w ap +ĠR ooted +write String +è¯ ¥ +Cho ose +f type +r B +ç ľ +Machine Instr +32 3 +ĠL ists +ãĤ ¯ +Ġmultip lier +j ango +ĠT GSI +Ġinit ializing +S pl +Tem perature +Ġc ube +Header Value +Ġ7 6 +show Month +ĠPER F +f riendly +te in +get Attributes +Ġfor Each +Is AssignableFrom +ĠFI LTER +ĠC LK +Ġcon trib +ĠL CD +ĠCON ST +ĠE L +cl js +lu Z +ĠT PM +Error Log +50 7 +U h +W CHAR +Ġ" "). +ĠP rom +88 5 +b ang +n db +Ġv js +:" ("+ +av x +Vertex Attrib +æ ¸ +04 2 +ç¨ ĭ +on a +DE CREF +аР¹ +T errain +data Source +IN STR +Ġ" ', +ĠF all +auto complete +ãģ ¨ +BL ACK +)|(?: [^ +Ġm obile +Pur chase +wik ipedia +ĠH ook +AR K +AB B +Ġ(* ( +pol ated +nv ram +Ġcorrespon d +Ġm pc +24 5 +æŃ £ ++ $ +s fp +temp orary +Wa iter +Ġm secs +get Constant +b ins +or test +Ġg a +dif ferent +PInvoke Callback +C Z +T v +Ġc redential +Ġno Method +Cod ing +! =' +S i +Ġh istor +IT OR +Mono PInvokeCallback +X Q +Ġc art +ul ates +Ġre corded +(); } +ĠC ert +Ġget Num +Ġget Next +Str ong +09 00 +E AP +i io +ĠS SB +Tr usted +Ġper mitted +Ġcomp ound +äº º +showMonth AfterYear +get Entry +Ġw d +Ġl f +SS I +ĠDE LETE +Over view +P ts +id o +Ġb aud +node Id +ĠK ill +Exp lorer +blk no +Ġdiv ider +-* -* +ingu ish +T CHAR +Ġre lat +Ġr ates +fp ga +year Suffix +D up +K H +ĠSt ub +ĠGL FW +I v +('. ') +ĠCustom er +KT tcbiAg +(?:(?:\\\\. )|(?:[^ +d os +Ġnew er +ind s +object Manager +mark ed +ĠQueue WorkItem +ĠAli as +amp ing +Packet s +:"\\ /\\ +S ight +Ġ" | +ĠP ART +Ġbo ther +open ssl +)? ))| +Ġv ote +Ġint StringLen +List Meta +Ġlist ing +ĠEx tended +ĠCom mit +Material s +\\\\ ])) +s lab +Ġh ci +eth ost +CODE S +^ = +re map +ĠF ade +ENT S +ĠMA KE +Send ContainerState +Ġhton l +j st +l atch +Ġa e +Ġa ce +ĠPre vent +Ip Address +L ights +Date s +ĠCON NE +ĠBo ot +ut er +ab cd +l ba +St rength +") ?" +temp erature +Ġpr ime +Ġs implify +read FileSync +Ġan no +ms b +[: ], +Perform ed +$)/, "" +Ġ ÑĢ +Err Invalid +U O +x FD +é Ĵ +ĠD SP +'] ++; +ll c +current Page +an onymous +ĠIN TER +CHAR ACTER +st udent +HT MLElement +NO S +ĠGet LastError +M x +f T +Failed Exception +ĠEvent s +transaction s +WV ud +Ġpartition s +Ġrepla cer +âķ IJ +R tc +{ \" +Com bin +DE TE +cont rollers +Assert ions +96 0 +cred its +Ġsil k +Supp lier +ĠX M +serv ations +f ram +Ex e +pro filer +64 4 +ب ر +çĬ ¶ +ĠF inish +ĠL Z +ĠH o +Ġgroup ing +ãĥ ĥ +åĮ ħ +3 01 +E ps +Ġg z +ĠG ui +]) * +UN ICODE +Ġ"/ ") +FI ELDS +ĠUn able +Na am +get Debug +ĠD D +log file +md l +Ġco ef +K F +S s +Ġc map +Ġe ap +ĠD M +dig ital +Scalar s +Ġcard s +åIJ Į +æµ ĭ +SC HED +mouse enter +E r +E w +P NG +Dist inct +k ube +æ Ļ +ĠAct ual += /^ +To Upper +trans mit +)) / +RA DE +perform ance +W IFI +in em +qu o +Set Text +ĠU V +Ġactiv ated +æ £Ģ +ur o +Ġpro duces +Response s +SH OT +Null Value +Ġ' '), +ĠM etric +Ġlong est +ev list +Work book +a ic +Ġ2 40 +Ġtoken Base +30 5 +right s +Pro x +ĠR uby +Ġset Value +T ween +End Tag +14 5 +card s +at tempts +Ġl u +String IO +Wire Bytes +w sdl +sc ache +15 6 +tc G +Lua CSFunction +> $ +Ġpre ferences +spin ner +Host ed +Instanti ation +\ - +LE SS +Ġover written +ĠPri ority +in ci +get Description +De cember +Style Option +оР¼ +t ic +co w +Tr iggers +4 22 +Ġm thca +ĠAb ort +Ġ" ` +ri o +Ġ@ _ +ĠUp load +Set Id +Ġpar ity +inter polation +Ġn u +Ġin active +ĠE very +New Decoder +ĠRE SULT +LIST EN +Round Trip +c str +DE AD +Y k +c M +s li +Ġ* ); +09 1 +Mark ers +U d +te s +Ġpred icted +Ġbranch es +8 75 +u ZW +Ġd ic +set Status +Ch arge +min i +ED I +User ID +Ġfloat s +V j +sign er +ĠTh us +Ġstr r +ĠSpec ifies +b q +l is +à ¥ +lo ppy +list dir +ĠJ PEG +25 7 +ĠHR TIM +Ġl it +ĠM ultip +back ward +IP lus +Top ics +Ġav ctx +Aff inity +ĠP N +O A +Mark et +New s +Bracket Block +PROD UCT +L u +Ġ6 6 +select All +Ġside bar +ĠPred icate +REPL ACE +ĠC RL +04 43 +н и +MO UNT +" || +p Player +Ġf resh +={ ' +S pline +n Dst +IC R +CR TC +xff fd +Press ure +7 134 +ĠMethod s +pgs ql +K MS +i ra +Ġd ispose +UN IX +TO O +Fold Range +Ġenable s +\"> \ +p do +Ġ* __ +Ġhe ading +DI AG +ĠBr anch +N aming +s om +st rerror +Reference Equals +AF TER +T pl +m z +FP U +Vi olation +Ġsit uation +pro cesses +SU ME +long itude +Addr s +Ġsur rogate +ĠD er +Ġby pass +Ġrep lica +à¤ Ĺ +Byte Size +scri bers +te le +bl it +if a +Ġv k +ĠI IO +Un register +DIS K +1 000000 +T z +Ġm Path +get c +ĠRe quire +riev ing +TRUN CATE +re ement +Ġp trace +Ġr n +getComment FoldRange +B ATCH +Esc aped +O verr +data store +Ġ(" \ +rep lica +UL AR +em ployee +Query Parameter +LOG IN +b relse +ĠQ uest +ĠWe ak +Ġv l +ve mb +SO AP +Ġfold Style +Ġ% " +Drop down +Mail box +W Q +m cs +Ġf ft +read b +OWN ER +x FC +IG V +Session s +GV z +Ġpri o +Ex press +00000000 0 +hd G +plan ation +zz le +BI AS +C ertificates +get Label +get Display +DB L +DI ALOG +F uzz +end Time +ann o +GV k +ĠFORM AT +2 12 +d ue +ul filled +ile ged +BL UE +depend s +Ġin vol +od ate +\" />< +te ardown +ĠI MAGE +Comment Start +ĠM essages +ĠF lash +32 32 +require ments +can f +ĠWh ile +Opt imize +read Only +ust um +Service Exception +Ġdraw n +Aut omatic +Ġ$" { +Ġre versed +base s +ym orphic +Q Name +U MP +v ap +Ġ& # +Ġview er +Ġio v +Ġp ure +RO UT +E CTION +n ano +ĠR outedEventArgs +riv es +14 3 +w ps +Ġq ib +Ġpro viders +Ġpick le +DE CODE +rint f +document ation +s ucce +is Set +Ġm tk +Test Shape +local es +Pixel Format +N BT +b ecause +ĠB IG +Ax es +Ġm es +Ġ'" ') +amil ies +Ġl ate +IZ ATION +m akedirs +ch s +: | +n of +Ġ[ ]. +ĠLinked List +B AT +() ' +Ġpre pared +abb reviated +* (?: +nes day +ĠSoft ware +èĬ Ĥ +an ded +add Imm +LI KE +Ġrepla cing +F ails +x pc +Ġsaved InstanceState +as String +ĠL ambda +sa ss +Ag ain +Ġoffset Bottom +Ġql cnic +) (" +l j +ht m +Ġan alog +ide ograph +void Elements +ĠQ Action +Ġrep lay +Link Id +DT D +7 07 +d ensity +() > +SA CTION +Native Methods +sy ms +Ġvirt io +Ġh Wnd +div isor +IS upport +ĠDO C +------------------------------------------------ - +å¹ ¶ +d bo +Ġ( ). +ĠT ech +aw ay +Expr s +Set Int +ĠE lastic +Ġz z +ĠHe ap +partition s +WINDO WS +Ġstr ipped +CL IP +UST ER +? (: +)) [ +Ġl un +tor ch +orph an +Ġf q +Ġn and +normalize Rules +% ', +D ont +le b +last Index +next Int +Ġtile s +getNum Operands +J avadoc +Ġd rain +API Version +Socket Address +So ort +wa res +ൠį +E QU +Ġt iny +:: __ +Ġdefault Token +Ġ5 1 +filename s +yy v +5 02 +A h +full Path +Ġask ed +T ier +Source Code +ĠMatch ing +PACK AGE +swig CPtr +F t +sk ew +Ġca ret +optim izer +\ "; +ĠEN O +s ram +at m +Ġ6 1 +--- */ +64 6 +Ġreport ing +o Test +un escape +prop Name +ser if +remove Attribute +ĠVar iant +Ġpartic ip +Ġtol ua +P et +Ġo auth +DE B +ĉĉĉĉĉĉĉĉ ĉĉĉĉĉ +Anim ated +Scena Index +P unc +m eter +Ġcon crete +gdG hl +Oper ators +Ga uge +ĠShare Point +c rash +Re cipe +ĠCan vas +ĠPart ition +4 80 +b ul +Ġn Src +) = +C n +N arrow +str icmp +Type Ref +Assign ed +Launch er +q dev +ar a +RE P +Ġtra ffic +F z +Test Results +Ġtag ged +MM Y +åı £ +Ex cept +Ġv ers +ra f +loc ate +P m +Sh ot +RADE ON +O dm +Y Z +p ly +Ġf luent +), ! +Ġare as +Ġact ives +ĠSh ader +relation ship +get Frame +ĠW ORD +ĠGet HashCode +CRE MENT +AMP LE +ĠdomainObject List +MET ADATA +V r +write ln +by pass +ĠEntry Point +ask et +Ġasynchronous ly +Ġb igger +ĠCon version +Ġaccept able +inter active +session Id +D x +Ġw ent +cess arily +Ġoffset Top +Ġconfiguration s +Ġ+ "]. +H ull +x hci +ĠAL IGN +åı¯ 以 +k ick +w est +} `, +í ķ +ĠC lip +Record Decl +icon v +ĠSQL ite +E U +K M +Group Box +Ġturn ed +4 29 +P AL +b cc +For Key +ffffff f +F ID +=/ ^\ +Add Refs +Th u +ठ¦ +C ake +H ref +Ġre le +Ġe of +IN FORMATION +ĠO pts +STD METHODIMP +ĠD r +In gress +ĠL IST +pr s +red o +aa bb +ar ith +ce ph +ex tras +"> [ +ĠH ard +Ġroll back +RES OL +YA HOO +PFN GL +Ġ" )); +ERAT ION +re wind +Ġ8 6 +13 8 +convert To +B SS +D u +Un ity +Ġy a +}} \ +DI RECTION +66 0 +ä½ ĵ +get Day +SE CUR +Read String +@@@@ @@@@@ +ĠSk ASSERT +R CC +â ĸ +Ġ% [[ +a decimal +Ptr Ty +Ġbuf size +Ġanaly zer +] _ +c aching +Ġm igrations +he artbeat +Imp lement +и Ñģ +Ġ'- ', +effect ive +ĠDocument ation +am i +Ġa head +K ore +ĠP ol +ĠP EAR +SIGN ATURE +Gra vity += #{ +A mt +C BA +c raft +== - +ĠM R +'] ). +new Line +TU AL +Ġp ins +user Data +K HR +Ġ" }\ +Ġg ate +Ġf ee +Node ID +13 3 +Domain Factory +Css Class +K lass +Remove At +Ġsearch ed +ALI AS +z k +ib a +tra ffic +Selector s += < +Y n +Ġd to +ĠM SR +ID ata +Part ner +ĠRE SET +LLVM ValueRef +calcul ated +q x +IC A +Ac cepts +Ġmiddle ware +E SC +ĠB TRFS +Co efficient +px a +vok er +- -> +F AD +Q B +W G +se x +,"% ": +FI RM +Line Indent +ا ر +Ġprece ding +ĠM otion +RO ID +at ime +36 8 +ĠCH AN +H ive +=' .$ +E MAIL +N IL +pp tr +Read Line +Ġgroup ed +Ġwork sheet +ĠPO LL +Ġs ong +ĠF i +Ġbe acon +Ġalloc a +pZ iA +Ġtun nel +K P +m delay +comp ilation +BB D +Extended Property +abcdefghi j +PodAuto scaler +or i +Ġs light +ĠS orted +:" (?: +19 6 +ĠCh rome +IH R +U Char +ĠC he +group ing +m us +(' > +Ġneed le +ĠCh at +Ġsession s +adr atic +", '[ +ĠT LI +ĠB in +04 1 +ĠAl gorithm +ĠIP PROTO +åħ ¨ +ĠB its +ĠH ead +inal g +Ġser ve +cor r +m Context +p ct +Ġc as +ag p +Ġx f +Current Culture +Alloc a +ä¹ ī +f ilt +olid ay +fld El +de que +Version ed +ĠOpen Layers +\\. \\ +Prefix es +at ively +I OP +is Loading +int illa +T ray +Z nVuY +z f +lo ded +ĠGet Value +NE LS +touch start +æł ¹ +ĠCre ature +M otor +O I +ĠF x +moo thing +on th +18 7 +Find Property +ĠYA HOO +ĠC v +." + +ĠMon itor +ĠGu ide +J j +S oc +Ġm ol +ĠF lat +SI VE +Ġparams Array +Ġ}) (); +anit ized +S mooth +(' ; +ĠR OM +ĠRe member +Image List +19 70 +Machine Function +Ð IJ +Ġ Enumerable +mp y +77 5 +Ġdown loaded +Ġown ed +Sq rt +J h +Ġc w +Ġver ified +åĿ Ģ +Ġscatter list +Ġtest Runner +Ġpre cedence +USH ORT +present ation +é¡ ¹ +te gra +7 000 +s Type +'] = +ĠG T +Ġtrack s +/ "+ +é ķ +pre load +PER MISSION +æĪ ij +"}] },{ +2 30 +E lect +c andidates +n X +pp p +msg len +TER MIN +ĠStr ip +< \/ +Ġre view +SSE S +ut ors +ĠI CMP +Over write +GO OD +ĠM Hz +Ġnode Name +55 0 +PER F +sock addr +expression s +adjust ed +Ġsem antic +F ramer +bu bble +Ġget env +on Change +Ġi ce +Ġdo Test +Ġk mem +Move Next +ri st +ĠL LL +06 34 +Ġ] )) +20 7 +little fuzz +ge v +ins ics +SA pi +WORD S +MonoPInvokeCallback Attribute +SECUR ITY +ap hore +Ex c +Back off +exec Command +Ġattempt ing +Get Parent +ĠFI ELD +!= - +h ape +on Click +ĠD LL +Ġar ith +Content Length +cap able +PRE D +Ġvariant s +Ġanaly ze +it v +Ġ$ (". +PR T +Bad WireType +I k +[ -- +ĠC GM +Set Active +SD IO +Pr ime +VR AM +g data +Ġl atch +has er +Profile Id +ا ÙĨ +direct ives +Î · +ĠV ID +Lat itude +u dd +Ġf out +ORIG IN +ĠL C +source Root +Ġshow ing +Syntax Kind +Ġ} )( +ĠT EMP +raw l +Ġdef ining +Ġmove ment +AutoScale Mode +ĠM IB +ĠB US +fe b +Ġtest case +xD ol +Analy ze +ĠW H +YX I +D ensity +l arg +ĠC TL +Ġic mp +emo ji +M p +n interface +Ġe en +Ġro unded +i ot +pr t +stat uses +Proto buf +Ġbar rier +Ġauthor ized +a el +Ġb ins +cap italize +LOG GER +ĠVis ibility +Ġoct et +h ighest +out l +auth enticated +host data +TI LE +=$ ( +Ġн а +G ING +{ }; +ap prox +Ġ@ __ +Q p +][ : +MP TY +33 0 +e u +ax e +App ointment +Internal BadWireType +ask ell +Lookup Instance +p buf +is Checked +Ġin ventory +I y +W o +Ġdata Source +arch ical +25 3 +ĠPre v +ĠWait For +ur bs +Ġm wifiex +get UTC +li able +find All +Pag inator +ASS OC +( ~ +Ġf v +Data GridView +Ġle ader +LOCK ED +ĠT P +Set Context +pl d +ĠC Log +:" ( +atom s +EB ML +Ġhd mi +ĠS CI +Ġtr usted +ĠH istory +Ġcount ing +HORIZ ONTAL +In active +In serted +Ġst amp +fo ps +ĠW rit +ib dev +uc ing +CG M +Ġn avigator +ĠIn te +06 7 +err code +ĠD ense +eth tool +=' $ +MAT RIX +8 001 +abb r +éĽ Ĩ +sc c +06 6 +/ < +ri de +bb ed +ĠT ermin +sub device +FAM ILY +m clk +ĠN R +Arg b +as semble +be led +аР¼ +C decl +um ing +ile stone +Get Float +cache Key +ĠSh utdown +b mc +p ctl +Ġg f +Key Pair +Ġmultip art +ic a +lt as +Ġback ing +ĠTrans ition +ĠPh one +Ġ' // +loc ities +ĠH AS +Ġ6 2 +DB D +Event Id +AA BB +Ġprop agate +Font Style +Ġindic ated +Add Item +Ġsub scriber +æĶ ¾ +ĠO MP +EM IT +Ne arest +Ġdec ision +FL AC +Ġct r +DAT ABASE +d ce +r me +la ch +Ġin clusive +Ġres idual +ĠGet Current +selector s +ĠPo ssible +D raft +F riendly +f rozen +To Use +re order +Ġpa used +RD Y +APP END +? ! +Q Text +h aps +Item Count +Ġca ref +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Log Entry +=' % +VB Info +8 64 +J L +se ud +Ġm ar +Ġin fer +RE PE +Ġon Error +ĠQ Size +Core OS +M IS +p info +tr ial +Ġex press +tesi an +L UA +P ING +ĠA ctor +PE M +Message Id +client data +17 7 +] ` +Bit Cast +Ġfix up +A an +get G +client Width +Mock Object +*)( = +) ]. +T ID +U Long +c ule +l psz +ĠS WT +ac cepted +02 00 +)( \ +ĠT k +IN O +user Name +cv t +Ġout s +Ġnormal ization +getNdb Error +ĠM PT +ĠG TK +ne arest +Ġcor rection +PL ACE +get Resources +ĠP ool +Valid ity +Rect s +Ġp ul +In Out +ĠP D +HE S +Ġ6 8 +Ġperform ing ++") (\\ +clock s +Ġidentifier Re +Ġfeed back +ISupport Initialize +Ġ{ // +Ġop us +v L +factor ing +th dr +or te +ps r +Config ured +bern ate +ĠRel ation +W AL +] << +n P +v y +of dpa +н а +aut op +ĠC a +ID ER +hide Modal +ĠMy Sql +Gu ild +pref etch +Comm unication +U y +m buf +Session Id +Ġsp ans +Primitive Type +00 20 +lic ated +Be low +Ġoper ate +bi B +white list +L ost +ĠG ive +dis count +ĠTest Runner +er mios +(' = +w cm +Ġl dap +var name +33 4 +W ATCH +X l +ref er +Function Name +lear n +V c +a io +u DF +Ú © +Call Options +Ġcomp utes +socket s +ighb our +I gn +h am +j vm +NUM ERIC +Ġ201 7 +ĠT W +ĠF LOAT +Ġmin imal +dict s +] < +a Glz +lic enses +AL ERT +local Name +sd s +ac ct +URL s +XML String +Named Item +pod s +ĠAre a +ĠTog gle +] ","", +Ġf tp +od ata +Ġtest er +Ġauth enticate +Ġour selves +Utc Now +ĠM et +View Translation +Ġrelease s +ĠD bg +S am +T rap +h eld +Set Window +ĠIn tern +vid ing +Ġ'= ', +]","", ,"", +Ġt pl +RD ONLY +Z F +Ġre build +ol ded +vi es +Not Supported +18 1 +Ġstyle sheet +h read +get Configuration +ĠV R +comp ound +ĠD IR +key press +File Exists +do ctest +Ġusers pace +Jul y +2 80 +J H +K b +æ » +ip er +Ġbu fs +sock name +dif fs +VERT ICAL +S vg +T DR +\ * +st v +qu iz +reg val +Int Value +|[^ | +à ¼ +è ¨ +re cted +23 5 +CONTA INER +Cont rollers +Min Max +split Container +ĠSer ies +tn l +ĠUN USED +к а +STAND AL +O kt +c st +get Record +29 0 +Build s +ĠWIN API +trac ing +prediction s +eder ation +Key Code +Ġ'" ', +Prob ability +N ick +ra ster +from String +new Request +M is +T c +ĠM SI +var iate +Ġget User +BU CK +style Behaviour +Work ers +AX B +nav bar +Flat ten +", "" +qu asi +ĠCon n +Ġbat adv +a ead +Ġprefix ed +Pers ist +. */ +w mb +ĠD ynamics +Get FileName +PH ASE +) $/ +ud f +New Value +Assert s +INTE GR +Ġe a +Err s +Pro tect +Th ickness +associ ated +æł¼ å¼ı +C AD +G fx +m ismatch +Ġf ence +Ġin form +Ġpoint ing +ĠTop ic +p grp +Ġ? >" +Ġ9 7 +"} ]} +Monitor ing +ĠIter able +Ġc amel +int errupts +dd c +Set Attribute +Inter polation +loop back +Ġangle s +F light +s ar +() }), +get Template +Append Format +ĠIRQ F +Q I +Ġg one +Ġmax len +pad ded +h ose +ĠJ o +ĠJ VM +so lo +w ar +ve hicle +mp u +Col on +LO UD +... ' +S print +ser io +ĠCon d +Ġra ster +Ġam ong +IMP LE +! [ +in variant +Ġcon tour +AG C +zd GF +chieve ment +\\\\])) *? +P ot +e es +h uman +Con versation +ĠO ur +Spec Flow +Å ¾ +ĠD H +? \\ +Ġre pl +Ġse verity +Ġ'{ ' +/ ') +le ader +Ġm ysqli +ĠB PF +VM X +ss canf +Ġm g +Local es +soft ware +Ġtransform s +ĠSpec ify +çĶŁ æĪIJ +32 7 +start Date +nd x +æ· »åĬł +ans wers +Rel ations +am s +Ġg sl +Ġr ating +13 05 +å¯ Ĩ +Ġee prom +ert ype +ĠA ng +Ġq h +([" ../../ +) +' +R n +i adic +x code +Ġn h +Function Type +Ext ents +ĠST D +ĠCall s +Ġp ev +__ .'/ +]) } +ank s +Post s +ĠOpen GL +synchron ized +B c +J r +Ġt n +fs l +ĠList en +Ġpresent ation +L et +Ġo x +ĠN ested +DI E +get Project +Get Position +ĠDep loy +] =" +ĠS tri +(? < +Client Conn +UND ER +TAIL Q +O Y +_ ), +Ġ ew +!! ! +p index +Ġvalue Type +>> >> +ĠUtil ity +Kore a +R w +è ī +Ġex pose +Int ensity +Start s +ĠReturn ed +uff ff +Web Request +Ġtemp file +Sp inner +èĢ ħ +ĠP IO +no se ++" +S ynth +c flag +ĠP hp +Show ing +pp d +error Type +Out going +Box Layout +Ġca ffe +Rep lay +F avor +Ð Ķ +oc s +Ġset Id +ĠIn f +Pers onal +get V +Ġst ay +ps i +没 æľī +end ance +Ġpackage Name +Ġwake up +4 30 +Ġr an +IN NER +I WL +q f +ĠP in +ĠL S +Sc r +Ġad jacent +Ġok ay +Febru ary +Ġh da +Ġ/ [ +inter op +block Comment +Ġ rom +Ġs plits +Ġv d +Ġep isode +st ick +Ġre connect +v u +Ġa ssoc +Ġqu iet +('/ \ +' % +E y +` ); +AN TI +ĠLog ging +"} . +ĠJson Token +Integr al +Ġtransl ators +u DE +Ġs pa +block quote +MS B +Respon d +b son +à £ +re cipe +is Reg +Con sum +ĠB AR +DE PRECATED +are as +hd c +Ġs mc +CLA RE +) &&! +la de +ĠV B +call Parent +Ġc ircuit +Ġg ather +fa v +os p +To Table +ig u +ĠM ost +ĠF FI +QU AD +ty pename +Ġeas ily +t sc +To ast +old fd +cy B +Ġreplace s +ĠHttpResponse Message +D etermines +Widget Item +Ġfact ors +dom Map +g ence +Ġh over +ĠR B +ac f +Ġct ype +Ġmag nitude +LOOK UP +P w +Î ¯ +Set State +ĠR TE +u code +Ġ{ ? +Ġre ly +Ġ. _ +": ", +argument Count +Cho ices +Ġseparate ly +EP SILON +Sort ing +ĠSUP PORT +set attr ++ |\ +E lems +State Change +ĠMy SQL +ĠIm Gui +W ake +sh arp +new Builder +Ġsc r +Dis connected +" - +z end +à ª +Ġr uby +Ġex am +ÑĤ и +ä¿ ® +local Var +cs rf +Access Control +ĠUs ers +Ġn ick +ĠT od +ĠA BI +ĠD erived +led s +ĠCON T +Insert ion +LOW ER +sth rough +P kt +Ġin o +Ġ3 000 +By ZXR +* [ +O m +W PA +[' __ +Ġsc nprintf +h el +Ġg iving +D p +N x +Est imate +] ][ +b roken +Ġe ye +ĠP UT +pro tection +file func +ne ighbor +Ġen a +Ġz fcp +FR ONT +ĠHE ADER +aWY gK +o z +() ', +get Product +Ġ' ]' +ĠC LOCK +An t +INITIAL IZED +uny code +gev ens +D AD +File List +\" "); +annot ate +Parameter Type +Ġdomain s +Ch rom +:" $ +ET TER +S ITY +ĠS U +ĠO ct +Ġy s +pc mc +Ġoff line +Comput er +S MC +Pro posal +Object File +round ing +ĠD ot +back light +Act ie +Ġsk ill +ĠTo ast +RUN TIME +| ( +ĠP DO +ns result +we ex +Ġref low +FO C +iction aries +P ulse +R hd +") &&( +time stamps +End Element +Ag g +PRE F +2 25 +Ġex its +To Double +< ( +Ġe asing +fa vor +Ġindex ing +Ġdirect ives +Ġconnect ing +REPL Y +Ġp j +Ġh ns +HO UR +ĠUni Value += "); +Ġbe hind +old path +New line +opt arg +ME D +ab orted +24 2 +Ġm h +ĠA G +DE TAIL +ac lass +Ġ'. ', +Temp File +Stat uses +T a +a Params +Ġobject Type +ĠDet ails +s pectrum +Ġm ii +Ġen emy +}} }, +att ice +as er +ĠR Doc +M arch +Ke eper +M Bean +b ch +j ni +)) ", +ĠA cc +String Buffer +sp b +Ġtri angles +Ġcs io +g cc +Info List +Decl s +Ren dered +SM TP +Recipient s +0 99 +H ist +ç ¡ +ĠB FD +IS el +ĠGL float +prod ucer +Keep Alive +b no +b ullet +e or +Ġf oot +Ġnew path +Mult iline +ĠPK CS +is Buffer +ĠI WL +Im Gui +Ġwalk er +éĻ IJ +urlencode d +Ġs iblings +ol en +ĠQ LA +Result aat +]+ )\ +1010 1010 +lo pen +Ġ' )) +Set Color +ca ret +cn tr +Sur f +Ġinterest ed +Ġv r +ĠN avigation +Sk y +DoesNot Exist +. [ +N FC +O GR +Start Index +19 5 +Mark s +HTTP Response +GO OS +Out side +Not BeNull +EM U +Kind s +H op +Ġv node +red raw +]+ ; +gra vity +ĠOr dered +In Use +ĠDe coder +ठ¹ +Ġmac ros +ch apter +mem move +Source Location +Cache Key +access Token +) '; +Ġte ardown +ALLOW ED +åıĺ éĩı +P open +S IDE +Array Ref +Par cel +") + +Sh uffle +App le +Frame Index += \' +E h +H p +v blank +up loaded +By ZX +Ġversion added +Volume Source +ĠPAR AMETER +antis sa +fo reg +Ġqt script +Ġf its +ĠK VM +di jit +Ġpers ist +Am eric +N pc +w Param +struct s +Ġreg ression +åħ ĥ +blob s +Ġ' ': +Value Exception +ĠIn et +inter polate +Ġtim eline +D CB +c if +h ang +Ġp db +Ġnew Name +B b +K R +Get Custom +Node Info +SHA PE +(", "); +åĪ¤ æĸŃ +5 100 +Ġ} "); +Data Grid +Field Info +Ġtra versal +ha usted +Rece ipt +E GL +// { +AN CH +soft max +Ġunit test +vx ge +Get User +inter section +ĠST M +C amel +ĠP IN +op c +Un set +ud ge +Ac cel +E c +For Call +f light +an i +ĠN UL +ĠD RV +Ġtrans lations +15 3 +Tri angles +Cor rection +(', ') +Ġes p +->__ (' +ic ht +ĠH ive +15 7 +Style Sheet +Ġclass ification +TRA IT +D SI +Ġi oread +An other +ear Down +Cop ies +Ġd iagnostics +Mo z +rel ations +Queue s +ĠCall er +K ube +MAR KER +ĠBack ground +xuIC og +ĠV LAN +ĠGet All +оР³ +ĠRef lect +Wrapped Object +al en +Ġstr str +å¿ ħ +( "," +ĠD up +Sub stitution +/************************************************************************ ******* +Plan es +F AB +Ġpro files +tribu ut +t arg +Ġis Array +Block ed +Close st +met av +页 éĿ¢ +de init +Ġsign atures +E lf +u is +cur ses +override s +Ġintegr ation +g yp +HE LP +Class ification +sub title +Start Date +br k +byte Length +éĢ ģ +ĠFire fox +ĠByteArray OutputStream +set Icon +K z +() || +Ġd ll +Ġin compatible +pro bs +pa ction +ĠH ASH +getStart Rule +Ġgor outine +test data +Ad mission +sim ilar +è·¯ å¾Ħ +Ġre commend +Ġ_ ( +ĠO ID +Ġ'< ' +Ġapply ing +ĠC tx +\\ \" +Argument Parser +az e +Ġcc w +tun e +éĩ Į +foreg round +v si +Ġf lavor +ĠGet Type +B eta +len s +Tra il +-_]+ "},{ +Z O +Ġc ms +Ġr ho +X h +m utable +Ġbytes Read +çĶ ± +ĠSend Message +D CT +Q x +Line Width +CH G +Decl aringType +voc ations +Tim ed +m sec +ĠFe ed +Recogn izer +Ġequ ation +Y V +Part icipant +--- + +Particle System +Rob ot +out w +wx T +: ]. +H MAC +Ġnew Node +p olicies +Ġcon secutive +__ (( +Ġen velope +pre pared +Ġtim ers +li a +ptr s +Open ing +dw arf +C andidates +ĠU RB +desc s +Bag Constraints +( ... +mouse leave +Tod ay +im ports +err Chan +gl funcs +87 1 +Retry Policy +attach Event +åĪĿ å§ĭ +o ffer +ï ½ +ĠWeb Kit +O SC +R DF +Group By +Ġaccess ing +v sync +err it +ä¸ » +è¯ ķ +P DU +m ysqli +s coped +ind ented +pp le +SE CRE +BA SIC +CURL OPT +ĠCOR BA +pcmc ia +E SCAPE +t up +ĠC AR +ĠL TS +FA CT +Ġcl js +Print able +ĠCON TR +æľ į +å®ļ ä¹ī +} ): +ĠU ID +__ ; +Trans mit +ĠRender Texture +Q ty +p Next +to ByteArray +ĠB IOS +TH ON +Ġinternal s +CLO SED +M c +re ens +TRAN SL +Ġt an +", $ +App lications +Collector s +D AV +G pu +d ry +Tr an +Ġwork ers +Ġ9 5 +/ '.$ +k rb +t alk +md ay +Big Decimal +/ ") +ĠS OL +ĠTh rows +Windows Azure +ĠAd ded +Ġp vr +cs d +JSON Object +A toi +I U +get Values +type def +bo unded +OR K +appro ved +v ang +ĠF ore +Ġen force +Measure ment +åħ³ èģĶ +C CA +D l +b idi +s ensitive +ĠUn used +Ġcompare r +//------------------------------------------------------------------------ --- +ex ported +ac b +App Name +pol ynomial +na cl +v ince +dev info +Ġ? ", +ĠST A +ogn ito +h list +q v +ĠC ID +object Type +plit ude +Ġf ingerprint +Ġv allen +Object ive +At End +]) ] +S pring +sp li +ĠError s +ĠD WARF +Log out +revi ation +VIR TUAL +: ') +T ED +Ġp In +"> ', +source File +"}, " +66 1 +change set +T reat +ide s +Ġ8 8 +any chart +ĠJSON RPC +clip board +HO OK +SC C +xl b +qKio qKio +quenc er +/ [ +am t +ro be +ang erous +24 8 +Web Page +decimal s +it u +Ġx frm +ĠI ID +Ġget Target +Ġstr cat +ĠCal cul +Release d +Pag ing +Ġsil ently +éĶ ® +or ange +ind x +ĠEvent Listener +Network s +a fs +à ł +Ġ" ${ +SP L +Ġdate Time +ĠSk Scalar +ĠUS ART +TIM ING +ĠSO AP +B attle +ND IS +ASSERT ION +Ġes lint +iser fs +Ġl w +Ext Value +ĠList View +perm alink +Ġ que +-- , +Ġre map +PE AR +Ġcurrent Time +Ġver bosity +check ing +xff ffff +R f +m enus +[^ \\ +Ġdrop out +locale ID +ä½ į +Multip art +Ġcred it +m orph +u ss +Ġm it +la cer +lem etry +Ġover all +ĠUp per +Perform Layout +D yn +H lw +e o +n j +ĠP lot +oc c +Un d +Update Instruction +Spec ialization +* ' +get List +ĠS CEV +Base Address +ĠImp lement +Ġ ĉĉĉ +.. \ +back ing +Ġtarget Type +SQL ITE +Ġadjust ment +get Scroll +END ING +8 35 +E b +get Font +ĠP anel +Ġsp read +ĠDEF INE +ECD SA +Ġv fs +Sy mlink +tlen eck +A f +F inite +Ġt body +TO C +Ġbit mask +W j +[ ]; +ĠPop ulate +F STAT +ð Ł +Ġ1 25 +MAC RO +Apply Resources +B LOB +ĠP aint +Type Definition +Get Count +call ing +Ġintegr al +S quared +TO UCH +Ġplay list +NewErrParam Required +áĥĶ áĥ +E OS +to Fixed +IGN vb +ä» £ +H ow +ag c +In cluded +Ġvar char +create Event +getTag Rule +Ġb ogus +Log o +Ġ"\ "" +tm r +Owner Account +b sg +x q +ĠP ACK +ĠM ED +sub st +Ġ[] [] +Ġcons istency +S UN +s pring +ĠS afari +Ġh ope +ĠAPI Version +xl an +if NoneMatch +he at +Ġlink er +set Image +Ġg race +ĠMC Inst +Ġcomput ing +Ap prox +Ġ ---- +Ġp wm +Ġb race +Ġre pe +vent ions +Or Null +Ġsub tree +Ġseparator s +Ġdojo x +pars ers +h da +Ġf ps +ist a +ĠM icro +render ing +concat enate +Ġ amp +Ġm illis +Ġ(! * +app y +Ġblock size +Ġissue d +MEDI UM +Ġsector s +Ġinstanti ation +G rp +g fs +Object ID +P b +Ġcom mitted +RAND OM +Y M +k q +IN ODE +ĠU b +copy right +web socket +ĠNET IF +con sumed +Ġget opt +page Token +ठŁ +conf irmed +S int +get Re +as df +Content View +Ġoriginal Depth +Fail ures +Ġmp z +ĠAlign ment +M ai +st ores +Ġ} // +Ġ* **************************************************************** +Ġco vered +Ġfore ground +Ġ". ") +æĹ ł +ATT ACK +g op +l num +ac s +SU PER +sets ock +bat im +Jo ystick +N g +m aker +Ġnto hl +En glish +For um +rx d +AAAA AA +SO LE +ÑĨ и +M elding +è ¶ +Ġw il +Ġe ase +AAAA E +ĠKey ValuePair +7 37 +et able +for ge +Ġget Max +ĠO wner +Q r +co erce +ĠC OPY +а Ñģ +Day OfWeek +D SA +S ch +s ive +Con sumed +Ġh ence +qual ifier +ry stal +book marks +W b +y g +en emy +ic ial +get Cell +test ed +Of Month +Mach O +e fi +Ġi pc +destroy ed +аР· +p File +Ġac curate +Ġph rase +аР± +RSS I +setsock opt +Ġg old +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +ĠJson Convert +de ref +View Controller +ds r +Author ized +* >:: +J e +d ur +ĠE ven +Property Info +c ript +p Ad +er ing +ab e +dr bd +PC R +Buf Size +mF y +ec s +Man ifold +ĠWork flow +å° ± +C ENT +L ik +p np +Ġt ween +ls b +Spec ifies +å¸ ¸ +ĠCRE ATE +Ġs aves +Ġst rength +fa ker +Ġk object +max len +Zl bn +( -- +Ġp name +Ġde crease +Com parable +Ġad vert +AS D +transition s +0 56 +i ency +ĠD ID +Ġsh ifted +#### # +Mo ving +Ġweek day +T IO +set Font +con struction +ĠSet LastError +RO Y +XF ER +ĠTRAN S +G CP +Y aml +y ZW +Ġo pposite +ĠC rypt +ĠB F +SEG MENT +v ub +DB us +Ġsk y +Annot ate +Unique Id +Ġanim ations +p ulse +Ġ" ")); +ST I +com bin +ec lipse +Ġevent ually +column Index +boolean Value +Ġfront end +Ġplain text +M HZ +play ing +ĠMain Window +Y T +s ctx +Ġw ays +public Key +Ġsc ipy +Exp iry +ĠEvent Handler +BLOCK S +B anner +Ġn sec +LINE S +çĽ ¸ +RESER VED +D LE +å ĥ +() }} +:// ' +Resource Type +Dis count +gn u +=$ . +ZWF jd +2 28 +V n +Ġ// { +Ġcom pany +Int To +NOT IFICATION +Ġatom s +Ġord ers +ĠSCR IPT +& ( +c ers +t YX +TR AP +fold Widgets +Ġplay ing +çİ ° +ç» Ł +Destroy ed +H g +or ry +assert ion +parent Id +FP GA +48 5 +Created Time +M RI +Z i +ĠBinary Operator +S odium +en es +Ġch arge +Set Property +ĠV GA +request Id +access ible +Suppress Message +s j +Ġexp ensive +Ġtop Level +Ġmix in +ĠMF TestResults +B CM +ig e +Line Edit +ĠUnmarshal JSON +C ascade +x FA +Ġf ocused +Ġp key +Mut ate +ä¿Ŀ åŃĺ +c ascade +m sk +ĠIn validate +ĠString IO +SY NT +]+ ) +Ġkeep ing +orb ell +Ad j +ãģ ĭ +Mark down +Ġdisable s +Ġc ertificates +us leep +RE LOC +Text Color +ADD ING +D WARF +st em +Ġcom ing +Write Header +Unre cognized +p Item +Ġb roker +ĠMachine Function +Ġfac et +Ġut c +L PARAM +Ġset Operation +ĠEl se +C sv +Event Loop +Reg ression +GE M +Write File +I aa +Ġo ffer +vi p +Ġset State +width s +product Id +Ġvol umes +ro se +get Activity +//// ///// +Ġsub system +Vo or +ĠAUT O +J m +M q +Ġj ffs +EX PI +06 3 +22 7 +Ġimplicit ly +' -' +C u +ing ers +Ġe at +pro vided +Ġslight ly +N AND +FF T +Ġsub type +ãĤ ¿ +Ġiom mu +æĺŁ æľŁ +Ġn th +Ġp olicies +17 5 +__( /*! +Ġbracket s +B odies +T akes +d rivers +es sel +es lach +(/ [ +neg ot +al a +Se cs +Ġuse c +D m +L on +Ġsource URL +ĠDest ination +ZXJ z +fort un +J X +J c +Ġ1 26 +De grees +77 0 +TL V +Ġend Index +ĠHT MLElement +Ġservice Name +Stat fs +vl c +inte rest +lli seconds +è¿Ľ è¡Į +is Present +an alog +). " +Ġcont rollers +Ġarg p +Method Decl +ĠDe legate +BE FORE +compar ator +get N +to Have +read UInt +Ref Man +LI BR +Ġgl Vertex +ĠXML HttpRequest +(?= \ +NIC ALL +T LE +f S +str s +Ġat an +TH ROUGH +Ġ*) (( +QString Literal +Ġpcm cia +G K +b link +r tp +ed ata +es ome +ĠC Wallet +und erscore +ĠE MPTY +Ġq x +common s +Ġslash es +s izing +ul ating +Get LastError +Ġreg istr +Resource Group +Ġsign er +ä¸ ī +Ġexit ing +Ġbr w +z x +In herited +Ġ5 8 +={ " +96 5 +Pred is +Ġknow s +ĠGet Name +mer chant +Compare To +IDENT IFIER +getSection Range +em ph +Or Empty +IR DA +tile map +Ġred undant +p Out +s Name +State Machine +Ġtext area +tt m +E e +F ly +g st +() ? +ms dn +iven ess +ĠCom m +ĠZ one +reser v +Ġtransform er +AN A +QU FF +Ġappend s +lv ds +Health Check +ĠU R +der ived +And Set +ĠInd icates +V LD +_ + +ro ck +Ġfor get +I Y +M alformed +IC LE +Access ibility +CF GR +Mouse Move +ĠPAR AM +Ġdash board +x ls +not Ok +Ġtra il +ĠType Code +EXT ENDED +SW IG +ĠHW ND +ç§ » +) ||( +Ġp Node +Ġ1 12 +Ġde crement +аР´ +| = +Ġn vm +Mail er +ag ick +find By +wo o +rad ix +batch es +ĠSmallVector Impl +v fe +æ ¡ +de termin +Ġf rac +set Source +Ġde que +ĠF O +start Tag +lab or +Up loader +Long itude +Bounding ClientRect +B Box +ab il +ĠE scape +d pi +work sheet +DO S +ĠPre vious +ir k +ĠG rab +Event Data +OS PC +EVENT S +ĠAuthor ization +5 33 +Ġv ha +rl im +ET A +VOL T +Ġmach ines +A IR +R DS +t ie +Ġde g +Ġ/ > +Ġo sg +ĠP od +pl r +css Class +inner Width +Try ing +is fied +ĠM ar +add Event +17 2 +Do or +Struct Type +ĠAction s +Nan os +p file +Le ad +Inter cept +BOT H +Ġa ud +ol s +pa inter +Ġtemp orarily +Ġedit able +f seek +ĠF luent +Ġevent Type +xml rpc +Ġscan f +get Canonical +Ġ' ">' +ĠG B +Ġad ap +Ġ9 8 +Ġsim ulate +Ġo mit +Ġse maphore +Element At +"> '+ +IO Device +ous ands +exp iry +Ġblob s +ç³ » +E asy +I OR +N avigate +Ġerror Type +save file +Ġfunc s +trac er +Rigid Body +æľį åĬ¡ +/ ^\ +× ij +str ike +ref und +Ġcre ator +c name +in buf +to ast +To Many +Ġdata sets +>< ? +ĠAR G +Plugin Manager +T XT +v cs +Ġw ww +Ġu g +ĠM obile +Parse Int +imp lement +anc ial +L it +ĠT V +dh cp +chrom a +ĠS IMPLE +32 8 +Ġal phabet +ĠUtil ities +Vy Y +t ape +set Selection +ĠC LE +) ("+ +J NICALL +te k +IN CT +dev data +Is Equal +ĠQ Dir +Ġnon zero +Ġub i +åķ Ĩ +T EN +Ġ0 000 +ig zag +ĠT yp +S iS +)) )), +Ġres ervation +ĠV IA +Ġret rieving +CON V +expectedException Message +Y o +p Node +p Buffer +get Storage +set Accessible +group ed +xf rm +Ġpan ics +ĠDat um +IMPLEMENT ED +Ġ quest +ener ate +Ġinit ially +post Message +Last Name +Mouse Up +cloud s +/ = +d sl +r z +Con tour +Ġwe ird +IC AST +td i +Subject Access +Ġasc ending +ĠDel ta +NEG ATIVE +B m +Ġun ary +ĠTR IG +P SK +Object Base +ib m +sub sys +response Content +Ġfail ing +) ++; +pp s +Ġtre es +Ġmt u +Z N +Ġr usage +Ġen abling +Ġ{{ .* +ĠArt icle +; ") +l tr +er ied +un ary +od m +sp am +PL UG +ĠEN GINE +DU MMY +Ġf use +name len +SE XP +Ġqu ite +802 154 +Z n +r is +Ġp wr +() }. +test Data +Ġsub mission +ĠUn ity +build ing +p ud +st y +st reet +Re cover +ĠT Result +Ġi k +34 6 +ss a +200 3 +getName space +DIST ANCE +Ġb le +our ier +cy l +Ġsy mmetric +Include s +B son +B ones +O dd +a Args +i wl +{} . +Ġinsert ing +ĠC ached +Tag ged +sun g +ĠPh ase +]* \\ +comm unity +SUR FACE +context Menu +ĠData Source +snippet Text +Ġ ancestors +add Button +Ġwhen ce +15 5 +Ġdis miss +ĠLe ave +av y +Ġtext Box +Ġtrans pose +remove Data +rq stp +clean ed +Ġliteral s +åĬł è½½ +) `` +p X +ĠW E +Ġ/ >< +MI B +GetType Info +ste reo +Interop Services +â´ ° +ĠMED IA +f ies +ĠS lice +admin html +%%%% %%%% +b right +c aches +is ac +co ok +Ġd z +err p +Ġpro viding +db name +agent a +Year s +j x +wa ul +AUTH OR +Ġplan es +ĉ ĠĠĠĠĠĠĠĠĠ +re pe +ĠA mount +0000 1 +Ġx r +า ภ+SECRE T +J V +c ats +op l +Ġq c +24 6 +AAAA A +off load +]/ ); +erc ise +Ġenviron ments +ro ps +Ġdif fs +æŃ ¤ +MethodImpl Options +rij ving +s iblings +ĠD if +Ġu d +HE AP +Ġk m +Sk u +æľ º +ĠItem Stack +for get +Ġprotocol s +Card s +Ġsur f +> (& +G em +L x +w u +co alesce +oc i +Ġ"< ? +Security Token +extract ed +Iss ues +Ġ"* " +Declar ations +Z H +g ss +ret ain +Ġun initialized +26 3 +Cons istency +d C +ĠD iv +For Type +HID DEN +R gb +U Short +Add Child +ĠQ Declarative +ĠSh adow +blk s +Q K +t al +Field Element +getNext LineIndent +Ġvocab ulary +C riterion +ĠS AM +size i +") +" +reg orian +app lied +ha ust +clear Interval +Ġwra ps +Histor ie +ç»ĵ æŀľ +X H +s st +Ġr y +Ġx d +Ġro ck +IG R +ĠY Y +yb rid +U u +ĠT MP +Type Reference +Directory Name +Vo xel +6 86 +E rase +t dma +Ġbu bble +AA Q +åı ª +���� ���� +un ic +Ġf cntl +em bre +sc ss +base dir +FI ED +BO OK +Iam Policy +D uring +H is +ĠV IR +sub menu +cc cc +(/ ( +ĠContext s +get Min +set Width +ra z +Get ID +An si +Ġalloc ating +Ġappro ach +ĠTe am +QUFB QUFB +ren cies +17 8 +B MP +ra ised +ict im +first Name +C FA +D umper +REG ISTR +ĠNO I +# \ +RE NAME +AC ON +iss or +drop out +Ġconf idence +! ' +U CE +Ġh b +>( * +Ġmax Size +23 9 +pool s +----- */ +{{ / +g bl +// $ +ĠEX IST +sample d +MON ITOR +ĠToken s +ARCH IVE +Ġconflict s +Z K +el lipsis +Ġor ient +tri buted +22 9 +picture Box +解 æŀIJ +STANDAL ONEM +STANDALONEM ONTH +s park +æ Ħ +Ġ ------ +Ġb odies +ĠT ell +ĠO Data +Ġx max +cont iguous +Is Zero +Ġsc b +ĠCom put +ĠRead Only +J b +J une +() &&( +Ġa go +SV C +dead line +I ED +fo ut +Get Function +Ġ% = +Ġmiddle wares +N h +Ġ ENABLED +file list +AA B +Ġfe at +ĠParse Exception +Ġsample d +ĠSetChr Pos +I iw +As n +ĠSt ats +... ] +Folder Path +rw lock +Ġmed ian +$ ', +S ensitivity +add Property +Un wind +vestig ation +z ap +Ġa w +12 51 +iagn os +Sim ilar +d ual +s cheduling +out p +Ġk ick +Row set +Spec ify +ĠIs Nil +Ġclear ing +ĠOC FS +G as +S lave +un prepare +ST REQ +Test Expression +Is Enumerable +88 7 +59 0 +n esting +dev init +ĠB ridge +Set Options +Element Name +From Name +]+ \ +<< ( +S orter +un subscribe +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +operator s +ga uge +ा ', +k ge +set Time +Image View +DI CT +Ġdraw able +ĠM L +Ġj arg +Ġ", ") +ILL EGAL +Ġpub key +çĻ » +Ġ -------------------------------- +er ation +Ġst udent +\": {\" +CAM ERA +hance d +U H +lay ui +result Set +Ġ8 00 +Ġ12 80 +Transition s +outer Width +Ġ urlencode +iz r +Ġget File +(& : +As k +Ġsub classes +Mon day +record ing +ĠAction Result +Z D +set Body +ĠE H +Code Abbrev +Ġ6 7 +vol t +Jl YWN +Tor rent +% , +c in +Ġ( ? +Ġst em +pp i +ĠE QUAL +create Keyword +Ġocc ured +æº IJ +ĠT CG +Ġun serialize +new Name +rt d +Ġ 9999 +or o +Ġm edium +ĠO FD +As Int +pb n +Ġde veloper +Ind ic +lines ize +uv w +Ġunmarshal led +Ġepoch s +// -- +() ]) +:" $", +Success fully +Pred ict +AzureOperation Response +vZHV s +åĥ ı +D ONT +p de +ĠI de +ĠR REG +ĠRe quires +20 9 +Open File +E g +f lavor +Ġ( ...) +RE NT +Error Msg +ĠDE CL +aut omatic +chain ed +Dw arf +ĠFi res +F TP +ĠW L +LO D +Ġte ch +DETE CT +S ST +f usc +r src +("[ % +pag ing +çŃ ī +B ED +w buf +ĠIn dent +tag ged +upt ools +Ġdeser ializing +Y g +out buf +Com bat +Key Press +ĠUn ion +Invalid Argument +Oct ober +d py +get Extension +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +source Map +gra ded +Listen ing +createKeyword Mapper +P ure +re ward +In vert +ĠD istance +Get Time +DIS CONNECT +X K +Ġcall ers +SC I +Simple AI +ĠS parse +post fix +ĠData Frame +HTTP Method +ĠImp lementation +ан и +separ ate +C J +Ġm q +Ġ== , +Ġg n +bo orte +Imp act +56 59 +ĠCur DAG +Hero Warm +Quoted String +IHRo ZSB +HeroWarm SimpleAI +Ġn fp +AD A +SI F +CL USTER +Ġclock s +Ġdistance s +5 86 +y aw +Ġn est +Ġ(! ($ +æľ ª +S alt +_ = +b ps +ref cnt +Ġdis carded +ĠDialog Result +p fx +y t +Ġw orth +Ġre addir +Model Name +vol umes +GUICtrl ComboBox +Ġmultip lication +e j +return Url +Ġ'; ' +Ġflush ed +ĠM FI +vent s +Ġj long +Be at +Ġbase s +S vc +T aken +ĠĠ ĉ +ĠN FC +buffer Size +org an +F OLDER +q M +is Selected +sp ans +Sub tree +expect ation +]* \ +b ur +Ġb v +get Short +Request Handler +18 4 +P v +Ġde viation +Ġg imp +ĠFile Info +ategor ical +T b +Z hb +Ġb anner +err ing +Ġl atter +Ġe uid +Ġres ized +Trans lations +FL D +FFFF FFFF +Ren ew +SEN SE +Offset Y +Ġreal path +nl h +Ġscroll Height +2 99 +S ell +m otor +ad vise +Err Msg +rt sx +([] ); +æĿ ĥ +ĠS uch +Ġis Empty +ĠP ayload +áĥĺ áĥ +Q List +a Value +In stant +pm ic +C ub +q unit +move ment +Ġcor rupt +Overflow ing +ĠdomainObject Set +F ns +R uby +u it +-- | +up stream +Get Block +apt uring +Suggest ion +1 999 +L java +ext s +To Update +rt t +ĠPython Qt +Lua DLL +éķ ¿ +G p +Ġ å¦Ĥæŀľ +get Obj +Ġint errupted +synchron ize +] "; +Ù ī +ig ar +ĠD RI +Sem a +Eps ilon +åĪĿå§ĭ åĮĸ +at mel +pt ic +PAR M +ен ÑĮ +Critical Section +spli text ++ , +S qr +d ip +() }); +18 6 +Pool s +Ġdif ferences +ĠOr g +SizeIn Bytes +cons ider +. ], +V FS +wp id +ĠInit ialization +Ġ', ', +N AT +N OR +Ġref count +YX Rpb +Ġbe ans +ĠH ave +Par as +dis connected +Local ization +Ġtermin ation +é¢ ĺ +è £ +Ġn fc +âĶĢâĶĢ âĶĢâĶĢ +at on +Ġ' :: +max Size +Desc ending +09 5 +Rl Z +walk er +dd i +get Stream +Ġis Active +36 00 +man ufacturer +Ġside s +confirm ation +I face +R ace +place s +35 2 +GUICtrl TreeView +Ġmer ging +% ' +m oid +ĠUn pack +Ġdb gs +SQL Exception +Ġde serialized +from Latin +Q Abstract +h if +dd b +get BoundingClientRect +Ġr ts +Ġne cessarily +LT S +("/ ", +Ġdatabase s +ali yun +blue print +get Days +ra x +Ġh om +ĠP ending + ° +Ġst s +ĠG SS +Item Stack +ĠValid ator +s ay +ur t +ag a +Ġ' {{ +24 9 +Ġlocal ized +spe ech +L an +Ġmock ed +ĠRes ize +integr ation +V id +Ġp ract +ĠS Q +Red raw +ĠInitialize Component +ĠEx press +Iter ate +hot plug +s queeze +ĠN ORM +IN CLUDE +ĠG XV +ĠGet Instance +Address Value +ICAg IH +bas ics +Obs olete +v K +Ġp Player +ĠI M +parse Error +WE P +Ġsb i +Aggreg ator +ĠNative Methods +ĠsetOperation Action +F println +h oc +i X +ra structure +Reference Type +_ (' +l ider +Ġ1 970 +vers able +Mono JavaBridge +ĠImmutable List +Ġcater waul +D SC +t con +WR IT +Ġpartial s +analy tics +: {" +e js +j am +Ġnum erical +ĠExt attr +ĠFL AC +S uld +U IT +ĠS TE +T ls +re member +max length +private Key +U FF +re ferer +Ġa vio +ĠQ Font +ENC IL +Q Unit +m illis +s lope +Ġ> (); +Has htable +pers oon +Ġdist inguish +compress or +P db +Ġto Array +Min i +r mdir +Ġm ic +la cing +ĠMethod Info +ble ms +f ingerprint +ĠCre ated +c ite +Be arer +23 8 +DD A +Ġ[& ]( +phanum eric +Ġd fs +ĠW PA +sub system +tx id +H G +Ġt weak +ĠP article +Cast Exception +kd Wxl ++-+-+-+- +-+-+-+- +J BQ +J AVA +S on +| & +se mi +ver bosity +ML INK +//---------------------------------------------------------------- ---------------- +ĠQ ScriptEngine +Ġgener ally +selected Index +; "> +Re pe +St a +ĠM IPS +De reference +Response Header +Create Info +) })}, +Ġm Current +con ns +trim med +setValue AtTime +Ġп ÑĢ +U dp +ĠText Mode ++ '. +ro red +Ġrun Test +03 9 +Ġ20 10 +ĠAl ready +VALID ATE +key pad +Ġme ant +IM UM +erase FromParent +ĠLa unch +æł¹ æį® +C ircular +b abel +j r +add Option +ĠV C +Ġ8 64 +Auth enticator +Serial Number +ĠExact ly +Maint enance +> {@ +Test Helper +Copy right +ĠRE F +Try Get +SUB TYPE +è¢ « +B ullet +Ġkey ed +и м +ĠLib Func +getCurrentToken Column +B az +get Parameters +ĠSC ALAR +Ġqual ifier +b on +es ized +Ex ported +Socket s +nv vm +inject or +Ġapprox imate +Ġre location +last Name +do Request +PRE V +b servable +ĠL F +Ġstart Pos +client Height +Go ssip +Ġrandom ly +äºĭ 件 +un wind +Ġm utable +xu Ly +:{ }, +ĠÐ ± +cbiAg ICAgICAg +Ġstand alone +3 10 +Ġde limiters +ĠUN ITY +ĠPart ial +Prod uction +S pa +S ched +Ġl ife +Error Response +ĠR outer +Tra ced +Ġcor relation +ĠMedia Type +ffffffff ffffffff +' ( +To Delete +ĠIR B +get id +scroll To +Ret Val +BP F +sol ar +Ġincre asing +t return +pe ers +ĠGet String +Ġ/> \ +å¹ ´ +缮 å½ķ +D ic +set Options +ĠG st +ĠRe ferences +ĠCon firm +Ġ7 7 +B an +w izard +ID ictionary +ec ma +ape l +Ġlong itude +RO UTE +WA VE +Ġinstanti ated +hemer al +. ". +W PS +Object Reference +ject ory +bad ge +h ack +mp q +mp ot +Ġse ct +28 8 +ĠK B +ĠClo sure +Ġlat itude +ĠMD IO +ĠS anity +ĠI Enumerator +ver ified +com b +Has Index +SYNT AX +é « +un compressed +Ġs al +Event Emitter +Ġtax onomy +AMD GPU +) === +Ġ lose +Ġc dev +/* ", +iv ic +ĠCode s +/ "; +J x +W iki +h pb +Set Data +ä» İ +> (( +ug o +aut oneg +Ġclip board +ĠOFF SET +L DR +r an +ex if +bu ddy +=' ') +åIJ ij +Ġown ership +Ġincorrect ly +LIBR ARY +l X +Text Area +CC B +Ġopt imal +Clause s +è§ Ħ +ĠSn apshot +4 35 +S al +p it +ĠP EM +ĠE asy +ne on +Be am +Sign atures +nl msg +get PrototypeOf +01 8 +r info +s quared +in serted +Ġre sets +file Info +Ġsource Mapping +med ian +Ġder iv +c ubic +Ġ$ (" +text ures +Create Call +Action Type +st acle +get Order +get Singleton +ĠB X +Ġdebug gee +Encode Varint +getProperty Value +IHJ ldHVy +N AV +] },{ +te arDown +Ġm usb +ex cel +Q D +ĠF raction +:" . +comp letions +Is Array +Ġsp ot +FOR WARD +coun ted +REPE AT +I Enumerator +Ġf puts +Get Local +Ġsh ip +object id +UR POSE +ĠMod ifier +Sem aphore +Ra ft +get Bean +Ġof dpa +og onal +25 1 +rie val +ai lover +Aut omation +ĠCLI ENT +u L +ĠT ick +ph andle +Ġtest Create +valid ators +," - +ĠPARAMETER S +B x +D ual +d ct +-- + +ERR A +Al ter +Own ed +P ast +s Request +esc ription +CC CC +åĮ º +ĠMac ro +Recogn ition +Ġb rightness +Int s +22 3 +Intern et +Ġp Out +Ġrequest ing +me ans +SA X +vc n +ĠLog ical +GR PC +Checked Changed +9 55 +Ġt ill +", [ +(\ $ +Ġrem ains +co ol +as ures +Constant Expr +ron o +xxxx xxxx +N c +id end +comp leter +float ing +List Response +'). ' +CL S +GN U +c sp +Loc s +has More +part ner +Parse Uint +GUICtrl Toolbar +CONSTR AINT +! ') +b ands +ec dsa +Box es +ĠIs Valid +>= | +ĠSup ported +çĽ ´ +Ġaggreg ation +Sat urday +ç´ ¢ +Ġissu er +A HB +G i +in correct +25 00 +EXT END +Under line +G uess +ch osen +ri ov +as us +Ġset Interval +ĠNotImplemented Error +Ġ'| ' +T Entity +a hash +Î Ń +get F +Ġre alloc +Lo ops +Ġel m +pol ling +Ġsm arty +B er +d dev +ĠC String +ĠRE AL +Ġtrim med +F CP +h E +attr namespace +ĠApp le +ErrInvalid Params +M SC +[ ]. +ĠO PC +ph en +Ġtext ures +18 9 +($" { +" "; +Y K +a vi +return Type +)) + +ĠN P +ĠF atal +With Value +27 1 +c fi +h pd +m secs +reg istr +AR ROW +ĠCom parison +over load +08 00 +pk cs +irc um +pinned Offset +I US +In vite +pre processor +Ġdiff ers +ĠMin imum +* " +L Value +h askell +Ġp ragma +ed Array +Re actor +{} ). +ng id +recipient s +Ġm time +Ġw ind +Ġh mac +sub plot +02 1 +Ġlocal Name +Ġchain ing +H t +T en +up on +Ġop ens +MESSAGE S +Termin ated +x fb +ose conds +GV t +MAN AGER +re cs +pe x +ub yte +to ber +regex Lib +usb hc +factor s +ĠB P +DE LTA +parse Str +draw Line +Ġentire ly +W ind +f ro +× ŀ +st ory +un ified +TR IC +her its +еР² +nat ural +U Q +v bus +Ġm sec +SE S +press ure +Sub type +getSimple Name +2 14 +ĠT ouch +Ġh er +Ġup rv +Network Policy +clone Node +UX C +E VAL +at oi +Ġg ulp +KEY VAL +Search Result +Dialog Result +ĠWA IT +* ([ +6 59 +E ff +ap pear +av el +xy gen +TRAN SACTION +In clusive +field name +Ġinfo s +Ġover head +Modified Time +g fp +In Range +ĠD i +Ġr dma +To Index +18 5 +PORT S +ĠBU FFER +REA SON +S park +Ġb ag +ĠX Element +Ty p +ĠEX PR +agon IE ++ ', +u data +Set Status +19 4 +imp lements +Game s +Ġinvok ing +sip Self +æĥ ħ +App Id +SET RE +:' < +USER NAME +B asis +C SUM +get Var +32 5 +Of Line +S d +in clusive +qu iry +new path +He artbeat +Th ursday +STOP PED +f ns +× Ķ +Ġpre process +Work ed +edit ing +instr ument +Ġs is +ĠP DB +lang code +Ġpush ed +N ational +n declare +set Int +key Type +Ġstr aight +Ext ensible +decess ors +ĠT oo +Ġcaref ul +< $ +K I +T j +de grees +View Holder +2 33 +P MD +u FD +Ġs scanf +In flater +oc al +Mesh es +è¿ ŀ +y our +ra il +String List +hash ed +S r +ive c +Ġ200 8 +CallbackImpl Base +F INE +h q +ct oken +() }) +Is Active +Thread Pool +Internal Error +ภ± +ĠMarshal To +Grpc Client +h ys +get Command +ol ddir +Ġe f +DIR TY +Apply Options +decor ated +al ternative +=" / +Cert s +QUOT E +R q +] ={ +res idual +current State +Write Int +Offset X +ERT IES +ĠCh ip +du k +ĠLO AD +Ġestablish ed +g Q +UM NS +Const s +Invok ed +A head +g un +r nn +Ġc ifs +lo st +In houd +Ġx c +tern atives +SR AM +meta Data +Ġmark down +Ġpop ulation +Ari thmetic +иÑĤ ÑĮ +M oment +set Message +Ġto ok +ĠQPoint F +u io +and o +entity Type +zero OrMore +}] }, +CN IC +Unicode String +ĠME THOD +ĠSum mary +C ull +D ropped +c lic +Ġg ro +End Event +t as +Comp utes +nil fs +ĠMenu Item +ĠC ross +Al ternate +34 9 +ãģ ĵ +Send s +peer name +Ġ'@ ' +ç¡ ® +Ġ*/ ); +current Thread +"/ > +ateg ies +Ġswitch ing +getElement Type +Ġ(& $ +ĠPRI V +SMB US +M IO +get Range +Ġd raft +set Description +Ex tern +CLA MP +Ġidentify ing +b roker +it nim +bb b +Get Height +Un ified +:" ' +Log File +hw mon +Struct ured +Ġinf late +F la +H c +Ġ} ]); +Find s +Ġflatten ed +Ġs pr +pt t +Ġg x +14 14 +Ġurl Params +Cell Style +Pe ople +SPECI AL +M r +t B +is oc +Ġ' ../ +Ġh el +Ġe cc +ec x +Map Type +Jo urnal +Ġorigin ally +gem s +P aper +l pc +Ġa dr +Ġun escape +Ġen closing +Cl k +Pri or +d map +Ġ Ke +sp d +From Seconds +ĠPl an +æł · +C m +ĠĠĠĠĠĠĠĠĠĠĠ Ċ +op ener +EN OSPC +ĠE val +link at +Ġindex er +ĠPro totype +Ġsuper Class +Report Error +Decode String +Get ProcAddress +Ac curacy +." \ +Fm Pcd +C lazz +T angent +ap a +Test Failure +:" [\\ +Ġsk ew +=\" % +PLAY BACK +N avig +b ash +} #{ +qu int +ĠM er +Map Value +cre ating +ĠSD IO +Face book +setOn ClickListener +iagnos is +] "), +i ode +Ġ lack +ĠS peed +Ġ[ _ +ĠM ux +key map +ide os +Ġimp lies +monitor ing +Plural s +ĠCons ider +Wed nesday +sipParse Err +E le +Z WR +Ġ" {" +sem icolon +Ġ---------------------------------------------------------------- ------ +Ġsomew here +B ed +E vt +S weep +Ġc utoff +Get Response +LL O +Data Stream +Handler Func +wait queue +Ġcl r +ãģ ¦ +ĠDis k +../../ ../ +I b +^ ( +Result Type +Do Not +tab lename +aff inity +ĠJson Object +days Short +Ġhex adecimal +ç´ ł +I z +V pc +k elihood +() )), +ip ipe +ĠE mp +Ġcmd line +Scale Factor +ad ir +Ġre boot +ist ant +lic ate +Com pose +Sign als +Div ider +Uni Value +! ) +6 96 +); ", +is False +be ep +fill Color +sequence s +getCurrentToken Row +Optim ization +s uspended +De struct +ĠX S +Deserialize Object +ĠAggreg ate +à · +Ġ0 777 +Ġun wind +Ġinput Stream +top Level +Ġkeep s +å¤ į +deli ver +Tod o +ĠBuiltin Type +4 26 +; - +f resh +get Language +sc n +Ġget Last +ial ias +At tribs +Attribute Accessor +slice s +ĠStart ing +clus ions +à¥Ģ ', +h rt +i ations +re lay +Ġe ss +ĠD ock +Ġ<< - +isValid ated +de alloc +Be acon +Ġsuper class +MM IO +WE IGHT +ĠLex er +read File +line CommentStart +24 10 +drag gable +Ġpod s +p This +Ġl psz +"] ') +WID GET +get cwd +"," $ +Ġexecution Context +! | +W LAN +c ulture +ĠS MALL +ĠF REE +ĠF LOW +particle s +ĠVert ical +MILL I +F all +L UT +Ġor phan +Cache Entry +enum mer +Author ize +la ves +Ġe gid +IC H +bind er +Ġaccum ulate +Ġign ores +) "},{ +Ġf riend +Ġs len +get Items +Con trib +bu y +64 2 +Ġencoding s +ĠCOL UMN +Ġimm utable +getOwnProperty Descriptor +A IF +P ragma +form ance +ĠIS P +ĠPr imary +C ubic +T OK +ĠS RC +Is Type +sub tree +Ġtop ics +Push Button +readable State +Set Bytes +Base URL +Ġpart y +Ġab c +ĠInit ializes +Fil led +ĠINTE L +m ot +v path +Ġthe WrappedObject +ĠR I +ug ar +Go String +CAP S +EXIST S +\ ");\ +] ==" +get Package +set Methods +ĠS TO +File Object +style Sheet +åIJ ¯ +Ġglyph s +d sc +Ġp icker +ig o +he red +23 6 +Fe el +Abb reviated +T Q +s it +z p +ing Context +Ġan chors +Ġfile size +ld a +Storage Class +Ġreason able +Support ByVersion +Wa arde +ĠSupport ByVersion +SEN SOR +Ġp wd +ĠQ Abstract +Check Response +s ysc +æ Ł +() +" +Ġ" )", +ĠA A +AN IM +Ġlo ose +>' .$ +Ġperiod ic +ĠAP Is +G W +Z L +d pc +Ġa dev +Ġimp orter +rq st +B p +_ ][ +Set Size +file System +ne ighbors +99 0 +18 2 +CP L +platform s +TRAN SPORT ++ ] +st aff +Ġnew State +ER ATE +RE COVER +Ġdo Request +Ġappropriate ly +M ine +set Interval +Ġde sktop +ĠP ASS +Data Types +Ġan t +Ġun z +{} ), +Ġdisplay s +Vd be +CRL F +F CR +R TP +k probe +de ck +Ġ* *)& +Line To +ĠRE QUI +('- ', +T J +w elcome +um inance +Ġre striction +inter preted +util ity +Menu Bar +)? /", +Anim ating +5 25 +Ġd uplex +ĠC arbon +per cpu +AP PRO +Ġ', ') +los ion +E THER +d it +GE TR +SubjectAccess Review +5 34 +C FI +i bo +Ġ ang +:: - +Ġtime stamps +SY MLINK +nt fs +menu Item +Ġcipher text +DEST ROY +w AA +x er +Ġs uspended +ĠR outine +CT STR +15 8 +Bar code +MsRest Azure +BRO AD +elix ir +s buf +To World +Lock s +Screen shot +ĠVAR I +çº § +get Arguments +ĠZ IP +æī ¾ +v iz +re voke +ar u +ĠE dm +Ġinsert s +high lighter +ĠMCSymbol RefExpr +ins ensitive +Role Name +Ġframe buffer +05 7 +Ġyield s +ĠPer iod +embed Rules +U ATION +st ops +Ġg boolean +Ġr isk +place holders +mode m +ines is +Symbol ic +INS N +Ġgradient s +in ant +json p +ãĥ ª +mail to +Q Variant +} > +Ġ* ), +ĠA ri +ren ew +throw Error +Tim ers +d ts +u y +ĠU ErrorCode +Ġfrom Index +dw Flags +ĠPipe line +Ġw lan +Ġbe h +Ġex ynos +Ġres ync +Ġat tempted +Ġ4 03 +ĠSer vlet +pass phrase +submit ted +Dom Element +0 30 +get Group +ĠM AT +usb vision +:/ ( +к и +SCHE ME +Ġcont inuous +Sub class +GR ID +connection State +wra ppers +- + +Pre pend +xff f +4 02 +K r +ĠC Y +Next PageToken +Global Value +Ġcalcul ations +A String +u j +Enum s +CHECK ED +ĠPoly gon +; < +E Tag +ang ling +Ġ($ ( +Draw Line +th d +Ġs cheduling +Vis ited +Sk ipping +Native Type +Sent ence +Ġdescrib es +L vl +S v +} :{ +ĠU i +Ġimp ulse +Sp atie +RD WR +bundle s +m angle +u q +get Window +fl ux +pm n +Optim izer +Ġsaf ety +G g +Ġh op +Schema Org +imp ulse +å¥ ½ +D bl +v box +la ats +Re cursively +ole cule +DI GEST +Ġmembers hip +ĠINS ERT +C ircuit +O iA +re cogn +ĠW SA +Ġ7 4 +Src Reg +QUOT ES +p apsz +w Q +ro ce +Ġm dp +Pro vides +og a +Ġk ube +UR NS +80 5 +')) { +property IsEnumerable +CHAR S +CONTR OLL +saved InstanceState +Ġquick ly +Ġwebs ite +elastic search +J um +s plits +Ġ" +" +ĠString Writer +Ġmo unted +ĠError Code +Ġencode s +dl c +un init +Ġh tt +ud GV +Ġbyte code +ĠAdd SC +Ġte le +ĠVariable s +PushBack Named +Ġl ag +Al ternative +')) : +Main Thread +period s +Place s +Ġupper case +FER ENCE +UR ST +Ġtmp dir +q td +in fer +Ġc ch +Ġtmp l +Ġview Box +Meta Object +Horizontal PodAutoscaler +Spin Box +C le +b mi +c mt +iv o +FO LLOW +Ġcor rupted +ĠTrans lation +Too Many +åĵ ģ +c cp +Ġt ro +Ġex posed +Ġit alic +Ġk ern +cpu freq +å¤ © +OPEN SSL +2 0000 +ol ations +ĠB A +Ġdomain Factory +B onus +D ID +H ack +ĠC ity +'] ): +script value +ĠPay ment +Ġb ld +Ġsub s +Access Key +Ġstop ping +Ġir send +(/^ (\ +Creation Time +Aff ine +Ġc uda +es i +Ġget Source +Ġ` { +Log Message +Ġtrans ient +Ġicon s +Visual Studio +Ġcontact s +Exact ly +yl us +) '), +> '). +ĠL INK +=" [ +Number Format +web View +ĠSer ialization +ĠSD Loc +sr p +` ). +Get State +umbn ails +ĠÃ Ĺ +_ < +Ġv h +ĠC TRL +ĠB Z +Ġmonths Short +ìĿ ¼ +Mob ility +z lib +Ġd vm +ĠA ML +ĠL RU +own ed +End Date +.'/ '.$ +Tue sday +uvw xyz +ĠD ST +po ssibly +Ġclear Interval +prob es +Ġtell s +ĠPRO CESS +O MAP +Z o +n link +ub ifs +ÑĢ а +MOD IFY +(', '); +à ¶ +Ġ ion +Of Work +From Argb +Region Block +p ck +s ata +s ax +ren e +ĠP ub +=" { +22 6 +Ġbatch es +0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +p sc +p asses +re x +ĠC op +Ġk p +Event Dispatcher +GD IPlus +] != +Size Varint +ĠV ol +.* $ +Ġget Sub +=" . +Bu y +Ġtrans fers +post er +Ġcons ists +Dock Style +B OM +C DB +s Key +He at +(__ (' +ĠQString Literal +partial s +â´° âµ +> . '. +B roken +Ġ1 44 +:// " +Ġmodule Name +Ġfind er +Show Dialog +ĠWeb Rtc +F an +s mem +at r +set Date +Ġas BC +Table Size +}) ", +Command Text +ĠCOM MENT +branch es +çº ¿ +Ġarith metic +U c +Ġp md +Ġ// -------- +($ ) +IT IES +ĠLog Printf +SE CTOR +sg id +cy an +ãĢĤ < +^ [ +w ep +ĠD ATE +Get Width +++ ]); +ĠR H +Ġsub stitute +ठ¶ +Assign ments +() [' +Ġcol lapsed +]+ / +namespace URI +Glyph s +F ired +W ant +Ġx l +Sh rink +not if +Ġq ScriptValue +Ġselect s +ĠLOC AL +w z +Ġad vice +ĠComple tion +J MP +Co ef +ĠExp licit +Collision Object +[ ! +à ½ +Î ¬ +Re connect +Bo b +Ġinter cept +NE S +rf kill +ĠRew rite +v able +get World +Pro vided +ĠJ ul +Ġac cesses +Any thing +Ġident ifies +ä¿® æĶ¹ +Q Y +UT IME +part icipant +50 3 +ĠOpen SSL +PAGE S +FRAME BUFFER +* ,\ +z fs +Ġp file +__ )) +("/ ") +áĥ Ŀ +ен ÑĤ +PARAMETER S +n Value +Ġgame Object +ĠCur ve +gICAgICAg ICAg +èĬĤ çĤ¹ +// ================================================ +Ġget Message +25 9 +oper a +Ġassoci ate +ĠDeepCopy Object +ĠNUM BER +pick le +M CR +s C +y min +Ġd av +åħ ¶ +ĠSC ROLL +dev c +of ile +ph on +24 4 +iom ap +wa com +den y +Ġrecipient s +Get Buffer +go ff +f mr +get Test +ĠB er +Ġ7 3 +B el +Ġin finity +up loader +Ġkey Code +eb x +Ġwork book +Ġrep lication +Design ator +u DD +get Array +ĠC atalog +ID OM +cc r +ln k +ĠRet rieves +Ġsem icolon +BRID GE +re build +ro is +ch ap +get Tab +get Headers +In lining +AD R +ĠHelp ers +Ġt ps +ĠM ixed +ĠL AT +error Msg +lab s +Ob servers +sem antic +èµ Ħ +L erp +Q ByteArray +Get Extension +Ġex ited +ĠL IR +pr inted +roll ment +Ġns Auto +QU IR +board s +ho uding +ynchronous ly +is met +Ġset Text +ĠH CI +chem y +}} }} +PROP ERTIES +Ġbundle s +ĠTrack er +m Is +ĠClass Loader +quis ition +W c +it f +ĠA PR +Ex cluded +Base s +cq r +f ine +n ction +// ------------------------------------------------- +Ġb tree +ĠI G +ĠP AT +De posit +ĠR AND +Ġle ase +Ġtx q +fV xuXG +x N +Get Id +Ġk vp +Row Index +Local File +Json Unmarshaller +ëĭ ¤ +Cancellation Requested +Ġ" ": +set User +Ġg v +ST AR +amp du +ĠKey word +Div ision +POS ITIVE +FOC US +Q UEST +get Float +Security Group +ĠSource Node +๠Ī +coeff s +åĿ Ĺ +ĠTIO CM +Ġ ÑĦ +ul ators +State Manager +jo ined +Ġval ign +Ġ'% ' +è¾ ij +get Locale +ĠC url +ĠB ot +04 5 +15 1 +Var iance +Account Type +> +Ġmult iline +Ġconfirm ation +Aan vang +ro ff +Get Element +IC d +OT E +point ers +Char Sequence +Ġaddr s +Ġnormal izer +CLU SIVE +Occur red +Ġp ulse +64 7 +Sort able +Ġnat ural +at Least +Type String +ĠB SD +ĠB LK +Request Body +Qu at +Ġpre decessor +Pur pose +in vite +Ġh m +ĠI A +Json Reader +表 示 +en ic +De g +]) /, +Pref ab +Ġ'* ', +Î¿Ï ħ +coup on +M orph +[ . +Ġg int +Check out +Ġhttp Context +Ġapprox imation +M OB +r key +Ġ" ". +ĠD IST +Query Params +iff er +VOLT AGE +* \/ +ent r +Ġs rs +ĠI Collection +Ġget Field +Ġx type +Ġsh orter +error Count +>( _ +Ġ"\\ \\ +' ? +R r +Ġp Dst +up pet +Ġ# {@ +zd HJ +Ġcomm unity +åİ Ł ++ "},{ +f db +Ġ{ ", +is y +key code +test Expression +Ġpre pares +note book +ĠPre conditions +Asm Token +ynamo DB +e lect +j sp +s md +Get Result +ĠG S +Ġ'_ ', +getComputed Style +W ALL +qu ash +pec ially +current ly +]= ( +decor ators +CY CLE +elen gth +i pts +k arma +Ġp pp +S chemas +Ġm ongo +get Rows +ĠS olr +const Data +Ġnode Id +Ġav atar +uc cs +ĠST OP +team s +T LI +Ġ$ ('[ +Ġser v +On Failure +Ġparent Node +ITE MS +ĠBu cket +RT M +ĠSim ilar +Ġunmarshalled Object +ĠS ID +ĠS dk +ĠF l +Res ol +Call Site +Ġ"' "; +Americ a +Q Point +al m +Ġq scriptvalue +ĠK o +cbiAg ICB +ĠQU ERY +D ynamics +b yn +if c +Ġ" :: +ĠEn abled +Ø « +Ġm usic +get Timestamp +Ġex periment +To Left +Rel ay +Ñĥ н +Ġperiod s +in finity +Ġt CIDLib +Ġp unctuation +Ġb idi +Con currency +Ġg ene +\\ ! +Th rottle +Create Time +39 3 +ĠFix ture +F j +r tx +} \\ +ĠA x +Path Name +cre asing +Ġorder By +Validation Exception +Ġinject ed +Ġin verted +ĠE CC +ĠIn ject +Or Err +Ġro s +ĠRT LIB +/************************************************************************ ****/ +ĠG aussian +Item List +Root Node +getFoldWidget Base +Ġ æĺ¯åIJ¦ +ĠS UM +con j +li est +Init ializes +select ing +xu ICAgICAgICAgICAg +Amb ient +i Y +Ġs weep +shift s +ced ures +fade Out +ĠGu ard +Unre achable +Sized Buffer +WEAP ON +Ġin cr +To Lua +Mouse Button +æķ°æį® åºĵ +etic a +Deserialization Error +E OT +G aussian +r ation +Ï ħ +Ġb ios +lic ant +Ġlist View +network s +MOD IFIED +Ġa fs +Ġa rena +St ory +br d +Ġpag er +G PS +S olve +ce mb +Ġ* ******** +Re order +op ro +"] } +random Element +ĠCal c +P LAIN +c um +v etica +ĠD F +ĠP eer +ph ases +Ġcom pptr +IS DN +get App +set View +ĠD OT +os pace +read w +.$ ( +Ġlog out +command Worked +Activ ator +catalog ue +C RO +T Value +to string +Ġnet if +spec ies +Byte Order +DOM Element +S g +im ax +div ision +88 21 +ĠTrans former +g ens +m il +ĠF FT +check Type +33 6 +ĠPsi Element +getEnd Rule +ĠHo ek +MUT EX +" # +m ir +Ġc aptures +get Control +23 7 +pers onal +P TRACE +Ġin file +ĠF ollow +ĠB AD +Node Container +Of Year +Http Exception +relation ships +/************************************************************************ */ +Capture d +F v +ad itional +ĠP B +ĠW allet +priv ErrorLog +SU P +Select able +TRUN C +Stateful Set +L od +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +sp s +Ġbase Path +Ġdesc ending +Ġ((( ( +Expect ing +getComment RegionBlock +* >, +{ % +Ġget Input +mt i +99 8 +El m +LET TE +d asd +la w +Ġde tector +read ers +Ġim possible +ĠQ Image +AST Context +ĠXml Element +Tmp l +Ġnl attr +( << +K in +V BO +Ġp apsz +", ( +set Start +ĠR cpp +Ġsh allow +44 44 +contain ing +Ġparen theses +f info +l strip +oc rr +Ġget Content +ĠCh anges +ZX N +fill Style +reject ed +Sa ver +B mp +m ant +Ġin consistent +Ġ& (* +up ports +St ick +ĠRe ason +18 3 +ÙĬ ÙĪ +errit ory +n Height +as in +ult aneous +Ġor th +Ġtrans mission +88 3 +fl g +ĠCPU s +j y +dd l +ĠTest Case +URL Params +39 5 +FL IP +Ġrelative Time +Ġol dest +> "). +b am +y uv +ag ue +put Int +mod ifiable +Normal ization +Ġnetwork s +prob ability +G un +n ss +ce c +16 2 +old mask +US ART +sw ipe +äº ¤ +Ġrespon ding +éħ į +Q Graphics +ĠF IN +LE AVE +Ġattr namespace +ĠBO OLEAN +cach ep +L ate +al gorithms +get By +ĠP USH +out ines +low est +Device Info +uc lide +tab Index +Ġstrict ly +IB ILITY +Reset Timer +ĠComp utes +ä¸Ń çļĦ +Lim ited +swift mailer +reserv ation +int ensity +Get Options +Ġget Description +RO WS +Ġpin ctrl +S rv +Re moval +To Write +SS A +XML Schema +gpi os +; ') +a C +c aptcha +l dev +In Memory +ST ENCIL +be ef +ãģ Ł +Ġpass phrase +Pr ism +Plain Text +*|\ /\/ +W arp +ub it +RE ACH +Ġun load +): \ +With Path +so y +Av ail +rott ling +*\* \/\ +2 14748364 +X Size +Z s +k hz +Ġm igrate +Ġh apd +ac cepts +xml Writer +enumer ator +U CTOR +i ann +Ð ŀ +Re mark +). *\*\/\ +ĠW rapper +Read Closer +conn track +Star BlockCommentRe +triple StarBlockCommentRe +singleLine BlockCommentRe +K d +De ck +=" {{ +UN EXPECTED +has Arg +Ġmin i +Te X +Ġattach ments +Glob Star +, "" +k B +Î ² +re versed +Ġ" |" +Ġas d +ĠW D +equal ity +Call Settings +33 1 +Ġden om +R IS +int ra +Config urator +td m +reset Text +Pr imitives +. - +l ck +Ġin jection +ĠD K +ĠTr uncate +DR IVE +anch ors +ĠQu ant +Suite s +ENC ED +ĠC c +Ġg fc +Ġvalid ates +Diff use +Ġ{{.* }} +interopRequire Default +h il +s ab +is instance +// \ +pe lg +40 8 +ä½ ł +Ġtermin ating +Servlet Response +Ġste reo +P n +d mac +in q +ul fill +bu gee +To Send +Ġcam paign +Histor ic +pelg anger +B ench +h ero +St ages +cur time +sw agger +Ġ. ' +Set Texture +"; } +77 77 +aut oc +GAC Y +INTEGR AL +S ms +k time +Ġm ips +get Iterator +ĠA tt +pro log +Ġx xxx +Close Body +064 1 +ĠCONTR OL +to plevel +ĠE mbed +Ġ4 000 +mt k +BO UN +Ġunder line +Ġdecor ated +ĠMatching BraceOutdent +G DB +Ġc ame +() && +ĠC File +)); \ +Ġch ains +Ġun specified +ĠDe ep +Packet Metadata +Ġimplement ing +4 09 +r ift +Re ach +Start Position +$ , +ig ible +con trast +Too Long +< \ +a Event +Ġar y +ĠF ULL +Ġret code +model Class +down case +ĠGlobal s +promise s +Dop pelganger +I a +j id +Ġf flush +ed u +Ġget Resource +DS Generator +C SI +N ix +() +CH AT +scale X +Ġtitle s +disp osed +XB vb +Ġrecent ly +ur is +valid ated +child Node +bind Value +)? ( +ENU Win +åŁ Ł +T ML +f scache +get Params +set Query +ap y +ĠI OM +32 9 +37 4 +ĠPy Err +previous Sibling +RA ID +8 22 +K w +er ate +lace d +Global ization +ar ms +Ġn arrow +List Value +ĠTIM ER +L s +M aj +] ==' +x BF +Ġn dev +(" ")) +Le ap +Sp ill +Ġaccess Token +Q c +r token +Pro filing +Un less +) '). +[ \" +ĠC AS +ĠRe covery +instance Id +Ġbit rate +ĠData set +total s +font size +è¯ Ń +ĠSm art +j shint +k f +set tlement +Ġe ol +Ġ4 80 +04 33 +ĠXml Schema +* _ +ĠC MP +Ġh or +qu iring +Ġtr ick +SE CT +IT ext +pb mc +cip h +L UN +get Declared +Ġh ue +Un wrap +Ġtext ual +оР¿ +Ġ'_ ') +IGlm ICh +Ġs st +id p +tr iggers +ver ification +8 34 +P SA +v js +Ġf riendly +ĠI AM +To Bytes +cl ist +red uction +ĠX OR +[$ _ +Ġsy mpy +listOf Errors +XBvb mVud +ĠUn marshaller +Ġrel ations +Title s +//////////////////////////////// //////////////// +Q H +po ke +Ġnum Bytes +MD S +Ġhash ed +configuration s +Ġ'& ' +å®ŀ ä¾ĭ +L NK +W J +t cm +en ess +[] } +time delta +02 4 +CE L +ĠAd vance +ĠSpec ific +Ġden ominator +ĠAbs olute +m Type +param Name +MA Y +user Info +Ġkey len +Ġup stream +Ġrequest Id +sk t +Ġ8 2 +100 4 +ĠMatch es +B ands +V b +ent y +ĠS core +Ġ_ $ +ĠV G +ome ga +9 000 +H ouse +ur ious +if m +Ġm ute +'] ." +"" ") +---------------------------------------------------------------- ------- +Memory Stream +Fire wall +=| >> +u ap +y z +ĠD DS +To Check +Ġget Config +ber icht +create Object +pre release +Cluster Role +Ġart ist +Lim iter +" '); +ĠCon f +Color Space +ĠPar agonIE +ĠBIT S +ALIGN MENT +ĠParameter Direction +isF inite +× © +ew idth +(){ }, +cast er +Install ation +T BL +s info +é ĵ +Ġ" (?: +St udent +Ġ? ', +Ġbu gs +VER SE +Gate ways +f usb +Ġget Node +File Descriptor +script PubKey +Local s +---------------------------------------------------------------- ---------------- +áŀ ¶ +Diag ram +ĠRece ived +Ġ ------------------------------------------------ +Ġp et +'] ][' +Ġout come +Code Generator +{} '. +CLA SSES +HEADER S +Ġ---------------------------------------------------------------- ------- +T ips +Z t +d cache +w sgi +Ġ' ), +ĠC enter +ĠP ref +Data Context +Ġdev priv +Ġdi vided +ATTACH MENT +@ - +L ING +de letion +Ġf rm +test case +Object List +Ġ` ( +100 1 +(". "); +Ġplace holders +ĠDecl aration +FIN ISHED +() ], +set Cursor +Ġx cb +Start Pos +Entity Manager +Ġv addr +ĠI CmpInst +ĠM X +04 9 +ĠON LY +Pe ak +] === +Ġf seek +ed x +Is Visible +Inner Exception +Partial Response +Exceeded Exception +! "; +' >" +Ġint ention +IN Y +ĠW arn +Ġconst expr +Ġ4 01 +Ġjson Object +Ġca using +START ED +HV l +Ġp du +Bit rate +HTTP StatusCode +nes dev +b ill +p P +q name +Ġa abb +to Contain +Get GUID +Ġtrack ed +K NOWN +W r +b ay +min s +client Y +full path +oton ic +> ). +H FC +s riov +Ġre act +test ream +ib ilities +chr is +Mac ros +upper case +ĠUN IX +//------------------------------------------------------------------------ ---- +Pe ers +Rew ard +âĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶ âĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶ +5 35 +L g +S sh +__ .__ +Ġuser Data +Ġobj s +Ġover lapping +ĠInput Service +Ġesc aping +", \ +ĠS ci +class CallCheck +check For +OS F +=\" $ +ai ro +ĠPre view +dj ango +ĠSPE LL +ĠsourceMapping URL +Z w +s ized +Ġ0 5 +Ġw g +ĠS HO +(? =[ +frag ments +Î¿Ï Ĥ +*)? (?:[ +ulner ability +R sp +q int +re striction +ut ures +In crease +St uff +back off +Ġ` < +Table Entry +Min Len +sw izzle +Convert UTF +38 7 +åį ģ +avail ability +qd io +f if +To Unicode +IS team +(( __ +gr ader +Ġco v +ĠBase FoldMode +æ¶Ī æģ¯ +w arf +| ~ +ic c +om it +Re positories +rt nl +mm etry +short code +ĠBlock s +Dial ect +Ġstrn cpy +O CI +Ġ// // +ĠG radient +Is Required +valid ates +Ġmax Row +ĠSt udio +OS D +])) ); +Ġ'] '; +Arm or +N q +O g +O racle +m imetype +ort ion +AT I +ĠMod ified +ᣠĴ +3 09 +I tr +Ġf ive +get Editor +ĠA st +Text s +Not Nil +SP ARE +thr ift +F av +] &&( +h bn +n args +Ġg uint +ĠP IL +ph otos +ĠJ Object +go v +CL ICK +OpenGL Functions +Get Module +:" / +color space +FE AT +Selection Changed +åħ Ī +ĠElement Type +s ZW +ĠR M +dis ks +Ġad res +Cur ves +]+ )? +fb dev +Recogn ize +F irmware +G am +S IS +Ġm ins +lic ity +Role Sizes +ZX M +Deleg ates +Ġin lined +ub ar +.' +H ls +o ops +à ´ +err Code +ĠM USB +Response Headers +ins pector +86 7 +ĠEX EC +activ ities +xs lt +ĠRece ives +*$/ ); +L t +] (); +` ; +b str +ĠP riv +Ġat ol +Ġ"' ", +ĠBack up +æĮ ī +lo ud +ĠS un +ĠD uplicate +list Item +dm abuf +va ult +aut om +Culture Strings +. ")] +ĠC ost +Ġfile Info +Ġpo DS +Ġpref etch +Fri ction +x BB +et ra +ĠF EC +ix map +field Type +LA P +exception ToString +"+ ( +Ġ'= ') +V BR +us ive +to gether +ĠF PU +Set Param +=' . +Inter p +Ġinter active +seq no +fil eno +Tex Parameter +security priv +months Short +ĠPlace s +fall through +inem atic +_ ', +Ġsh ost +24 7 +member of +Ġreset ting +çĶ » +读 åıĸ +read String +Not Empty +On Next +Pre processor +ĠFile OutputStream +SCR IB +SN AP +Tun nel +A ID +E AX +K v +is Invalid +ach er +TI AL +Off s +Ġoss im +m ers +x cb +Ġb attery +32 6 +()) }, +Sub Class +34 4 +Ġdis abling +rec laim +fade In ++\ - +ester day +Ġac quired +AST ER +progress Bar +Chart s +inter action +ĠSet Up +Create Directory +Ġsd io +ĠBack bone +Ġkv mppc +d quot +n as +Å Ļ +(" {} +ĠS ock +ĠH it +Ġ8 4 +Ġappend ing +Ġgr anted +Ġwiret ype +W il +k J +it ers +TH H +SER DES +MON O +|\\ * +Drag ging +ĠARCH IVE +$ \ +O UR +Y s +p L +u z +ex press +32 2 +Ġdesc endant +tab index +54 4 +skip py +Built In +M t +P d +is space +Ġm ention +In Scope +Ġget Width +Ġget Kind +=" < +55 7 +DD D +RC V +Ġtri p +9 89 +S CEV +m info +re cycle +ret code +Ġp len +Ġp lat +one of +Std in +] '; +Ġf at +lo ose +Ġ2 70 +Form Data +Top Left +non zero +ĠEditor Cell +Disposed Exception +art s +ĠM ON +ld ns +Ġ10 5 +Host Port +Ġmix er +valueObject Src +foreign Key +ĠBoot strap +X c +ĠS EXP +IO V +Ġdis cover +CI A +regular izer +ени е +" '; +B link +G PI +S cores +m sa +get Region +ĠD rv +ach ieve +Ġget Height +__ ), +ĠPar sed +":" "," +Replica Set +trunc ated +ĠCho ose +ĠInte gr +B AP +R ID +b GU +Ġre draw +ht ab +(), { +Ġren amed +ãĢ Ģ +Ġcompare To +__[ \" +' - +m agento +Add ition +Is Success +ĠUn do +Comp liance +p Dest +v sc +get Map +ad t +Get Request +Ġun likely +ĠV o +av ings +COM PUT +WE EN +Ġdifferent ly +模 æĿ¿ +Ġre do +dev fn +user info +expected Response +Ġbuffer ing +ob tain +Font Family +ĠEvent Type +R UPT +as f +ĠN X +SU ITE +MM U +Load Balan +(/ < +iline ar +à ± +Ġm eldingen +SH R +Xml Schema +REGE XP +ub uf +ĠN IC +FP S +ĠDraw able +ĠBU ILD +B STR +M anagers +ì ļ +Ġm pt +Ġd uplicated +ft l +Ġad c +Separ ate +qu a +ĠP ACKET +Is Open +Script Context +ĠNode s +ighe id +Ġide al +gdb arch +Ġcod ing +ĠW ave +For ced +open Elements +Argument OutOfRangeException +NOT IMPL +Global Variable +ĠUse ful +Ġ256 0 +Z STD +j m +à ± +im uth +Ġname len +loc s +log f +18 00 +inst ead +Ġassign ments +ĠOutput s +getLine Tokens +Pur ge +ul i +app Name +Ġsp ill +ĠHttp Client +ĠProcess or +rott led +p node +iz en +ast ers +ĠDOM Element +a ffect +om an +ĠC i +Ġnew dirfd +ph b +Ġsc ales +ops is +ĉĉĉĉĉĉĉĉ ĉĉĉĉĉĉĉĉ +Render Texture +H om +s L +In Seconds +Ġ== > +Add Command +offset of +Order Id +UV W +ĠDOM Document +Throws Exception +V q +Ġc vmx +Ġ0 6 +ĠS ur +Get Address +Get Process +Ġget Item +cont ig +ND B +lin er +åĽ Ľ +è¾ĵ åĩº +Ġb size +ĠT Type +Ġnew val +Ġget Version +LL DB +sp f +06 5 ++" _ +н Ñı +ĠPar sing +ĠByteArray InputStream +ç« ¯ +I c +c able +t ween +ic p +get R +Ġ8 192 +EX CL +33 5 +opt group +Ġop Lambda +gl Vertex +Ġt au +6 27 +am ap +Ġb er +Ġv g +Ġin bound +Ġ8 3 +... )) +!= ( +optim ized +C FB +Ġd sz +Ġ(* [ +ĠLog ic +Convert From +44 8 +CONT ACT +ĠStruct ure +COMPRE SSED +in stantiate +Ġsh im +inter cept +")) && +77 8 +ÑģÑĤ ÑĢ +S PROM + Ļ +To UInt +tp d +ge bra +Trans pose +current Value +LA SSERT +BU LK +ĠDelete s +ĠInvoke Options +_ ]* +t weak +est imator +Or chestr +SH ADOW +96 52 +Secret s +Ġdot s +PART ITION +Ġb ss +Com poser +Ġstr ips +ãĤ ī +ĠPhys ical +N p +Ġnot ified +Ġun marshall +ĠReg exp +Change Type +ĠLL V +Quick Fix +audit Str +Ġmicro time +WAL K +I AA +h ir +m Num +or um +ĠN G +Get Node +Ġle ftover +Ġad f +dot ted +Ġdescri ptions +get Reference +ĠH C +System s +ĠException s +Custom ers +measure ment +trav ers +n inja +Ñ į +Get ting +To Local +OT G +vo x +ĠFile InputStream +transform er +jax b +STRUCT URE +è¿ŀ æİ¥ +c ch +d U +d uring +Ġa Value +). ( +Map Index +Collection Changed +Ġprop ag +Ġpriv ilege +Cor outine +Ġprogram s +QUOT A +chi Kit +Ġwebs ocket +Ear ly +atel lite +) # +D ue +p mt + Ĥ +Ġp H +get Collection +Ġw av +ab lk +/* ---------------------------------------------------------------------- +Ġup dater +Ġem u +prop agate +arb all +T earDown +Ġc laims +he ar +Ġal though +View State +bit mask +SP A +P Z +Ġc sum +Ġin voice +file stream +OM X +sp ent +GE TE +By Ref +Content Loaded +Ġper l +Cli pping +abcdefghijklmnopqrst uvwxyz +tain ted +9 08 +Q v +Ġd ictionaries +ĠS ynchron +Ġ[] ). +SC LK +ĠAR C +on Match +et ency +ĠD ocker +Ġr ss +Ġx hci +ite ct +ĉĉĉĉĉĉĉ Ċ +Mouse Over +Ġlook ahead +ĠMO VE +Spell ing +Asc ending +Ġvx ge +D ma +T iny +Ġint ensity +assert Identical +ĠUn der +unlock ed +Ġpass wd +ĠUN Z +ĠSign ed +ĠCR YPT +FH IR +d types +Ġf sm +Re use +Ġpost fix +âĢ Ŀ +DEN IED +E tag +b logs +ĠD istribution +Ġread b +Member Type +quant ized +NON BLOCK +ISC SI +toolStrip Separator +D DS +N est +ĠH z +ie ved +Delete Options +Ġ'" .$ +rtl phy +ĠPRI u +Ġfraction al +ri bed +ĠM Bean +lock res +init iator +Throw Exception +æĺ İ +Break s +Branch es +Complex Type +(/\|[^|]*? $/," +(/\|[^|]*?$/," |"+ +k id +al ax +Ġst k +ĠI ts +ĠJSONRPC Error +get Definition +ib atch +ep fd +last Child +ĠCol l +diag onal +OCT ET +F in +b size +Ġd ag +ĠCon current +RD MA +PAN EL +ĠSTO RE +c fs +i ri +de comp +ce p +Ġp Info +as sessment +max Value +Ġ7 9 +sys vals +Ġtri vial +database s +) ": +U CODE +Ġget Key +ĠG l +Ġcurrent State +Null PointerException +ĠRawSyscall NoError +r buf +th ickness +ĠC ERT +Ġh ier +Get Max +create Class +VE H +ä» » +mov exattr +t foot +ĠP AL +Get First +Ġcolumn Name +ĠLua API +Optim ized +Mach ines +de structor +Ġre cipe +Ġ[ \ +Ġr data +List Size +IM R +ãĤ ¢ +PER SIST +LV L +ĠNORM AL +F String +Property Descriptor +layout s +ĠDebug Loc +ĠDis card +X p +e os +Ġp andas +Ex if +Ġres id +be am +a ad +m cp +ignore Case +ã o +P okemon +c ircular +l ime +m ur +get Un +co efficient +ol a +Ġse cp +ĠB CM +ĠL EB +UN IF +Service Account +34 0 +Send Async +exec uted +xFF FFFF +execute Query +ta u +Temp oral +ĠJS OP +patch es +ç® ¡ +Q Size +d atal +s val +// ", +Ġw o +Ġw tx +St able +CRE ATED +yyyy yyyy +SAMPLE S +singleton List +IOM UXC +è§Ħ åĪĻ +O Z +r ws +w arm +ri pple +ĠJ AXB +Query Result +Ġpre defined +09 38 +los ses +Ġxy z +å¢ ŀ +get value +he matic +Ġe cs +59 6 +Render State +Bl uetooth +OSI X +ĠP OS +Update Time +=\" ${ +inner Height +CAL C +it t +ver bs +Value List +Ġget sockopt +Ġj class +Var Decl +dat atable +Protocol Version +ĠPCI E +Ġeffect ively +ç Ħ +in crease +Ġg lfw +RE START +Ġget Path +MAN AGE +Ign oring +id l +ic sk +Ġm ong +init ialization +ãģ į +éĹ Ń +). ..) +start Row +mem cg +M UTE +get Variable +text box +max Results +ass ume +G HZ +Ġd atalen +con crete +Ġst v +Ġfor ces +Ġus ual +cm Nl +ĠView Group +ĠSY STEM +uclide an +O HM +d T +ra cy +ĠL at +Ġiter ating +days Min +ĠNdb Dictionary +Ġinspect s +BROAD CAST +- */ +n buf +p Object +s dr +Ġt u +ĠB ank +sh p +be en +Ġlog o +BU til +Ġcontrol led +parameter Order +Ġcert s +Ġassum ption +toHave BeenCalled +B irth +s R +M BOX +Z GV +k ana +al num +(" ")); +ĠR pc +path info +Ġrad ians +ĠDig est +er b +ĠP WM +ST DOUT +Exception Handler +IT rans +freq s +LINK AT +ĠStream Reader +Ġelim inate +ĠSHO ULD +ĠD AT +ĠW I +еР¹ +ĠRun ning +(" (% +ĠT ax +Get Player +SE VER +Ġstart State +ERROR S +ĠVAL ID +Shortcut s +iop ort +Care Context +B CB +H KEY +L AND +ex ynos +Ġe ther +ST O +Ġas io +assert String +Ġoutput Stream +ob servable +run On +Ġoct al +K U +t one +v dd +ID B +Ġcurrent Index +Method Type +5 76 +Ġs mu +lo re +Ġd ow +Ġ_ : +EN E +class ification +IV ED +Ġblack list +T ries +y ui +get Real +im en +Ġl y +Ġcurrent Node +Mem Operand +... "; +pol ar +gl ad +transform s +Ġpract ice +H Nl +] "). +p E +Ġm Data +get Level +ĠD N +Co ol +resource Name +Mo ves +require ment +23 885 +oin tee +scal es +Colour s +Brace Pos +B URST +c api +mp lY +De leting +ĠW ID +Ġsource File +Ġme i +ĠIO bservable +Ġunder stand +åİ » +mis sed +Y Size +In Place +ĠC MS +sh ade +20 63 +Ġcomp lain +Case Insensitive +ĠData Set +Ġrecogn ize +Anno unce +# {@ +F AT +K m +ine se +ID L +Ġover laps +Ġview Model +Interval s +æķ ´ +Ġprop agation +п ÑĢ +Coded OutputStream +UmV hY +/ ); +` ), +fe eds +Ġk time +99 6 +37 9 +Email Address +sat uration +Ġobs olete +C QUF +e re +t Y +in Array +col lected +tp m +output File +AP SE +Pop over +EXEC UTE +REFER ENCED +ĠRot ation +Ġn ss +co f +ĠS UN +.... .. +å¼ Ĥ +CAL IB +ĠWH EN +B ij +c vmx +on Before +qu et +md sc +Query Parameters +ĠEn crypt +Edit Text +Ġmenu Item +Remote Exception +ALG OR +CLEAN UP +stones oup +4 10 +re stricted +Ġc nic +Ġs ized +im ity +Ġget C +Ġ# > +Object Array +Time To +ft s +Ġexist ence +Ġpromise s +496 729 +PLAN E +n curses +x max +Ġv n +ub mit +Ġget Title +Ġj e +ps mouse +Line Length +input Stream +ĠLL C +st ag +Ġc ub +ĠM anaged +add Command +Fact ories +75 11 +Instrument ation +ĠDr upal +j avadoc +ĠA ns +Ġnew s +__ (" +BB I +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ċ +Stack Object +Db Context +b ow +c ad +f imc +Ġ( + +as ide +od s +test Name +ĠL R +New String +ĠY es +ĠClass NotFoundException +ARRAY IDX +åıij éĢģ +ValueObject Bean +if index +Ġ2 02 +Ġal one +ĠAn onymous +Ġob servation +Ġcomput er +ĠTIM x +Ġfew er +Ġc cb +get Plugin +get Columns +ĠM ULT +Ġsplit ting +Ġ"$ ", +LIC ENSE +ĠUB IFS +' & +( :: +D v +ĠB OM +Mask ed +tip c +ĠOr ig +J vb +r map +ur on +Ġp This +ĠA sn +op r +To Document +var iation +{} ] +Search er +FRAME S +ä¸į èĥ½ +ĠPers istent +ĠPRI x +ĠBuffered Reader +Ġunre achable +z node +im ens +== | +Ġat m +For All +host ed +Style sheet +control led +throw Exception +Double Click +comm unicate +ĠCE PH +Ġe core +") }) +AA AB +Request Context +App ender +GL float +domain Factory +ภ¥ +screen shot +sensor s +NewErrParam MinLen +? >(" +G old +m ak +Ġv ga +set Auto +cont inuation +ud mFy +Lo bby +ls m +DD Do +Ġinitial ise +|\\ . +Frag ments +: ]: +E EXIST +data GridView +code Coverage +ĠProcess ing +REST ORE +Ġcut Ver +TraceSource Accessor +e ight +h File +vi br +os m +ptr ace +Min Length +Layout s +ĠTime val +ĠIP V +Upper Bound +mF t +BAB A +899 4 +K a +X n +p map +:: * +00000000 0000 +IS upports +pre ct +prepare r +订 åįķ +", [" +ren ch +ĠM K +ĠL ike +Trans lated +allow s +parsed Frame +G s +Get Target +De queue +double Value +Ġuc first +Ghpc y +O Data +c sa +is Second +Ġ\ '' +pi ct +cre ments +ĠOutput Stream +ĠPer f +pag inate +Ġmeasure d +K Q +P J +Ġg ss +ver ifier +object Id +MC Inst +Adapt or +v table +int c +he res +ĠM lock +Ġregister ing +ĠToken Type +customer Id +ĠTemp orary +Cred s +} "/> +de crement +Ġo ob +bt v +)} ). +. : +L w +t j +(" (" +ĠS implify +Re build +ĠRe cursive +Ġtext After +container Array +Ġconvert To +pred s +Ġans wers +IHJ lc +sell er +n mi +Ġ{ _ +get NumberOf +ĠC os +date Element +Ġz ap +Ġq Warning +ĠUn marshall +Host ing +Ġconnect ivity +Ġpriv ileges ++ ": +E i +I h +p U +Ġd os +"] ' +And Feel +50 8 +XML HttpRequest +Ġ') '); +Ġcombin ations +Ide al +C apt +Ġ  +de tector +Function Key ++' / +Ġcred s +ĠMotion Event +2 66 +d F +is Zero +Ġp Parse +ĠS EM +sh info +Ġkey points +ĠQ P +Ġsc anned +Ġreplace ments +ategor ie +éĢļ è¿ĩ +ĉ ĠĊ +ch nl +dev doc +pre empt +With No +interval s +Ste reo +value Type +Ġstr ipe +Attribute Properties +Ġsearch es +ï¼Į \ +exact ly +SourceMap Consumer +q Q +Ġm ob +ĠIn vocation +ĠGet Enumerator +000 7 +Column Header +pages ize +Ġ'$ ' +转 æį¢ +H b +h Dlg +s rl +Ġle ap +Has Events +Product Id +B DB +C styleBehaviour +p num +Ġn ano +get Double +get FileName +ĠI SC +new val +ole s +Is olation +Message ID +Http ServletRequest +è·¯ çĶ± +N sec +Ġb on +Ġh fs +rc d +ĠQ File +Ġback log +DO OR +Web kit +ĠChar Sequence +RoundTrip per +N pm +l ands +z w +qu at +attr name +Entry Point +Ġpage Token +Ġcopy right +fetch All +Ġaws RequestMetrics +Dependency Object +//////////////////////////////////////////////////////////////////////// /////// +* } +u ations +en glish +ĠP retty +CA S +Ġ"- \ +CRE AT +high lighted +Ġincre mented +ĠCRL F +) (& +s of +DB Instance +Byte Count +gl Bind +enum s +Pol ymorphic +ĠCUR RENT +I u +ĠM unlock +be v +Property Names +99 7 +gress ive +BR ACE +Sw g +* ') +B j +U ED +Ġb rcmf +Ġ< > +Cont inuous +Ġbreak ing +Action Event +33 9 +Ġmark et +release s +Ġ'" ': +Tri via +Ġcons isting +ĠMock ery +Priv ileges +Ġcli pping +Ġintr insic +K Z +b fin +d E +Ġ2 20 +Ġmax Value +ish list +ĠFormat ter +为 空 +4 36 +L CA +S lope +] '). +k Hz +ĠM utex +ĠF TP +Tra ces ++" - +Bin Op +ä¹ Ł +s usp +ĠS EQ +Set Default +Ġz r +Ġgroup Id +Ġop codes +ĠName s +ĠST ACK +az ard +87 12 +Remote Storage +Ġfil p +C yl +get Top +Re moving +ser des +AL READY +Desc endant +has htable +03 5 +ynam odb +DOM Factory +๠ī +ĠPri ce +b ci +k an +De crement +pr v +AN N +Def er +Ġfull Path +fri ends +Ġn lm +Ġp File +li o +Set Float +Ġtest Data +Resource List +SP Y +Rad ians +decl arations +ic m +res izer +vi afb +ĠB ottom +Ġset Type +Ġpar ms +Ġbase dir +aW xk +Security Exception +Ñ ĺ +Ġm lib +ĠI TE +ĠP ages +Ġelement Type +Sk ew +оР¹ +cancel led +Ġoct ets +éĹ ® +Õ¡ Õ +] "},{ +f li +get Left +ip u +ĠR ATE +ĠE SP +node id +PR S +ĠInter locked +æĶ ¶ +) (* +P MA +a GU +e fault +in box +fo g +(( _ +sr f +Ġ"{ \ +Ġ"{ \" +dsa f +W ATER +k vp +get Bo +co bra +Delete Call +SELECT OR +zo ek +x ss +â Ī +Ġb ring +Get Content +type id +ĠR ay +cc i +ĠHandle bars +touch ed +6 17 +Z CB +b rew +co cos +(" ~/ +Ġto wards +sh ards +ser ving +Ġx a +Class Type +24 3 +/************************************************************************ ****** +{` & +emph asis +P CH +Ġ% > +): ] +com mod +next Element +End ing +VER Y +Ġtra ces +cr s +Bool Value +ven ient +sim d +ĠMin or +C f +I Unknown +p fc +| : +Ġc umulative +() })} +Re map +param Value +Tr iggered +OPT S +47 0 +p str +ro i +() != +Ġ" (% +Ġm imetype +ĠA CC +Ġis NaN +fe of +SE LECTION +Map Entry +CON VERT +ĠCom bo +оР¶ +Conv olution +BN X +æİ § +re curse +dd THH +Ġv y +Ġre new +Name To +Ġy min +ATION S +wx String +C tr +M Z +p Current +at las +ĠQ Event +raw Data +current Token +Ref low +Ad v +BUF SIZE +Ġbla h +ĠDecre ment +f stat +r value +t icker +å ł +set Model +(? :"+ +should Trace +prefix ed +Ġsu cc +Diag s +eslach ts +ê ¸ +an de +(' ~ +Ġnew Size +ĠF ac +Resource Id +Cache Size +Security Context +Author ing +follow ing +N om +P SE +ig ence +Ġ! !! +rr d +per iph +ĠE Tag +ĠRe start +(( :: +Be g +search ing +Ġcy l +m xl +y outube +Ġf av +Ġ" ."); +Ġh pi +ĠB SS +ĠX R +IG lu +ENT IAL +Ref er +Ġnp m +Ġjson Writer +ĠQuest ion +K N +p Ndb +t ms +t wl +ro unded +expected Result +Handle Func +Typed Array +6 26 +F sm +get Channel +Ġd ce +Get Async +(( ? +cc d +Ġco unted +vm w +LI R +Ġrot ated +hyph enate +ĠĠĠĠ ĉĊ +Ġc xx +IC P +]) }] +Qu ot +If c +à® ķ +BIG INTEGER +ĠAB ORT +F re +H IDE +O Q +am er +Ġa y +rc p +Ptr To +Image Url +Menu Items +short name +Serialize ToString +Ġ================= ========= +ĠActive Record +Cod er +Ġ= ================================================ +List Entry +Ġ3 84 +Class name +... ') +Ph otos +agent s +. ); +6 07 +get ClassName +ĠUp grade +ĠOutput Service +Mag nitude +X t +m tr +q ml +y thon +Name Space +ens ing +Ġk l +]) ? +LO CALE +ĠTo Lua +ĠInput Argument +ĠHe alth +COMP LETED +๠Ģ +Ġfour th +ĠServiceClient Tracing +) (); +à ¦ +Ġg y +ram id +={ $ +Core Application +Ġ'# ') +aX M +æĿ¡ 件 +ĠSIMPLE PIE +ĠLAT IN +B road +s an +Ġd ct +Ġsp lice +K IT + ģ +is nan +Ġsh op +byte code +ĠIS DN +Vector Type +Pag ed +YWN r +Ð § +ĠP ad +sa w +Custom ize +=\" { +Ret ention +reser ving +Allow s +Ġprec ise +ĠRen derer +a arch +m Y +ĠS SA +tri angles +border Color +ĠCode c +stride s +launch er +ĠMk dir +Logged In +C ats +G f +id able +Ġ0 8 +Ġ2 54 +Ġsh m +Ġread line +Ġgra vity +HIST ORY +* : +Ġ" ]" +ĠA verage +ĠF ront +Ġj it +SI P +rep lication +collection Name +Ġet ag +raise Error +icip ants +ĠAUD IO += . +E POLL +P SS +yst ack +Dis charge +FL ERR +åĨ Į +Pol ling +åij ĺ +Calcul ates +b olt +q ed +x ref +Ġcon cept +Ġst icky +Ġ6 0000 +color Idx +Slice s +capture d +pst est +à ĩ +Ġw arm +Ġu wb +ĠM SB +++ $ +Ġlocal Storage +Minor Version +n ice +set Scale +ĠT akes +com edi +Ġfree ing +Ne cessary +<= | +K nob +x late +Ġ* )); +Ġget View +io va +Event Name +table Future +ivic rm +> ". +ck sum +++ + +Sh aders +pad s +ĠGNE AttributeProperties +comp s +Write All +Ġpool s +ĠMo chiKit +F ence +c bs +h oriz +v pc +é ĸ +Ġf dt +Ġen caps +no uveau +ĠJ avascript +Ġdro pping +G rab +H eld +l L +se ason +Ġo Settings +Ġde ltas +Se ason +UN Z +ĠCom pression +tt f +Annot ated +Dig ital +202 8 +zt BQU +Exponent ial +ĠG CC +Ġtest Cases +RT MP +hs ync +Internal Type +G MAC +on Update +St apel +Data s +ĠV A +Ġdistribution s +H ang +W p +f lock +ĠS CE +Un ichar +ĠQ Painter +content Window +Selected Items +Ġmaterial s +对 åºĶ +Trunc ated +F ib +Ġ ---------------------------------------- +re levant +il de +get Uri +ĠS pawn +element At +response Chan +Dir Path +Ġmo q +n ZX +Õ « +ç ¦ +Ġs ynthetic +err c +Create File +Desc endants +by e +GL uint +Border Color +110 5 +assertEqual Int +toolStrip Button +ĠLW IP +9 87 +Ġm ir +Ġm Loc +'] =$ +Event Impl +OK AY +ĠUn register +æĸĩ åŃĹ +sol r +9 46 +r ang +ĠA pache +Per Pixel +Ġattr name +ãĤ Ĭ +Ġenter ing +gradient s +F rozen +` ", +c ircuit +t var +à ¢ +ĉ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Ġ ENOMEM +Ġe lect +pr hs +AD B +FF IC +ĠDe ad +UL ATION +Pass phrase +Ġspecific ally +Ġfill s +ĠENC ODING +X il +d ptr +is Running +Ġp cb +get OrCreate +ĠS ORT +Un ordered +Ġstr tr +ĠGlobal Value +ĠFe atures +pot ential +Treat ment +D ex +V v +w cn +Ä ħ +Ġ' "+ +ĠB UG +ĠH EX +Ġswitch es +Parameter Codec +Mark ed +(", ", +Bracket s +ĠActiv ate +X MIT +x M +db m +construct ed +vocab ulary +scl ude +F leet +s For +set Input +ĠT OKEN +Ġu df +Conf irmed +Cor ners +PK IX +Zip File +@@@@@@@@ @@ +sprite s +ĠSIZE OF +Ġm tx +Ġl trim +add ons +LE GACY +reg id +ard en +ĠOper ands +AIL Q +ĠCR YP +f usion +ct ls +Ġc riterion +pr c +pp v +Ġcurrent Value +Not In +stream ID +ĠVAR CHAR +Instanti ate +5 43 +d cd +d umper +to ff +ĠD CT +ĠP SR +riv en +Ġout bound +item id +Pre cedence +ĠTest Fmt +exit Code +Ġdi rent +Ġserialized Object +erv ic +I q +Ġp or +ON D +": ( +Header Size +material s +Den y +Poll Fd +ABCDEF GHI +W g +Ġb ssid +get New +') "); +Ġ3 02 +Sh ares +create New +Var Name +Control Point +7 20 +ĠS at +To Float +ST ICK +arg max +round s +Api Client +Volume Attachment +getZ ExtValue +ĠDROP DOWN +Ġh x +09 35 +Current ly +åĪ « +getAttribute Value +Ġoct eon +camel Case +G UEST +in verted +Ġd cb +ll is +|| {}; +sn mp +Encode String +Decode d +hb WU +gers ervic +ĠLeg acy +G AP +Ġ lay +Ġs data +(' ? +Ex posure +add Node +write File +old ier +AB L +ĠFI RST +Ġcomm its +id u +get TableName +02 8 +lin space +áĥ Ĺ +Ġins ensitive +æī ĵ +SOCK OPT +ĠF chown +Get System +ĠR tl +Ġ8 9 +09 7 +Ro i +rate limit +(': ') +/ ************************ +j unk +Ġb ands +to Json +key Name +PC S +ĉĉĉĉĉĉĉ ĠĠĠ +Ġfull screen +DOM Document +ov y +Ms gs +Ġpublish er +Ġbra ces +6 54 +F amilies +I frame +L CR +Q Icon +t weet +al ph +Ġp Buffer +St ale +text s +ec p +ep c +Service Error +ĠEn glish +CHAR SET +905 2 +d aily +h ips +w an +is Int +Ġf ram +Ġp np +ĠF AST +ĠG F +ĠW AF +Ġ@ "\ +Ġmedia Type +D k +H el +en gines +de register +ĠN OP +Ġse quential +last name +Pointer To +Button Text +PAR SER +Fatal Error +ĠDispatch er +st ress +red ient +RT T +ĠKey Event +ĠMC U +p val +con sum +dev id +nd l +ĠAssert ions +Ġfull name +aut orelease +äº Ķ +Ġoverr iding +Ġmigration Builder +is IE +Ġf rees +Ġ1 30 +Ver bs +03 8 +Ġpc ie +ĠMsg Pack +b ert +Ġ( '. +Ġi path +Ġvar y +ĠB i +[] {" +Ġstart Date +http Client +WE ST +q ib +ĠM IR +Ġget State +fe br +cl ing +Ġnext Token +ĠSer ializer +ãĥ ķãĤ +Selection s +SG I +XC OP +LCJ zb +y max +th readed +Key frame +last Modified +Op No +)? \\ +ij it +DOWN LOAD +Ġpatch ed +Ġdead lock +LIN UX +Ġm en +Re location +Ġg test +ĠM ime +fd c +Current Time +tensor s +; = +e ager +in set +st ab +Timeout Seconds +Gu zzle +eme ente +E o +f sp +Ġv im +Ġget Size +valid ity +Ġ([] * +2 19 +_ )) +h pi +p pt +ri val +ĠQ Url +å¤ ĸ +mcb sp +0 32 +Ġth ickness +data Size +new Item +Ġfree ze +IND ENT +á ng +ĠCONNE CTION +Z e +p Filename +x form +z ing +en rol +(); ) +Bytes Read +86 9 +R le +t errain +in ates +return code +ĠS yn +Ġun map +Ġcom pose +ma W +Ġmax Width +Ver ified +ĠTarget RegisterClass +Ġfrequ encies +ĠGra vity +d od +Ġ 设置 +Ġd ur +Value To +Res ervation +ide ographic +Ġmod ifications +ĠRE cma +trace back +Ġdecode Varint +Ġfix es +Tw ilio +6659 2 +se o +is Supported +mp ic +Ġg as +ĠP haser +AB EL +Ġ9 2 +Custom Event +Ġredirect s +Z R +Î ® +Ġ' >= +Record Type +pg a +Ġmock GrpcClient +Fetch er +åij ½ +ìĿ ´ +8 50 +J p +Ġ(( _ +Ġshould Be +gl ue +hdr len +Down Latch +Dat atype +Ġrespect ive +A DED +T aint +f gets +ad or +fo od +ĠO racle +Ġreg no +Ġcap able +Ġcap ital +Bean Collection +Expect ations +k at +p ctx +z v +Ġto plevel +bo gus +Ġalloc ates +sip Cpp +ĠAD DR +ĠIND Array +hed ron +Ġh g +AT YPE +]. ..) +termin ator +ĠCal lable +Ġtracing Parameters +F CS +(" ! +ĠC Sharp +cont inuous +HER IT +EXP AND ++-]? \ +_ {$ +d port +Ġd jango +Re ached +IF LA +Control len +Book s +çĻ» å½ķ +B ill +R NG +Ġb z +Ġo prot +Ġ0 9 +Ġi Count +Ġde mand +ĠR ob +Ġ/* , +Ġns null +----- + +Enter prise +anno unce +Ġ1 40 +sh ash +ĠIn tel +Event Target +And Wait +ॠĤ +4 55 +n py +ĠT TY +ĠN ES +ĠL IC +Ġ3 65 +CA E +ĠGL SL +оР· +Identity Provider +got iate +\. [ +Versioned Params +markTest Skipped +e vm +j fs +{ `, +Ġc fs +ĠN an +class ifier +IS SET +sb d +Ġabort ing +Ġà · +dic om +* - +S ense +v buf +set Path +ĠS ass +data Set +ĠR ex +Ġfile System +SC pnt +ĠUn lock +ठħ +Process Id +ĠY ield +hr u +SW F +Cluster RoleBinding +ঠ° +FFFFFF F +Nix Vector +Geld igheid +Ġp io +set Variable +ri tem +ĠB KE +Read Stream +domainObject List +Ġk Expr +Start Span +Oper ating +Ġ[' - +ĠWrite To +Ġsort able +Book marks +radio Button +Ray cast +C lang +S ay +get Alignment +vi er +Out bound +yy idx +sim ulate +O ES +g mail +oid s +Ġcol lation +Start Info +Ge boorte +Pri ces +DEF ER +ĠRule s +enforce Focus +2 17 +T rees +g B +Ġ' ')); +Get UInt +IC C +ĠQ H +29 8 +Ġ'- ': +vd XJ +att ention +Ġtransfer red +Ġ================= === +ĠArch ive +Ġsimpl ified +Z r +c X +j YW +} '); +pt d +ex perimental +to HexString +00000000 000000 +04 6 +Ġsub scriptions +Ġinit iate +ãģ ¾ +HTTP API +123456 78 +Ġmodify ing +7 146 +C aster +E PS +file type +Write Object +Ġq object +define Locale +ç½ ij +Css HighlightRules +M LOCK +P MC +is AssignableFrom +Ġn avigate +Ġm angle +get Right +ĠS PR +context menu +AP Int +Null s +******************************** ******** +UND LE +quival ence +Ġcalcul ating +hwnd Dlg +Z p +ing e +Ġde crypted +write To +OT YPE +Function al +chip set +rec order +Att endance +orb is +I on +V Table +p nl +z es +Ġf tdi +get Icon +Ġr fc +ĠQ Network +Field DescriptorProto +pan ies +GL ONG +Wh ich +draw Image +XML Writer +NotFound Error +Ġweek s +ĠDec or +Uses With +Ġsentence s +I AM +Ġs us +In vestigation +Ġget Method +EN ET +ms vc +queue Name +Transaction Id +ali ased +integr al +AspNet Core +Ġerr Msg +ĠL PARAM +und ler +iv ore +Pos X +Tag Token +Ġ(!$ . +E CHO +Re jection +Ġex cess +Ch ains +Ġerror Callback +write Head +With Timeout +---------------------------------------------------------------- -----*/ +Ġob vious +slide s +Macro Assembler +æĭ © +Pot ential +f attr +m State +To Right +per im +DE LETED +]) }, +Ġ] -> +Headers Frame +zz z +ĠAss umes +Ġamb iguous +RAT IO +Soc ial +W are +} '", +Ġm Comp +pr une +List Type +Event Log +AG ED +Ġsynchron ization +Measure ments +Fac ing +Aut om +ĠDomain Objects +ĠU CD +At Least +We ather +W elcome +Ġth rew +as printf +ĠI PC +Pro vide +Lo an +59 5 +gerservic enummer +O d +c pl +m J +OR IENT +do i +VER B +ï¼ Ł +variant s +Ob served +Ġsuffix es +Deser ializer +cake php +X b +get Main +ĠA LT +__ )); +Create Table +Ġpo Feature +define MIME +ĠWh ich +SECOND ARY +% & +A mp +v ors +Ġt inymce +Ġsh aring +\\ $ +AD H +ps f +Me i +ĠReplace ment +JK LM +3 19 +Z SA +s Data +Ġc ros +Ġm dev +Ġd ao +Type ID +ĠF ocus +file descr +ĠIn ventory +Ġen gines +Ġsc ans +Window Manager +ĠObject ID +Byte Vector +Ġ(_ . +ey J +3 77 +H r +Ġ Ñĥ +re calc +Key Type +Code ception +SC SS +EE P +Decl Context +COL UMNS +Ġdict s +r isk +(' "', +Ġ8 7 +Ġcur ves +rect s +XML Node +Ġwx Default +Ġdecimal s +NotImplemented Exception +j R +w B +in stanti +Ġd B +ĠI AsyncResult +ĠL SB +Ġset Default +Ġdata Set +On ClickListener +ctrl s +HTTP Request +Ġtri al +б ÑĢ +PropertyChanged EventArgs +Suggest ions +Ġinherit ance +SOFT WARE +Ġmkdir p +Denied Exception +REGISTR Y +) // +w Y +| ^\ +res ync +Ġevent Data +parent Element +oo oo +ĠWITH OUT +dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd +i id +un a +Ġb Is +ad ma +Ġl is +Al so +SH IP +ToolStrip Button +ĠMOD AL +Good s +COMPI LE +' _ +set Object +Ġvar name +max Width +With Default +Output Buffer +loading Text +[ ($ +if name +SS IP +Text Utils +AA P +Ġ8 02 +body IsOverflowing +Ġinode s +:"\\ *\\/", +E a +ĠR oom +ud ents +Content Info +Ġhttp test +ĠGe cko +Wifi Mac +valueObject Dest +Ġsatis fies +éĢī æĭ© +y mmetric +te ss +ing o +get Begin +Ġv q +ap m +ĠI Disposable +min Width +Bo unce +PR IO +Group ed +ĠEx change +ĠRE PORT +T tl +m sc +); "); +Ġn fds +od bc +ĠM ATCH +ac i +ĠQ Graphics +Array Size +******************************** **************** +ĠData Grid +Ġprob abilities +æī ĭ +A void +ĠM IDI +chr s +Scroll View +VAR S +" ?" +P LT +p ul +Ġun ordered +ME L +ĠX P +fc port +Bit coin +85 8 +[\ {\ +ĠEC MA +Ġbn xt +c ff +c sc +s vm +Ġ iz +for d +Get Entity +Br ick +ĠTw ilio +GroupVersion Kind +æı Ĵ +) [' +ĠP hi +En vi +List Node +ĠRe ject +33 8 +!= | +åĬ Ľ +NODE S +в а +S J +S ect +l B +Ġm anner +tr is +Ġ' )); +ĠB ulk +sh iv +Time Out +ĠIf NoneMatch +Ġem ployee +hd cp +Free ze +ĠMap s +pers istence +VAR CHAR +Ġprox ies +L int +] ()) +m igrations +u ing +Ġs pectrum +/* / +ĠG LOBAL +Client Size +spec ification +35 7 +prop agation +Ġstat uses +åħ Ń +ç¼ © +E ither +U it +ĉĉ ĠĠĠĠĠĠĠĠĠĠĠ +Ġ) ? +Ġun managed +Ġon error +ĠIn voker +Ġtoken ized +28 6 +Parent Id +man ifold +Ġ/> ' +ToolStrip Item +Popup Menu +FIN AL +ĠSER IAL +0 80 +Y x +u X +Ġm nt +De partment +ĠU CS +net link +TH R +Ġweb pack +sent inel +bank s +Ġdisp lacement +ĠALL OC +C q +D PRINTK +Ġp sb +end Row +ĠC StdString +RE M +bo o +ĠQ FETCH +Ġpart ner +INVALID ARG ++ )(\\ +K s +re ls +ĠC ACHE +Ġ@ { +app engine +Field ByName +End s +IG l +ĠMan ifest +ĠUT IL +g cmV +l ig +x it +Ġ ill +Ĥ ¬ +IN VOKE +__ ", +Ġ8 000 +uch os +Hash er +ĠDRI VER +A round +K ASSERT +x Axis +de ath +Ġb q +ad oop +px mit +cor rection +dec ision +76 5 +Ġsum maries +Ġstat istic +ERE START +a GV +ĠD FS +Ġget Attribute +Object Data +ĠGet Component +28 7 +Thread State +conv ex +Ġanim ated +nor mpath +Ġfq dn +E CONN +n ls +Re bar +ĠN EXT +ĠD IE +(& (* +File Data +Ġz f +Ġ'" '); +('_ ', +ĠCmp Inst +MER GE +) `, +F abric +G n +a ption +r iff +Ġs dp +Ġh uge +To Call +col group +Ġme et +ET WEEN +Device Name +Configuration Set +Ġsplit ter +Wra ppers +F inally +Q Color +V ST +d iagnostic +l ci +m om +st hru +Ġf ns +Ġm arshaller +ĉĉĉ ĠĠĠĠĠĠĠ +ĠC tor +ĠString Reader +has One +we ighted +PAR TIAL +Det ached +ĠEX YNOS +DIS C +ĠImp licit +Ġes pecially +SF TP +Ġder ivative +biz Content +4 50 +H ar +ue vent +str chr +co llation +Ġar ity +Tag Iterator +ĠPar ses +LAN E +two ord +Forward ing +? >", +Q a +Pro of +EN CH +fs f +Ġ-- $ +erm ite +ĠGL UI +Hosted Service +9 170 +P wd +h ns +Ġp State +ĠC over +ĠF s +Object Class +Ġstr printf +GL X +Http Post +C aches +K O +O auth +z fcp +à ¨ +de struct +Th eta +Per Sample +ĠComp ound +secret s +apache conf +- ": +: ]+ +I map +I AsyncResult +c qp +t iff +or acle +Ġs keleton +op mode +Ġu x +On es +Ġz mq +Q d +ph ony +Dis crete +enter prise +Ġmon ster +ĠHttp Context +Ġsat uration +PY THON +T ST +U CHAR +en cap +Ġv dev +On Click +KEY WORD +Ġ'< %= +]* $)/,"" +Ġclear Menus +Ġhapp y +RU FB +ĠP references +List Of +Table Row +(_ , +jo ins +({ }); +CR M +umb le +Ġmaybe End +Ġwor st +ĠPOP OVER +/ #{ +] ])) +h uge +ĠI OC +sk a +Ġdis covered +Sk ge +ĠRE CT +Old Value +ĠIntern et +Q F +id ity +Ġ/ [\ +IS AC +UM B +]? [ +Ġow ns +D etermin +G ather +Ġ* . +Ġd word +EN vb +old own +For warded +Table Cell +cip line +Lib raries +C rit +Q RST +j wt +Ï Ĥ +Ġs coped +Ġerror Msg +Ġsc m +SC p +api Key +Ġexit Code +super Class +Way point +Ġc in +key patch +Ġ8 1 +=' / +ls r +Obj ID +Ġfull Name +064 7 +cop ies +E poll +ĠS EN +self Link +([ ( +/** /*. +Z q +am per +Ġ" ]"); +Ġo vr +pos als +Ġ"% - +Ġ9 1 +Ġlink age +Short Name +Ġinitial ised +ĠOr igin +VoCollection From +DEC ODER +åħĥ ç´ł +B ay +s byte +Ġt up +ĠM IC +Size F +db i +fn t +we ets +OF DAY +sch er +æĸ¹ å¼ı +% \ +); */ +it ution +Ġa ware +add Parameter +ib yte +=' + +Ġ(' ' +ĠGener ated +ĠRed uce +Ġtor rent +M ater +h yp +Ġm ss +Re action +=" ) +Ġver ifier +Non Query +ĠAl bum +Ġ15 00 +$ ('. +x aa +Ġb ene +get timeofday +Str Len +Before Class +m crypt +Ġp Parent +Ġs uggested +set ToolTip +Ġl stat +Ġcon trast +ĠN pc +En tered +ĠB IN +Ġy ym +09 41 +27 2 +Mag ick +K nowledge +c are +p cl +vi sed +ind iv +AB E +Pre condition +17 12 +serv ative +ĠHy per +4 34 +m angled +t ang +w A +set xattr +]. ( +]) && +wo od +Ġund ers +chn ique +4 16 +Q q +re a +get xattr +In ertia +Ġg reat +ĠP CH +/* ++ +ภ¢ +Ġcred its +INTERR UP +6 97 +T iXml +j n +m hi +re uid +un core +Ġo gg +Ġv st +um i +ĠS olid +rep resentation +CONFIG URATION +ident ical +Std Types +wer k +PREC ISION +s V +v end +get Point +ab a +Ġst ory +LE AD +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +]) ", +mat urity +ĠSer ialized +ALL Y +Ġsynchron ize +åĨĻ åħ¥ +L SR +ic ular +Ġnew Index +read Tag +Ġmarshal er +SOL ID +JKLM NOP +get Random +mp a +Ġget Int +Ġsh ipping +enu ation +Pre cache +DB Cluster +Output Format +17 24 +TIME OFDAY +Go To +Proto Types +generated Column +Ġty pename +ĠCre ating +Equ ipment +r ps +add Param +Ġstring Builder +md dev +AC ITY +Ġthrow ing +ĠArray Set +CB E +release d +Ca ught +Ġo pc +Ġw t +Ġl ng +ĠA K +'] ]) +Ġset Kind +Ġassert Eq +buf p +Inter mediate +exp ansion +ĠRead y +PU B +au ss +SEC URE +Tele port +Q ml +ĠN ONE +tom l +pop ulation +Has Suffix +Database s +Sw agger +Ġscalar s +Termin ation +7 06 +A uction +_ )* +k ubernetes +ĉ ĠĠĠĠĊ +() ||( +Ġm orph +ĠS MI +)) ))); +ĠP e +ec m +min imize +attr Name +display ed +------------------------ ------ +Serialize Object +Ġunre cognized +T cl +a en +b ail +g host +p Num +t ow +Ġn ex +Ġp em +ĠC AST +Ġh ull +api Paras +If Exists +ĠQt Canvas +hy dr +åĩ » +计 ç®Ĺ +b ivore +ĠS aved +max Age +Ġper haps +CC M +sn ake +Sound s +Ded icated +F igure +S uspended +ĠS ig +(' (' +ĠE at +app lications +LA S +Ġext s +Ġwork ed +Daemon Set +Ġoccurrence s +en k +get Val +ĠR AD +Un implemented +Header Text +Ġqu int +ĠRes ume +ĠCP LE +Ġder ive +à¤Ĥ ', +it ives +err x +ind ers +ST V +Ġstring Len +ĠV OS +fs oc +ms vs +Net Office +F print +Ġ! * +bu ck +sc anned +write Field +PC D +Lower Bound +notify Url +same Value +Construct s +ãģĹãģ ¦ +c ate +y A +ag ur +ĠS q +ĠB roadcast +app id +Ġpre processor +Project ile +abb ed +Ġrec laim +ĠSH ADER +G allery +T OR +Ġuser id +Ġdis crete +ĠLoad s +ĠAssign ment +K iB +\ ') +b ignum +c addr +Ġc lf +Ġto c +Ġe cx +ĠR oll +Key State +Item Info +IS DIR +LO Y +replace s +br w +Close Handle +prod Code +terminal Type +å·² ç»ı +K h +d M +p Ch +s mt +Ġc ropped +un mask +set Param +ĠC CT +lim b +}/ . +rtl hal +Ġcomm as +s ph +set X +ĠS coped +Ġe hci +op ens +Test AllTypes +Write PropertyName +Ġgl Bind +rand n +ĠSize Varint +ĠCPL Error +çī ¹ +ĠFAIL URE +ĠFade To +8 40 +G ive +t aken +u o +x plat +To Load +LE M +'], $ +Ġexpected Response +Ġroot El +}. { +respon der +mar quee +createElement NS +ĠTI LE +A br +G race +t ier +Ġn ie +Ġb las +key Value +Instance Name +Ġtext s +Ġmin imize +ĠRequest s +TL B +ĠMark down +coun tries +) ")); +U ps +m cc +r ar +get UT +ĠF eb +port unity +Ġj unk +ĠJ Factory +Ġsource Map +rel path +MC Operand +Ab orted +mock ed +F ulfilled +N GUI +Ġf imc +ore g +Data Buffer +ĠU D +IT NESS +Ġcode gen +ECT OR +ĠDis connect +Sys Message +UVW XYZ +M akes +b E +x AA +ĠN aming +To Json +any thing +Open Id +FS M +OUSE L +J g +re vert +ix gbe +ĠV OID +Be ing +SH O +tol ist +ĠAv H +Der ivative +Ġrnd is +- { +; ( +X s +d ana +m thca +co sh +Re factoring +ĠP ie +Ġsub dir +And Assert +ctrl Key +Ġ'\ '' +ĠSD HCI +MULT ICAST +C CR +Ġif p +ac p +user Context +ft di +Tri vial +=-=-=-=- =-=-=-=- +Ġinvol ved +' }; +T Document +Ġb an +Ġb all +Ġi h +ĠH L +')) -> +ĠSe q +ABORT ED +S olr +X FD +Ð ij +Ġ' \" +Get DirectoryName +Ġget Column +LL V +Key Sequence +ĠH ello +Ġy o +current Node +}} ", +BE ACON +Network Interface +aws err +room s +Wil son +j ZX +ul n +ad vice +Se eds +ok t +load ers +group By +TH REE +Go Test +ĠTrans mit +TA O +è§ Ĵ +terminal Info +Ġug ly +ra ses +ĠP AS +Ġse mi +Ġget Image +Ġreg val +TH CA +encoding s +Ġzip file +Sprite s +SUS P +L mpz +s ut +y u +y ped +able Object +ĠF stat +Ġch op +ost o +Ġstart Offset +find Matching +å¤ ´ +Uniform Location +d Device +get Scheme +add s +Ġq os +Dis ruption +Ġcl Set +GF y +(?= . +5 06 +6 01 +C ERROR +S anitize +] "+ +B orders +Q Z +al c +Ġs lower +ĠB lack +cont ained +assert s +FI R +ob servers +("/ "); +ĠGener ates +4 54 +n bits +s list +y k +on to +ĠS MP +Ġstr Error +Max Results +PRE SSION +(", ") +ĠSM Loc +ZXJz aW +" ') +B OLD +H um +v cm +} .", +Ġ' {" +Ġcon venient +Line Start +offset Parent +Ġany where +Ġexp iry +Has One +Ġdirection s +Ġsl iding +Unique ID +ros pection +UNIF ORM +4 24 +@ % +p Dev +Ġb ash +To Base +Ġget Response +Ġ10 3 +Ġkind s +Ġtouch es +ä¹ Ī +ĠOFD PA +J WT +O j +` }`, +ĠM PC +min Value +Request Builder +cor pus +JS Object +ĠIndex Error +Ġ'\\ ': +Ġsprite s +Mess aging +ĠBIG NUM +M SH +P reamble +in bound +Ġc ron +Ġb k +Ġl x +ĠM etrics +not Null +07 0 +D TR +er ted +set End +ĠS TI +Ġi bm +ĠD warf +To Node +ĠB ACK +Un structured +yy m +Configuration Exception +ĠMath Utils +sort By +sf tp +glo be +s aml +ç Ł¥ +co sa +der iv +The se +Read Bytes +Ġ[' $ +200 2 +member Of +Ġdist utils +Ġrtl priv +ĠRep ly +x H +x ef +} ${ +le le +Ġ' ", +ad y +Pro duces +ĠB rp +Ġdata Size +Ġat EOF +Is A +User Profile +ERT URE +Project Id +o Db +Ġx mit +Ġsh ortest +sn ic +ten na +Ġgraph s +Variant s +ĠSER VER +:"# [ +MILLI SECONDS +w fd +ch es +get Category +Ġd si +:: :: +ĠA SS +ĠA no +IN ACTIVE +Up loaded +Ġro unds +Ġper ms +Changed Event +Ġjson iter +Ġthread ing +optional Args +------- + +Ġpix man +Gk Atoms +3 11 +L TE +M ute +M VT +or Else +ĠP WR +Ġk eras +Sh aring +db h +UN SET +Config Map +Ġcheck out +Label Selector +READ ONLY +plan et +Ġtim ings +Ġcalcul ates +COMPI LER +' { +) (?: +T f +on or +en na +Ġf z +Ġh aystack +ĠWe ight +çļĦ æķ°æį® +Note book +Floating Point +Ġa zure +Ġv pc +Ġh ar +add Handler +Ġset Data +user ID +ZW Q +Ġsnapshot s +imens at +# ! +3 66 +R SV +Ġs sb +Ġ0 644 +ĠP atient +ak Net +An alog +GL int +prev out +------ + +Ġdot ted +I FF +L J +Å Ł +in stant +Ġ" >" +tr usive +set Key +ĠC LA +Ġdef late +cmd buf +Ġbase string +Debug Log +Mask s +clo ser +ĠExt end +ĠSub scribe +ĠDirect ive +I LT +u K +is if +Ġp tl +set Context +Ġg rep +To Test +Ġ2 0000 +Ġen counter +local ized +Ġac cel +Script Shell +Meta Type +tok s +Download s +CID R +C aptcha +c dr +v il +ex cerpt +Point To +post Data +27 9 +ĠByte String +Ġthem es +distance s +ĠIns pector +h ort +m rq +ĠT OK +Ġg op +Ġg ently +ĠO VER +create DocumentFragment +ĠAR N +mc u +RI ER +UL ATOR +87 8 +pw sz +Book ing +Ġfi res +Ïģ ι +v free +in use +load Npm +sub stitute +Be ans +40 7 +throw n +89 8 +arm or +ĠClose Handle +ĠNe gative +TRANS FORM +PROVID ER +6 10 +M UNLOCK +b U +i paddr +x chg +ĠO V +read reg +(), ! +================ = +post ed +Argument List +29 4 +Work list +ĉĉĉĉĉĉĉĉ ĉĉĉĉĉĉ +schema Path +wl dev +B vh +l sa +n ents +Ġx attr +Ġcont inu +Is Dir +Read Buf +"] '); +SYS CTL +ts f +cal lout +fl uid +Gl ue +Ø§Ø ¡ +loadNpm Tasks +m U +v ht +am qp +Re paint +inter mediate +Sub Reg +ĠUN IT +mk time +ĠCBase Entity +D PRINTF +p Msg +if ting +ul ip +iz mo +ĠA sk +(' ( +ĠU String +her cloud +Ġab i +btn Cancel +Ġsil ence +' ^ +8 00000 +Q cm +] */ +err orm +set Height +ON Y +File Manager +As Stream +]+ )/ +EB AD +aff e +Ġla unched +ĠFold Mode +woo commerce +& , +S MS +f am +p rite +s Q +il it +Ġst ages +Valid ates +NO FS +Pass Manager +Ġdecode s +Snapshot s +getText Range +opening BracketBlock +G LES +Ù ĥ +is Same +ad os +be e +byte Offset +INT EN +IG J +Ġq int +28 5 +cr b +88 25 +Http s +ĠRad io +dmx dev +U sec +i buf +Ġin herits +Ġ+ \ +ĠN d +pro v +ll Set +group Size +56 9 +Ġsuccess ors +ĠPl ane +T om +ĠS IM +ind ustr +ĠU DF +new dirfd +ĠRe c +post gres +(\ . +fw state +Ġ201 4 +ĠSrc Reg +è¶ ħ +缴 æİ¥ +M es +g tt +an ium +um em +CT URE +temp dir +fs i +Open Layers +Root Element +Ġdecode URIComponent +M ade +g test +Ġb link +ĠC OFF +und led +File Mode +Ġhe uristic +Ġinit iator +Module Info +Ġopen ssl +Ġvo or +ÙĬ ÙĨ +Tech Talk +STE AM +- ) +R tl +h itch +de mand +Ġw fd +ĠS OFT +Get Properties +"; \ +Ġitem Id +replace ments +ĠCom press +'])) { +Api Key +inc ident +Compilation Unit +3 88 +a E +s ens +ĠE ar +UN SPECIFIED +ĠEn coder +Ġ20 11 +IB M +W w +X E +in ery +ĠS ans +Ġnew Data +Ġ_ __ +OT IFY +Non Zero +ĠApplication Insights +s anity +get Log +ĠO TV +got iated ++ ---------------------------------------------------------------------*/ +A REST +J AX +ĠĠĠĠ ĉĉĉ +Ġt da +str totime +em ber +Ġu Code +ĠList ener +39 7 +è§ Ĩ +æİ¥ åı£ +Ġaffect s +ĠAnaly ze +ĠSeek Origin +L c +N CR +S ATA +T u +p ids +u ari +Ġon Change +hw irq +We ighted +åIJ « +mer idian +adj ac +p Cell +Ġ1 14 +Ġinter act +Begin Init +ĠConvert To +Character istics +Too Short +Verbose Proto +err Msg +=" $ +cy A +fc ntl +encode Offsets +pay pal +inner Text +ĠFind s +ĠSCROLL SPY +J ack +k V +p ill +SS F +FB D +Ġdev fn +Ġem ulate +zone Offset +Pending Exception +Sem i +F UL +get Filter +get Byte +set Mode +test File +Ġj z +EX C +exp lain +diff use +ĠEnable s +Ġperm utation +upt ime +Ġ è¿ĶåĽŀ +id ata +con strain +Ġl vl +En closing +dir path +Log Warning +desc endant +IG lz +orizont ally +grad s +ffic iency +7 09 +b ys +f de +× ª +re ached +-- ){ +Ġ1 35 +UR B +View Group +Property Manager +Im ag +Return Url +Ġ'- '; +Ġdelta Y +Abstract Class +str conv +Ġh ouse +Ġget Cache +End Init +Ġmost ly +0 55 +A FE +S AL +f lo +m hz +q z +Ġc len +Ġm Last +Ġ[ < +Tr uth +target Type +56 789 +ĠXml Document +Oct et +RAD IUS +dav inci +ĠDeploy ment +Ä Ľ +est ablish +MD IO +Stack Size +49 2 +quote Name +GEN ERATED +ĠMV PP +' \\ +V pn +t ch +bb reg +Ġre liable +ib qp +Ġz d +has Value +Tra kt +36 000 +media Type +Ġest imator +SQ RT +Ġ{ {{ +is Def +Ġa o +Ġex planation +MA NT +Class Info +09 47 +PA LETTE +ĠY aml +Over load +IH Rv +Ġsuper block +Sig ma +lz ma +IDENT ITY +d np +q y +Ġc ff +ĠB LE +ĠH Y +time val +Ġread ers +Ġref ute +me ch +Ġ{} . +Ġexp ressed +Open CL +":" + +Connect ing +ĠVer bose +ĠPa use +vZ GU +æ¯ ı +æ¯ Ķ +in place +FI RE +order Id +Ġuser data +And Value +[\ ] +ĠInd ices +busy box +Ġrele vance +Ġhel ps +" =>$ +G Lenum +M SS +v co +item Name +Le arn +ick ago +Ġfield Type +IG A +ĠLo aded +Ġpers onal +X FF +t Helper +Ġf iring +Ġb ullet +new Node +ĠH IGH +ps k +Ġsub title +Lat Lng +Created At +å¾ ® +STER EO +ĠFE ATURE +COLL ECTION +h apd +p block +å ĭ +ap k +Tra verse +ãĤ Ń +Lex ical +ĠPerform ance +getTotal Milliseconds +Ġresol ving +I Collection +d ca +ĠA MF +ĠM SP +ĠO f +ĠEx clude +ĠSt age +lat t +\/ \/ +anim ated +ĠValidation Error +Pres Context +mpl itude +8 390 +N f +ĠE quivalent +ĠPro d +Ne ighbors +GUICtrl Rebar +ĠClean sed +wra ps +Rol ling +V ip +p clk +Ġc pi +Ġde compress +Ġnew Instance +File Attributes +Process ors +Ġla beled +Login Id +Ġdeli vered +C DR +a Name +r dr +é Ł +ine base +Get Active +ans ions +Ch apter +ĠE lf +div a +Ġcallback fn +Ġshift s +plugin Name +Ġbasic ally +TOP IC +(.* ?) +Y r +m ature +s pline +Get Parameters +fe p +ĠE CD +Key Up +ภĩ +ĠNet Office +mV y +need Encrypt += : +H sm +Ð Ĺ +al phabet +ve locities +Add Component +mt t +has Content +Ġinit iated +Ent ropy +chip s +38 5 +Ġselect ing +("# % +ĠBe an +Est imator +ĠCleansed Lines +D arwin +s Z +ss c +Ġch ips +Ġadd EventListener +Ġapp Id +Control Message +WR ONG +Report ing +ĠXml Node +Org anizations +enumer ated +xlb WVud +ĠPRIV ATE +Disruption Budget +c pt +p VM +Ġa State +ĠC LO +Ġset Config +Column Width +Ac celeration +Ġ{{ # +Secret Key +tiny MCE +mpot ent +C ATCH +O z +Ġa ch +ĠP en +MA RT +Ġhe artbeat +FR AC +37 0 +Ġmock s +M f +y ystack +Ġ= ================================ +get Tokenizer +ex periment +(' [' +St reet +ĠB FI +ĠIS R +Ġ9 4 +Post fix +37 3 +respon sive +71 64 +Ġkeyword Mapper +F BO +Ġb unch +Ġcon form +Em ulate +Char sets +ĠUn ary +NO OP +Physical Device +Cop ied +æĦ ı +7 01 +A e +U IS +ap pa +ĠD ash +Is InstanceOf +create Header +msg id +cn f +Ġwa iter +|> | +Ġstrr pos +9 22 +Z et +l net +in cl +Ġp ct +ss d +Ġw w +read Bytes +ĠQ Vector +09 28 +Debug ging +ĠRes pon +GD AL +//================================================================ ============== +Ġbot tleneck +Ġprece ded +AzureOperation Error +D OF +L BL +t stamp +× ł +al esc +ĠC red +oc racy +ĠB eta +Ġ` `, +SC L +27 5 +about us +A j +S GE +Ġv ault +ĠC od +add JS +ST YPE +ĠH uffman +element Name +End Tags +Client ID +ĠPro vide +Ġac celeration +MSG SIZE +ĠMatch ers +Soft Body +æ£Ģ æŁ¥ +l J +get ReturnType +ĠN av +Input Data +Co ordinator +Ġgroup Name +Custom Attribute +Ġll Get +anim ations +> \\ +N th +g ist +n skb +Ġs quared +Ġ" ")) +Ġg re +assert Empty +entity Id +ĠJSON Array +az or +redirect s +4 100 +C z +O y +f ed +f ir +n ud +Ġm Is +Ġm oney +Ġw y +"> % +tx power +core os +ĠCreate OrUpdate +Connect ivity +ĠSw ing +H ING +J ACK +get DB +List By +Ġret Value +ĠJ SApi +Page Number +Has ColumnType +Ġsy ms +Ġauthor ize +cw nd +privacy policy ++ ------------------------------------------------------------------------ +; ){ +Ġ( ){ +Ġin ference +Ġst retch +Get Index +De precation +Value Map +ĠL AN +Error String +ener ation +sa ver +ĠSet Len +Ġcomp lement +process ors +sd a +27 8 +Display s +Ġ"\\ /\\ +TestCase s +GUID ialog +ĠValidation Exception +ĠMsRest Azure +re le +as io +sp ir +addr info +28 35 +Last Index +Ġanim ator +ĠSingle ton +QRST UVWXYZ +o Config +int StringLen +ĠS CC +ĠC li +Key ID +Ġ{} \ +now rap +clock id +Ġsa ver +éĩ ij +ENO SYS +Ġnfs d +è£ ħ +æ ´ +Ġv port +work load +ĠID ENT +Tree Model +и ÑĢ +CBase Entity +f ive +r code +Ġv nic +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ċ +ĠD UMP +ĠM CF +Data Len +': \ +Ġcheck Box +html specialchars +MAR GIN +hib ited +U GE +a ught +d ge +f is +l db +Ġn Size +Ġm otor +sc roller +ĠR OS +priv ilege +On Load +Ġprint ln +pol arity +ĠCur rency +b om +t act +er ber +ic om +Ġun quoted +ĠGet Default +Service Type +vm cs +Parameter List +Dec SendContainerState +Ġorg anizations +met al +ĠSL JIT +F action +c E +p Mac +le w +Re conc +Ġbe am +per ly +rt m +Next Results +GUICtrl Menu +ĠWAR N +x Z +z ig +get ById +no logy +gin x +Mon itored +Down loader +gra ce +ĠSW AP +isNot Empty +COMPRE SSION +E loquent +x ie +Ġm ot +Ġo a +sc ip +Path To +Ġkey ctl +uid ing +Struct ural +67 1 +Ġfin ite +Enc SendContainerState +mov q +LLVM Context +E ase +S LOW +ĠS HR +Ġh dc +row Index +ls rv +Window Update +Ref VoCollection +46 9 +Try Add +Ġsent inel +edi ator +QUF BO +Asm Parser +Oc curs +Provision ing +LIKE LY +is InstanceOf +ĠT or +ĠA ug +ĠN ON +ĠB NX +ĠByte codes +07 4 +Job Request +Ġbar s +Ġjo ystick +?? ? +vote s +ĠTesting T +A chievement +t aint +Ġp V +row Data +Data String +DE LIMIT +CH A +(){ " +CS D +vZ iB +8 36 +er on +and uiding +Re mainder +De activate +sp c +Response Body +Create New +ng doc +39 6 +ctype s +re ach +en umber +if stream +Ġ" } +get FullName +dev tools +ĠL AST +File Id +Ġtra it +Constant Pool +drv info +BY PASS +Job Id +Gl v +çĶ¨ äºİ +Ġv cmp +Ġon Success +Context ual +ĠWrite Line +My SQL +Ġgraph ic +Rest Client +Unsupported OperationException +wheel Delta +S ingular +V ision +ĠP IC +ĠH PI +Bo om +06 00 +26 7 +Ġaccum ulated +J Component +L RU +Ġp run +bb ing +co b +set Background +ĠS ATA +ĠT CL +start Line +comp etency +nt b +DR S +76 54 +execute Command +Normal izer +Environment Variable +4 66 +E ve +f bt +p state +s ans +x j +on ing +Not Be +App licable +Ġnum Samples +uid s +". ', +=== - +Pool Size +Cor rupt +sy ch +(?:(?:\\\\.)|(?:[^ ' +F tp +ce an +Ġs park +lo v +ata kana +Or Die +Ġmax Results +SC AL +COM MA +ĠFile Access +respon ding +mer bivore +Sm tp +ĠAST Node +cid r +Ġaggreg ated +Ġcomparison s +ĠChild ren +Ä Į +ct f +Ġn buf +== =' +ĠS IR +Ġk r +eta iled +has Data +SP DIF +ighb ours +stand alone +ĠAllow ed +p Entry +ĠA lt +ĠB MP +Ġco ol +ĠExpression Type +Tenant Id +3 13 +D an +str buf +get Player +ĠD emo +per ator +Node Index +Ġprint able +Dis cover +ts i +Async Operation +Rect F +ĠDateTime Offset +ĠSize of +ĠWith out +Bi Di +ĠScr atch +" { +ç Ī +Ġm db +write back +Ġloop ing +keep alive +Graphics Unit +tensor flow +associ ations +.*? )\ +SelectedIndex Changed +4 86 +8 250 +as l +oc cur +Ġobject ive +bytes Read +kw ds +ĠDis abled +æŃ ¢ +ĠSym fony +Combin er +Y v +m ont +Ġm si +Ġ// @ +Ġnew Item +ĠP trace +Ġget text +ĠE BT +(( \ +ld o +"), { +Rel atie +mock s +Main Frame +ĠMC Expr +gICAg IC +Sq lite +Iam Permissions +ĠDOC UMENT +. @ +J Text +b rcmf +et ary +Ġs mi +ra per +ĠS Node +Ġar ma +key gen +ĠO TG +file Handle +ml uZ +Sc aler +Message Size +cal ibrate +Redirect s +.*? \\ +//================================================ ========= +M SP +Q G +h j +Ġ( . +Ġresult Set +Sh r +29 2 +custom ers +Ġ{}; \ +ĠPoint s +ĠDep ending +ĠPop up +/? >", +jdGlvb iB +Zhci B +] }); +In List +form Data +"), " +Ġco erce +ĠBu f +expect ing +ç» Ļ +Car rier +bracket s +ĠExecution Context +(?:(?:\\\\.)|(?:[^' \\\\]))*? +U HJvc +p ops +is Equal +Ġt ur +ĠD AY +ĠM IT +Get Image +len p +yn ch +IC sg +trans ports +Trans parency +Integer Value +Drop Target +Ġrec order +editable types +r find +), \ +'] )-> +QU IT +send buf +Cmd Line +Inner Text +ç§ Ĵ +spread sheet +f scanf +Ġt angent +__ | +ĠW ORK +View Item +NE AREST +exists Sync +Big Int +Ġmlx sw +Ġн е +alic ious +H Mg +Q Font +g win +p DX +read Preference +Ġ` & +create Worker +"," \ +box ed +09 8 +graph s +Atom Container +åĨ į +ç³» 绣 +ĠSTE P +atingWebhook Configuration +/ ~ +s box +v xlan +Î ´ +:: % +ĠR ails +TE AM +Ġhot plug +6 25 +am ar +it ype +ĠS END +Ġi pt +AC P +Request ID +Reg el +ãĥ Ĺ +è¿ ĺ +Ġmd io +å¿ Ĺ +maint enance +на Ñĩ +9 34 +B SP +K k +e ente +Ġget Status +cp up +pc f +Task Id +Ġcomple tions +pub Key +mlx sw +ĠSAX Exception +M ysql +c ust +i host +Ġt ape +Ġget Model +Size Type +Not Equals +Active Record +fill er +ĠAllow s +ĠD PLL +Ġch mod +Int f +Ġexp lain +39 8 +Ġcli pped +C ant +d HJ +k addr +z Q +== ( +ĠA ck +Ġh dev +Ġget Property +col d +ĠX PC +NE Q +wr qu +ĠBack end +N Unit +f puts +m utation +Ġf gets +Ġo vers +Ġw nd +ist ical +AN DB +(( ! +}} . +ĠLocal Date +3 14 +z R +get Bounds +ĠD WC +Ġu an +SE ED +Test ed +last Error +Auto Filter +REF RESH +Ġblk Cnt +Ġvi olation +m cr +get Sheet +Ġto po +sc x +ĠB H +AN ALOG +class Map +trans formation +cent ers +26 1 +Struct Field +Ġcpu freq +DIG IT +ĠSdk ClientException +ĠLIC ENSE +s int +re curring +Ġw rote +") ( +Ġdata GridView +sd u +irc raft +æĿĥ éĻIJ +n Index +at EOF +de em +Ġ" "}, +Ġj vm +Al gorithms +Resource Attributes +24 12 +Ġinstall er +(?:(?:\\\\.)|(?:[^ " +B as +f its +Ġf ds +In cr +Ġerror Count +ĠG IMP +MA D +cur ves +Start Offset +split ter +sw arm +Ġlib usb +PRE TTY +Grid Layout +Ġsupport ing +]() })}, +Subtarget Info +Jq ZWN +B right +B CD +P VOID +q real +Ġp reamble +ch er +get Doc +ĠS team +Ġget S +\\ $_ +Ġper mit +Argument Error +support Constant +]? \ +ĠRO UND +C as +s us +v host +:" /?>", +\" "; +DY N +Ġa ver +Ġe gg +Get FullPath +To Stream +ST P +Ġtest Parse +Ġ` \ +IP A +Poly line +Ġphys ics +CU BE +does Not +Crypto Key +Ġwra ppers +B loom +G ls +Ġw ps +String Length +riv ed +:" (< +Min imal +ĠReg ular +LOG ERROR +ĠOutput Interface +iph ers +1 0000000 +w itness +to h +][ - +hw c +Ġ10 8 +Fact ors +ĠLe af +Ġactiv ities +mov able +# " +S OF +f unct +m data +Ð ļ +Ex clusion +Ġbe have +Set Current +Ġk calloc +Is Checked +Ġpar port +Ġclient Id +long est +ĠNew Client +Br and +balance d +$ (" +B PP +D CD +s en +s rs +s keleton +Add String +Cmd s +G host +b nd +h ive +k thread +n io +u hci +re cursion +ĠN DIS +ĠD ONE +num mer +Ġqu adr +Bit Set +ĠAPI lib +Ġmeta Data +[[ @ +addJS Line +G SS +Ġ Ùħ +on touchstart +Ġm Context +set Focus +ER CE +reg set +ĠW rapped +28 3 +cal ibration +cod able +nZ hci +iam Vjd +E UR +t LS +RE STRICT +AL ARM +ml c +do Something +ĠSC HED +éĿ ŀ +! . +ing roup +Ġb ed +ĠT ele +De faulted +Ġun bind +Ġdo or +Item Selected +ann ers +(( (( +scale Y +4 64 +4 18 +T CA +x V +is son +ĠA udit +Ġis Open +Get Info +Ch ron +With Many +AP M +URL Connection +define Mode +chunk Size +"=> " +s db +(" ${ +Ġto Index +Ġis Set +Ġfor med +add Sql +Text Align +Ġexpected Value +Ġcur Punc +ĠBase d +paren thesis +ĠREG ISTER +dss dev +getGlobal Context +breadcr umbs +k ex +Ġp rune +ĠP ress +Ġun iversal +TR UST +Config Request +local ization +EX CLUSIVE +}) })} +Ġio base +60 50 +Remote Addr +à® ® +VEH ICLE +8 19 +s prom +x hc +Ġa Source +ĠD UP +Ġan on +char Stream +Group ID +Content Id +Ġq disc +Pre p +Tree WidgetItem +amb ient +Standard Item +Endpoint Address +IZ ON +管 çIJĨ +J vm +b db +Ġv tx +Ġh erm +($ ('# +ĠV IS +Ġdesc end +hd GV +alert s +ä¸į åŃĺåľ¨ +sil ence +. ',' +Ġth rottle +get Previous +In bound +ĠC alle +Ser v +Ġ($ { +Tag Buffer +attribute Value +cd i +Ġtri angular +eslachts naam +J uni +Q N +c len +ar range +is Window +ĠA FFIX +ĠR V +Ġstart Tag +Exec Credential +Packet Size +NEW LINE +ĠPr ism +POL Y +ĠHard ware +j ia +Ġ Enumeration +set To +ĠA DV +ĠN ID +Ġobj c +json iter +sd c +ĠDE CODE +FC MP +Pop ulation +ĠXml NodeType +ju in +Ġexponent ial +gpi od +G zip +L v +X O +w usbhc +tr b +Ġget Table +Com partment +new t +raw Syscall +PE T +Attribute Type +"] ). +ĠHTTP S +Ġlic ensed +ĠMultip ly +M ol +S LASH +a Str +am z +Ġp gid +im b +ub us +qu ite +Ġg rand +Ġget Service +Ġpro filer +bs i +No vemb +99 2 +gen esis +RX Zlbn +è¯ Ŀ +ĠHttpResponse Exception +Favor ite +èµĦ æºIJ +D q +l um +Ġs ir +str y +)? \ +Ġund erscore +ĠUN I +ju il +9 47 +T n +d name +e charts +k M +Î £ +Ġl pc +Ġ(! (( +file Size +App Data +Ġmod ifies +35 3 +Ġred irected +ĠAno ther += * +S DR +); " +ur gerservicenummer +set From +li ptic +ĠF MOD +Service V +output Stream +Frame Rate +gg y +ĠK S +hd Glvb +ĠClear Chr +Ġpin ned +N SU +Y I +à ¬ +re dd +out Error +ord ova +=" - +IT est +idx s +ĠAl location +vid ia +loss ary +Stri ke +Already Exists +APPRO X +I AN +de leter +Ġs pc +Code Coverage +first Line +can on +ĠSh uffle +WE AK +46 1 +delta Time +Ġsw ipe +Tick Count +ĠMin i +//================================================================ =========== +аÑĤ ÑĮ +T t +p reamble +ĠA nt +Con verted +add Header +Test Util +LO ADED +number Format +PAR ITY +FBQ UE +Ġpers istence +mid night +Sem icolon +stroke Color +Mix er +Ġguarante es +ĠCalcul ates +K EN +c ash +Ġm anag +ĠS cheme +De viation +code cs +Ġ# " +New Client +open xml +Ġcons ensus +ĠSql DbType +Ri bbon +tcbl x +IFIC ATE +EditorBrowsable State +c is +Ä Ļ +Ġp addr +Ġin former +ĠH ot +Base Name +pack aged +ĠRE C +names Abbr +bootstrap Table +çľ ĭ +ĠClearChr Flags +at l +de velopment +Ġc db +ĠF chmod +Ġex traction +par ation +av ac +http Context +Start Tag +," __ +Ġpage Number +ĠPR Bool +Bad ge +AQ D +Adapt ive +Shop ping +B v +D av +W ar +Ġ âĶ +Ġb drv +IC md +New Int +replace With +]+ $)/, +ĉĉĉĉĉĉĉĉ ĠĠ +Graph Node +draw Text +CN M +EQUAL S +pw allet +slash es +ĠBuffered Image +ABCDEFGHI JKLMNOP +b cast +St s +ext ure +Write Buf +Interface Type +Mo zilla +WR ONLY +pb iB +Debug String +(". ") +Character istic +ĠSmall String +ĠDIS PLAY +d nd +s udo +y et +Ġcon versation +Ġr tx +ĠL OW +num erator +create Child +Ġread Only +Var iation +Ġrow Count +auto scaling +Ġdate Format +gb m +Me chanism +Ġtyp ing +ĠPO INT +ĠSOCK ET +Ġ'! ' +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +g A +s able +z V +ĠM U +add Component +[' $ +ĠR DS +Buffer ing +ĠUn like +Ġsign s +(/ , +Inst s +rep lies +[^ >]* +MIC RO +UNI QUE +Ġtro uble +Ġlos ses +B ROW +G AM +c umulative +Ġ= ============= +set PrototypeOf +ĠC Amount +out standing +sh l +File Reader +Function Info +06 1 +å¯ ¼ +assertNot Empty +Ġparticip ant +. ), +Ġ Enumerate +ret rans +ed d +Get Client +ole t +no pe +Ġspec ialization +Ġcode d +Ġact s +39 45 +aff ine +Ġ': ', +Po co +den ominator +MIS MATCH +d ice +Ġthe ano +as an +ĠM agick +Ġget Url +ĠR L +ĠE MIT +Function Call +track ed +irr ors +Platform s +cour ses +Ġspe ech +x axis +st all +Ġw cs +ap im +Ġis Object +ĠF ault +Ġres izing +ĠIn crease +ĠRe vision +Test Base +ich ael +me i +86 6 +EXT ENT +ĠMessage Type ++' " +C UI +H s +V IA +Y c +Ġ$ $. +str Name +ag rid +ĠT SK +ix p +Pre defined +Comment f +ĠPRE FIX +ĠRedirect To +5 37 +Ġ( : +un handled +AT R +ac ute +assert InternalType +Ag gressive +AP CI +Ġco ins +Ġos d +the Data +Xml Reader +TX D +ĠOption ally +Html HighlightRules +Batch Size +ĠCan onical +gest ion +Ġinstalled Modules +Picture Box +built ins +DETAIL S +AAAAE AAAA +x dd +{ // +it ative +() ]. +Ġs chemas +get Process +get AsString +=" '. +sign up +ma de +Page Link +ãĤ Į +ĠPR Uint +decl type +Qual Type +Ġwp abuf +FCH MOD +7 11 +P TE +Ġs pend +Ġre aches +Re strict +Resource Model +web hook +CD F +Us ages +ãĥ Ĩ +mer idiem +Ġ?? ? +DH CP +Ġmicro seconds +TUN NEL +_$ ][ +ills Left +*(\/\ *) +ĠSu cc +H ud +d mat +Ġu dev +Sc intilla +AC I +create Instance +Pos Y +MP P +sd hci +PT STR +stack ed +Ġsp inner +Over lapped +coup led +G low +K J +W AN +b en +ĠP ag +ĠR IGHT +Ġne ighbour +late x +Write Attribute +ram s +76 9 +75 7 +/************************************************************************ **** +RU BY +Ġconcurrent ly +codeCoverage Ignore +Ġf lipped +get line +ĠS om +Re stricted +Ġ3 04 +Index Buffer +Ġim ap +CI AL +tm f +hex digest +ĠSy mlink +4 88 +F wd +i wm +{ }); +Î ł +Ġ" '. +pe st +to StdString +ĠM n +ĠF mt +String Array +ĠL U +Ġem ails +Json UnmarshallerContext +AV G +Sequence Number +ĠEN TRY +Ġ================= ====== +enumer ate +Ġpolygon s +Ġmis sed +> ())). +I rp +k R +ĠS cheduler +(); // +Ġg code +ĠF allback +Get Log +Ġpro v +ĠIn stanti +match ers +.' _ +UV D +fast call +ĠBT N +< _ +[ ", +r desc +z ID +de partment +Ġo mega +Message Set +AB AA +000 6 +CON S +remove Item +ĠUn less +Ġtimeout s +ĠÐ » +widget Name +ĠContent Type ++") (\\. +VX GE +//////////////////////////////////////////////////////////////////////// ///// +I MI +S sid +Ġs quares +md ma +Command Event +sd ag +Print s +Ab p +Ġcp umask +Shadow s +Ġп ол +ecma Version +uIjo z +e levation +u fs +Ġ rol +Ġ$ __ +}} {' +get Condition +get Plot +ĠT Y +Ġr u +String Slice +Data Manager +Ġstr ike +For User +Ġver ifies +mac addr +åĽ ł +flatten ed +Adjust ed +checkPosition WithEventLoop +ADH OC +T SC +l mc +à ª +up y +Get Metadata +test Method +Value Generated +HE LLO +ĠJ ERR +Ġapp le +19 78 +Ġ(" - +Ġprivate Key +cancel Button +ا Ùħ +vict im +' },{ +F ab +o Form +Ġf if +int ree +get Tokens +pt x +ver ses +tp c +Ġvalid ating +Ġpr ism +sig Bytes +Ġtab index +Occurrence s +\* ]*(\ +Aud ience +x EF +Ġ' ". +ĠP LT +ain ted +ĠR ich +par ql +min Height +esc ript +ĠCom pact +Ġqu eried +Ġcar rier +Sorted Set +Der iv +\*]*(\ *\/ +9 17 +X frm +Ġn Index +str ipped +time Zone +cy I +session Entry +Over lapping +My Float +ITH M +eat Space +Construct ed +REX IT +Z igzag +m vc +v an +Ġst ick +list xattr +Project Name +//////////////////////////////// //////////////////////// +ภ§ +REL ATIVE +WRAP PER +Ġfri ends +ĠNorm ally +it ations +pr g +file info +]) }} +Ref Ptr +Ġ"" ") +rad ial +ãĤ ³ +ĠMark er +TZ OFFSET +E inde +H OLD +M UST +Ġr ich +28 00 +ZX hw +rypt on +Ġpipe s +7 18 +V ary +X hr +l atable + · +ĠM ul +Variable Name +route Params +/{ + +extract or +Ġ================= ======== +enumer ation +Stroke Width +ĠBound s +ĠQL CNIC +TOGG LE +B q +G arbage +f reed +g arbage +ic ache +ĠC BlockIndex +Ġnew est +local Position +debug Log +53 80 +virt io +Accum ulator +ĠCho ice +m Value +n Y +x J +get Controller +Ġd bl +Get Model +RE DIRECT +ĠG DT +new offset +(? :" +jo ystick +Ro unded +Game State +Ship ment +* ] +H mac +n fp +Ġc entered +Ġ> ']) +Lo ot +]] = +ĠDif ferent +R ss +f est +f coe +Ġc ascade +Ġif i +im show +im ulus +Ġerr InternalBadWireType +ĠN DEBUG +ĠL ABEL +ide al +ĠGet Data +Ġby testream +Ġnode Type +From Instruction +ns Key +]+ " +trace s +ãĥ Ń +unpack ed +Ġposs ibility +) `. +G rip +O fs +S Ptr +Ġ" () +ed p +om a +Cont ained +AC B +Map Key +long name +ĠOut Streamer +Ġ') ') +want Err +/^ ([ +Tax onomy +Ġrespons ibility +('| ', +C ue +p Client +add Data +Ġget Token +arg types +Ġhe at +Array Of +Fr ustum +ValueGenerated OnAdd +A SP +Ġm z +co ins +ot p +Re corded +St aff +ĠP J +sign um +12 01 +base Dir +format String +([ { +56 8 +FB F +sw ab +Has ForeignKey +ĠPar agraph +YX Nz +ä» ¬ +clip se +æĪĸ èĢħ +4 14 +w rb +Ġin de +ve re +up id +to po +to Utf +Key Map +Event Queue +On Delete +Ġlookup s +jac ency +ORIENT ATION +Ġ`& `, +C CE +c and +j J +sh allow +per l +ĠH old +Ġ` . +Client Info +free bsd +Em u +(! ! +Ġlink ing +revision s +ĠAcc um +C and +K g +R IC +Ä ģ +Ġn ir +get Select +set B +Ġ& ) +Sc si +Ġmethod Info +Frame Info +ĠCom pany +ĠObject Type +Has Attribute +ampl ers +Ġdeser ialization +- ', +D ag +f L +k Q +ut a +Re cursion +ĠC redentials +out set +ĠW IFI +Ġuse less +led ge +group id +Callback Base +begin Transaction +pass ive +ĠCommand s +ب Ùĩ +Ġset Error +Un install +()) } +son y +CH andle +DB BB +}} {{ +ĠSer ializable +]* ", +ĠSC U +Ari al +(?:\ .\ +ĠCHAN NEL +IZON A +O a +S ale +W DT +l Q +p seud +Ġ áĥ +od v +=' '; +MP C +fn ic +ĠIN F +vid ence +lcd c +$ " +in l +Ġc cc +** )& +ert y +Ġl da +Ġst udy +ĠR P +ĠG M +Ġtest File +mon ster +22 00 +ĠGL sizei +Success ors +Begin Transaction +Ġpool ing +Cast Expr +Cons ensus +éĤ £ +R Value +m N +Ġm sr +str action +Ġg cd +ĠD Y +To Type +ĠV IEW +Ġro ugh +ms build +ĠIN NER +gen re +ĠAc quire +Codec Info +Quad Part +Ġeff ort +Rich Text +am en +data source +Ch arg +ĠH SE +ĠH ence +write FileSync +Start Of +Ad vert +Go Away +HTTP Client +Ġaccount ing +Operator Type +Ġdrag ging +? (" +X Nl +c L +x ec +er d +st aging +Ġ- $ +function al +ĠF ORE +Get Config +Err InternalBadWireType +Ġret ained +Line Item +Ġ7 68 +[- _ +EST ORAGE +)}} } +FACT ORY +ABCDEFGHIJKLMNOP QRSTUVWXYZ +p dc +x T +ra at +ĠH and +Ġreg num +Ġtoken String +Reference Count +Reference Expression +35 9 +rep resent +ĠWait ing +HARD WARE +succe eded +E ID +J am +M CAST +in finite +Ġn oc +ĠC r +ĠP adding +code point +OR B +AD AB +PI L +pen se +hash er +Filter Type +ঠ¾ +}` ); +REMOT ESTORAGE +ĠLeg al +Underlying Type +E INTR +S Byte +w ZXJ +Ġn Max +col lide +be arer +FO V +E u +O le +P f +Get Param +ĠR aster +ĠE poll +Out Stream +MP U +cre at +ENC ODER +Under Test +supp lied +Ġconflict ing +Bra ces +STEAM REMOTESTORAGE +d um +k L +q g +Ġt arg +Ġp Op +Ġs on +il ib +Ġu dc +De bian +Ġdo ctype +IS M +has Key +Ġcomp liance +SA PI +(/ & +Http Header +Ġ'' }; +OFF LINE +Ġ`` ' +white Space +ĠSA FE +---+ ---+ +" \\ +h ud +k df +Ø · +pa id +ip o +Ġ@ $ +Ġinter polated +27 6 +vor tex +202 2 +/*################################################################ ##### +B Len +P wr +R ANK +Ġp cl +Ġw q +Ġl h +res ched +Get Files +ĠO rient +LE ASE +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Class With +db s +Ġq dev +Ġquery String +ภŀ +ĠTra verse +Ġquot ient +h uff +get Super +Ġk obj +dr ReadBuf +=' \ +:// % +child s +Ġlast Week +CB AB +MIN UTE +Ġsw ig +ĠToken Iterator +ĠDa emon +3 32 +E th +H ue +_ '+ +v st +Ġt cs +Ġb oto +ĠA sc +Time stamps +End Span +Input Interface +Ġtra sh +PO W +CP T +ĠSub stitute +Ġtyp ical +toolStrip MenuItem +ĠTe uchos +" << +5 21 +h pp +ro pping +Set Field +cur Punc +Line End +Ġz k +Call Count +28 41 +ĠBu ilt +PROT OTYPE +çī Ī +Ġevalu ates +hed en +S MSG +w data +Ġre paint +Ġd so +ĠP VR +dev attr +Text Reader +push string +Gener ating +SP AR +Schema Path +ĠAs semble +Ġsm tp +Ġut imes +è¾ ¾ +ĠRow s +MID DLE +E ls +i L +al sy +Ġp Entity +Ġs iz +Get Entry +ĠG OSS +ĠQ Pixmap +Code Analysis +Block State +Ġ{} )); +43 7 +ĠAST Context +é¡ » +findMatching Bracket +r amp +v ld +fa x +last modified +Model State +REG NUM +ts b +Ġsip Name +ени Ñı +D ur +T ell +Ġc name +Ġb cd +ut ations +Ġde activate +12 80 +ME TRIC +float Value +frame set +Ġmo z +03 6 +Ġ"- ") +Own ership +Ġet cd +CAP ABILITY +DAY S +Ġintegr ity +Sector s +ĠGOSS IP +L IF +c buf +th ru +ro ys +get Env +get pid +mo unted +ĠR ing +Ġco vers +MBB I +dash ed +Plus Plus +D roid +H LEN +X y +et ries +get Scalar +Ġfor bidden +ance s +Ġun locked +create Query +Ġmax Height +ĠUn defined +Min Size +Byte TagList +Ġ32 768 +Dec ay +Ġ200 7 +ToLower Invariant +ĠCXX RecordDecl +H x +L ag +S ol +Z u +c HJ +l cn +get sockopt +/* -------------------------------------------------------- +gs o +28 1 +ठļ +Ġio e +QT s +}] },{ +p cpu +Ġ" /* +get Rules +Get C +Get Version +ĠR ock +pc ib +Resource Path +OS State +LOG IC +sv d +lan es +"% ( +/ "> +C ST +H IG +p F +Ġn py +Con ns +out Stream +Ġx n +Test Context +ug ate +Group Info +cb p +," "); +Ġdate picker +cmV ud +Pie ces +Ġeh ca +h Q +data Path +RE LOAD +64 5 +Add Attribute +io vec +sum maries +OS DiskConfiguration +Ġparser Config +:/ [\ +Ġcast ing +aX Jl +VMImage State +F sb +at u +Ġc ue +Ġf air +ĠT ail +Ġst ones +AC ING +ĠX ST +Sub st +Style Class +root Element +resource Id +SP IN +my id +29 7 +Ġfill ing +Shared Preferences +O OL +Q OpenGLFunctions +e igen +ĠC pp +em plate +ĠI Queryable +lock ing +++ ], +Create OrUpdate +Sub stitute +ĠAT F +mount s +ĠOp Code +VO ICE +Must Be ++") ", +Ġist anbul +Stand alone +TestShape InputService +Traced Value +å¡ « +D z +R ings +l te +ar o +Ġ} }, +get A +Ġ' >') +To Copy +Ġget Total +ĠX C +Template Name +Bl cn +Ġam t +Validation Result +Ġextract or +ĠAny thing +Ġconstruct ing +Ġadapt ers +Hyper link +ĠHttpRequest Message +ĉ ĠĠĊ +get Format +Item Data +Table View +FR I +vb G +Ġindic ation +High lighted +ĠLabel s +pctl dev +X Element +k db +x link +Ġ" }") +err un +ĠS CRE +Ġl db +ĠN AN +ver batim +ĠB log +Ġas sembler +comp uter +pb md +ĠReg istration +Ġqu at +OUT OF +ĠST V +Ġte lemetry +ĠCON DITION +Security Policy +ĠCopy To +ĠChar set +perm utation +ĠCount DownLatch +TRI ANGLE +ĠCmd Args +; }; +E LT +E ACH +[ (( +b ak +x size +get Origin +Ġget reg +Ġcom position +"," + +Ġpre decessors +99 4 +BB A +Ġad t +Ġ200 6 +Temporary File +set Target +make file +ĉĉĉĉĉĉĉĉ ĉĉĉĉĉĉĉ +fm dev +Ġdecor ate +8 59 +d as +st ers +ur ate +Ġs rp +ĠM ade +pro duce +Pro v +ĠL IS +Ġ4 56 +desc riptions +ĠSub tract +ĠSimple DateFormat +ĠAsync Callback +Ġf info +In Context +ĠM utation +To Hex +code Point +ĠR ST +Ġcom posed +ĠV EC +Class ify +TH AN +(/ % +ãģ ı +Ġimport ing +AUTH ENT +*> (& +. ([] +E asing +Y ellow +f ingers +g cm +p G +r ptr +× ľ +ag ana +St icky +pon g +ac me +Key Identifier +Sh orthand +debug ging +Ġbit wise +Constructor s +å¤ ĩ +PROP S +ĠLO OP +Ġ'(' }} +Ġow ning +FRE QU +ĠPan ic +$ (' +e valuation +s fx +ĠS pl +") == +ĠH ome +Ġcol ormap +Ġz i +Tra sh +ĠObject ive +Ġ; _; +task Id +PER CENT +Ñģ Ñı +Ġpop ular +BR ANCH +nV sb +Pull Request +è¿Ļ 个 +CONSTR UCTOR +Ġgray scale +! $ +k G +Ġm ib +Ġm angled +Ġw izard +Ġ// # +ĠB ra +], $ +Key Set +ĠH A +error String +Ptr Set +SC N +Format Int +Action Bar +timeout s +Transaction al +fact s +ĠSc enario +TAG S +Ġhigh lighted +XV pcm +ĠColl ision +WriteRaw Tag +c C +c GU +x dp +id ct +get Completions +ol dest +Get Values +Size X +ous and +Ġel astic +Parameter Spec +Func Info +ĠRE FERENCE +tc XG +Rel ax +ĠInit FunctionIndex +ĠInit ScenaIndex +DateTime Offset +numeric UpDown +ĠIndex ed +ĠInstr ument +ĠâĢ ĵ +Coefficient s +dd p +get top +Type Index +Gener ators +28 9 +Depth Stencil +Inline Asm +Execution s +Ġdrag ged +getField Value +ĠAN SI +Q StyleOption +i val +Ġb rc +ĠC lang +ure lia +Ġk k +\" ] +Ġpack er +Provider Name +]+ $)/,"" +DEF INITION +COMP LETION +Catalog ue +Known Types +Ln N +Ġintro duced +ĠOrdered Dict +achieve ment +pro of +cl f +ac a +io im +be ing +comp lain +aw n +Scale X +|\ [ +Ġ19 00 +Ġpw sz +ĠJust ification +Evalu ated +hier archical +l val +n kerning +s pect +y in +y axis +get Register +con cept +pro cal +ON LINE +ĠB S +ĠW a +File Names +Sh ards +ĠAct ually +ĠPO INTER +Ġcompress or +ĠAUT H +èµ · +. ]) +F PR +Q Declarative +` \ +get opt +Get Color +add Filter +ĠG lyph +ĠQ Sql +sub element +Ġser ializable +ĠAdd ition +Full Method +000000 1 +Real Matrix +ĠSY NC +Ġri id +ouch er +ĠOrg anization +EndEvent Names +ERESTART SYS +C CT +D f +s pare +Ġd q +ĠM SD +ĠR d +Int ro +SI R +pen alty +over laps +rad ians +ĠAR IZONA +LP VOID +ĠSup ports +C raft +S orry +ì ł +re lat +Ġt errain +get Filename +op end +Ġcom pares +ĠH ack +ĠIn otify +ĠQ Quick +LO SS +Ġcomp licated +Ver bosity +dt or +à® ¾ +ĠColumn s +hid l +Cy cling +ĠBl end +d iagnostics +k unmap +à ³ +re ally +Ġ( :: +Ġp ert +Ġ> & +Ġan ti +assert ions +igh ter +send to +SV N +Google Cloud +Comm unity +Adjust ments +ĠXR FDC +S INT +m add +Ġc rit +Ġm igr +end Point +ĠI p +ĠW rong +ĠQ Name +current Item +Ġco ok +26 8 +vers ing +course id +Synchron ize +æ» ¤ +ĠITE M +g cd +h df +v im +ar x +bb f +ex ch +Ġre lax +)) *( +Ġst uck +pa ired +ĠB TC +Time Value +With Field +group by +Ġlast Day +Address Checker +NO RED +Raw Bytes +Ġ------------------------------------------------------------------------ ---- +ĠPROT OCOL +ĠSEN SOR +5 04 +S chemes +a WN +q o +get W +Ġd types +ang ler +ĠR K +}) /); +uff fd +found ation +My Sql +ĠSelection DAG +Ġig b +X o +w or +w tx +x Q +te a +get Expression +(' ! +ĠF actor +ĠE LEMENT +ĠH S +ud ma +ld m +Field Defn +SIZE OF +bf ad +]/ ', +Ġcollision s +enclo sure +F etched +p Name +is Playing +Ġre duces +Ġ// , +ĠD ASD +ĠG AME +red uced +ĠH ACK +oo keeper +Ġhead s +IFICATION S +Ġ********************************* ************************ +å¯Ĩ çłģ +Ġm antissa +get Annotation +pro mote +Ġpro posal +tmp file +Access Controls +Ġ"< " +xc f +Ġ') '}} +åħ³ éĹŃ +ĠSCRE EN +9 80 +O thers +S MI +a hw +ĠB AT +ĠIn verse +offset Left +sample Rate +Shader Program +Ġbi ases +Ij pb +L PP +l ps +t info +Å Ĥ +ç ¾ +ch op +ch omp +Ġe ager +Ġg adget +ip mi +LL ED +Ġset DoesNot +"], [ +ĠAc cording +Hi bernate +:"^ \\ +å¿ħ é¡» ++ ') +ch en +ĠT elemetry +Ġcon strain +CH OWN +Ġbase Url +ten dee +Sp lash +dm amap +Ġconf irmed +Ġstructure d +Ġunder flow +Quick time +C MSG +_ )); +Set Request +ĠRe cogn +Ġen g +AC AA +ĠJ Component +gr ading +Line Info +sk ipping +Service Config +06 8 +Ġdown loading +CUR VE +å½ ¢ +Ġglob ally +315 36000 +Ġtom oyo +Ġbufs z +S MO +× ¤ +get Alias +ĠS PU +ĠS olution +Data Model +ple x +ok ai +post data +cr q +26 9 +category Id +Ġlang word +IHtcbiAg ICAgICAg +4 11 +G ender +H AD +d rc +i Id +w if +æ Ĵ +Ġp cs +ĠS MS +Ġh cd +ĠF ALL +================ ======== +Window Title +Ġq eth +Column Count +'. ", +]+ (?: +Ġirq s +Ġ') ', +Mono TODO +alax y +I OT +N VM +t bs +ĠN ever +type Of +ĠQ V +Create From +Convert ible +Begin ning +Ident ification +ĠProperty Info +Ġoverflow s +Ġwa com +pretty Print +Ġ1 91 +ĠA NT +Ġnew Test +SS P +ĠQ Dialog +ĠX T +copy To +ĠAn im +QT T +YX Nl +ĠFunction al +>' + +ĠDis covery +Dot s +Ġpanel s +Dial er +$$ $$ +大 å°ı +Friendly Name +C ognito +o buf +ct n +Ġdata source +Ġcom b +node Index +Return ing +pay ments +getNum Elements +Ġpub Key +Deploy ments +Mess enger +4 15 +4 75 +] |\\ +w sz +ul as +Type Kind +tem bre +AT ING +Ġk Audio +Write Value +server Conn +Single Object +Cast away +м а +) "). +G ene +c W +st arget +Ġb illing +Ġto wer +Ġcon cern +ĠD isp +Ġbo unce +App lies +ĠZ oom +("% . +Ġri de +Mount s +Destruct uring +Ġ{ *} +In de +set Result +priv key +son ic +do ctrine +Buffer Length +cal ib +67 8 +HAL T +ĠJan uary +e led +v z +ent o +Ġs cp +Ex perience +"); } +Ġset Max +ĠPro jection +34 3 +Ġ9 00 +54 6 +802 1 +UD T +plat data +den ied +åĽŀ è°ĥ +X EN +p andas +am mer +get BitWidth +Res idual +DE PEND +sp n +net mask +Ġ(_ (" +Ġsys log +Gl j +Gl zd +ĠJson Response +ĠFunc Info +CLR Types +Ġincrease d +cyc led +artifact s +^^^^ ^^^^ +larg est +SWIG PendingException +Capt or +p W +get Dimension +(" :/ +). .. +ĠH ermite +Resource Request +Ġco variance +Comp ensation +Append Int +Sn iffer +intr insic +tcbiAg ICB +Ġaff inity +ĠCondition al +ĠOC IO +Techn ique +N OM +c fb +o S +Ġc rystal +Ġt weet +im d +ĠG a +Image Path +Ġwrite To +27 3 +=% # +Direct ives +xl arge +rok es +hematic al +c pos +h R +Ġ questions +Ġs buf +id List +get Hash +to Latin +ĠR DMA +Ġset Current +reg num +:" "}, +State Ref +Class ic +Field Descriptor +Case Sensitive +Ġ"% . +Ġrow Index +ĠLog Error +ĠWh ite +Codec Context +Ġrevision s +YG ON +ĠWrit able +p Cur +Ġs rb +get Subject +To Next +ĠO hm +sa W +next Link +Valid ators +Render able +ĠLo ading +sv s +Ġinvok er +igu ity +B lt +V Reg +b ump +} [' +ĠS omething +Ġ: " +(' ../../ +to ut +ĠO rd +ĠH B +ev http +Ġag p +45 1 +padding Right +Delim ited +wra pping +Ġn Value +ad p +as ize +Key Info +Qu ads +Ġapp name +opt ind +)? )?)| +LOG ICAL +dm esg +Ġbl it +ĠText Box +Binary Expression +RATE S +éĵ ¾ +P ITCH +Ù ¾ +Ġc vt +Ġm sb +ĠM oney +Type Parameter +32 768 +sh dr +AL IVE +TR C +Field Set +Check CLRTypes +ua W +sql server +Rep resent +MULT IS +Ġmeasure ments +GRE ATER +laci er +t data +)) - +ĠA W +ir da +UN SPEC +Pre conditions +Ġns AString +filter ing +Device Id +Ġcost s +Expectation FailedException +D fa +T BB +V an +] }) +s XG +Data Service +File To +ne utral +06 21 +ĠUn fortunately +Link ID +Ġgen esis +л ÑĮ +Jl bn +major Version +ĠMan ual +brush es +|< |>| +åķĨ åĵģ +D j +G IF +O pr +T Arg +m X +Ġp Mem +In finite +ĠT Key +put All +ĠM akes +ĠF LT +Ġse aled +query Builder +ĠCol lector +89 7 +DV D +Every thing +Fuzz y +C SC +V g +f Z +g ery +m Loc +m fd +m alformed +n br +Ġf light +Ġn iet +Ġ// < +55 6 +Ġac celer +Ġattribute Name +usb d +sock s +Fold ing +Ġob serve +WAIT ING +Ġresol ves +P added +x eb +(' .' +Ġ) [ +Instance Admin +ql cnic +Ġaddress ing +08 5 +Ġaut om +DIS CARD +CUR R +Ġclick Handler +Dat etime +Fri ends +ĠEmp loyee +3 76 +E CP +E CB +i ates +s T +} "},{ +ing ress +Ġw iphy +SE M +ĠH I +index Name +sk cipher +Ġio va +Ġentity Type +adapt ive +En force +test Cases +Data Store +Add Value +OP C +ĠString Unmarshaller +With String +Ġpre pended +ci procal +19 00 +real time +cbiAg ICAg +Associ ations +MEDI ATE +à¥ĩ ', +succe ed +代 çłģ +| ==| +Ï Į +con om +Ġg nc +Key Spec +): ! +Enable Window +Syntax Node +Ġflush ing +UNIT S +Ġiv tv +Ġx bmc +Ġ4 29 +An on +Ġstr ange +ify ing +QUAL ITY +DL G +æİ Ĵ +Mer c +4 0000 +7 56 +O zs +S parc +Ġn Bytes +ro g +(" {$ +ĠT reat +). ') +Ġ2 48 +ĠL IT +Ġx pc +Ġy aw +... ', +Ġskip Generated +GF p +57 1 +Person en +OVER LAY +Pol ar +E viction +i ProfileId +j dbc +v irq +x DC +get Adapter +Ġ' (?: +of stream +Application Context +Lite Vo +иÑĤ е +5555 5555 +ĠincludeSub Domains +Q File +f ederation +re k +Ġ" ;\ +Ġ$ ($ +get SizeInBits +ĠS el +read Object +Ġun w +start Offset +Ġinner HTML +SAMP LER +ĠWINDO W +c def +f ptr +st udy +sh oot +Ġget Client +ĠR TP +comp osed +TIME S +Ġgl ut +Execute s +bucket Name +pub sub +plural s +G j +Ġ )), +Ġf y +set Disabled +ĠE lem +ust re +As ia +From Point +Ġnum er +Has Flag +ĠText View +Ġinitial Value +rot ated +ĠPre pared +BUFFER S +Ġfall ing +WW W +mip i +; "). +l K +Ġm ater +el lipse +get Machine +ri age +Ġ< !-- +Ġi q +AL U +Ġback light +ĠDE C +Clear s +Ġput ting +Mat rices +abb rev +(/^ .* +åĢ ¤ +ROUT INE +Ġm eter +get Desc +Ġre lies +Re curse +). __ +Th áng +Ġnext Day +Ġnext Week +NO WAIT +dm F +Packet Type +cx t +Ġsw arm +ĠNext Token +ĠRET URNS +Ġsit uations +ĠCHAR ACTER +ĠSu ite +k cs +w sc +Ġj d +ĠX en +For ge +04 56 +MD Node +hd C +COR RUPT +Pull Parser +"}] }, +ECD H +Ġregistr ations += (' +E AC +Z B +g ethost +à Ł +Ġ' >'; +set Action +pp hy +Ch a +Class ID +Ġinstance Id +Source Type +mod ulus +Num Elements +Env iron +ĠKey Value +Uniform s +Ġsatis fied +R ib +v Q + ¯ +ol sr +all types +To Run +Ġmem move +NT L +)[ ^\ +Ġsw apped +had oop +# ", +S izing +d cr +set Pen +ĠC TX +Ġr mesa +ĠH w +Col lide +Ġnum erator +parse Expression +24 1 +33 39 +thing s +ä» ¤ +ĠHttp Method +Ġ================= ===== +SharePoint Context +To Target +ON IC +Ġon Load +Ġy affs +ec b +By Path +Min imize +86 0 +86 5 +Ġ"/ "); +Symbol Type +Ġaccount Name +Ġindic ators +Emit ted +Ġtrain able +Sat isfied +ĠRece iver +ĠApi Exception +ĠMono log +p Q +ur sing +ĠC Q +ĠN pgsql +Ġr ssi +ĠF K +Ġspec ies +py test +CB L +Ġ", "; +Ġwithout Suffix +perim ents +? (' +H ACK +Ġ" ~/ +36 9 +:' " +Ġsample Rate +ĠConvert UTF +еР³ +72 19 +Ok tober +Card inality +1212 1212 +ĠOPC ODE +ĠCStyle FoldMode +re ported +ĠD CB +Write Literal +copy Of +*) \ +ng Model +GL YPH +Ġkeep dims +ĠOper a +ĠTyped Array +-*-* -*-* +ĠAng le +& [ +* & ++ (?: +R vc +id y +Ġex perience +Ġend p +comp l +action Name +Ġbyte Length +Ġ\" $ +cn n +ĠRef Ptr +Priv ileged +Team s +xdW ly +> [] +Q ModelIndex +T PC +e in +e vict +Ġc fi +con versation +ke h +:" )) +Table Column +ĠCOM EDI +ten r +Ġpr imitives +cn v +Ġdelta X +è¿Ļ éĩĮ +Sil ent +ĠLLL L +Mobility Model +. "}, +> ${ +M ic +M GR +M CLK +c GV +p date +Ġe thernet +ĠM ENU +Ġex cluding +Ġj ni +An n +Ġsc aler +gr f +Sub resource +{} {" +imp Obj +ĠNe eds +Ġprom ote +)}} . +EXIST ING +8 0000 +Z Ext +b or +n Max +Con e +ĠM ATH +String Util +code gen +ĠE AX +Input Event +pow ers +Ġbook marks +Synchron ization +P UN +b onus +Ġc pl +get Terminator +ĠM usic +Ġx id +db f +ĠJ Panel +ĠX n +ns IDOM +Ġstd dev +Tra versable +Ġfix tures +Ġfinish es +T re +b H +b X +} "> +Ġo u +get Tree +Ġd ac +ĠC AL +Ġi op +Ex cl +ĠP AD +Ġget Local +55 1 +Script ing +Ġbatch Size +expand user +Ġbackground Color +Ġdecor ators +ĠPAR SE +VIR T +m ctx +Ġ2 34 +Ref und +bit field +54 5 +decode URIComponent +Ġdw Flags +ĠAP ERTURE +accum ulator +è¿ĩ 滤 +Ġdocker Cmd +GUICtrlComboBox Ex +Ġrend ers +éŁ ³ ++ (\ +h is +un ities +Ġget Request +index A +AN CED +fs b +Response Received +*/ )[ +)( \\. +Sign In +NT STATUS +:/ ^ +Ġsoft max +[^\ [\ +Decor ated +Ġ'{} ' +o vers +p orter +Ð £ +st ages +is land +ce lot +Ġs chemes +Ġ$ ("< +set ExpectedException +Ġcontext Menu +Read Object +VM Context +Declar ator +Ġmit k +æľįåĬ¡ åĻ¨ +p goff +th ick +ĠS IS +Ġh tab +UN ORM +Log gable +Trans mission +sm ile +Ġtemp oral +.* $/ +progress bar +Ġ": ") +Ap pt +grpc log +Ġincre ments +imagick draw +Ck ge +!!!! !!!! +ĠSUPPORT ED +Ġnvm e +A FF +d D +i Count +q Debug +Ġ* )) +IN AL +16 16 +ge org +ud i +Result Container +Layout Manager +chan list +RT W +.* ?) +cn trl +Relation al +Ġfold ing +ĠSH OW +}: #{ +MY SQL +ĠDH CP +favor ite +3 18 +O e +am ond +ce iling +Ġo y +=" ") +ĠE Q +tri vial +Back ing +TO S +If Exist +ĠHelp Example +Elapsed Time +Collapsed Class +ĠpNew Script +S us +e res +n module +s Y +s he +Ġ í +Ġp Dev +Ġ' ${ +ĠU DC +:" >", +Request Interface +Ed ited +CR S +callback fn +Ġ'} '; +ĠSq lite +on Start +ĠN at +num Of +Ro ad +IL ight +ठ¡ +Ġmo zilla +Global ize +Math f +CONTR ACT +deep copy +Ġmer ges +Ġjq XHR +B ID +en ation +Ġc ircum +as a +ap se +for bidden +pro posal +Ġse ason +Ġx Axis +new lines +An imal +IL INE +show Message +stack ing +44 9 +alt setting +Spell Script +p ap +de bounce +get Auth +add Aria +ĠB lu +Draw Text +OC SP +Ġjust ify +Selected Text +QUFD QS +REC IP +ACC ENT +IHtcbiAg ICB +TestShape OutputService +Ġocr dma +e fd +r der +de limited +Ġd ai +ĠN CR +key ring +String Table +Ġget OrCreate +New Server +from Array +Packet Conn +Ġ', '; +Ġ'; ') +nic ally +Ġiterate e +Unmanaged Code +N LA +Ġf wd +Ġas semblies +Size Changed +Ġtest Constructor +Ġstatic ally +event Id +Address Space +Show s +ĠSE CS +getData Layout +CHR ON +5 11 +str ix +Ġnew Obj +Ġget sockname +ĠE rase +schema Value +reser ves +Ġorg an +Nav Mesh +LIT TLE +IsNot Exist +Ġhole s +Nat ural +C OP +L st +if x +om aly +ĠC ARD +Com paction +Ġpublic Key +table Id +ĠRead able +dot s +(. + +WI SE +5 20 +G ift +i we +se cp +Type face +Ġsh ards +load Class +base Name +Lo aders +mon okai +Source Info +Back Buffer +decl s +ĠSET TING +ĠENO ENT +E MSGSIZE +P AC +X Lite +t BQU +x pos +is First +In File +fe red +reg ard +9999 99 +-_]+ " +L ens +b ird +Ġm ission +ĠE valuation +mat mul +ĠIN TR +28 4 +Ġem ulation +rest ype +psz Name +ঠ¬ +ĠAttach ment +UnaryServer Interceptor +S plits +] $ +d printf +j unit +p Target +s S +tr ch +get Bool +Ġin visible +Ġcon strained +Ġy pos +ens ate +For AbstractClass +push KV +Call Inst +88 9 +ãģ Ĥ +Editor s +Man ufacturer +ass is +U CS +f trace +r A +Ġn sp +). $ +Object Definition +Ġret rans +ĠJ IT +Check State +js ObjID +Ġparameter Name +Ġinvalid ated +ãĥ ¡ +46 7 +87 9 +ĠFP GA +M IP +d ra +l ug +p log +w ns +y Axis +get Prefix +sc a +ĠB and +ire q +/// < +new axis +sub stitution +Ġsc al +Ġro i +ific and +Api Exception +Ġprogram ming +ĠTool Strip +Sockaddr Inet +LIC ATE +PAY MENT +refer rer +D pi +N MI +re ps +is Closed +im r +eld er +ĠG FX +ence s +Parameter ized +Ġgrid Store +Ġrx rpc +ĠStatus Code +Joint s +ĠSourceMap Consumer +w O +Ġ" }"); +'] ]); +Ġthrow able +RO OM +MAR TY +cons istency +à® ª +Hw nd +æĹ¥ å¿Ĺ +ĠSK IP +Slash es +( , +S QU +d uplicates +i put +k YXRl +is Absolute +Ġin ferred +up rv +), $ +)| \ +send Keys +ĠNew State +ĠDb Type +æĹ¥ æľŁ +ĠPlace holder +Ġembedding s +B idi +n orth +Ġs dev +get Or +ĠT UN +Get Errno +ĠR NN +write able +not Equal +child Num +Target Lowering +Comple ter +sil ver +COMPRE SS +ĠSharePoint Context +N ym +S INK +r ct +Ġthe ad +to Match +ĠD ue +Ġun aligned +Ġfrom len +current Line +Sub Key +," [ +BACK DROP +Ġfall through +Mer chant +ĠMOD IFICATIONS +Serialized Size +UnaryServer Info +Z d +d len +g ax +get Task +get Transaction +ĠC UDA +Ġfunction Name +ĠP ing +Type Symbol +Ġget First +Ġset Arg +Ġpre processing +Table t +ĠTR Y +LOAD ER +Ġactiv ations +CXX RecordDecl +nowled ged +' * +a err +d an +f st +x P +re iserfs +ĠC raft +Empty AttributeValue +Tab Page +Ġlock er +38 3 +ĠNode List +Identity Pool +Ġtrigger ing +ĠAc cepts +Ġconcat enate +å¸ Ĥ +Ġcent ers +ĠCODE C +GetResource String +ThrowIf CancellationRequested +B UNDLE +O sc +] --; +o Module +to Uint +log Error +Ġkey frame +pression s +Ġopt len +Variable Declaration +PRE FER +draw er +ĠPL ATFORM +game Local +ĠPer cent +fire wall +Quick Sight +Ġdial ect +Cron Job +% # +; ); +S quares +c ptr +é ł +re me +type Id +Data View +Ġat las +OT ER +CE GUI +And CollapsedClass +her p +ĠObject Id +ĠFile Reader +Generic Arguments +BC N +Ġbin aries +ĠControl s +shortcut s +Ġ864 00 +addAria AndCollapsedClass +M DB +a ur +m R +u cm +al d +pon sor +ĠTh reshold +message Id +ls n +Ġtrans mitted +Ġ10 7 +ĠCom ments +Ġsome how +Auto Scaling +dt v +Red ucer +Remote Station +Ġtrunc ation +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +G IT +n rows +Ġp fx +el ded +get Char +Ġbe at +ip rintf +ST MT +mb hc +work around +device Id +send mail +Role Id +е ÑģÑĤ +85 7 +ĠConvert er +Look AndFeel +++++++++ ++++++++ +} */ +ir b +To Set +ĠR A +}, \ +ok er +cor por +Ġweekdays Short +O u +m lock +Ġd angerous +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĊ +read write +With BaseURL +Version UID +Non Empty +ai lout +Ġ---------------------------------------------------------------- ---------------- +Soft Layer +ract al +ĠMe an +Inet Address +Ġbelong ing +RECE IVED +on oi +Ġv host +(" )"); +Ġg allery +Message Queue +max size +LA ME +Ġper manent +Definition Id +Selection Mode +ĠOut er +Runtime Type +Security Groups +Illegal StateException +Ġintro duce +erra form +) [: +a GUg +al rm +ed a +ra ddr +ay er +ost er +Test Type +Message With +cc m +Rule Name +js coverage +Ġnp ages +ALL EL +Ġproject ed +57 8 +Ġvideo buf +655 35 +æĶ¯ ä»ĺ +L arg +W itness +y label +IJ ľ +Ġm enus +set Annotations +Ġ1 17 +ap os +Ġ! @ +Ġe bx +IN HERIT +ĠH V +led ger +py trch +({ $ +Per ms +Dis miss +ĠGEN ERIC +28 2 +]+ $ +åį Ī +(': '); +ĠAD VERTI +899 7 +ৠį +F f +b dc +s ib +le ap +00 12 +ad f +Ġre ferencing +Ġ1 18 +Ġx pos +ĠWe apon +Ġauto complete +Ġtransform ations +ĠToken izer +202 0 +å¾ ħ +ĠConstruct s +Inject or +ĠInet Address +w D +x label +Ġd irected +ĠD rive +ID A +TR IM +TI MI +Mo ver +CONNE CTOR +c la +s yst +de crypted +ER IAL +Ġun conditional +base T +Query Options +NO ERROR +*) " +Ġsame Day +Port ion +Ġactive Target +Ġrect s +ĠUSB D +Self Link +MK DIR +contrib utor +drupal Get +11111111 11111111 +g V +Ġf u +Ġ: ${ +qu x +out bound +our ses +Data Exception +00000000 0000000 +Resource Data +handle Error +Dir Entry +ĠK MP +Send With +37 2 +Editor GUILayout +SPE LL +Calling Conv +xuICAg IC +pH alData +Ġweekdays Min +D ry +Y u +re init +Ġn Block +Ġg pointer +item Key +Ġra s +send Request +over all +Execute NonQuery +ĠSY N +NU MP +Inf late +under lying +Inv itation +Ġsha res +phab etic +O OB +ĠS ch +bu d +ĠD en +Ġ) \ +ĠH ighlight +write UInt +Ġkey Value +The mes +({ }) +pri ces +GR ADE +]* $)/, +Sort By +equ ation +Lan es +T icker +T aps +c U +o ught +ì Ĺ +st ill +un serialize +ĠS pe +ĠP eek +Type Spec +ĠH alf +ms ie +Number FormatException +Match String +ãģ £ +ĠXml Reader +ĠConstant Expr +à® µ +Ġhy pre +imm utable +ĠAut omatic +ĠTyp ically +m ight +s Value +è ĭ +str ips +Ġre written +Ġassert Array +Init iator +gram s +ĠSer ve +Short Vo +Ġps Enc +Amazon WebService +cross hair +ĠNT STATUS +Ġleak s +M eters +h andling +set Filter +32 70 +port id +ĠR Q +ĠW MI +ill ator +Text Editor +create Statement +Method Exception +07 00 +Ġwatch ed +Ġ"* . +; }} +æ Ĥ¨ +st ations +set Tag +/* ================================================================ +++ )); +AC ED +sub scribed +[" ] +Target Type +Ġev http +Db Connection +Ġ200 9 +ĠTerm inal +Q J +q len +s moke +x cc +è ı +// ************************************************************************ +ce f +ĠM SM +__ () +02 9 +>> () +]+ = +ภĶ +ĠAV H +Pick up +ĠFlat ten +J SApi +Ġn ul +ert ools +res ized +to ggled +]) | +Response Code +link er +do orbell +dr agon +nd ims +ĠAT MEL +Ġold path +Delete All +UD F +Ġactive Index +Formatter Test +ĠSort able +RELE SS +f loppy +de lt +ur lopen +un pck +Ġn bits +Ġb ones +el ijk +get Domain +to Float +put ation +Ġ4 26 +temp file +create s +Ġmax Len +ĠZ lib +uc ers +}\ ]] +ĠPrint Stream +Wifi RemoteStation +Ġpow ers +T RE +l ift +z T +Ġ ĉĊ +Ġ" *** +Ġm pf +est imated +local Anchor +status Text +Ġdis count +Spec ies +Option Value +IH Byb +Env Var +Ġmultip lied +èİ· å¾Ĺ +WI RE +Inspect ing +Ġstones oup +co arse +Ġin l +ĠI PI +Ġg over +ĠM ess +00000000 00 +Line String +format ters +Not Exist +over lapping +Ġsame Else +Cal ibration +aX N +Ġvp fe +Coeff s +ĠRG BA +le c +if ile +": [{ +Set Result +Ġout Stream +ok u +Is Static +Property Set +we chat +OUT P +37 8 +ĠTime Zone +Ge gevens +pred icted +Stri pe +ĠPlaces Utils +n U +s ad +y Y +Ġs lab +path Parameters +index B +write Object +Spec ular +Ġhash er +cmp l +Ġio vec +89 0 +Wait Test +QUE UED +è· ³ +dbl click +G lu +H f +f lick +n fds +dd ate +Table Info +ob served +Ġco uple +Dir Name +total Count +Ġmark ing +Secret Version +WH EN +UJ BQ +Yes No +ĠQRect F +å®Į æĪIJ +Q O +V HT +st an +key frames +ĠR W +Ġy Axis +Ġstr ftime +Ġline Width +CON FIRM +Ġsearch er +cell Value +ĠCode gen +ĠGroup s +/ [^/ +? { +Q ScriptContext +i T +Ð ĸ +Ġc URL +Ġ' >', +la beled +Ġ1 22 +Ġh arness +Get A +EN B +create Delegate +Ġlong DateFormat +Ġoffset Y +EM R +begin Path +cho oser +Encode ToString +ĠStart s +Ġut imensat +Ġexam ine +" _ +E SR +Ġm om +res v +ER ASE +ip ort +ĠL atin +Ġpro portion +File Content +io u +Ġstr tol +Ġid Vec +UN ION +max s +55 4 +Ġafter Each +TRAN SPARE +ĠWait Status +Ġannot ated +ĠTurn Direction +Amb iguous +ILight weight +^ { +l if +t ower +w ys +ĠT SS +res izable +Ġg ues +add HandlerContext +file Id +Ġ4 43 +Is land +GE OME +Resource Bundle +No Method +([ & +06 25 +Ġmod ulo +ãģ ł +54 9 +connection String +ĠSetChr Flags +HandlerContext Key +Again st +Ġaug ment +ĠRelation ship +ILightweight DomainFactory +X Rl +ion ic +ex its +Ġh yp +ĠI CE +data Object +Get Context +ĠW PARAM +vo xel +Do Request +Ġauto Convert +ĠCall Args +Relative Time +Ġnv g +åĪĨ ç±» +) ==" +K u +Q Quick +en derer +Ġm View +00 13 +Ġst all +ĠM AN +Get X +Id List +ĠL ane +ore m +ĠRe cv +ĠQ ED +max Height +do pt +Ġsys vals +BT REE +Ġjs Base +ĠImmutable Map +Soap Client +Working Directory +{{.* }} +setCurrent Index +pstest svc +d be +r sn +| , +is null +str Path +set Location +ĠC W +Object Property +mem cache +Group Layout +Http Get +:[ [ +Account ing +border Width +Ġptr diff +Security Manager +ĠNumber Of +Customer Id +Nested Map +TestSuite s +aug ment +Ġbeh aves +å¼Ĥ 常 ++ "] +0 101 +Y R +a ard +g int +ì ŀ +Ġm aj +set Attributes +Ġ1 59 +ST RO +lf t +SL ICE +ĠId le +ĠSC AN +Worker Client +Jul i +Unless StatusCode +- "," +k log +w dd +ĠS Val +ult ures +Ġex clusion +By Tag +fn WaitTest +Ġed x +39 86 +Metric Status +ĠEntity Type +Conflict s +å¸ ĥ +Ow ning +W inding +j int +l vb +t L +Ġ ich +get Arch +act ives +Sub system +cd Fx +CF LAG +tool set +ĠUser name +CRE D +Metric Name +Polygon s +dic ated +GetCustom Attributes +P WD +l R +de precation +Ġ: ) +ĠP DC +log Level +ac ao +dis cussion +Init ializing +the y +DS N +Application Name +SUB SCRIB +*\ }/. +Ġmesh es +ĠER REXIT +ĠDIST INCT +COMPUT E +' %( +A IC +N AS +Ġ( #{ +Ġ} }; +(' {{ +ĠR DF +Com Ptr +(). $ +Th readed +Sub Item +Ġq a +Ġcommand Line +Component Type +Last IndexOf +READ WRITE +cf m +Ġpers isted +ĠTra in +ĠSem antic +Kube let +9 24 +c ertificates +r pt +ĠS lider +Ġr tp +sc ipy +Ġse s +object ive +Ġpos itives +System Colors +Ġproperty Value +np ages +CD A +Ġ/> " +Xml Writer +getClass Loader +dW xs +resid ue +3 56 +get Setting +ĠS ender +con tr +ap c +ĠP reference +ĠE OL +Bu yer +Ġ3 50 +Request Mapping +Ġstart Loc +Start New +BB H +Row Height +... }\ +sd n +Send Event +Bit mask +è¯ ´ +Ġvo List +PROM ISC +Io vec +Gra de +SEN S +Ġmaint enance +Ġaudit Str +模 å¼ı +ANTI ES +shouldBe Called +enk ins +d ream +ret Value +id b +il iation +get Analysis +(" *** +Ġg imple +Ġr at +und ament +par port +av f +create Command +Ġsub stit +Row Filter +Cell Value +Ġbar code +Ġpb one +H v +q glfuncs +ic i +Ġget Code +Ġk map +Ġ` _ +Or phan +Ġne igh +Content Alignment +IP Net +MS Build +php Sheet +Ġrep lies +FS R +Click Event +Auto Complete +PER IPH +selected Item +condition ally +è¯ Ĩ +ĠComple tableFuture +ĠContainer Builder +Black list +Ġ"@ " +fuzz y += (( +d md +i log +ur tos +ra ag +Ġl value +Ġr ig +add Value +value d +field Value +Per Frame +with Scalars +menu item +Ġ{{ ' +|\\ + +LP CTSTR +Ġsimpl er +b B +s Table +Ġ las +ĠI OP +ĠF AR +Ġpro f +__ ' +ĠGet AI +sy mmetric +FILEN O +\\$_ \ +S ZWFjd +c ctx +h len +s ptr +à ¬ +il ight +ri se +iv il +Ġset Title +Ġdo y +Ġstr s +Array Length +current Object +Ġ(' .$ +Ġsp urious +Ġclean ing +YW Js +Tile Entity +Drag Drop +*\ })/); +ĠStop watch +p port +Ġb fin +as r +Ġr dr +ĠM MI +ĠQ StyleOption +Ġlist Item +ĠSt ates +Args ForCall +Parse Float +Ġ/> ', +Ġscale X +Ġclo bber +Ġ"[ % +ĠOp Codes +Geo Location +Registr ar +A mf +] !== +k N +m rt +p network +Ġd og +set Version +Key Frame +Log Line +Ġhas Data +Ġtrans EndEventNames +Ġq false +Parent Node +Ġover lapped +Fail Now +scan line +Ġlook ed +ĠHttp ServletResponse +indiv idual +G CS +p Range +ç µ +Ġre action +Re veal +all Errs +Loc ate +vo List +******************************** ************************ +gl Color +ĠSc anner +Ġeq Pos +Ġew k +c riterion +get Primary +as ihpi +String er +Ġx g +ĠW ake +AC EM +CP Y +ठı +54 8 +EV EN +45 7 +47 40 +snapshot s +ĠReflection Class ++ /, +D IC +D IO +s aving +Ġp sp +ack age +SE TE +.. - +PR ICE +\" ") +Ġsend to +rie Count +Ġdat agram +getCurrent Depth +PROM PT +ĠDes ktop +Need le +Artifact s +lyr Tabs +Õ¥ Õ +Ġintention ally +C UP +D tor +Y a +_ #{ +Ġd aily +ĠR AW +Or Object +sk i +Server Socket +Task Queue +Expression Type +.* ', +original Body +Sequence s +AF X +ĠMan age +.+ ? +ickago Master +F ailover +| # +Ġs port +00 11 +text Field +ip l +ĠG ather +Ġtest Class +Input Type +(/ [^ +ĠIndex OutOfBoundsException +Diag onal +Ġlex ical +Embed ding +hasMore Elements +> ), +l N +r dp +Ġ era +de z +ĠC CB +'] ])) +Set Output +ĠW ide +UN C +prop Dict +PS An +ĠSH ORT +Ġ------------------------------------------------------------------------ ----- +ĠWEB PACK +# . +in jection +Ġp ly +ul ations +Ġsh ot +By Closing +Ġscreen shot +Ġannot ate +Ġpol ar +DELAY ED +C ML +d uty +n K +{ & +Ġm ine +Ġnew Client +fa ction +Ġu cs +:" &# +ne y +ĠGet Time +bit rary +by Id +Ġlib s +Schema Props +ĠDelete Collection +!== - +Di rent +Ġп о +Den om +Eng funcs +xie code +ĠBlu etooth +G utter +R isk +g ids +m type +n if +in dependent +is Negative +Ġs ds +Ġb sg +ra ils +Get Member +ĠU E +64 9 +reg base +(( [ +Int Val +Status InternalServerError +Ġconfig uring +find Next +mod ification +minor Version +æ£Ģ æµĭ +D Device +v ci +on Close +Ġm ad +set Config +he me +Ġi po +IN OTIFY +To Name +ĠE FX +Ġtest Can +ĠQ FileInfo +sub key +Ġnext State +43 9 +Prop Types +original Line +ĠPR CM +@@@@@@@@ @@@ +Ġserial VersionUID +ĠMouse Event +loded Node +K ubernetes +p Val +al o +Ġ1 19 +ĠC TC +DE G +ant age +Col lation +ton umber +No op +view Model +... ), +Ġed i +Ġ9 3 +mouse Move +Insert Point +ĠRes erve +ĠFix up +calcul ator +AutoScale Dimensions +FBR UE +ĠRAND OM +4 25 +p fd +p dw +× ĺ +return ing +ul s +Get Message +64 3 +new Val +12 50 +Block Info +CON CAT +opt imal +ĠCheck ing +should Return +ĠRE L +xFF F +health y +m its +n ID +re j +Ġ( `` +un icast +get Incoming +Ġw sz +Ġis Cycling +ĠH F +offset Y +=' "+ +ĠIN SN +(\ { +Ġsum marize +TX Q +&# [ +RS N +655 36 +A cpi +G z +on der +To Move +Config Path +No Case +Ġbyte Count +pg m +Ġscale Y +Product Name +Ġacc ident +ĠUs ually +5 24 +Ġ2 14748364 +Ġset uptools +ib ase +ĠV irt +Ġgener ators +Send To +\\. -]+ +d tp +k Y +z ily +Ġp error +Re achable +Ġerr Code +Ġnew Pos +pro ph +Ġget Options +com ic +max Depth +stream er +Ġcast s +intf data +M eth +g pt +p gp +is Imm +ro ids +Ġo ci +In String +ĠS AA +ĠS ynth +ĠM H +Get Selected +ĠG LES +ole ans +ĠGet Object +gr an +Line Color +66 9 +CAP ACITY +pix man +Ġvid ioc +Q PS +] ([ +é ¦ +Ġv io +err SchemaPath +ST OR +Ġget Api +ac d +user agent +pb i +ĠIO CTL +fw node +Wrapper Pass +ai sed +ĠBlock data +iw ik +SUSP ENDED +j N +t port +er k +ic r +Ġb orders +Ġstr val +imit ers +attach ToDocument +ĠIR Builder +Direction s +ĠQt ScriptShell +BACK GROUND +Ġdash es +M igrate +Ġf og +ĠA JAX +to Locale +ack s +Ġr pm +Ġvar args +Ġres hape +riv ing +Ġbreak points +ther m +Ptr s +Ġover writing +Register CLR +Wait Group +ogn ition +g D +å £ +Ġ} */ +ex posure +)) ): +Ġu fs +est ures +Data From +ME A +FF E +04 58 +record Data +Ġrece ipt +57 9 +week s +VIS UAL +Assertion Error +Ġmut ate +é¢ Ħ +/******************************** ************************ +Spread sheet +ĠCop ies +QPoint F +ValueObjectBean Map +W PARAM +UE UE +Ġtask Id +prom isc +Ġthreshold s +ĠFore ign +Destructuring Errors +3 0000 +D aily +a ab +f otg +ed ition +Ġb str +get Writer +get Errors +Ġsend msg +77 2 +Ġsp am +PH AL +sig mask +Wrap f +Ġjo ins +Ġprepare r +supp lies +Cons ult +lst m +breadcr umb +4 13 +> "), +P EN +i lo +l V +get ting +get Contents +get sockname +Ġw iki +set Minimum +ack et +ĠM isc +Data Ptr +Ġ[] ), +Or bit +Pos ix +ĠData GridView +]= $ +éĢ Ģ +adjust Dialog +ĠAF TER +Spe w +Foreground Color +apple t +E ss +o am +x Y +Ġb rowse +Ġ1 36 +HE AL +Class Id +Child Node +cap a +normal ization +Replace d +getMock ForAbstractClass +Major Version +S pect +h M +k ZWZ +St ill +ĠD V +Ġas oc +ĠRe m +Query Param +Create Preparer +Format ters +All Maps +Target Exception +batch Size +report Error +ioc pf +hl Y +bat adv +Subject s +ĠNext Link +ĠKeyboard Interrupt +Zhb HVl +National iteit +ToUnicode Scalars +u T +Ġm unmap +set Length +set Use +++ ]. +End Index +With Http +bl p +UI Element +aint y +ĠHT T +DEBUG FS +crypt fs +REST Client +B SSID +P ct +S f +[ ..., +^ \\ +j ade +tr k +ĠS low +Ġr si +Ġx gbe +Is Defined +build s +ĠSe g +}/ #{ +ĠStream Writer +ĠTra it +Deleg ation +Zv cm +/ {$ +x addr +ĠP REC +ac x +Ġ, " +And Return +Rule Set +Xml String +delta X +49 3 +Encoding Exception +ga u +aggreg ation +Ïģ α +模 åĿĹ +ĠAssoci ate +Refer rer +Ġunders cores +6 80 +E lim +L DO +g lock +j B +s ia +st l +str a +Ġe fi +Ġg w +ĠD ip +Ġj p +write q +\" /> +json Object +ĠK is +Ġscript PubKey +Ġapi Version +Distance s +Completion Source +ĠAff ine +(?:(?:\\\\.)|(?:[^'\\\\]))*? [ +- / +M ont +e low +h L +t own +in ited +Ġv mbus +Ġnew Val +Ġget Reg +Ġun k +break points +Argument Null +Transform ed +PS W +Editor GUI +ĠOp No +d mi +on Show +Ġp Tab +Ġb tc +get Full +(" '", +map i +Ġtrans parency +Pre vent +EM ER +Ġstack ed +DD L +mock T +ĠTem pl +ĠSO UND +Subscription ID +fac ility +аÑĤ а +2222 2222 +æ¸ ħ +I EN +c Unit +Ġ} )). +get Milliseconds +ĠP seudo +ĠF A +sh ifted +Test File +Text Input +Ġlo ts +Import ant +before Each +CHAR GE +DIRECT IVE +AsString Async +Integr ity +Ġevalu ator +ĠAU DIT +E of +M VM +ce iver +get Transport +get DisplayName +ĠS nippet +Ġ1 13 +he v +sc py +De composition +create Table +On Change +ĠPro filer +main cpu +Stop ping +indent Unit +Ġabs ent +ELEMENT S +WithError UnlessStatusCode +Ry aW +adapt ers +autop lay +Cle ared +UTIME S +< ! += # +Ġnew List +Sh ield +Ġro bust +][ +-]?\\ +Target Value +Ġmin Y +Load From +Ġassoci ations +tick ets +UG O +Place holders +aug ust +4 31 +P nt +f set +m le +s lock +Ġ оÑĤ +od ified +vi ally +oc p +Db Command +Mat urity +Ġsa id +Ġcod er +cub rid +ĠTech Talk +getBo Id +ĠEBT Status +v ir +al sa +ur ons +un es +Ġs ap +Ġv table +ĠD SI +key points +add String +=" .$ +ĠW AN +Key Usage +Ġfile Size +Ġ[] _ +ĠĠĠĠĠĠĠĠĠĠĠĠĠ Ċ +Ġ... ] +ĠGo od +Replace s +DOM ContentLoaded +TABLE S +d fd +is atie +get Custom +Ġre iserfs +Ex ited +Ġde limited +Get Char +und a +min length +Attribute Set +po thesis +Client Context +']) ?$ +Should Return +Ġff lib +th est +bb uf +get Trace +Ġnew len +add FormatterTest +++ : +Ġdis cussion +Min er +CA USE +ctrl pipe +Close Fd +çļĦ åĢ¼ +imate ly +Chain code +RET CH +TK IP +Ġthr ift +ICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAg +IHJldHVy biB +( # +F ish +R ational +e quivalent +r split +ur u +get Scope +ref lector +ĠH EL +ĠQ TRY +Ġparam Name +pc bi +View Data +nd is +fn Test +No Data +Ġop ener +tool box +Find String +So Far +Relation ships +âķIJâķIJ âķIJâķIJ +re validate +ag ged +get Single +ĠP PP +ac u +ĠCON TEXT +HR pb +github assets +ĠDecl Npc +ĠChip Index +ĠNpc Index +b sp +d info +ar xml +un pipe +Ġm ist +Ġl k +Ġh iding +Set Parent +ĠH NS +Ġsub dev +Be haviors +clear Annotations +BE LL +Ġdown stream +wire less +ker as +ĠOpt imize +Ø§Ø ¹ +Ġnom inal +' ', +b J +p Result +Ġp Cur +co a +Ġde ath +=' '): +Ġcor r +Ġqu irks +Ġpost er +ĠRead ing +Ġpred s +job Id +ĠMD Node +å· ¥ +ĠCALL BACK +â´°âµ Ļ +O GL +n ak +et ree +set Display +Ġset Status +HE EL +af u +Ġrc v +87 88 +Media Player +pow ered +ĠAL PH +rtw dev +௠ģ +Attempt ing +('= '); +/ '. +n ost +r si +v at +ode v +ap pearance +Ġar range +ĠL and +": "" +Ġdata Length +Size Y +UN PACK +SH L +PA SSED +ภ´ +Ġ200 4 +Ġextract ing +Fill er +hb G +rab ic +è¾ ¹ +_: \\.-]+ +]+;)|(?: &# +]+;)|(?: &[ +(?:(?:\\\\.)|(?:[^" \\\\]))*? +["] (?:(?:\\\\.)|(?:[^"\\\\]))*? +6 08 +9 09 += ${ +H q +P u +R ATION +h cmd +Ġ1 32 +li j +add Message +Ġset Key +ĠG reen +By Inspecting +Check ConvertUTF +MS M +LOG DEBUG +Rad ial +met atable +Ġdc cp +æŀ Ħ +Compile Unit +ä»» åĬ¡ +ĠOrient ation +urtos is +sc intilla +ĠG imp +ĠW i +From Context +Label Values +Control ID +etr ation +Ġfetch es +VH lw +tan h +7 42 +H oriz +Ġp add +dd s +Ġg si +Get Status +ĠO IC +Ġun named +der ive +create Node +SU ID +Print ing +This FileInfo +jb Iter +quant ize +ĠFound ation +Ġsymlink s +is Constant +get Stack +Ġcon currency +Ġ[ -- +Ġfield name +Frame Header +pri ses +rivate Key +Ġhost ed +Ñĥ ÑģÑĤ +Ġrecv msg +Ġsip Type +234 1 +模 åŀĭ +Ġpen alty +3 17 +b road +d ips +n Time +q set +z L +Ð ¢ +Ġnew fd +ĠF lip +og e +ĠGet DlgItem +Ġapp Name +Tag Compound +we ather +ĠTest Util +Command Buffer +CA PI +Ġ] * +SD MA +Json Writer +"} ). +000000 10 +INTER L +Ġtermin ates +Vol tage +Dock Widget +ĠLIB USB +J VM +K l +è Ī +is Pointer +Ġv reg +[" @ +ls i +Tag Rules +Next Sibling +Invalid Input +36 2 +ĠLog Print +ĠComp ilation +ĠEN UM +ç» ij +EF USE +Ġsound s +Skill s +ĠConvertUTF ResultContainer +b cp +à © +de re +set Cookie +ĠA aru +Ġerr ln +lock er +tab Control +Down loading +LOAD ING +ĠIllegal AccessException +multip lied +Ġcy clic +Syn ced +tsd n +INSTR UCTION +UO US +ĠServlet Exception +d ia +j V +Ġ} ]; +(' :: +Ġs uc +Ġb Ret +ublic Key +ĠM AY +Ġget Page +Ġend Tag +Ġen closed +Code Dom +Ġpath B +dr WriteBuf +Ġdef initely +active Element +Enum Type +Ġbit stream +side s ++" ' +Active Directory +Right ToLeft +Edit Mode +Ġæ ¨¡ +(/^ [ +Ġ"\" "); +C SP +Z b +v enc +Ġv cs +um s +Ġw id +ĠS quare +Re sets +ĠA ver +St ake +ĠP res +ĠB ail +md i +AN I +Is Match +not null +Oper a +ua e +NAME D +Ac celerator +Cast s +ĠClear s +Ġwalk ing +Ġtransmit ter +ĠBound ing +Ġ1 200 +end ptr +Ġe id +An ime +"," ./ +MP S +keys For +ĠMethod Handle +ĠModule s +ĠReal Matrix +getObj Function +p attrib +ar ner +ss s +ed ited +== ', +Ġ+ -------- +Ġfor cing +Type Declaration +ID R +ĠE qu +cp m +Current Page +gn c +Web Resource +Mock Behavior +и д +|\ . +ĠSo ap +Pod DisruptionBudget +Ġdispatch ed +Ġfi ber +ĠStat istics +Ġgd al +Ġwildcard s +Et cd +ĠProb lem +YE LLOW +\ [ +e vo +w day +le f +et m +el ided +ex pose +'] ", +Ġ(! ! +Ġx b +ภķ +II II +Insert Pt +BR USH +Creature AI +Ġattack er +" -- +b las +d fa +k aW +Ġo pend +ĠC ycle +ĠI MG +li que +Ġal tered +sub scribers +From Path +EX ACT +Ġvalid ators +head room +Ġcor rected +Ġsort s +Pref etch +ListView Item +Ġbuilt ins +Water Mark +aid u +Third Party +n lp +p instance +00 80 +ire c +Data Array +Ġk probe +mt s +Are Same +CL SID +Net Addr +Ġform er +Ġcomponent Name +ĠSE ARCH +Article s +Âł Âł +Aabb Min +Q h +z N +ç Ł +Ġin Obj +Ġr tnl +sc lp +To Return +Ġbo b +OT P +AM F +Ġback trace +Ġwp as +sch ool +olar is +D sr +k atakana +Ġs val +ck pt +Ġe in +add Result +OR w +Ġy mm +ĠX B +Read AsStringAsync +Em ails +da e +åı ° +ony ms +899 3 +dg v +ĠIm ages +J dbc +b ing +h fs +Ġc data +Ġn od +Ġw k +Ġin clusion +Ġcon servative +ow l +ific ial +Ġtmp reg +DEBUG P +JSON Array +Panel s +Ġpop Context +Filename s +gd HJ +еР· +Ġsupp ressed +External Capture +Aabb Max +m asm +ch ased +get Html +Ġin fluence +Ġde dicated +add ition +Ġdata frame +Class List +cpu info +STR I +05 1 +Render Context +Insert s +Machine Operand +Gen re +setAttribute NS +Complex ity +Ġ'* '; +ste am +=| !=| +Ġrele asing +ĠTod o +D amping +O OM +S moke +r len +un block +ĠT cp +(' =', +ren ade +ĠM igration +ĠF AT +Sh ut +Ġno qa +Connection State +Post Back +ĠIRQ s +micro time +ĠDiag s +Ġspe ak +Ġsuggest ion +t is +le HB +Ġm wl +Ġl ut +'] ))) +Form Element +arch itecture +Ġoffset X +100 2 +Web Driver +Ġ'/ ': +Total s +Named Pipe +Refresh Token +Pricing Detail +O x +g IG +Ġc st +Ġf unct +ap ar +up np +OUT H +åı ³ +dig table +ĠAd apt +Power Of +Algorithm Exception +Ġæ Ł¥ +Alt itude +ĠIo ctl +CHILD REN +Overr idden +IOR eturn +ĠVARI ANT +M req +_ [' +le mbic +un obtrusive +Ġre pair +DR AG +flow s +ĠSh ard +43 8 +ภª +Ġrank s +B on +j is +m vi +{ [] +Ġp B +able View +string From +Get Output +Ġcol lide +default Mode +As ynchronous +06 9 +Link color +threshold s +webkit TransitionEnd +Ġxs lt +ĠRO OT +IMIT IVE +intersect s +ĠEmbed ded +. ")) +s laves +x fd +Ġf lt +ĠC SL +up case +ĠO CT +sp lash +UN MAP +Ġbase Name +template Cache +scroll ing +Network Gateway +Ġlimit ations +ĠSub target +Generic Method +Zone Id +Nick name +7 02 +S CH +ed By +Ġm olecule +ri id +Ġg ens +ĠW ell +Ġlocal host +tab Id +READ ME +Can Read +Auto Lock +Wait Time +------------------------ --- +LIC IT +. '] +. ': +C OS +U sd +Z g +b ol +k object +Ä Ĺ +in form +In dividual +Ġin place +Ġget Root +Key File +Item ID +"" ). +Ġpath Parameters +resource Type +Current State +bt f +ĠMap per +Tex Image +Ġsepar ation +provide s +ĠCookie Jar +R CR +d tr +r arg +Ġ eta +get Exception +ĠN a +ĠD U +Ġget Active +Co upon +Queue Size +Build ers +Post alCode + '.$ +ins ns +Ġnum Of +AM OUNT +Assert Equals +ĠID irect +35 4 +tax onomies +ÑĤ ÑĮ +Ġip mi +pur pose +å± Ģ +PERSIST ENT +Eve rest +V IO +t cl +v fi +{ \\ +at y +ĠC am +Ġget NextToken +Data Offset +Property Change +free p +Pre decessor +Ġblock chain +TP REL +symbol ic +Fill Type +Po oled +VERBO SITY +ĠBYTE S +*= *= +d bb +th s +Ġt ied +read link +ĠR N +ĠE AS +File Utils +(( - +Token Id +do pts +On Init +Header View +Ro oted +{} ". +domain Name +07 2 +Ġte chnique +Ġaut os +Ġgrid BagConstraints +vt bl +Patch Call +Immediate ly +"}]} ], +Ġopp osed +LoadBalan cers +d ar +h ull +m Last +v base +st udio +ck ey +set Next +Ġy e +ĠIn voked +max db +No Zero +Template Id +ĠJson Serializer +ĠUN KNOWN +touch end +Ġjs val +Ġpol arity +Ġcomplex ity +ÙĬ س +Processing Instruction +docker Cmd +RECE IVE +D DB +S PC +h vc +m ite +ed ir +us art +ĠC amel +Ġis subclass +ĠB inder +ĠE CS +Object Manager +date Value +Group List +Format String +Ġoutput File +Ġnet loc +Ġlocal time +cr m +.' '' +Ġ200 5 +ROM E +------------------------ - +å· ¦ +omb ie +ĠCLE AR +proph esize +U q +d P +f j +or se +Ġc um +ĠA UX +Ex am +to Double +Ġr mdir +Ġtr icky +ver lay +To Save +priv CloseFd +Ġend Pos +base URL +Per manent +iro ha +Into View +VB I +Other wise +в ед +Clamp edArray +autos ave +arx iv +ro tl +co g +ĠC CE +ĠM elding +ĠF c +Ġnull s +eld b +ĠG uest +Ser ie +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +TR AIL +mb s +LI ED +Load Inst +bind s +Ġtask Service +\\. [ +ĠSV GA +DIG ITAL +) ][ +n ore +Ġ* ------------------------------------------------------------------------ +ĠS AVE +Ġ1 29 +ĠC API +Ġget Base +Set Font +Bu dWxs +Index Informer +An i +start Angle +Is Error +ĠGet Property +current Style +Ġfirst Tag +rap id +go AAAA +Ġhttp Client +ĠID b +Connection Exception +66 5 +Ind ented +LOOP BACK +predict or +Ġcontrib ution +zdGF uY +S aves +l C +w ptr +è Ĥ +Ġo z +ĠS IL +ĠO HCI +Ch k +With BaseURI +Ġcall IfExist +Input Buffer +Parameter Value +amb iguous +Boolean Value +sig moid +bg color +want s +Void Ty +6 94 +O v +m gt +p Frame +x AB +de coding +un initialized +ck s +Get Root +ST RETCH +ĠE g +Ġ\ $_ +Ġval or +ba idu +chan def +Directory Separator +FL AT +Reset Event +gu ild +sem ver +rw sem +WithPath Parameters +ìļ Ķ +Ġv ir +Ġnew Line +Ġk x +Init ializers +Vector Copy +([] ), +75 8 +Ins ufficient +conv olution +ĠCode d +Shared Ptr +Will Return +apr il +аÑĢ ÑĤ +ĠMk nod +T iled +X path +a V +b V +c aptures +Ġget Module +Ġon load +object Map +UN DEF +tag name +so uth +[: ' +æĿ Ł +Ġuniq id +M CB +u addr +ĠN N +Ġset groups +Ġy Offset +obj attr +Ġdis criminator +Search ing +44 7 +"/> , +Me eting +Driver State +sin h +ĠDISABLE D +Lik elihood +regorian Calendar +Q MessageBox +W QE +e en +p oid +get Lexer +ĠA SIO +ĠX code +Ġsub command +({ _ +instance Of +ĠCreate File +send msg +make Text +erc ion +SHE ET +TooMany Requests +_ ") +c las +} (); +Ġ ))); +Ġm ds +(" ) +Ġ1 000000000 +ĠP MC +os g +Set Defaults +(? !\ +event Handler +null s +Log Event +Status Message +connect ing +ĠValue Type +Ġmon keypatch +("/ ")) +supp lier +ĠCould n +ĠHigh charts +ĠTok Error +O EM +R ock +X g +Ï ī +Ġv ice +Ġget groups +LL IA +:" "; +ĠX aml +Ġso up +Ġco up +Ġresponse Handler +Dis covered +{{ { +Sequence Equal +Ġcoll ider +MAT ERIAL +Ġ************************************************************************* ***/ +ADJ UST +ĠPropel Exception +UnmanagedCode Security +GEOME TRY +N or +c il +s name +y M +app name +yn et +Index ing +ript ive +AC Y +Out Streamer +kg db +gre SQL +Side s +country Code +Ġsr pt +ĠBl ue +çķ ¥ +/ ). +2 100 +B LA +Z x +a if +e Type +f Num +h armony +v pd +te lt +Ġst ays +ĠM alformed +") }} +ĠR OT +temp oral +Ġ[] ): +Service Server +Ġwork list +Ġed ac +ĠEn tries +pk l +INIT I +ĠAC CESS +TLS Config ++") ("+ +MULTIP LE +errorm sg +["](?:(?:\\\\.)|(?:[^"\\\\]))*? [" +" `, +b da +d xf +it m +set Column +ĠT ER +ĠC RTC +EN S +Ġpro posed +AD ODB +dr p +AME LLIA +Ġ16 8 +php unit +45 2 +Ġway point +Org an +pref er +Mix ERP +SLOT S +åķ Ĭ +suggest ions +dmFy IG +çĦ ¶ +, : +Q Painter +y offset +is Initialized +ag eneration +get U +Ġd ss +Type For +ĠL i +Ġj ack +Ġal s +From Stream +Read Full +ĠAdd To +Rate Limit +ĠOp codes +Ġdiff icult +fun ctor +ĠTool tip +i loc +l key +x gifb +Ġc j +(" }"); +end Index +ĠC LS +Ġpro bs +Inter pret +find Element +ĠTo ByteVector +ĠCol ors +Sk etch +=> ' +hs v +MO CK +å® ¢ +padding Left +Card inal +ĠDest Reg +gK iB +Plot s +dro ps +Ġsubstitution s +5 14 +> ()-> +B ogus +X k +Ø ² +ĠS iS +String Index +pl ans +ĠV INF +Ġbu bb +Ġid On +Block Type +Table Index +from XML +Select All +Memory Manager +46 0 +Ġusb net +è¿ IJ +Ġfac ility +Envi orment +E f +q mp +ch anging +ap b +AD T +sub Range +On Call +Sub Items +cb n +Tool box +seq s +Xml HighlightRules +44 6 +Api Response +Category Id +Ġwould n +ĠMC Operand +Ġfuzz y +A LE +C PlusPlus +I LO +T ower +lo ve +pt op +Ġw ins +Ġw itness +En counter +To Html +Ġget App +Data Atom +pp able +ill er +ĠV O +ĠRe peated +06 32 +Ġparent Id +Component Name +05 9 +Ġskip s +cn J +proc Get +Std Encoding +RESULT S +High charts +ĠMT U +Ġgra de +) () +Z Gl +Ġc apturing +Ġs anitized +Ġ< ! +mo ver +reg cache +comp r +Ġ` / +Ġpa ired +OD ATA +EX PRESSION +RL EN +Ġcontinue s +ภ¸ +49 4 +relative Path +Hit Test +ĠSN MP +ĠSEG MENT +D etailed +l xuICog +re vs +an ame +Ġst roker +Ġget peername +ĠGet Parent +Source Name +Ġ10 9 +Ġnet lbl +Ġover view +ev con +Ġruntime Service +Ġfire wall +dead beef +DIG ITS +ĠAssoci ated +bounding Box +D cc +E vidence +d asm +h pc +p Mesh +se ma +Ġ" =", +ĠC laim +32 00 +ĠV L +Ġkey down +Ġz s +parent ly +IP SET +Dis criminator +Hash ed +=> " +Single Node +WE BK +ĠJson Value +ReadOnly List +ĠAccess ible +IHtcbiAg ICAg +Ġgetreg entry +4 97 +T TF +a S +al gs +get Center +im pact +Ġd ip +set Range +Ġ[ @ +ree k +Ġ3 01 +Ġpublic Request +apt ics +switch es +Tags ForResource +Ġtransition End +Ġvf io +ĠCONNE CT +b read +d in +st orm +te c +Ġo o +Re vert +mp ort +ĠL ines +value Changed +Text Edit +CH IQ +Ġmessage Id +ĠPro duce +Device Context +Ġ(" # +hered oc +WEBK IT +t res +w V +| ðŁ +string To +vi ver +Ġwe bh +[] [ +its u +Current Line +Ġexist ed +Ġsp ent +dc cp +dim m +blank s +strn casecmp +XF xu +Ġà ł +Ce iling +Ġga uge +æݧ åĪ¶ +_ () +b rain +d ynamodb +s lack +is Sub +get Search +ĠS heet +ĠS park +St ax +ĠI ActionResult +ĠF requency +index ing +min Length +inter lace +ĉĉĉĉĉĉĉ ĠĠĠĠ +Ġproto Props +Man a +Ġtrain er +!! \ +ĠActive XObject +5 36 +E LL +se at +Ġd ijit +ĠS unday +Key Size +Directory Path +BR IGHT +Ġ"* ", +b S +d ow +() [" +Ġb irth +Re search +lic ator +Ġnew Request +ire g +Ġget Date +path To +10 11 +(( ?: +field Info +Mem cache +Ad vice +NO I +Ġload ers +Ġattr Name +å® ī +Dat agram +ç»ij å®ļ +iVB ORw +5 18 +P ST +c H +j our +Ġ Ä +() })}, +get Initial +ĠF uzz +CI RC +cor outine +Ġbet rokken +ah iso +Machine Name +Help Text +High er +BACK UP +Ġsy mtab +Ġsur vey +ahiso vi +e fs +l seek +ĠS ensor +ĠC ritical +ĠA H +Ġnew size +bu yer +ĠG A +Ġhas htable +ĠKey ctl +Opcode s +ĠPrint Writer +ino co +POL AR +MPEG audio +Vocab ulary +E TP +X SD +b aa +p se +t ulip +Ġs co +ch id +In set +ol ly +ĠD VB +') } +02 0000 +Content Types +And Update +ĠIs Empty +ĠData View +Custom Resource +GR ANT +Proxy Model +Ġdw Error +Ġbc ma +]() })} +Preferred Size +Land scape +Unauthorized Exception +hdG No +hE Ug +L TR +] >> +e G +i Num +l ptr +t rend +le ftover +Ġis r +Ġret rieval +Log on +me a +COM BO +MI RR +CB CM +Channel Id +Attr Value +Qual ifiers +Ġinject or +KG goAAAA +NSU hEUg +attleg round +KGgoAAAA NSUhEUg +/ '+ +7 04 +> ? +C VMX +P su +R TR +g ht +g pc +te er +set w +ab ase +Ġpro of +=" \ +Ġun quote +col span +std dev +rt n +Ġbuf Size +Ġla zily +Relative To +Ġmet aclass +س اع +Ce il +cbl x +i C +p Control +Ġp cf +Ġd of +Ġl id +ide a +ĠQ Char +block nr +AS SET +]+ ", +EL SE +Sw arm +Wifi Mode +௠Ī +CANCE LLED +dav id +9 33 +: + +W ild +f bs +f ired +v bo +Ġs orter +Ġ" ]", +ĠA LC +ĠB IND +Data Format +Ġid l +UT ABLE +PR OF +Tool Button +Cl oner +Ġrule set +ãĤ · +Same As +DT S +bat tle +Ġrepeated ly +n C +y h +Ġ{ ... +ed is +iz mos +up dating +out String +). _ +ref ill +File NotFoundException +find First +Ġany one +Def late +Ġswitch ed +Ac celer +hY mxl +ĠAri thmetic +B AN +am mo +Ġv ictim +Ġw dt +Ġh cl +Ġr ct +Ġex hausted +tem a +ant enna +:" +If Absent +compare r +mult imap +Ġclick ing +ĠDet ach +å± ķ +="# " +embedding s +J et +l uma +m M +r db +u IG +it lement +get Helper +ĠT TL +Ġg cm +ĠD uring +Ġr value +key pair +ĠE INTR +ĠW ater +list Box +IC ATE +Per Row +Process Error +yy j +Sum maries +/************************************************************************ ******/ +áŀ Ģ +ĠVER BO +Magic Mock +7 15 +O CC +w ild +Ī ëĭ¤ +() '); +Ġ" }"; +get Pinned +Ġv ideos +and a +ers cript +Key Exception +sub table +std io +Role List +Ġroot Frame +88 4 +GF uZ +Tx Id +) +ROT ATE +注 åĨĮ +pde q +C umulative +n S +w ow +Ġj a +Ġk ubernetes +Service Model +Ġclass ify +New ton +Ġmax X +ÑĢ ед +writ ers +star s +Fire fox +FFIC IENT +K afka +^ =" +Ķ ¯ +Ġ" .* +data points +File DescriptorProto +Un specified +cor s +Custom ization +ffff f +Blob s +ĠAlloc a +Mer idian +TextBox Column +look behind +WD G +Separ ated +*|\/\/ )# +3 89 +F arm +a Row +b loom +// * +Ġd quot +Ġerr code +Res ized +Query Value +)] = +TEST C +'][' '][' +ãĥ ¬ +delta Y +Certificate SigningRequest +Ġwatch es +-------------------------------------------------------- -- +Land ing +Camel Case +REMOV ED +Ġn arg +Ġa Str +get time +Ġde velopers +ĠF PS +log error +Ġy r +sub j +image Data +run es +ĠCheck er +Ġchild Node +]+ ' +ãĤ ° +ĠMAC H +ĠConnection Error +Too Large +Look At +(\{ |\[ +9 01 +A lice +C utoff +n L +x ad +is Loaded +In A +ĠT ST +Ġ! (( +Ġan Object +base URI +Or Add +current Row +BU ILT +Sub section +66 92 +76 0 +Tri age +indent s +Ġconcaten ation +Indic atie +Ġdav inci +)[^\ }\]] +(\{|\[ )[^\}\]] +(\{|\[)[^\}\]] *$|^\ +I PI +p am +{ ]*(\ +Ġc mb +// . +get Encoding +Ġv box +Con formance +Ġe pi +Get Frame +File Writer +]) |^[\ +url lib +max Y +Create Object +cb fn +Module Id +Local Variable +Ġreq s +Msg Type +39 4 +Plugin Name +Notify Url +Ui Thread +}|\ ])|^[\ +[^\[\ {]*(\ +[^\[\{]*(\ }|\])|^[\ +C IF +P du +k afka +is ms +mo odle +SE CS +Sh ade +Is GenericType +UN ITY +Image Size +Server Exception +56 6 +Ġtotal Size +Manip ulator +[\{\ (\ +P WRITE +b fc +k F +se pt +is Loggable +set Y +set Maximum +data Length +Ġun wanted +Var Char +Command Handler +Call Expr +Handle Ref +05 2 ++' [ +Ġpush Context +CN TRL +diag ram +getSub Reg +Ġaux iliary +ĠUR Is +QUFBQUFB QUFBQUFB +h Instance +v ms +); }} +Ġw status +ĠO verr +16 00 +Ġq m +alloc a +Ġns GkAtoms +body A +Button State +Ġproject ile +Background Image +Ġpers pective +Ġrt ol +iw yg +Ġtok Types +Nl cn +Ġspe aker +Incremental Encoder +J Object +l lable +z g +ç ¥ +è Į +om g +Ġh res +qu ux +ref Count +Line Style +Ġser ving +fd p +Ad Group +Ġ(" _ +Pass ive +Ġsig mask +PROT ECTION +K illed +Ú Ĩ +in voker +In lined +Ġto ast +Ġh oriz +vi iv +ĠG OT +Format Provider +rt as +FA F +open cl +Ġload Balancer +GL Program +Ġmain ly +rep lacer +bc n +Ġer p +Ġnl msg +ĠPass ing +Incremental Decoder +æ¡ Ĩ +7 45 +: ; +: `. +; */ +Z c +ing Type +set Duration +(' .$ +Ġfor warded +Set Input +new Index +ĠV LQ +IF n +Ġlast Name +Ġstream reader +Ġstream writer +(/ \/ +Stack s +Ġ"\\ " +nfs d +Ġevalu ating +Sdk Internal +ANDB Y +m config +q Y +get I +ĠB attle +log level +find ById +GL SL +PRE PARE +=! ! +Flow Control +Ġsupp lier +Io ctl +Ġgrace fully +Mkdir All +) (_ +c ave +ĠN VM +To Vector +Pro vince +File ID +Test Object +:" {", +ĠString Util +local State +On Page +DR C +hd sp +Accept able +س ب +INTERRUP TI +B orrow +Q IODevice +f pr +i ctx +t int +et d +ed ma +Ġb db +ĠF String +ĠF MODE +ĠB W +Un mount +Le aves +Source Context +Ġnet xen +ĠY oga +stack Pos +REL ATION +åĽ¾ åĥı +jul ia +ĠREST Client +BROW SER +6 18 +S afari +T an +c string +d ms +g map +p Buf +} `) +if d +Ġ1 33 +ĠD ynamoDB +ign oring +add Method +Token Source +On Close +TH UMB +No aWxk +wait q +ĠUn link +Mo j +(/ (\ +Ġiter ators +Execute Reader +rp n +Ap pear +ÙĨ بÙĩ +æľī æķĪ +syn ced +InvariantCulture IgnoreCase +Ġattack s +EXTENSION S +evalu ated +e ip +h DC +à ² +Î Ķ +Re cycle +und i +Is Running +Log Debug +do be +block chain +99 5 +Ġtra vel +Work bench +expand er +Ġwa arde +M ot +~ ( +et cd +Ġa db +Ġ" {{ +pt odate +um in +set Num +(" "). +Ġcon ventions +ir is +ĠN b +art ment +func Name +Ġun read +ĠG reater +Ġy ellow +Item View +Form Field +On Update +By User +}} ', +ĠUn authorized ++" \\ +ian a +cell aneous +å® ½ +bg mac +ĠFormat ting +OutOf Memory +Suppress Finalize +dq b +VID C +Ġconsum ers +Ġincremental encoder +Ġincremental decoder +Elect ive +O mit +l ux +m agenta +v S +y mm +Ġa Path +ck editor +pt ide +la c +Ġ+ \" +up lot +ĠP reserve +que l +Ġ. " +Ġun mapped +Int l +temp File +TY P +Ġwrite back +gb mV +Admin istr +Resolve Result +ĠNe g +SCA DE +issue d +Motion Event +9 03 +B LT +v V +Ġf ulfill +Ġo vl +Ġ// ! +pl x +Ġcom ps +Ġy offset +min X +NE E +tmp File +json rpc +td ls +Build Target +Render buffer +mer ce +Exit ing +inte gers +hb WV +inv Mass +Toggle Button +getSource Range +Replication Controller +g mp +en ow +Ġ1 96 +Ġi ph +ĠF amily +Get N +Ġse ll +Ġun icast +ib lock +Ġurl parse +hdr s +38 1 +tw ilio +Gen esis +cogn ito +Instr s +AST Node +Ġ'; '; +ĠLLVM Build +I VTV +p idx +__ ') +arg b +Sh l +Ġdouble s +yy b +Json Token +]* [ +diag s +reet ing +Ġrf comm +Ġsuggest ions +suggest ion +: [] +i var +j ue +In ference +(" .. +ĠT DA +public ation +String Stream +Ġget Connection +Ġbo unded +Ref lector +rt le +Current User +oct ets +integr ity +jq XHR +YXR ja +A ffect +P p +P OD +Î ¤ +er ning +Ġw kt +ĠC ut +Ġr ings +add Seconds +AR R +Text box +US ING +ĠDe leg +Ġ16 384 +Ac ct +MI R +IR ON +Ġrel u +ĠSh op +Del tas +Xml Rpc +ĠLo gs +Ġte kst +Should Equal +ik a +selection s +mk dirs +tun ing +ĠTw itter +Cb Cr +çĤ¹ åĩ» +................................ ................................ +Ġ'> =' +Shar per +atLeast Once +& ') +if fn +Ġs udo +(" ** +fa sta +Ġset Attribute +comp liant +ĠTh ree +Ġbyte array +day OfWeek +account Name +ven ance +getC Ptr +, ; +P cap +g al +l ro +Ġ Ñĩ +se al +is Dir +Ġt info +Ġ* ****/ +Ġa an +ĠS ends +Ġe gl +Ex hausted +File Chooser +Output Path +ĠObject Name +Ġexp orter +Sign ers +bin op +Ġextend Statics +Pol ynomial +TRANSL ATE +2 00000 +7 17 +P ins +] (), +e uler +} $ +Ġa arch +get To +ri k +(" }\ +ĠM UX +Ġ2 13 +Se at +ĠH PC +AC M +Ġspec ially +Group Resource +Ġbase Type +Ġq id +Ġopt parse +UD MA +cx d +Play ed +transfer red +123456 7 +ĠKEY WORD +ĠEC FieldElement +Sent inel +gIC Aq +Ġcpuid le +ĠCombo Box +LCJmaWxl Ijoi +5 13 +F ilt +g E +g od +n aW +n want +p write +p DS +Ġn Ret +Ġp num +ĠS CM +Ġis ci +Ġst t +ir lap +IG EN +CR B +])) . +Extra Large +Partition Key +Ġmk time +Linked List +ere vent +[ ({ +[ ::- +n ist +u sso +re commend +is Root +Ġp block +Ġb Result +str r +get L +get Password +Ġin sets +Re versed +ang ement +Ġar p +dev no +SE TR +ib p +ĠIf c +Status BadRequest +Ġexpect ations +Revision s +Blend Func +SPEC IFIC +ĠExtension s +getPinned Offset +Ø º +ĠI rp +Key Length +Response Message +39 64 +STD ERR +Ġsimilar ity +etrokken heden +Ġsomew hat +Occ up +ztBQU VBO ++ # +f data +l cs +m illi +m aka +re call +Ġst ress +ĠF ingerprint +Data Item +ĠG DB +new mask +AB SOL +Ġne gotiation +Address Of +doc string +ĠIN V +Pl ans +Del imiters +Vo x +ja co +å° ij +increment al +exclude s +æĢ » +setRequest Header +4 33 +A UR +Ġf olded +Ġre voke +(' :: +Ġtr aditional +Ġget Element +ĠL ead +ĠRe cursively +max X +ĠX Y +=' ".$ +parse Maybe +Ġhash lib +quote Identifier +MOT ION +Ġamb ient +ĠSci Msg +B AAAA +H j +n ap +p Context +q str +Î ľ +Ġ( /\ +ĠF urther +Ġget Block +Find All +Ġscale Factor +datetime picker +prog name +ĠVirtual Machine +_ / +a ren +p Mgmt + į +de sk +un authorized +ss r +Ġst ash +Ġh len +ĠN eeded +Ġbe haviors +Sh oot +default View +(?: [^ +ĠEx ists +Pre load +Ġ32 767 +Member Expression +wb GF +ĠBe havior +æµ ģ +Let ters +Ġresync Period +WALL ET +7 08 +A PE +H arness +d art +o Settings +t name +Ġre direction +Test IamPermissions +cur rencies +db t +End Pos +cc n +variable Name +57 2 +Ġowner Id +Ġlaunch er +Ġixgbe vf +ĠWire Bytes +usso uth +Y Q +h anging +o Z +is Allowed +Ġp Mgmt +set ContentType +ĠF ourier +AT IC +Ġget X +ĠX USB +Ġcode point +sb p +ä¸ ¤ +Ġpass ive +]* ( +Proto Buf +[\ ' +aut og +Ġqual ifiers +Signing Region +ол ÑĮ +Ġ<<< ' +INTERRUPTI BLE +: '); +G ithub +b node +Ġn am +Ġm us +ĠT PS +St ay +PI CTURE +Field Names +Pa id +trans parency +TY PED +INT F +Ġref lected +ĠUn iform +Ġwork queue +READ ER +Ġdiff iculty +Ġkernel s +Ġunpack er +SCHED ULE +--+ --+ +m arch +Ġn orth +Ġt ier +get Runtime +00 15 +ist A +Re voke +Ġh ba +Ġvar iation +ĠR U +ĠG X +DE MOD +Pa wn +mat rices +ysc ale +Control led +blk size +sources Content +rtle fuse +a im +d H +â ² +re achable +th op +id ential +ra zy +ĠC FF +text field +ĠF inished +ĠGet File +ĠGet Window +Ġsub directory +New Context +try lock +Ġover loaded +ĠReg State +man ip +TER N +Addr Mode +Core Clock +DIS CONNECTED +ĠSC HE +ĠCH UNK +]? \\ +quent ially +ĠLE AF +ĠFast Math +A mplitude +G SL +S CE +m Q +z J +get External +IN DIRECT +pa x +'] ){ +ĠH andlers +End Offset +=' [ +Base Response +QU Z +Ext ends +Per Sec +Button Down +Comp liant +Local Port +PH ONE +tip s +irr us +warn x +ler p +Virtual File +ENO BUFS +SUM MARY +ĠOptim ization +6 06 +D OL +t angent +u YW +| [\ +Ġt ight +Ġ' }', +Ġ[ ...] +LE VELS +Request Headers +assert Text +ific ati +td c +ãģ ķãĤ +SR GB +Wh o +FOR WARDED +ĠGlobal Variable +expectException Message +OUTOF MEMORY +3 80 +C GUI +M andatory +p List +p Child +Ġt ie +ĠC ircle +Value For +Add end +Ġtime delta +cc a +86 8 +Bit stream +ĠReact DOM +Ġml me +æľĢ 大 +ASSIGN ED +[, ] +B ST +C msghdr +L dc +c put +n ag +p ss +or lib +Ġn Time +Ġ0 00 +Ġu control +Inter actions +has Error +Base Stream +Max Depth +)} }; +Tab Control +Namespace d +è® ¸ +(){}; ( +Ġpropag ated +W ANT +d V +h K +r pl +Ġp Creature +id t +get Read +em es +Con venience +Ġg un +Ġ2 53 +Ġget Selected +Ġlist Options +ĠUn mount +UI Event +fl p +Socket Struct +xu XHR +Ġcast ed +gre et +Round s +Comm unique +ĠOver lay +oss im +pipes Count +Ġchrom a +!| && +b iter +w rote +is ible +Ġb dev +Ġd k +In dependent +ĠS AMPLE +pp b +ĠH ub +mt l +Ġind x +Post Form +ĠWh y +USER S +XB kYXRl +Prom otion +Ance stors +Ġbid irectional +<<<< <<<< +b Use +f ll +g X +l cp +n Rl +en and +Ġp Child +IN SU +ID irect +fe a +ac r +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Is Available +ializ ations +DI VE +Helper Parameters +Down loaded +Json Property +bm Nl +Updated At +Escape DataString +ĠSmall PtrSet +ĠCPL Free +ел ÑĮ +ĠMeasure Spec +Ġ86 01 +LookupInstance Bean +æŁ IJ +) [" +R ND +b att +Ġ( = +Ġf is +Ġo hci +set Check +Ġto Be +Ġ+ ' +ĠT ls +pr td +Ġun loaded +Ġkey store +With Callback +aw are +CC W +FE W +Ġpy xb +vp fe +gy ro +Ġretry ing +Patch es +åĢ Ļ +Mer ger +éģ ¸ +Ġfrequ ently +Ġpmc raid +C ors +p unct +t gid +Ġ( {}) +Ġs he +pe e +ĠT IPC +pro blems +ĠO LED +Data Node +fe as +()) }; +(? > +py c +Util ization +sort Order +Ġauth entic +MC Expr +è® º +DP LL +Deserialize FromString +G or +M DI +O mega +P reserved +i get +y esterday +Ġa ac +Ġde bugee +RE USE +Text MenuItem +Not Contains +Ġmin X +)] )) +Ġiter ates +anch oring +ĠData Layout +font Family +Cursor s +Security Action +Validation Rules +ĠMo vie +Por trait +SupportByVersion Attribute +V NI +_ *( +u we +è Ļ +Ġp mf +Ġm mu +Ġm argins +To Boolean +Data Wrapper +query Params +And Drop +CA Y +Mock s +ead y +Ġ". "; +GUICtrl ListBox +Super visor +Ġfac ets +ĠIMP ORT +Ġanno unce +MIRR OR +f Help +x pt +get Patient +ĠN u +ort ure +ip Address +Ġx size +Is Connected +Ġfield FromInstruction +bool s +Co unted +bit coin +Ġdis ks +du ino +fr ica +ĠComple ted +Episode s +Instanti ated +Appro val +Saf ety +6 75 +A pk +C txt +D uplex +H uffman +w Index +in ent +Ġb am +Ġre jection +In Month +ĠA LTER +ĠN il +Ġ*/ ; +To Create +ml ist +sign o +ĠH istogram +own ers +last Line +"," \\ +bit Length +," $ +ĠCheck sum +Ac cessed +insert Element +]] ), +Ġauth enticator +ĠST DOUT +48 7 +Trace Event +namespace d +Cursor Pos +arm v +Ġdraw er +ĠHttp ServletRequest +Throw Helper +ĠSource Range +Anchor ing +ĠAd j +Ġsegment ation +ĠDecl Context +?, ?, +Ġgax grpc +ĠVe hicle +F ig +Ġc ubic +Ġ' )[ +ĠS log +As Nil +ĠTest Suite +aw esome +55 9 +sl jit +Bit Converter +container Name +ĠAl though +Ġround up +Po ison +Paren thesis +Est ablish +SHE LL +ZO OM +redd it +ĠCONSTR AINT ++ | +S LE +m rs +s ns +} ]", +de ltas +Ġs ps +Ġre pos +(' ) +ĠD ll +per ipheral +pre h +By Val +CON VERSION +Column Int +Component ResourceManager +ICE S +Pay ments +ĠMessageBox Buttons +ç»ĵ æĿŁ +Ø´ ÙĨبÙĩ +` ' +l data +u ite +Ġw off +set Texture +ĠC GUIDialog +ind ication +ust ered +Point Cloud +Stream Handler +Inter polate +body B +EC MA +000000 02 +Ġtool chain +:/ ^\ +ĠAS IC +Ready For +ĠWork ing +TM R +åį ³ +Operations Client +Px U +Cpp Unit +ĠEffect s +åł ´ +originalBody Pad +\ : +d A +or am +li kelihood +En gines +String Var +]. +Date Picker +Read ToEnd +Return Code +parse String +CF M +enum mers +Clo th +Month Cal +WIN D +Shared IndexInformer +ĠVer ification +åıĸ æ¶Ī +PROCESS OR +) :: +4 99 +9 32 +E CS +F BU +e log +{ : +Ġm ex +ĠV EX +ĠTest Server +56 63 +Simple Type +ATTR S +Small Vector +Unavailable Exception +Virt Reg +ÖĢ Õ +B anned +Z HJ +t T +} '; +Ï ĩ +le HR +Ġis olated +add Days +ple ase +Read Buffer +Ġcode Point +Ġ*) " +Tra vel +56 3 +)] ), +Ġ~ (( +Simple x +Move Only +Master Key +Completed Task +ALLOC ATE +ĠEm ber +Terminal Info +ReadAll Text +ĠLPC WSTR +UPD ATED +Ġderiv atives +Y mF +f bc +g aW +p size +x cd +y size +Ġv Errors +In Buffer +In Order +ĠA ABB +Name For +ĠU Bool +Object DisposedException +Key Ex +Ġsub st +Write Start +Ġactual Height +GV yd +ĠPath name +ĠMO V +ĠExpected TextMenuItem +Hy dr +ĠQV BoxLayout +4 12 +d K +m ilestone +y affs + » +Î ij +get Loop +od p +Ġh im +be h +AA Y +state Name +ĠQ S +Host Key +DD X +Split Options +Ġsim ulator +E thernet +H oliday +L ot +T OL +s Path +u FE +am in +ĠP t +To Xml +base Type +AD DED +OP A +ĠJ OB +Co ok +spec ify +HP D +Ġem p +LOG GING +Ġgl Enable +vol ved +profile Id +hl dev +ĠSelect s +chrom ium +ĠPhys ics +ĠCover age +anchoring Helper ++ =( +5 77 +j M +re mark +Ġt if +ed y +ĠS olve +Ġh arm +vi olet +ĠM OS +ĠF LD +Ġget Action +Set Max +:" (\\ +Out Point +ĠSt ar +aster n +BE H +DIS COVER +Opcode Encoder +Drag gable +([^ "] +Chron ology +] ^ +t it +is ample +ĠT errain +Ġg am +To Show +of d +file Type +AC S +db Type +Ġ"% ": +ĠK lass +Ġsign um +Ġcustom ers +Scroll Pane +Marshal As +:\ /\/ +49 8 +Cancel Button +ĠAP Float +Ġens uring +Wra pping +表达 å¼ı +G IL +e U +t utorial +al chemy +te str +ĠS SE +Ġun escaped +AR IA +no vember +local Scale +Not Exists +Ġtext View +Ġnext Index +Spec ialized +run Command +Integer Type +Single OrDefault +Month ly +Decode Rune +GetType id +: ])) +Ġ çļĦ +Ġt err +id c +ĠM arshall +Get Sub +") ]) +[] = +AA g +Th in +Ġno Err +Pack er +gener ators +Attr Def +ĠCON D +ĠSk ill +Watch ed +Extra Data +Final izer +MAN UAL +FEATURE S +DUP LEX +A HEAD +D SR +I cmp +a F +d itor +Ġp Temp +Ġb ij +Ġd bus +ub WF +Con sent +Ġr nn +data size +ĠF ATAL +String Encoding +ĠH FA +sg t +Int ents +ee ee +ĠX SS +Write Field +Bit Stream +Begin Horizontal +Decode Response +*\ *\* +ĠExec utor +๠Į +776 93 +datatable s +G dk +e rer +is able +et est +() % +Ġm ci +Ġv A +up grader +ĠA SP +ĠI PA +Id Type +read Float +Com bination +arch ived +From Object +Write Reg +wh atever +down loaded +57 0 +kind s +sha res +WriteAll Text +ĠVERBO SE +> "," +k nob +r Q +Ä ĵ +Ġ ãĥ +Ġm aker +Ġv ect +ad ien +Ġw arp +St ress +os ing +Ġget Session +": [[ +Ġ\ "./ +Not ation +cb nZhci +Ġmin ibatch +ĠFile NotFoundException +Ġleft most +Long Long +ĠNot ice +Ġplugin Name +Ġrx q +glyph icon +Ġhy phen +Ġtun ing +Ġni bble +Ġbackslash es +4 27 +O ri +c fa +g os +h display +Ġc ant +Ġc make +get Bundle +set Code +EN H +Is ValueType +create Block +ठ§ +XML HTTP +xc bl +watch ed +Bucket Name +PersistentVolume Claim +ABSOL UTE +" /, +K ick +p Stream +q ry +et ri +Ġ" -> +ĠM SV +Get Line +ĠL AP +ĠIn correct +trans fers +Buffer Info +Ġ*) (& +ĠZ Z +ĠCont ents +rypt fs +bad o +Ġident ification +Notification Hub +COLOR S +Without Extension +ĠDes er +ĠPK T +Ġshut ting +l cr +Ġ( (" +Ġp type +get Script +Get Event +Ġset ContentView +][ \ +Ġsub path +current User +Ġ'% ') +Display Style +Transaction Manager +ĠIndex Of +ĉĠĠĠĠ ĉ +ĠInter op +Ġmulti processing +ĠDec lare +ĠDes ign +Ġaggreg ator +Tor que +Ġeigen values +ar ial +Ġb ip +Ġm edi +get Username +ĠC ron +ĠB SP +num a +Ġsc if +request AnimationFrame +Desc s +Ġmax imal +entity Manager +BB BBB +ĠUn its +over lapped +ĠWork around +ĠImm edi +|==| =|!=| +7 47 +O YW +` /, +x offset +is Required +is Leaf +add New +Ġbu ddy +init iate +current Frame +wh c +IL Intepreter +Html TextWriter +ass andra +Prod Code +Ġadvance s +ulner able +(?:(?: \\.\\ +_ - +b orders +ç ª +ì Ħ +at c +is Element +ĠS ep +end Object +Ġdata points +Create User +Entry Size +Ġel ts +CP hys +chr dev +ĠData Row +Ġfe eds +sock fd +Cluster Request +Static Text +Author izer +ĠTarget RegisterInfo +cop per +('" ') +Deleg ator +I AC +_ ') +b ower +n uc +Name Len +ĠM MU +ĠG dk +Model Builder +Ġq name +Ġexpected Result +Ġext rem +project ile +ĠUpdate Status +Br p +Ġet ree +iom ux +slide Index +vor bis +upt odate +//////////////////////////////////////////////////////////////////////// ////// +pet ra +<=| >=| +> '."\ +b ast +g ZW +l mp +ut ime +++ ]= +ĠG SL +reg Exp +mem block +Ġtrans it +ob re +ha W +xuIC oq +ĠTmp Inst +assertNot Equals +etition s +SYSC ALL +Ġcyl inder +G emeente +g is +m Lock +v ref +ì § +Ġ ঠ+ff d +Ġg ethost +ĠP resentation +op codes +ĠL ic +ĠE Op +new fd +){ $ +ĠIn sn +ded ent +start State +Ġspec ialized +Ġclass path +Co lored +Member Access +------------------------------------------------------------------------ - +fi ber +initial Value +lk b +ĠPers istence +ãĥ¼ ãĥ +3 99 +C File +H ier +c ro +Ġf k +Ġs ans +Ġb onus +get Settings +set Url +om ode +Ġis Future +ext name +Id To +mo le +Ġun like +Ġal ice +Ġsize Varint +Time Series +Line Numbers +Ġpar cel +Ptr ace +current Position +ĠApp lies +Ġsn ic +Unmarshal Text +Ġpassword s +}), { +rf comm +unpack er +ĠMn emonic +b info +p Input +Ġ âĢĶ +Ġb swap +Ġre actor +ol ink +(" ~ +ĠD iagnostics +Ġget type +Object Size +Str ategies +Ġfirst Char +56 2 +Ġph ases +/************************************************************************ ***** +MK NOD +Repeated Field +XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX +ĠMade Change +Ġipo ib +Ġopend ir +! ")); +5 39 +J Token +S en +S AN +et no +Ġf li +Ġf fs +Ġn ature +Get View +Ġget Activity +ĠE OS +ec ryptfs +net a +Instance Type +Sub round +CC tx +CO ERCE +Ġignore Case +Ġweb View +æĸĩ æľ¬ +ĠGrid Data +Unre stricted +èĩª å®ļä¹ī +ĠProb ably +Assume Role +ITrans action +ACEM ENT +) (' +4 89 +J ST +i ost +w ins +Re ferent +ĠT CA +ĠA wt +Ġnew Child +Get U +Get Temp +RE VERSE +Ġout File +OT I +AB ET +IO US +Ġtag Regex +by B +OC FS +meta Key +Ġchange set +Free List +Encoding s +Ġ'(' ) +Ġinc ident +é¢ ij +C Ag +J wt +c rene +d L +o Y +s ensitivity +u E +× ĵ +In Bits +and on +ĠS EL +ile vel +as q +Get Source +Ġset Content +Ġadd Pass +lab ility +Result Code +connect ivity +semb led +escape Html +Ġcorrect ness +Fixed Size +Collision Shape +integr ate +Gtk Widget +Ġdemon str +( ("% +> | +F resh +b rc +m Name +r igid +x ce +× Ĺ +is Instance +// [ +co il +Ġi Index +add Content +ĠR NDIS +ĠG SN +be haviors +create Cache +On Exit +Resource Version +Pre sets +And Verify +lex ical +MOD IFIER +è¯ Ħ +Ġlua K +]? | +áŀ ĺ +áŀ Ł +ÏĦ ε +Ġpret end +etno yb +8 33 +T IC +b anned +n per +Ġl ba +Ġun qualified +ĠE valu +Ġtest String +## \ +Ġpath info +BA F +Ġaction Name +ĠEX TRACT +DD C +ĠGraph QL +اÙĦ Ø£ +ĠOPTION S +åŁ º ++ _ +P haser +Ġs amp +In Stream +ew ise +ip sec +Set Key +UP GRADE +Ġremove All +ĠSD F +RX D +Language Code +ا ÛĮ +URN AL +ĠStream ing +Geo Region +Finding s +RESOL UTION +ĠSorted Set +ĠCWallet Tx +L ump +k ZW +n bt +p desc +Â İ +bb p +co ve +Ġd ilation +)) ))) +ĠM ET +out File +val obj +ance lable +Set Object +item Index +Response Data +sk l +New Name +desc ending +Ġsk etch +tree View +Ġ'; ', +BAB AB +DK IM +Broadcast er +337 20 +Navig ated +XVpcm Uo +ĠSTAND ARD +9 10 +S ynchronously +c begin +h ugo +v mp +er vice +Ġm ant +ĠA O +Ġg ru +li ament +Ġget List +64 1 +Ġtest Load +ĠQ Script +Th ermal +[" $ +Ġnum Rows +Num s +Ġsk l +Ġversion ed +Ġra ising +*) _ +ठ« +Access ors +Bit Count +rd y +etype s +Must Compile +/# /. +Equ ip +Loss Model +v R +y pos +Ġp C +get Java +con str +Ġint ptr +(' *', +qu er +Error Codes +min er +dir Name +New Encoder +Ġsrc Buf +ĠZ D +ĠUN SIGNED +ĠHD LC +Ġlic enses +éķ¿ 度 +Aggressive Inlining +DirectorySeparator Char +* # +A im +D XT +p ig +set R +ĠM ount +vent ure +ĠO XYGEN +reg el +Ġdo ub +Ġ/* = +Event List +Event Types +const expr +Ġret ried +create Spy +Str Length +Write Request +from StdString +HT Info +opt imum +88 2 +Mock ito +Left Width +Http Kernel +Ġ[" - +Ġfl ux +Ġadmin istrator +occ up +èı ľ +0 50 +B are +ra co +ĠS ector +Ġl sb +ak ismet +back ends +ep num +Request Uri +ite l +ob servation +Page Info +ĠNew ton +ĠOn Enable +PRE CACHE +wp abuf +Ġam mo +Ġ"# ") +inherit ance +Ġsw allow +ا ÙĬ +Border Width +Ġæ £Ģ +)))) ** +AU DIT +Cats Referral +ĠCred it +> ())) +F ra +F LL +L SE +x type + ± +Ġif def +Ġ1 37 +To All +Parse Tuple +Ġqu arter +Ġactual Width +SUB MIT +big int +Sent iment +fan cy +Ġroll ing +getFirst Child +ĠOk ay +Universal Time +H CP +f SB +h Process +Ġin GlobStar +set Html +Re ferer +Ġde ref +Get App +ĠW PS +ĠRe Sharper +pan ion +Ġad s +TP M +56 70 +Auto load +Single Line +Ġspecific ations +Need Encrypt +SNAP SHOT +M sk +X Axis +c be +h J +v br +get Atom +Ġh ero +qu irk +ĠP erm +Exception Utility +(). ' +Ġout len +OP TIMI +create File +Ġup loader +Mem cpy +the se +access ibility +Ġsend file +Ġword en +ãĤ ¦ +49 38 +ĠMO USE +STD IN +ç¼ Ģ +mag ick +Ġstub s +HEL PER +4 0000000 +l ump +z U +// ---------------------------------------- +Ġp Pager +Ġw inner +Ġl ir +Ġi prot +__ '): +CT CM +IC Ym +CE ED +header Name +Params Array +Parameter Exception +LOG MSG +Ġli kelihood +Ġincre ases +çİ ¯ +Q Web +S Ext +a T +); $ +is Dark +id Vec +set Node +set Alignment +'] .$ +ĠB ST +io ctx +Index Name +EX YNOS +Access DeniedException +If Missing +man ded +Lib Func +ĠLLVM Context +Ġ================= = +eg ret +Rew ind +ECONN RESET +C id +M peg +Q Event +Ã Ĺ +st ac +de leting +get OutputStream +Ġv px +Ġre covered +ĠC USTOM +fa cade +IC mn +min Y +Form ation +do ing +Im e +ca ffe +Range Error +Interface Decl +Cache Control +WR M +Custom Attributes +escape s +************************************************************************ ******/ +ĠBlock Pos +Ġes as +fac ets +ĠAN IM +ĠCAP ITAL +MOB ILE +n Size +n cm +s xe +Ġset Description +Ġtest Invalid +Un read +SU FB +EX CEPT +Mem o +position al +Ge cko +Raw Message +Ġman ifold +ĠStart up +VV VV +listen ing +10101010 10101010 +Ġconver gence +) >= +8 12 +b Show +r ub +re paint +ce x +Ġb map +ĠV FS +ĠV istA +Ġat y +Item Index +]) ( +ps d +tract or +COM BIN +Render Info +Ġconf usion +************************************************************************ *******/ +Ren amed +Big table +Spe aker +DataDiskConfiguration s +EO A +I IR +P TYPE +q Z +q ps +re pair +re positories +Ġde x +Ġj wt +()) })})} +sub domain +fs ock +stat istic +SP U +CI M +Template Decl +UD ING +Mapping Object +real ize +Ġvm alloc +Ġrad ial +Jo y +ĠTarget Opcode +á r +ceed ing +ĠNormal ized +/******************************** ******** +- ") +a cos +s anitized +Ġt icker +get Handler +con ference +sh iba +Ġbu ggy +:" ), +PR IMITIVE +04 47 +Per l +Script Mgr +MO Z +åĪ ĩ +ĠOut Of +qp lot +pad ctl +78 1 +EST ABL +Drag ged +ĠAL U +ãģĹãģ Ł +X r +d Z +p ent +in ame +Ġn br +Set Path +ĠR and +ph er +assert Eq +Token Review +================ == +"] )); +Ġcomp iling +Do Retry +Ver ifies +{" ", +POL YGON +ĠPRO C +Ġmn emonic +trial s +M SIX +V SYNC +s A +x Max +un modifiable +Ġp info +Ġp mu +ĠC Block +ĠC GI +ter ior +ĠG HOST +Un map +Info Type +Ġkey of +sa zure +source Data +ĠIS A +Ġserver Name +ãģ Ĺ +fix es +Ġpy game +Py Arg +serv let +getData Type +ship ment +A bc +C j +R amp +Re vocation +dev p +Date Created +Ġtext Status +Input Device +root Dir +style able +ĠType Name +window sazure +54 1 +еР¿ +present er +Ġæ Į +Ġnan oseconds +ĠDi vide +A IM +E PO +N ID +S AR +de allocate +Ġ" ): +ic lass +str t +get Uint +set Alpha +Ġ1 55 +ĠC GEN +Ġi B +ht p +Ġget Children +ĠL ANG +Data Contract +sk buff +Ġread len +ĠEx isting +ift i +Xml Document +Ġsn mp +vZ GV +how to +Ġndb require +ĠAsm Token +99999999 99999999 +Ġgdb arch +ĠRedirectTo Action +0 77 +K RB +L iving +P URPOSE +b urn +g file +o Template +re actor +dd Dcc +Ġi pu +ĠL an +Ġx m +sg n +LO GE +ĠDe structor +Ġtra ined +Next Page +df lt +064 3 +ĠTrans lator +Decode AsNil +Css String +Cred its +greater Than +coe fs +cool ing +ĠREcma Helper +ddDcc C +f D +i D +u Int +Ï Ĩ +Ġp dc +set Method +Ġ: "); +Ġde queue +Ġex perimental +Pro per +Set tlement +Ġkey space +ĠX HTML +current Path +try ing +ĠSystem Exit +Ġdis allow +BQ V +ik es +âĢ ľ +Ġwrap Quotes +Press Event +quant ile +Ġsyn ced +Ġnt fs +Che m +t se +Ġn Height +get Ref +get Dom +ĠA MP +test Dir +per c +Ġcom mented +Ġj query +CT x +inter ceptor +push number +Source Path +Box Sizer +bit set +over head +]+ \\ +normal izer +ĠQu ote +ĠComp iled +Ġarch ives +ĠDraw ing +Equ ation +Ġ44 100 +nex us +FALL THROUGH +":[ {" +Ġptl rpc +ificati enummers +T une +\ '] +e hdr +g U +m ch +t R + µ +ag reement +ol or +ĠC ant +Ġis Function +ĠR NG +Ġ); // +low fish +\\ " +no Of +Request AnimationFrame +Ġme as +Ġback ends +Float s +Ġ[[ @ +Ġsw agger +Fn Info +Ġps Options +Ġrs lt +Ġjo y +Ġunexpected ly +736 3 +éĵ¾ æİ¥ +Q WebPage +e lection +t led +u context +Ġ= ============== +Ġ( ** +is Admin +get Use +Ġtest Write +url decode +dr s +mod ulation +me as +Ġcor outine +36 1 +Search Criteria +ĉĉĉĉĉĉĉĉ Ċ +ÑĤ оÑĢ +------------------------------------------------------------------------ ------ +à® ¤ +zen mil +iser ver +|$ ', +ĠTIME OUT +/******************************** **************** +kat zenmil +Ġtokenized Line +bys hev +katzenmil ch +W HEEL +un mount +ro gram +Ġp gd +)) ** +con strained +ĠD ns +Object Builder +ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ +Test Tools +class path +sub devices +UN LIKELY +next Index +cs html +GL Context +ĠOn line +imp lied +cv s +Constructor Return +ĠOGR ERR +inde terminate +Epoll Event +D ARK +F ifo +N ight +X DG +Y b +Î ¸ +re moval +ur f +Ġp seud +Ġ+ ") +Pro portion +Ġit ers +ME S +Ġext ending +Profile Name +ĠCall Inst +mF tZ +Ġturn ing +xxxx xx +Ġ'] ') +ĠMY SQL +fri ction +opro to +> )); +O VR +R IG +h axe +m A +r phy +v T +y Max +ut ls +Ex posed +Get Group +Ġget Output +Ġ# ################################################################ +Max imize +Ġtra its +Ġcomp ilers +Global Object +UL IP +Ġhelp ful +[- + +fragment Context +dial ect +Broad phase +h ino +r doc +Ġc ip +Ġre create +Ġe fficiency +Ġx form +Se k +IC U +Or EqualTo +IO Error +Web Worker +change log +Send Msg +chan p +Buf Len +Ġnative Event +Shared Pointer +PK G +OutputStream Wrapper +lev ator +Generation Strategy +Ġ*** / +Regular Expression +FIRM WARE +ãģķãĤ Į +v B +om i +con g +end pos +up er +ĠM VM +pa cted +Get Section +ĠG FS +ĠE SC +request Object +Buffer Ptr +Num Bytes +14 00 +ĠUn def +Bit Mask +Raw Value +ай л +Personal ity +InvalidParameter Exception +\\! \\[ +Ġorth ogonal +' `` +J SAMPLE +O J +O q +R lc +c flags +p Led +in compatible +Ġc rt +ĠS GE +Ġof App +Ġg dk +li v +add Row +ĠL H +Ġsh aders +=' ' +Window Width +Ġfirst Name +Ġstream ID +ĠSp atial +Prom ote +zM zM +por ation +ĠEL SE +^ - +q ub +v dm +ĠP VOID +Ġu it +out ing +To Dictionary +(). '/ +Ġim gs +Stream Name +Ġdb c +37 1 +Disk s +cli pped +cha os +ScrollBar s +ãĤ¹ ãĥĪ +Ġwater mark +Ġimag inary +SPA WN +; }, +P SI +Ġ( _, +Ġf pu +tr unk +ĠA wake +ĠD ex +out len +key id +ĠR ational +AL S +Add Days +no script +CK ER +Window State +Mem Stats +window Manager +rec ision +Json Convert +45 3 +ĠImp l +Ñı бÑĢ +ĠCO IN +VIS IT +å± Ĥ +uFF FD +G ear +S Val +Z UV +b EndpointAddress +d am +t Q +Å Ľ +er ver +bb ers +To Display +me g +dat agram +ĠBuild Target +Cast type +Ñĥ л +scsi h +ĠHexagon II +zc GF +Ġextend able +addAction Listener +(; ;) +Che at +Equality Comparer +ëĭ Īëĭ¤ +à¥ĭ à¤Ĥ', +ĠCLR Method +ĠSte ps +R sa +k U +m key +s File +w asm +à » +Å Ħ +se xt +de bian +get DOM +Key Data +Ġtest No +Attribute List +Base Addr +PC C +DO MA +Web ACL +47 9 +Sample Count +Touch ed +ali pay +suffix es +Sat uration +Ġoverr un +Projection Matrix +Wide Char +Ġ************************************************************************* ****/ +AvLy B +Ġtweak ListOptions +INSU FFICIENT +C uda +K SA +L h +X MP +is On +Ġa im +tr uct +set Block +ĠS TY +ĠS KB +), ' +To Process +Ġ` - +ĠTh umb +Base Reg +access Key +89 60 +åı Ĭ +RI FF +78 4 +Ġcr is +Ġsolution s +Water mark +ĠWEB KIT +ĠNotFound Exception +ĠisNew Obj +F ED +g ts +Ġb fi +set Attr +ĠS ink +ĠD AV +ĠP MU +Add Int +FF ECT +"> & +temp s +Not Set +Ġdevice Id +br p +INVALID DATA +49 5 +ĠMC SubtargetInfo +Ġ': '); +(. +? +ZXhw b +C rawler +H ap +N vdXJ +X fer +b pl +Ġm vs +set Values +Ġl dr +ĠP AN +back slash +Un link +ĠQ CoreApplication +ĠQ UEUE +Request Object +Ġ` {$ +From Map +Method Redirection +host Name +Target Machine +36 3 +dm ic +vd imm +boot mem +touch move +ĠSto red +ĠRecord s +åĨ µ +Ġ'+ ') +ISO String +CAN NOT +jul i +Favor ites +RegisterCLR MethodRedirection +* =\ +E BA +q type +an cing +if ter +Ġs pring +ut en +get Operator +", [], +ol ist +Ġi phdr +ers onal +art z +type script +ĠL UN +pl ink +ec d +byte Count +From Node +Read At +Ġmax y +Em ulator +ĠCh rom +(/ ([ +ĠLoc ate +vd G +Split N +Ġob servers +bg Color +Ġpay ments +ĠMP FR +Ġwallet s +Ġindependent ly +Ġsam sung +ог о +COLO UR +m Base +à ģ +Ġa Index +ag f +get URL +res end +Type Exception +Get Command +To Client +reate st +Ġun rolling +Is Default +block count +Ġpre req +Op Name +Port able +Prefix ed +:[ ^ +Ġmock er +ĠRT S +Ġbig int +GetMethod ID +RegClass ID +Ġfoot print +'](?:(?:\\\\.)|(?:[^'\\\\]))*?[ '] +L f +m ys +t sa +v tk +w U +or onoi +bb it +ĠB UT +Ġget Parameter +From Json +Ġstart Line +Ġlog Level +ĠObject Types +Run Time +Fe at +make Suite +Ġ', '. +ov XG +ales ced +ĠJavaScript HighlightRules +ç§ į +Encryption Key +Ġcent roid +- | +3 120 +L PS +M CA +v fp +w N +Ġ} ', +ate xit +ad pt +MA S +col ormap +Un typed +Code cs +tx x +Ġel gg +STAT IST +ĠK V +Byte Offset +Store Id +Stack ed +comm its +Ġprogress Bar +LF xuICB +ĠTri angle +FIN ITE +Marshall ing +CodeGen Function +; }\ +D rivers +a uc +i P +n ursing +o em +t cd +un reg +ic d +ĠS WP +ĠA pr +ĠD arwin +data p +ĠE sc +As Array +Read ers +Ġlocal ization +35 01 +fail ing +Screen Width +prepare Statement +ĠNum py +ä¸į æĺ¯ +ĠFloat ing +Integr ator +ĠOff ice +ĠAssoci ation +12345678901234567890 12345678901234567890 +p Index +se tr +is f +ĠL td +ĠO SS +") ]), +Client State +tra j +Auth Token +ãĤ Ĥ +ĠSD LK +zip file +vd so +favor ites +Recommend ation +c set +o j +q com +t in +un ced +Ġt sc +ch ang +get Unique +Ġre cycle +ĠA AC +ĠI U +Ġout buf +ĠH SI +Ġcall Settings +cc dc +ĠAT M +And Type +ĠArray Type +Ġcomple ting +GU ILD +QUFD QTs +Ġ'* ': +ĠSom etimes += (" +i ContentId +p ma +r ms +Ġ é»ĺ认 +int errupted +Ġs se +pe ared +get Defaults +ĠS am +ĠT inebase +Ġl dc +Ġh fi +ow el +ime o +IN COMPAT +=" },{ +Ġreg enerate +ĠX t +Ġq true +And Check +Position ed +Ġ'/ ^ +Bit Field +Matrix Mode +nv list +ĠStruct ured +ĠACT IVE +Ġmut ated +framer ate +H UP +c end +m art +m thd +w M +z aX +is A +sh ar +av c +pre q +Message Header +ĠJ it +QU rl +Ind x +recv msg +Ġowner Context +Ġfetch er +zd Hls +Absolute Uri +åį ° +Ġfac ing +Compatible With +mss ql +gop hercloud +TRANSPARE NT +D GRAM +m j +Ġs addr +get Texture +Ġl am +St u +ĠI MX +Ġu data +IN ATION +Get Is +]) \ +ĠX L +Input Source +Ġdis allowed +Ġorder by +39 7363 +Ġev sel +)/ ; +Red uced +QUFD QTtBQUN +Ġassign ing +ĠAd vanced +Where Clause +Ġpur chase +ĠTI XML +ĠRep lica +Led ger +" })}, +è Ĺı +st eer +ar avel +Ġs io +get type +Ġd umb +In visible +(' {} +En ough +ĠO LE +ĠW X +SS O +Text Size +sp ider +Ġkey ring +raw s +object Class +has Attr +ĠSystem CoreClock +Ġco ff +Command Result +")) } +uc ation +encode String +Symbol Table +Ġraw Data +ãĢ IJ +xls x +B olt +G q +b ce +b stream +x bb +z el +Ä ĩ +ĠN BT +text Color +ĠM N +ĠG lob +Text Content +sp ine +Ġkey Name +from len +))) }; +we i +Column Names +ĠFile Util +Web Response +Append Element +Ġag ents +ĠEX CEPTION +blk cipher +watch desc +SM IT +gem ent +stroke Style +cmF uc +usp ension +Iiw ic +h B +Ġ{ $_ +Ġf si +Ġ' ** +co ul +ĠI DB +min x +}} " +ĠAT T +Can on +39 2 +Us able +render Target +ĠCHECK SUM +Ne utral +AIL Y +ĠIgnore d +3333 33 +Ġbg color +tolua L +Ġcoeff s +extr adata +["](?:(?:\\\\.)|(?:[^"\\\\]))*?[" ]' +f print +th m +de cr +Ġth in +ĠC ognito +Ġnew Path +ĠP EP +Get Handle +ST UD +pr icing +Ġ# : +ĠE ST +Ġat i +Sc rollable +show Event +ts v +STR IDE +build Vo +ĉĠ ĉ +Ġpair wise +mv pp +ĠAb v +Met al +ĠMerge From ++")(\\. )("+ +ĠSECS uccess +7 22 +O vers +T BD +st i +Ġc rl +Ġa part +Ġre calculate +ĠD AILY +num Bytes +By ZW +åı ¥ +45 8 +bound aries +Ġdecl s +abb it +Ġrand y +Uni verse +HEAL TH +33720 368 +' }), +X q +t ight +z W +set Subject +om x +Get Map +List Element +ph ar +ml s +Class NotFoundException +TR IE +Th ru +cle ared +Em ission +ĠTest Helper +ĠPro tected +root Path +Ġcur ses +way point +Standard s +Ġrect angles +accept able +DEVICE S +ĠTry ing +Transport Exception +eh ca +×Ļ ×ķ× +PREFER RED +- ') +W ard +c laims +st rel +Ġf pga +Ġr amp +ach inery +To Char +Value GenerationStrategy +Set Visible +riv a +count down +Ġk Num +Ġro tl +." ' +MC G +original Column +ãĢ ij +Ġvisual ization +Ġhistor ie +MANAGE MENT +B ss +B cc +C WD +O VE +s late +s lt +Code Sniffer +bit wise +ĠPro j +Ġ'/ ')) +59 8 +YX N +dn a +/^ ( +Escape s +nes qp +getIn trinsic +rat ios +ĠCLE AN +N SP +// , +Ġ* ************************ +ed ict +el gg +Ġin box +set Class +em ies +rc vd +[] | +Ġkey Type +Is ReadOnly +EM BED +]+ )", +slice d +Src Ty +JS VAL +cls id +typ ically +ĠSpec ification +CACHE D +Ġrespon ds +Ġear liest +../../ ../../ +QUOT ED +ĠInputStream Reader +ĠDiagnostic Utility +C ourier +H yd +m len +u AA +Ħ ม +Ġc z +ĠS DB +ĠP PS +To Long +ĠR t +app ers +next Indicator +Ġ[]; \ +import CssString +Activity Streams +c pr +Ò ¯ +on Drag +un w +Ġth unk +ent ions +In fer +ĠS pring +Con j +res cue +pp end +Ġj t +Ġstr casecmp +Sub match +dis criminator +ĠFile Path +08 1 +ĠRE PL +Ġtx id +Ġlimit ation +parameter Name +Ġms build +Ġdump ed +ĠEnum Descriptor +getColumn Index +nom inal +adjac ent +gau ssian +$ ) +b asket +p Mem +get Meta +im eter +set Desc +lic ing +op ad +test file +Ġtest Result +ĠQ Web +ĠJ Z +As Text +action script +Var Int +EX TR +ĠTest Get +cm n +Script Loader +Top Width +property Flags +Delete Object +cent roid +cat id +dom Idx +paren s +Ġweb Response +Ġhdr len +PAD APTER +Rew riter +Flat Style +Packed Slice +_$ ]*\\ +cml uZ +ĠYear Month +C airo +Å ł +Ġ{ "); +Ġs ales +Ġv cc +ĠD ed +ĠP FR +Ġy c +"}, [ +Draw String +ĠTR ACK +Ġph on +ĠSk ipping +Ob stacle +game s +à® ° +Jy ZW +ĠLinked HashMap +åĵ į +ĠREQUI RE +tact ic +% - +, # +J UST +Y C +Y et +d tl +f inger +m func +th ousands +Ġf val +Ġa cb +get Endpoint +qu eness +per line +[$ { +ĠSystem s +Co untries +df b +access at +Ġxml Doc +tran sclude +Ġcolour s +å®ŀ ä½ĵ +ĠRad ius +ĠTiXml Node +ĠCodeGen Function +unge on +Ġcontinu ing +/ ***** +\ -]+ +d buf +v pu +Ġf usb +ĠC andidate +ĠD fp +ĠM AG +und ing +List Vo +Th ings +Ġsc roller +ld mVud +Of Care +Ġnode id +Query Selector +ĠTest Result +Bit wise +Ġ'< ', +Cookie Jar +Adapt ers +quis ites +adien is +H UB +T ess +T IF +á Ī +Ġis First +ĠM vc +ĠL dap +ĠR NA +Message Count +Ġsub graph +Version Id +... ). +Ġ[' -- +Storage AccountType +Memory Pool +ĠUS ING +Ġemit ting +Ġhappen ing +Horizontal Alignment +supp lement +Ġmv pp +ĠDirectory Info +ĠTRAN SPORT +:"\\\\ $", +7 66 +K t +d J +Ġth iz +get Messages +Ġre quiring +(" ); +ĠS AR +Ġe y +Ġe fuse +To Filter +Ġget Event +Ġx code +ill ion +own ership +Int Array +As User +bl t +Ġfirst Child +ĠIN TERNAL +Select Object +Vertex Shader +HS V +SUB JECT +Master node +ĠPh oto +alg as +Advanced Settings +industr ial +- ? +> ")); +B IDI +b ake +p N +st b +ion al +Ġm cs +get Email +Re ported +ĠM iddle +Ġex if +Ġget Random +At tempted +Tr ig +]) + +AN TLR +esc ale +create Encoder +Token Stream +Ġinter net +go ver +Url Checksum +AG ING +]+ }} +=== ! +ÑĤ о +ภ« +START UP +Extra Small +Ġcx gb +ov r +sli jst +ĠPrepared Statement +P VS +_ (& +d ists +k ognition +Ġ åĪĽå»º +Ġin div +set Hours +data Value +add to +ĠL im +ph erical +new len +){ \ +Ġpath To +chem atic +std call +Char Index +Ġbyte Array +Task Status +pb mV +getValue As +Tri ed +:"\\ }", +Ġhard coded +FOR CED +sem ber +vg ui +ĠExecute s +mlme priv +Ġregard ing +acu um +L RESULT +T UR +j L +o B +p read +w it +y ahoo +â Ĩ +ĠS RAM +ĠT TM +RE cma +ĠU SA +ĠH int +sum s +Property Attribute +target Node +Write Buffer +std lib +Float Value +CO IN +Internal Call +Ġpeer ing +ASS OCI +Weapon s +ĠOC SP +5 32 +7 64 +> ], +a WR +h cl + ¥ +Ġn as +set Password +ĠN GUI +ER ANGE +ĠM agento +To Do +Cont iguous +12 73 +ug lify +item pty +Manager Service +ĠTest AllTypes +KEY BOARD +clk dm +trigger Handler +Push ed +SERVICE S +ĠMS Build +Ld arg +TERMIN ATE +C ANT +E mo +H ole +J ni +V sb +V RT +i Current +m iter +is ot +Ġf am +lo pts +ic he +Ġstr Usage +sub field +pre alloc +Ġmax val +div s +mod x +}} ( +less on +ĠMy Transaction +Metric Source +Ġdrag gable +Ġsleep ing +Ġ'[' : +åIJİ çļĦ +I MAP +I ANCE +p Styles +s key +re strictions +il inx +Ġ// " +ĠC styleBehaviour +Get Class +'] "). +Data Collection +own s +Text Length +ash ion +class dev +ĠGet timeofday +Ġapp ender +try Mode +lib name +ĠAdd EventListener +77 1 +exec uting +ãĢ Į +ĠRequest ed +ĠMC Asm +mF sc +oct al +QQ ml +ConvertTo Value +Ġba os +ĠED GE +Ġabb reviation +Gfx ROM +33720368 54 +b cb +c bo +y Min +ĠS uspend +Ġto Impl +Re views +ĠC rash +Ġtype Info +Ke vent +On Create +sb in +Access Mode +.' < +ĠRE SOURCE +BQ W +mouse Position +Ġct f +Ġsm sc +ron ym +Ġub uf +Ġgrad s +ĠAttr s +ĠClip board +enclo sing +%%%%%%%% %%%%%%%% +ĠReplacement Rule +uIjoz LCJmaWxlIjoi +F SYNC +_ (?: +is ReadOnly +ĠN AT +ĠP el +IN COMPLETE +add Object +SS R +ĠQ IB +so up +CR ASH +ĠEn queue +velo ped +Ġ102 3 +Instances Response +ORDER ED +Ndb Dictionary +Propagation LossModel +robot s +C group +F out +b len +n ppi +p ink +Ġp Name +() << +get Named +get PackageName +ĠS ending +ĠT om +qu arter +to Lower +Set RenderState +Time Unit +Ġ4 48 +parent Path +Manager Factory +Bytes IO +08 9 +)} " +direct or +scr ub +Ġdr upal +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +7 32 +8 14 +M EN +Ġf ed +Ġv pn +ĠC art +lic ensing +Ġst or +ment ion +qu aternion +") !=- +Ar ity +Ġend Column +Text Block +comp lement +expected Value +ob fusc +gl Uniform +Ġ', '); +ĠBO OT +ĠPre pend +Merge From +Li quid +sur rogate +çī © +houd ings +:"\\\\ (?: +5 83 +F LEX +P ump +al ex +is Dirty +if fs +Ġs imp +ag ency +set Point +set bits +ĠC redential +ĠP i +Ġu vc +file List +list Value +start time +Ġobject Name +AC String +sub Modes +ĠUn wind +AG P +Root Dir +39 1 +Ġfont size +æķ° éĩı +reed y +ĠOver write +Ġrefer rer +) */ +J f +f size +m ctrl +s ÃŃ +x dc +re open +st emp +up sample +em ption +for warded +rr set +File Time +Not Pt +po ison +Ġfield Info +Address Book +Ġ] [' +ĠUN ICODE +Family Name +Invoke Async +Surface s +ENV IRON +æıIJ 示 +__.'/ ../ +C Data +S Node +S LI +à ¯ +Ġp print +Ġs lack +ss b +Ġm crypt +(" =" +Value From +Ġas ic +For Value +Ed ict +Update Call +Ph ases +marshal er +ĠSD LA +97 1 +ãĢ į +ĠComp ressed +ĠCC Point +202 9 +ä¼ ĺ +Ġprod ucing +fre em +*(\/\ * +cemb re +RIS ING +6 50 +M igrations +n A +t type +or ce +ar izona +Ġp map +Ġ" ** +Ġre viver +Ġin Stream +and Where +Ġ1 48 +li kes +key frame +Set Next +DE LIM +Ġj assert +Ġtest Remove +ĠGet Int +Write Async +rt mp +stat Sync +service Provider +Ġfact ories +Ġappro ved +subject s +7 12 +9 19 +L ic +S MARTY +V FP +p Ret +u cy +} _{ +Ġp ps +add Function +To Fit +ĠG RE +Ġy p +class id +sub path +char Length +New Writer +po i +Ġmax size +wait ers +56 25 +Ġheight s +mock ery +CONF LICT +Decor ators +ARGUMENT S +áĥĿ áĥ +amar in +s uggested +on End +ap dev +Ġi ucv +ĠI r +Name Specifier +Ġr pn +ĠM ID +String Info +Ġset Immediate +count Down +mon ospace +process Events +My Uint +Try DecodeAsNil +ĠModel s +sources Contents +ÑģÑĤ а +ASC ENDING +Availability State +Ġlate x +udGV ud +S REV +V ery +Ġc el +Ġs fp +Ġs ensitivity +get Call +set Adapter +Ġ1 76 +Key Algo +ant i +Ġdo orbell +Lo oper +wh y +rt a +uch sia +sd f +td s +Ġsuccess Callback +Left ToRight +85 3 +Dom Node +ĠAv ailability +Magic Quotes +lips oid +ACCEPT ED +Ġste am +9 88 +S lim +v display +w R +in ement +// **************************************************************** +set Line +Ġ1 75 +log ram +lf d +AD M +ĠTest Value +xml Reader +Local Addr +container Id +Ġfull path +ĠLook s +Plan et +çĽ ij +Raster Band +getResource AsStream +ĠAnaly tics +åģ ļ +ĠmComp Der += ~ +C HES +K f +P URE +p alloc +s ff +al lax +Ġo Table +Ġ0 666 +con e +Ġ| ${ +os dc +RE AK +Ġch apter +[' @ +") })} +ĠR OW +av l +Ġadd Child +ann able +config urator +check NotNull +EX E +Frame Buffer +}} '; +ĠPro cedure +Ġmon itored +dat agrid +Alloc Size +Tex Unified +kv mppc +Ho vered +Ġctl r +ĠPH INode +Ġsnippet s +æĻ Ĥ +BOUN DS +b C +k ses +o Session +at re +get Handle +Ġstr toul +break OnError +gr h +Ġstd lib +Ed its +ĠFile Object +86 95 +pop ulated +pk s +Scheme GroupVersion +Dump Test +Quest ions +Ġsurface s +ঠ¿ +Der ive +VARIABLE S +Similar ity +WillReturn MappingObject +: ": +v U +Ġs sa +Ġde struct +LE AF +Se quencer +Un bind +line Height +Ġkey code +Is ac +Ġle ads +TR IP +Table LayoutPanel +}) (); +env s +Ġ100 1 +Internal ErrorException +MC InstrInfo +Decode Error +Card State +ACTION S +tid y +Ġquant ile +Pan es +åı¯ èĥ½ +8 27 +I ps +M ins +O am +g j +} ")] +); }; +Re pl +Ġg olang +ĠG PR +Inter locked +User Context +parse Long +Button Box +Ġcomp liant +MD T +Ġ/** < +={ }) +sv r +pair wise +COL ON +åħ ģ +Ġer rout +è§ ¦ +fusb h +c ant +s chemes +Ö Ĥ +Ġf ulfilled +ĠS i +Re quisites +Ġget Items +Ġor i +ND BT +And Add +env p +Ġ/> . +Py x +ATAL OG +Ø§Ø « +containerArray Elem +apim achinery +novemb re +v j +Ġn vc +Ġp adapter +em c +mp d +ĠF ONT +add View +File Handle +File Loader +sg list +An twoord +Config Exception +][ ( +ING LE +IF wi +System Id +ĠObject Spec +Script Name +ĠFile system +PAR ALLEL +web space +rep licas +getC ached +áŀ ĵ +å¸ ¦ +ĠFOR CE +åĿ IJ +pas sthrough +Ġtom l +G rain +Y Offset +c decl +e B +n ie +Ø µ +ĉĉ ĠĠĠĠĠĠĠĠ +Ġn dim +Ġ< ' +ĠM IX +Ġse eds +Ġend ianness +"," # +ĠJ WT +SH F +17 46 +Ġdest inations +Delete Behavior +vers er +Ġoff load +Sp lice +ploy ees +Batch es +Ġbitmap s +Jy k +Serialization Exception +Ġgc new +polygon s +jdGlvb i +Ġing ress +PERMISSION S +ĠæŁ¥ 询 +G bl +P OT +R LE +S DRAM +b GV +d ad +x op +y an +et ext +Ġf ramer +Ġb ro +ig ation +Ġg RPC +ĠP ATCH +Get Action +per mit +ĠR IO +Ġun resolved +ail ure +be bob +]) ([ +Ġz Index +parse Expr +show ing +wo ff +Project File +socket Options +after Each +Import Path +Total Size +Mac Address +Ġtre ats +Completed EventArgs +small er +ALG AS +Ġsimultaneous ly +a ft +s ack +w W +de limiters +Ġf type +)) **( +Ġst aging +to bj +ĠD jango +Ġ2 25 +File Range +pc yB +table size +tx pwr +Max Width +part icipants +search String +Ġsend Message +FC NTL +ĠÐ ³ +|\\ || +]/ ; +Pag inate +Ġ================= ==== +writable State +Ġhighlight ing +> '), +I pc +J lc +M h +r di +ing Enabled +Ġs ensible +Ġd addr +Ġd rives +Ġr tt +Ġdata Len +priv ileges +request Data +rl ang +IF JlYWN +util ities +ĠAdd on +FD F +Ġgraph ql +fetch er +asc ending +ĠRT MP +ĠView Model +Ñĥ Ñĩ +recv from +Dem ocracy +ĠPrepare Statement +reloc s +Med ian +NVPTX ISD +' >\ +S fixed +V Box +d ml +i Z +o asis +w j +in fix +on message +Ġt len +ic v +In verted +Ġg rey +To Host +ĠG DK +__ ). +ĠW ay +Ġsub device +Client set +pack ing +vo eg +Ġ/> "; +single Result +Ġgen ome +Ġ---------------------------------------------------------------- -- +Ùħ بر +measure ments +Ġз ап +4 113 +G adget +H AN +l E +n secs +Ġa q +str ptime +get Flags +set ype +ĠP alette +dev exit +ĠB MI +Ġget Form +ĠV SI +ĠIn stant +ĠString Tokenizer +ĠString SplitOptions +ĠGet Key +NE ST +Ġtra ced +Ġfunc Name +Operation Metadata +fl v +emit ted +ĠAl arm +ĠJSON TEST +GF zc +ĠClass Name +Multi Body +Disp lacement +Ġparagraph s +Ġlan es +? (@ +@ [ +h key +Ġn xt +Ġs uid +Ġ1 49 +em ac +Ġk thread +DB A +ĠTest Data +Delete File +ĠStop Iteration +nes vnic +ByZX F +A cs +a H +d node +f H +w status +in quiry +Ġd it +In box +Ġin def +con currency +sum mer +ĠRe q +av s +Ġk not +target Id +CP US +rate limited +sw p +]+ # +LOG Y +<< =|>> +Ali en +padd ress +SM U +Known Type +Room s +Rank s +Mismatch Exception +ĠExpress Route +uFD F +travers al += ',' +K AN +W xs +on Delete +Ġ( ): +ag no +ad is +Ġd mi +ĠP icture +var int +') "; +=" ', +Set From +ĠG EM +10 40 +ĠX A +Ġcheck points +Instance d +Block chain +push integer +Sub s +Header Name +me chanism +rx js +rad ar +Sp am +diff iculty +Vertex Array +Mouse Wheel +HI LE +tell igence +Answ ers +LANGUAGE S +*(?: \/\ +Daylight Saving +i ore +r j +Ġc df +get Files +set Base +ub re +ĠC DATA +Ġe o +Ġde reference +ull i +Get V +add DumpTest +ĠR OL +log ies +Color Brush +EX PL +Ġpos Y +Row Style +Option Parser +и Ñĩ +images ize +Ġmp ic +mag n +ĠImmutable Array +*(\/\ *|\/\/)# +*(\/\ *\*\* +advert ise +\"; \ +�������� �������� +*(\/\* ).*\*\/\ +*(\/\*\*\* ).*\*\/\ +' # +H IB +m Service +y Q +ë ¥ +Ġb ignum +Ġre cur +set key +Get Offset +Get Symbol +ST ANDBY +ĠL LT +Ġun versioned +ĠE p +Ġx o +ĠH CLK +ep u +Log ins +Connection Info +toString Tag +Ġparameter Types +Expr AST +à¸ Ĺ +wl c +Ġdd l +Ġ"\" "; +QP ixmap +Ġ'.. ' +NEE DED +6 09 +A PR +A fx +f red +f arg +q k +v rier +Ġm A +Ġar rive +Get PubKey +add Sub +act s +Data Point +Object Mgr +Ġtest Read +IC OM +event Dispatcher +Client Execution +Ġnum Bits +Builder Ref +long long +NT SC +Uint ptr +Should Not +åIJ ¬ +rand range +ĠUI Manager +Ġpercent ile +TOOL S +Ġparen s +MSI E ++ (?:(?:\\.\\ +T os +d hc +n ms +get Types +Ġ+ - +Ġ_ ) +To Server +File Spec +AN AL +cp b +sk el +Imp erson +Record Set +fmt s +ĠST S +ĠUser Id +Chunk ed +ĠBuffer List +ĠVar Decl +("{ \" +Ups ert +/ ," +0 34 +6 92 +i bb +u pe +Î Ļ +Ġb loom +str to +ĠS b +Get Row +Se aled +Per mitted +Ġ{} }, +/** * +Ġab x +и п +Ġrandom ize +pas cal +charg alg +Clinical Contact +ĠSy mmetric +ipo ib +ynet dicom +E mb +c roll +o User +w ing +Ġp mt +Ġd am +Ġin vocations +sum med +mb p +With Custom +App Defined +apt ers +Par liament +Resource Names +opt len +Ġthrough put +å¤ ī +ond en +album s +NEED S +|> |$ +ĠMet eor +a Input +g lass +r il +v hd +Ã İ +In Array +ĠI sdn +Ġget Is +ĠU CHAR +ac ard +()) [ +AN NOT +mem bered +Ġsub traction +By Value +has Many +run Test +Register Extension +Ġcustom izer +)/ ", +ĠPage Size +xuICAg IG +ĠCor tex +Ġcrash es +Ġdeploy ed +ĠAnaly zer +hpb GR +I rq +l bs +s ce +t so +x ED +Ġ ult +Ġ umask +am pt +Ġm svs +str Command +Ġh u +param Type +ĠP TE +ĠM any +ĠE ss +Ġx malloc +Ġcom paction +Sc rolled +ĠQ OpenGL +Qu adratic +Ġitem Count +entity Name +Unit Testing +stop ping +Ty ping +Ġdiv idend +!== ! +Partition ed +Energy Source +Ġgrow th +æµĭ è¯ķ +Ġvers a +hasOne Use +R DD +U ptime +r E +ĠĠĠ ĉ +Ġp ac +ch p +Ġi id +Ġh sv +-------- -- +ĠI pV +Get F +Ġat f +Ġro se +With Id +With draw +message Type +search er +ĠHandle Object +HR TIM +simple x +Cons istent +ä¸ĭ è½½ +erv ations +getActive Index +4 231 +B ETA +P SC +v sp +ĠT ur +ĠC Service +Ġis olation +Ġh vc +To ByteArray +Ġget Query +ĠG ro +assert No +Ġsub directories +Ġread File +OL TP +Has No +]] ] +tool Tip +ĠApp Domain +ANG LES +obs olete +ENCRYPT ION +ĠMySql Parameter +TooManyRequests Exception +C STRING +K j +P DEBUG +T el +T SO +p Header +set Page +Ġi buf +Con form +fa cing +Ġcom panies +sp o +Is olated +Or EventListener +ML S +cb r +ĠID M +ĠK eras +)} : +Ġmask ing +prom etheus +AV I +ru ary +Basic Type +RET VAL +MODULE S +Low est +å¹ ³ +ĠEventListener OrEventListener +ĠEventListenerOrEventListener Object += + +g imple + Ģ +ic all +get Str +get Write +Ġis Finite +ir ical +struct Pointer +). (* +der p +ĠRe maining +Ġk sort +gr bit +MM X +rx buf +ĠNew ForConfig +ĠRE D +Ġoff icial +amb iance +TOOL TIP +ĠPixel Format +ĠEventListener Options +ĠWID TH +* (?=\\ +> ())); +E scher +R at +Z J +b pmn +g all +get Unmarshaller +In p +err buf +ĠP resent +ĠP aper +Get AI +ĠR ANGE +pos X +AC CT +ps u +create DOMFactory +FI LT +Ġro ad +Status NotFound +go o +resource Path +:' .$ +Ġsn iff +So up +ij n +seek able +PASS IVE +Ġask ing +Ġans i +ĠArt ifact +rat r +X z +l ifecycle +n it diff --git a/saved_models/UnixCoder/pytorch_model.bin b/saved_models/UnixCoder/pytorch_model.bin new file mode 100644 index 0000000000000000000000000000000000000000..e45baee80939437495479444179e91ea46e4e991 --- /dev/null +++ b/saved_models/UnixCoder/pytorch_model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e28385bb916434983692dfdd57f5c78c64f92d4a26614965d1e9d150b4a37145 +size 503809527 diff --git a/saved_models/UnixCoder/special_tokens_map.json b/saved_models/UnixCoder/special_tokens_map.json new file mode 100644 index 0000000000000000000000000000000000000000..e97d1993365bb21c88f390e8703e4c1af564821f --- /dev/null +++ b/saved_models/UnixCoder/special_tokens_map.json @@ -0,0 +1 @@ +{"bos_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "sep_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "cls_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "mask_token": {"content": "", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}} \ No newline at end of file diff --git a/saved_models/UnixCoder/tokenizer_config.json b/saved_models/UnixCoder/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5fa4f3ad23f71b576620081b14a2b0514578f29c --- /dev/null +++ b/saved_models/UnixCoder/tokenizer_config.json @@ -0,0 +1 @@ +{"errors": "replace", "unk_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "sep_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "cls_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "pad_token": {"content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "mask_token": {"content": "", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "special_tokens_map_file": null, "tokenizer_file": null, "name_or_path": "tokenizer", "tokenizer_class": "RobertaTokenizer"} \ No newline at end of file diff --git a/saved_models/UnixCoder/vocab.json b/saved_models/UnixCoder/vocab.json new file mode 100644 index 0000000000000000000000000000000000000000..fd9a856533a99599d7b406d521df5667d58e40f6 --- /dev/null +++ b/saved_models/UnixCoder/vocab.json @@ -0,0 +1 @@ +{"": 0, "": 1, "": 2, "": 3, "": 4, "": 5, "": 6, "": 7, "": 8, "": 9, "": 10, "": 11, "": 12, "": 13, "": 14, "": 15, "": 16, "": 17, "": 18, "": 19, "": 20, "": 21, "": 22, "": 23, "": 24, "": 25, "": 26, "": 27, "": 28, "": 29, "": 30, "": 31, "": 32, "": 33, "": 34, "": 35, "": 36, "": 37, "": 38, "": 39, "": 40, "": 41, "": 42, "": 43, "": 44, "": 45, "": 46, "": 47, "": 48, "": 49, "": 50, "": 51, "": 52, "": 53, "": 54, "": 55, "": 56, "": 57, "": 58, "": 59, "": 60, "": 61, "": 62, "": 63, "": 64, "": 65, "": 66, "": 67, "": 68, "": 69, "": 70, "": 71, "": 72, "": 73, "": 74, "": 75, "": 76, "": 77, "": 78, "": 79, "": 80, "": 81, "": 82, "": 83, "": 84, "": 85, "": 86, "": 87, "": 88, "": 89, "": 90, "": 91, "": 92, "": 93, "": 94, "": 95, "": 96, "": 97, "": 98, "": 99, "": 100, "": 101, "": 102, "": 103, "": 104, "": 105, "": 106, "": 107, "": 108, "": 109, "": 110, "": 111, "": 112, "": 113, "": 114, "": 115, "": 116, "": 117, "": 118, "!": 119, "\"": 120, "#": 121, "$": 122, "%": 123, "&": 124, "'": 125, "(": 126, ")": 127, "*": 128, "+": 129, ",": 130, "-": 131, ".": 132, "/": 133, "0": 134, "1": 135, "2": 136, "3": 137, "4": 138, "5": 139, "6": 140, "7": 141, "8": 142, "9": 143, ":": 144, ";": 145, "<": 146, "=": 147, ">": 148, "?": 149, "@": 150, "A": 151, "B": 152, "C": 153, "D": 154, "E": 155, "F": 156, "G": 157, "H": 158, "I": 159, "J": 160, "K": 161, "L": 162, "M": 163, "N": 164, "O": 165, "P": 166, "Q": 167, "R": 168, "S": 169, "T": 170, "U": 171, "V": 172, "W": 173, "X": 174, "Y": 175, "Z": 176, "[": 177, "\\": 178, "]": 179, "^": 180, "_": 181, "`": 182, "a": 183, "b": 184, "c": 185, "d": 186, "e": 187, "f": 188, "g": 189, "h": 190, "i": 191, "j": 192, "k": 193, "l": 194, "m": 195, "n": 196, "o": 197, "p": 198, "q": 199, "r": 200, "s": 201, "t": 202, "u": 203, "v": 204, "w": 205, "x": 206, "y": 207, "z": 208, "{": 209, "|": 210, "}": 211, "~": 212, "¡": 213, "¢": 214, "£": 215, "¤": 216, "¥": 217, "¦": 218, "§": 219, "¨": 220, "©": 221, "ª": 222, "«": 223, "¬": 224, "®": 225, "¯": 226, "°": 227, "±": 228, "²": 229, "³": 230, "´": 231, "µ": 232, "¶": 233, "·": 234, "¸": 235, "¹": 236, "º": 237, "»": 238, "¼": 239, "½": 240, "¾": 241, "¿": 242, "À": 243, "Á": 244, "Â": 245, "Ã": 246, "Ä": 247, "Å": 248, "Æ": 249, "Ç": 250, "È": 251, "É": 252, "Ê": 253, "Ë": 254, "Ì": 255, "Í": 256, "Î": 257, "Ï": 258, "Ð": 259, "Ñ": 260, "Ò": 261, "Ó": 262, "Ô": 263, "Õ": 264, "Ö": 265, "×": 266, "Ø": 267, "Ù": 268, "Ú": 269, "Û": 270, "Ü": 271, "Ý": 272, "Þ": 273, "ß": 274, "à": 275, "á": 276, "â": 277, "ã": 278, "ä": 279, "å": 280, "æ": 281, "ç": 282, "è": 283, "é": 284, "ê": 285, "ë": 286, "ì": 287, "í": 288, "î": 289, "ï": 290, "ð": 291, "ñ": 292, "ò": 293, "ó": 294, "ô": 295, "õ": 296, "ö": 297, "÷": 298, "ø": 299, "ù": 300, "ú": 301, "û": 302, "ü": 303, "ý": 304, "þ": 305, "ÿ": 306, "Ā": 307, "ā": 308, "Ă": 309, "ă": 310, "Ą": 311, "ą": 312, "Ć": 313, "ć": 314, "Ĉ": 315, "ĉ": 316, "Ċ": 317, "ċ": 318, "Č": 319, "č": 320, "Ď": 321, "ď": 322, "Đ": 323, "đ": 324, "Ē": 325, "ē": 326, "Ĕ": 327, "ĕ": 328, "Ė": 329, "ė": 330, "Ę": 331, "ę": 332, "Ě": 333, "ě": 334, "Ĝ": 335, "ĝ": 336, "Ğ": 337, "ğ": 338, "Ġ": 339, "ġ": 340, "Ģ": 341, "ģ": 342, "Ĥ": 343, "ĥ": 344, "Ħ": 345, "ħ": 346, "Ĩ": 347, "ĩ": 348, "Ī": 349, "ī": 350, "Ĭ": 351, "ĭ": 352, "Į": 353, "į": 354, "İ": 355, "ı": 356, "IJ": 357, "ij": 358, "Ĵ": 359, "ĵ": 360, "Ķ": 361, "ķ": 362, "ĸ": 363, "Ĺ": 364, "ĺ": 365, "Ļ": 366, "ļ": 367, "Ľ": 368, "ľ": 369, "Ŀ": 370, "ŀ": 371, "Ł": 372, "ł": 373, "Ń": 374, "ĠĠ": 375, "ĠĠĠĠ": 376, "ĠĠĠ": 377, "ĠĠĠĠĠĠĠĠ": 378, "re": 379, "in": 380, "er": 381, "on": 382, "st": 383, "at": 384, "Ġ=": 385, "en": 386, "th": 387, ");": 388, "ĉĉ": 389, "or": 390, "ar": 391, "al": 392, "se": 393, "ĠĠĠĠĠĠĠ": 394, "le": 395, "ct": 396, "ion": 397, "de": 398, "Ġ{": 399, "Ġ(": 400, "ur": 401, "is": 402, "an": 403, "Ġc": 404, "et": 405, "if": 406, "te": 407, "->": 408, "am": 409, "un": 410, "ĠĠĠĠĠĠĠĠĠĠĠ": 411, "Ġf": 412, "Ġth": 413, "//": 414, "--": 415, "Ġn": 416, "ro": 417, "ce": 418, "ing": 419, "ret": 420, "it": 421, "Ġt": 422, "urn": 423, "ent": 424, "Ġ}": 425, "Ġ*": 426, "return": 427, "Ġp": 428, "()": 429, "int": 430, "Ġs": 431, "ue": 432, "ss": 433, "Ġa": 434, "id": 435, "lo": 436, "Ġ\"": 437, "ed": 438, "ic": 439, "Ġ$": 440, "pe": 441, "Ġb": 442, "dd": 443, "ch": 444, "ul": 445, "Ġm": 446, "ate": 447, "Ġthe": 448, "tr": 449, "ut": 450, "Ġo": 451, "bb": 452, "ction": 453, "ame": 454, "str": 455, "il": 456, "el": 457, "ag": 458, "get": 459, "Ġv": 460, "Ġ0": 461, "Ġif": 462, "ck": 463, "Ġ'": 464, "00": 465, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 466, "pt": 467, "**": 468, "co": 469, "ex": 470, "ad": 471, "ig": 472, "ĠĠĠĠĠ": 473, "um": 474, "\",": 475, "im": 476, "Ġw": 477, "----": 478, "Ġre": 479, "Ġd": 480, "In": 481, "es": 482, "Ġreturn": 483, "err": 484, "ol": 485, "ype": 486, "la": 487, "Ġin": 488, "ew": 489, "this": 490, "set": 491, "unction": 492, "ri": 493, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 494, "ode": 495, "ra": 496, "ub": 497, "ata": 498, "==": 499, "::": 500, "and": 501, "ot": 502, "(\"": 503, "iz": 504, "om": 505, "ĠS": 506, "ist": 507, "Ġto": 508, "))": 509, "alue": 510, "ĉĉĉ": 511, "Re": 512, "Ġ+": 513, "ab": 514, "ĠT": 515, "us": 516, "Ġ<": 517, "Ġ//": 518, "Ġ&": 519, "ile": 520, "ation": 521, "as": 522, "();": 523, "Ġ1": 524, "con": 525, "he": 526, "ert": 527, "ase": 528, "end": 529, "ve": 530, "ap": 531, "ĠC": 532, "bbbb": 533, "',": 534, "age": 535, "ect": 536, "ize": 537, "up": 538, "Ġl": 539, "ption": 540, "aram": 541, "ult": 542, "em": 543, "ff": 544, "Ġ:": 545, "od": 546, "Ġthis": 547, "Ġi": 548, "Ġcon": 549, "Ġ==": 550, "lic": 551, "Ġ!": 552, "ĠA": 553, "Ġint": 554, "Ġis": 555, "),": 556, "able": 557, "Ġst": 558, "Con": 559, "ers": 560, "all": 561, "('": 562, "Ġfor": 563, "ment": 564, "bj": 565, "Ġh": 566, "St": 567, "****": 568, "($": 569, "ke": 570, "string": 571, "Ġe": 572, "Ġerr": 573, "Ex": 574, "qu": 575, "ow": 576, "Ġde": 577, "ir": 578, "Ġnew": 579, "--------": 580, "Ġ-": 581, "ren": 582, "fo": 583, "ull": 584, "bu": 585, "ĉĉĉĉ": 586, "res": 587, "ter": 588, "to": 589, "tex": 590, "ĠN": 591, "oid": 592, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 593, "ER": 594, "Ġof": 595, "ublic": 596, "uct": 597, "ack": 598, "ath": 599, "vi": 600, "param": 601, "ort": 602, "Ġfunction": 603, "ray": 604, "art": 605, "mp": 606, "ĠI": 607, "ine": 608, "dddd": 609, "Name": 610, "Ġg": 611, "tring": 612, "else": 613, "ĠD": 614, "ĠP": 615, "name": 616, "li": 617, "function": 618, "op": 619, "Ġ!=": 620, "bject": 621, "for": 622, "Ġ_": 623, "fa": 624, "text": 625, "Ġ[": 626, "struct": 627, "ime": 628, "Ġr": 629, "ext": 630, "Ġtr": 631, "Ġu": 632, "put": 633, "Ġ*/": 634, "ĠM": 635, "data": 636, "0000": 637, "ht": 638, "que": 639, "ind": 640, "Type": 641, "/*": 642, "unt": 643, "pro": 644, "ang": 645, "ver": 646, "Ġar": 647, "));": 648, "Ġ|": 649, "sc": 650, "IN": 651, "ĠF": 652, "public": 653, "os": 654, "pa": 655, "lock": 656, "out": 657, "Get": 658, "\");": 659, "Ġvar": 660, "Ġbe": 661, "alse": 662, "oc": 663, "ssert": 664, "En": 665, "ain": 666, "dex": 667, "bbbbbbbb": 668, "Ġelse": 669, "ach": 670, "key": 671, "ign": 672, ").": 673, "add": 674, "De": 675, "ith": 676, "rent": 677, "our": 678, "Ġex": 679, "rr": 680, "RE": 681, "ip": 682, "type": 683, "String": 684, "ord": 685, "unc": 686, "To": 687, "Ġ2": 688, "atch": 689, "rom": 690, "test": 691, "len": 692, "vent": 693, "32": 694, "lass": 695, "dev": 696, "Value": 697, "Ġ&&": 698, "====": 699, "Ġnull": 700, "var": 701, "Err": 702, "val": 703, "Pro": 704, "Ġres": 705, "Ġand": 706, "']": 707, "quest": 708, "Ġse": 709, "tem": 710, "Ġ>": 711, "ON": 712, "lement": 713, "atic": 714, "row": 715, "Ġ:=": 716, "ST": 717, "ure": 718, "ĠB": 719, "sh": 720, "AT": 721, "vice": 722, "Ġvoid": 723, "Ġstring": 724, "ess": 725, "Ġ%": 726, "ource": 727, "one": 728, "def": 729, "yte": 730, "gth": 731, "ly": 732, "Ġch": 733, "ity": 734, "oint": 735, "ak": 736, "['": 737, "Res": 738, "act": 739, "per": 740, "ance": 741, "ire": 742, "Ġ)": 743, "Ġget": 744, "Id": 745, "Ġ.": 746, "ĠL": 747, "EN": 748, "ild": 749, "ax": 750, "ser": 751, "est": 752, "port": 753, "ight": 754, "fig": 755, "ial": 756, "of": 757, "mo": 758, "],": 759, "LL": 760, "pon": 761, "value": 762, "func": 763, "eld": 764, "ans": 765, "Ġfalse": 766, "Ġvalue": 767, "********": 768, "Ġtrue": 769, "ception": 770, "Ġ=>": 771, "rite": 772, "ay": 773, "ore": 774, "ive": 775, "Ġpro": 776, "reate": 777, "pr": 778, "": 1196, "ilter": 1197, "Count": 1198, "Len": 1199, "ud": 1200, "Ġreg": 1201, "Th": 1202, "ctx": 1203, "its": 1204, "lete": 1205, "temp": 1206, "uth": 1207, "allback": 1208, "SI": 1209, "Array": 1210, "Ġid": 1211, "LO": 1212, "ccess": 1213, "ĠGet": 1214, "irect": 1215, "Ġ\\": 1216, "ft": 1217, "ual": 1218, "Ġ((": 1219, "Reg": 1220, "Form": 1221, "Ġ`": 1222, "Ġbool": 1223, "PE": 1224, "summary": 1225, "lab": 1226, "db": 1227, "mb": 1228, "object": 1229, "lection": 1230, "ont": 1231, "++)": 1232, "num": 1233, "Ġret": 1234, "mt": 1235, "UN": 1236, "alid": 1237, "Ġarg": 1238, "ma": 1239, "Ġpublic": 1240, "Ġuintptr": 1241, "init": 1242, "Ġby": 1243, "options": 1244, "Config": 1245, "Ġ===": 1246, "create": 1247, "pre": 1248, "##": 1249, "config": 1250, "sa": 1251, "rint": 1252, "Ġcol": 1253, "Ġup": 1254, "Ġ},": 1255, "last": 1256, "Ġparam": 1257, "andler": 1258, "ise": 1259, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 1260, "ody": 1261, "Message": 1262, "item": 1263, "ister": 1264, "roll": 1265, "\",\"": 1266, "Ġ__": 1267, "ys": 1268, "pc": 1269, "Result": 1270, "ite": 1271, "ample": 1272, "ync": 1273, "ton": 1274, "Qu": 1275, "UR": 1276, "Ġstruct": 1277, "max": 1278, "vel": 1279, "lob": 1280, "Map": 1281, "dir": 1282, "quire": 1283, "Ġsc": 1284, "char": 1285, "UT": 1286, "word": 1287, "lose": 1288, "ERR": 1289, "11": 1290, "addr": 1291, "verr": 1292, "arch": 1293, "Ġrequest": 1294, "tern": 1295, "Ġwill": 1296, "bug": 1297, "fs": 1298, "ld": 1299, "mem": 1300, "Ġ});": 1301, "ocument": 1302, ".$": 1303, "GE": 1304, "Ġpa": 1305, "////////": 1306, "Of": 1307, "work": 1308, "son": 1309, "uble": 1310, "cond": 1311, "entry": 1312, "next": 1313, "request": 1314, "Ġ[]": 1315, "verride": 1316, "PI": 1317, "ark": 1318, "ject": 1319, "Ġnode": 1320, "itch": 1321, "ĠJ": 1322, "FI": 1323, "old": 1324, "AB": 1325, "--------------------------------": 1326, "Loc": 1327, "ify": 1328, "rol": 1329, "place": 1330, "query": 1331, "Or": 1332, "ound": 1333, "]);": 1334, "private": 1335, "View": 1336, "gr": 1337, "default": 1338, "Up": 1339, "'t": 1340, "ee": 1341, "Ġtime": 1342, "(?": 1343, "rence": 1344, "Ġall": 1345, "order": 1346, "Ġcan": 1347, "ĠTh": 1348, "anag": 1349, "01": 1350, "Response": 1351, "ĠX": 1352, "Field": 1353, "As": 1354, "args": 1355, "Line": 1356, "event": 1357, "Ġself": 1358, "ĠIf": 1359, "utton": 1360, "Ġdefault": 1361, "ait": 1362, "token": 1363, "local": 1364, "Ġ5": 1365, "status": 1366, "Token": 1367, "ape": 1368, "Out": 1369, "Ġpar": 1370, "From": 1371, "field": 1372, "02": 1373, "pi": 1374, "Ġno": 1375, "input": 1376, "ference": 1377, "link": 1378, "point": 1379, "TE": 1380, "sk": 1381, "Ġcheck": 1382, "Lo": 1383, "element": 1384, "witch": 1385, "Service": 1386, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb": 1387, "[\"": 1388, "table": 1389, "press": 1390, "Ġpath": 1391, "empty": 1392, "Ġuse": 1393, "offset": 1394, "action": 1395, "ns": 1396, "cord": 1397, "Ġelement": 1398, "ION": 1399, "device": 1400, "ector": 1401, "uration": 1402, "End": 1403, "Ġstate": 1404, "rl": 1405, "->_": 1406, "are": 1407, "ined": 1408, "ĠĠĠĠĠĠĠĠĠĠĠĠĠ": 1409, "Pa": 1410, "0000000000000000": 1411, "attr": 1412, "null": 1413, "olean": 1414, "Ġser": 1415, "che": 1416, "UE": 1417, "Attribute": 1418, "PR": 1419, "trans": 1420, "Ġspec": 1421, "itle": 1422, "Log": 1423, "'s": 1424, "inter": 1425, "eb": 1426, "ia": 1427, "space": 1428, "Ġro": 1429, "fd": 1430, "led": 1431, "Pos": 1432, "tot": 1433, "Ġcurrent": 1434, "ytes": 1435, "annel": 1436, "Ġstart": 1437, "\\\"": 1438, "eter": 1439, "do": 1440, "};": 1441, "Ġindex": 1442, "label": 1443, "dr": 1444, "tx": 1445, "uint": 1446, "ttp": 1447, "CE": 1448, "anager": 1449, "ict": 1450, "Ġ>=": 1451, "CK": 1452, "Ġapp": 1453, "Ġmethod": 1454, "Le": 1455, "Ġus": 1456, "Trans": 1457, "pen": 1458, "For": 1459, "pect": 1460, "match": 1461, "fore": 1462, "Length": 1463, "(?:": 1464, "ms": 1465, "Ġoptions": 1466, "vert": 1467, "uto": 1468, "ages": 1469, "ins": 1470, "check": 1471, "Ġne": 1472, "With": 1473, "py": 1474, "US": 1475, "Property": 1476, "net": 1477, "format": 1478, "req": 1479, "][": 1480, "printf": 1481, "Ġ};": 1482, "Ġ8": 1483, "oto": 1484, "Not": 1485, "group": 1486, "ainer": 1487, "Ġevent": 1488, "04": 1489, "ations": 1490, "ature": 1491, "Pointer": 1492, "Model": 1493, "ĠCon": 1494, "ename": 1495, "bs": 1496, "tings": 1497, "On": 1498, "context": 1499, "&&": 1500, "block": 1501, "CH": 1502, "Ġclass": 1503, "ified": 1504, "><": 1505, "25": 1506, "ative": 1507, "Im": 1508, "Ptr": 1509, "obj": 1510, "App": 1511, "nd": 1512, "Stream": 1513, "Ġz": 1514, "apt": 1515, "Ġsub": 1516, "ick": 1517, "tag": 1518, "ific": 1519, "lobal": 1520, "method": 1521, "ĠTHE": 1522, "000": 1523, "current": 1524, "Ġstd": 1525, "mat": 1526, "ilder": 1527, "unsigned": 1528, "Method": 1529, "Ġ>": 1537, "Query": 1538, "Ġpre": 1539, "late": 1540, "By": 1541, "po": 1542, ")),": 1543, "cle": 1544, "ich": 1545, "Client": 1546, "ace": 1547, "target": 1548, "iable": 1549, "flags": 1550, "Ġdef": 1551, "Ġcontext": 1552, ">(": 1553, "ND": 1554, "try": 1555, "ie": 1556, "Ġread": 1557, "msg": 1558, "Ġhas": 1559, "http": 1560, "iled": 1561, "Instance": 1562, "ension": 1563, "Str": 1564, "ĠĠĠĠĠĠĠĠĠĠĠĠ": 1565, "ription": 1566, "parent": 1567, "Ġtry": 1568, "abled": 1569, "Ġshould": 1570, "Be": 1571, "ĠSet": 1572, "Ġitem": 1573, "desc": 1574, "ustom": 1575, "\"),": 1576, "Ġhave": 1577, "ale": 1578, "Buffer": 1579, "Ġfield": 1580, "eters": 1581, "Block": 1582, "Ġline": 1583, "(){": 1584, "The": 1585, "Ġinput": 1586, "='": 1587, "Table": 1588, "append": 1589, "client": 1590, "LA": 1591, "Ġlog": 1592, "true": 1593, "[$": 1594, "Write": 1595, "safe": 1596, "Date": 1597, "Ġinstance": 1598, "(_": 1599, "ĠThis": 1600, "buffer": 1601, "push": 1602, "equal": 1603, "itor": 1604, "iss": 1605, "ML": 1606, "module": 1607, "mon": 1608, "message": 1609, "Inter": 1610, "Create": 1611, "TY": 1612, "Equals": 1613, "Ġcall": 1614, "jo": 1615, "Read": 1616, "queue": 1617, "Desc": 1618, "cope": 1619, "INT": 1620, "Ġmax": 1621, "riter": 1622, "'),": 1623, "params": 1624, "Group": 1625, "igh": 1626, "mode": 1627, "Start": 1628, "layer": 1629, "Ag": 1630, "Ġ\"\\": 1631, "cy": 1632, "ice": 1633, "not": 1634, "Ġnumber": 1635, "cs": 1636, "pression": 1637, "Ġ\"\"\"": 1638, "refix": 1639, "enu": 1640, "ĠEx": 1641, "ner": 1642, "OD": 1643, "Ġprint": 1644, "eta": 1645, "Content": 1646, "VAL": 1647, "til": 1648, "Mode": 1649, "Ġnum": 1650, "MP": 1651, "BU": 1652, "Oper": 1653, "free": 1654, "Ġmatch": 1655, "SC": 1656, "page": 1657, "ĠAr": 1658, "tected": 1659, "Format": 1660, "ls": 1661, "IG": 1662, "Ġlo": 1663, "ponent": 1664, "================": 1665, "inue": 1666, "Par": 1667, "ĠDe": 1668, "has": 1669, "ING": 1670, "isplay": 1671, "Ġwhen": 1672, "Ġtext": 1673, "ATE": 1674, "Return": 1675, "Em": 1676, "cmd": 1677, "Ġinter": 1678, "Ġconfig": 1679, "User": 1680, "ilename": 1681, "Sub": 1682, "bool": 1683, "aders": 1684, "Window": 1685, "ider": 1686, "IO": 1687, "Ġtrans": 1688, "IP": 1689, ".": 1703, "Ġpoint": 1704, "call": 1705, "(*": 1706, "ĉĉĉĉĉĉ": 1707, "content": 1708, "opy": 1709, "Ġsizeof": 1710, "ible": 1711, "Ġbase": 1712, "Var": 1713, "ude": 1714, "uments": 1715, "EX": 1716, "Ġcode": 1717, "ENT": 1718, "stream": 1719, "})": 1720, "Ġoutput": 1721, "ializ": 1722, "omain": 1723, "version": 1724, "Ref": 1725, "from": 1726, "pts": 1727, "std": 1728, "width": 1729, "wh": 1730, "CON": 1731, "Ġpos": 1732, "self": 1733, "Ġ_,": 1734, "teger": 1735, "True": 1736, "Base": 1737, "Ġcreate": 1738, "Arg": 1739, "find": 1740, "plit": 1741, "ODE": 1742, "remove": 1743, "Ġtarget": 1744, "Ġwhile": 1745, "rt": 1746, "OL": 1747, "Ġq": 1748, "Check": 1749, "imit": 1750, "Ġtoken": 1751, "Ġcount": 1752, "pack": 1753, "TH": 1754, "Resource": 1755, "()->": 1756, "gin": 1757, "cc": 1758, "SY": 1759, "dddddddddddddddddddddddddddddddd": 1760, "ses": 1761, "bl": 1762, "Default": 1763, "Header": 1764, "raph": 1765, "Ġsup": 1766, "fn": 1767, "Source": 1768, "Ġso": 1769, "orted": 1770, "No": 1771, "arsh": 1772, "ics": 1773, "Ġ6": 1774, "dis": 1775, "float": 1776, "Function": 1777, "ql": 1778, "ell": 1779, "Ġrange": 1780, "FA": 1781, "Pre": 1782, "parse": 1783, "false": 1784, "\").": 1785, "ĠSystem": 1786, "Ġone": 1787, "output": 1788, "Ġnext": 1789, "aa": 1790, "view": 1791, "src": 1792, "nect": 1793, "ding": 1794, "ero": 1795, "Ġinit": 1796, "lot": 1797, "Tag": 1798, "DB": 1799, "Ġany": 1800, "ish": 1801, "ical": 1802, "Frame": 1803, "goto": 1804, "Ġoffset": 1805, "Ġfirst": 1806, "hw": 1807, "Options": 1808, "alloc": 1809, "ifier": 1810, "ssion": 1811, "LT": 1812, "ĉĠĠĠ": 1813, "Ġused": 1814, "ĠĠĠĠĠĠĠĠĠĠ": 1815, "host": 1816, "ĠAssert": 1817, "Ġblock": 1818, "SH": 1819, "({": 1820, "Ġ*)": 1821, "Ġargs": 1822, "++;": 1823, "ĠSt": 1824, "uccess": 1825, "Ġ<=": 1826, "pend": 1827, "Ġ///": 1828, "bar": 1829, "here": 1830, "AP": 1831, "Ġunsigned": 1832, "response": 1833, "Input": 1834, "Ġmem": 1835, "rap": 1836, "Ġns": 1837, "Ġact": 1838, "Ġwhich": 1839, "html": 1840, "Ġmessage": 1841, "Ġfloat": 1842, "mu": 1843, "source": 1844, "Ġonly": 1845, "Lay": 1846, "entity": 1847, "Null": 1848, "box": 1849, "TYPE": 1850, "Width": 1851, "cept": 1852, "core": 1853, "Util": 1854, "go": 1855, "ines": 1856, "update": 1857, ")))": 1858, "Image": 1859, "unk": 1860, "totype": 1861, "mit": 1862, "Ġbuffer": 1863, "ialize": 1864, "Ġ10": 1865, "Override": 1866, "ateg": 1867, "irectory": 1868, "irq": 1869, "ĠFI": 1870, "perties": 1871, "ymb": 1872, "div": 1873, "15": 1874, "AME": 1875, "Co": 1876, "Version": 1877, "Child": 1878, "uid": 1879, "ailed": 1880, "rop": 1881, "ift": 1882, "PC": 1883, "Offset": 1884, "ports": 1885, "ob": 1886, "ymbol": 1887, "Action": 1888, "irt": 1889, "Mem": 1890, "iven": 1891, "post": 1892, "99": 1893, "\"]": 1894, "QU": 1895, "([": 1896, "Ġsource": 1897, "*/": 1898, "color": 1899, "returns": 1900, "Ġvalues": 1901, "Ġ|=": 1902, "Box": 1903, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 1904, "Handler": 1905, "rows": 1906, "mod": 1907, "ctor": 1908, "ZE": 1909, "Ġmap": 1910, "stat": 1911, "Ġco": 1912, "ca": 1913, "ysc": 1914, "IF": 1915, "mm": 1916, "amp": 1917, "store": 1918, "Ġval": 1919, "Ġfinal": 1920, "Ġper": 1921, "bit": 1922, "Style": 1923, "ormal": 1924, "Ġresponse": 1925, "ains": 1926, "ocket": 1927, "ĠReturn": 1928, "Tra": 1929, "lib": 1930, "we": 1931, "Ġ++": 1932, "protected": 1933, "Number": 1934, "replace": 1935, "Imp": 1936, "lication": 1937, "ĠNone": 1938, "lector": 1939, "NE": 1940, "lick": 1941, "BB": 1942, "Ġref": 1943, "ingle": 1944, ")(": 1945, "Ġother": 1946, "ĠIS": 1947, "vm": 1948, "ERROR": 1949, "top": 1950, "tmp": 1951, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 1952, "VER": 1953, "lat": 1954, "Ed": 1955, "06": 1956, "yscall": 1957, "pan": 1958, "ĠTest": 1959, "Ġad": 1960, "System": 1961, "header": 1962, "close": 1963, "All": 1964, "09": 1965, "frame": 1966, "clude": 1967, "mask": 1968, "(!": 1969, "first": 1970, "cache": 1971, "SET": 1972, "ists": 1973, "api": 1974, "lected": 1975, "Ġvalid": 1976, "Ġlength": 1977, "ĠNOT": 1978, "apter": 1979, "child": 1980, "AM": 1981, "ci": 1982, "Command": 1983, "Num": 1984, "Fact": 1985, "Target": 1986, "ender": 1987, "Ġdevice": 1988, "ved": 1989, "model": 1990, "Row": 1991, "lease": 1992, "cb": 1993, "wait": 1994, "body": 1995, "Ġcal": 1996, "template": 1997, "elper": 1998, "ou": 1999, "lt": 2000, "Builder": 2001, "Ġmake": 2002, "lem": 2003, "HT": 2004, "ome": 2005, "defined": 2006, "}}": 2007, "ates": 2008, "\"))": 2009, "Def": 2010, "image": 2011, "open": 2012, "vo": 2013, "Ġhttp": 2014, "ĠPro": 2015, "Ġmust": 2016, "root": 2017, "'],": 2018, "Ġ,": 2019, "anged": 2020, "Ġformat": 2021, "abel": 2022, "Ġlast": 2023, "ĠAT": 2024, "Valid": 2025, "Ġtable": 2026, "REG": 2027, "Column": 2028, "prototype": 2029, "Ent": 2030, "RO": 2031, "roller": 2032, "Char": 2033, "Call": 2034, "Address": 2035, "********************************": 2036, "sup": 2037, "DI": 2038, "ution": 2039, "13": 2040, "Ġdouble": 2041, "Ext": 2042, "Act": 2043, "KE": 2044, "mark": 2045, "####": 2046, "height": 2047, "Ġexpected": 2048, "typeof": 2049, "24": 2050, "80": 2051, "Ro": 2052, "vider": 2053, "rix": 2054, "Per": 2055, "Update": 2056, "style": 2057, "Ġflags": 2058, "ERT": 2059, "Ġreturns": 2060, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 2061, "round": 2062, "Entry": 2063, "lice": 2064, "Max": 2065, "nt": 2066, "ments": 2067, "ĠList": 2068, "Ġmin": 2069, "Ġoper": 2070, "Gener": 2071, "down": 2072, "foo": 2073, "Ġrun": 2074, "xy": 2075, "Ġgiven": 2076, "():": 2077, "Ġ!==": 2078, "Ad": 2079, "ous": 2080, "idget": 2081, "coding": 2082, "Ġtra": 2083, "ater": 2084, "attern": 2085, "ĠCom": 2086, "});": 2087, ",\"": 2088, "SIZE": 2089, "istr": 2090, "cast": 2091, "Ġcatch": 2092, "...": 2093, "ĠĠĠĠĊ": 2094, "And": 2095, "ugin": 2096, "||": 2097, "imer": 2098, "VE": 2099, "Height": 2100, "nown": 2101, "xx": 2102, "doc": 2103, "Ġstatus": 2104, "Ġneed": 2105, "Ġtag": 2106, "Ġbut": 2107, "idx": 2108, "older": 2109, "column": 2110, "14": 2111, "active": 2112, "with": 2113, "chema": 2114, "////////////////": 2115, "Ġboolean": 2116, "ĠCOM": 2117, "instance": 2118, "Ġmode": 2119, "Page": 2120, "PO": 2121, "resent": 2122, "Ġ['": 2123, "Button": 2124, "regex": 2125, "Ġ7": 2126, "Ġobj": 2127, "ĠTr": 2128, "Ġdoes": 2129, "rag": 2130, "Init": 2131, "aw": 2132, "handle": 2133, "Ġbyte": 2134, "option": 2135, "me": 2136, "andom": 2137, "TP": 2138, "\"},": 2139, "Params": 2140, "33": 2141, "switch": 2142, "ĠTH": 2143, "Ġrequire": 2144, "Rule": 2145, "Ġinto": 2146, "IL": 2147, "rid": 2148, "\"));": 2149, "adata": 2150, "lang": 2151, "Url": 2152, "MM": 2153, "Ġsk": 2154, "ote": 2155, "Ġ(*": 2156, "Empty": 2157, "reen": 2158, "ixed": 2159, "SON": 2160, "Server": 2161, "Ġdesc": 2162, "attribute": 2163, "ower": 2164, "ported": 2165, "Ġme": 2166, "resource": 2167, "55": 2168, "her": 2169, "iff": 2170, "Ġwas": 2171, "title": 2172, "XX": 2173, "SP": 2174, "Ġpart": 2175, "DR": 2176, "filter": 2177, "ERAT": 2178, "Ġsrc": 2179, "riptor": 2180, "MAND": 2181, "cpu": 2182, "FO": 2183, "etadata": 2184, "part": 2185, "js": 2186, "Ġac": 2187, "Label": 2188, "pare": 2189, "stant": 2190, "uction": 2191, "ision": 2192, "orage": 2193, "sole": 2194, "debug": 2195, "Tem": 2196, "ĠBY": 2197, "Ġmodule": 2198, "arshal": 2199, "Ġbuf": 2200, "Ġparent": 2201, "Ġgener": 2202, "Output": 2203, "Ġcomp": 2204, "fg": 2205, "Ġfore": 2206, "Ġel": 2207, "Position": 2208, "untime": 2209, "Ġ16": 2210, "xml": 2211, "ĠDO": 2212, "OK": 2213, "@@@@": 2214, "Ġos": 2215, "dest": 2216, "util": 2217, "ecute": 2218, "hash": 2219, "join": 2220, "endif": 2221, "ĠFILE": 2222, "leg": 2223, "Control": 2224, "ized": 2225, "00000000000000000000000000000000": 2226, "auth": 2227, "Range": 2228, "Ġversion": 2229, "ORT": 2230, "Ġusing": 2231, "Ġcur": 2232, "Current": 2233, "Ġclient": 2234, "34": 2235, "tract": 2236, "bt": 2237, "DIT": 2238, "Ġstream": 2239, "Bytes": 2240, "ume": 2241, "ays": 2242, "18": 2243, "BUG": 2244, "SYS": 2245, "imple": 2246, "Dis": 2247, "cm": 2248, "miss": 2249, "Ġwrite": 2250, "30": 2251, "ĠUn": 2252, "LI": 2253, "river": 2254, "ient": 2255, "'))": 2256, "register": 2257, "MD": 2258, "apping": 2259, "let": 2260, "Ġcommand": 2261, "Ġext": 2262, "TI": 2263, "Ġcontent": 2264, "tach": 2265, "Ġcallback": 2266, "pth": 2267, "Entity": 2268, "Ġfail": 2269, "Ġthen": 2270, "location": 2271, "ump": 2272, "19": 2273, "Filter": 2274, "left": 2275, "Op": 2276, "ĠAdd": 2277, "ĠObject": 2278, "cre": 2279, "Ġnet": 2280, "Ġinfo": 2281, "lear": 2282, "process": 2283, "Vector": 2284, "Interface": 2285, "ool": 2286, "Assert": 2287, "Args": 2288, "56": 2289, "Component": 2290, "ready": 2291, "Ġfound": 2292, "SK": 2293, ")|": 2294, "Ġdis": 2295, "structor": 2296, "Ġoption": 2297, "ternal": 2298, "AG": 2299, "unsafe": 2300, "resh": 2301, "Ġbytes": 2302, "Ġpage": 2303, "ures": 2304, "ĠCreate": 2305, "med": 2306, "_,": 2307, "Ġupdate": 2308, "ĠGEN": 2309, "Ġpack": 2310, "my": 2311, "olic": 2312, "gine": 2313, "Ġspecified": 2314, "Ġforeach": 2315, "Cache": 2316, "json": 2317, "nal": 2318, "Ġra": 2319, "Spec": 2320, "run": 2321, "show": 2322, "Ġthrows": 2323, "opt": 2324, "number": 2325, "ĠTHIS": 2326, "irtual": 2327, "pu": 2328, "ty": 2329, "ility": 2330, "atal": 2331, "Pack": 2332, "server": 2333, "Ġ{}": 2334, "ating": 2335, "Enum": 2336, "ui": 2337, "sor": 2338, "/**": 2339, "ERATED": 2340, "Ġerrno": 2341, "ĠIN": 2342, "ĠTOP": 2343, "ĠCOMMAND": 2344, "Ġmsg": 2345, "Pl": 2346, "uage": 2347, "elp": 2348, "BO": 2349, "Ġprocess": 2350, "RL": 2351, "Are": 2352, "Min": 2353, "duct": 2354, "see": 2355, "ĠEDIT": 2356, "ĉĊ": 2357, "Ġmodel": 2358, "iginal": 2359, "rx": 2360, "split": 2361, "ava": 2362, "UP": 2363, "').": 2364, "coder": 2365, "uch": 2366, "inition": 2367, "ĠGENERATED": 2368, "ĠWe": 2369, "igger": 2370, "rit": 2371, "ank": 2372, "ince": 2373, "ities": 2374, "wo": 2375, "Layout": 2376, "Ġresource": 2377, "Case": 2378, "Ġimage": 2379, "Script": 2380, "UM": 2381, "CA": 2382, "Ġtmp": 2383, "Ġhandle": 2384, "Ġentry": 2385, "env": 2386, "Ġgroup": 2387, "Hash": 2388, "None": 2389, "Match": 2390, "tom": 2391, "Part": 2392, "Mo": 2393, "ultip": 2394, "Next": 2395, "Ġwork": 2396, "ABLE": 2397, "formation": 2398, "select": 2399, "bytes": 2400, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb": 2401, "ww": 2402, "Dir": 2403, "Handle": 2404, "gg": 2405, "Ġ]": 2406, "MS": 2407, "flow": 2408, "INVAL": 2409, "so": 2410, "ose": 2411, "sd": 2412, "Ġab": 2413, "send": 2414, "28": 2415, "Ġattribute": 2416, "Ġcontinue": 2417, "ssign": 2418, "ssword": 2419, "right": 2420, "php": 2421, "spec": 2422, "COM": 2423, "CP": 2424, "Ġback": 2425, "tra": 2426, "50": 2427, "Level": 2428, "arning": 2429, "atrix": 2430, "Draw": 2431, "Back": 2432, "command": 2433, "Ġold": 2434, "Ġrep": 2435, "Ġoverride": 2436, "light": 2437, "copy": 2438, "ha": 2439, "ET": 2440, "AAAA": 2441, "rect": 2442, "Load": 2443, "Ġswitch": 2444, "idd": 2445, "da": 2446, "uff": 2447, "UI": 2448, "17": 2449, "ear": 2450, "CR": 2451, "ĠZ": 2452, "Ġcl": 2453, "level": 2454, "Ġlocal": 2455, "long": 2456, "Ġind": 2457, "skb": 2458, "cry": 2459, "ched": 2460, "olicy": 2461, "iction": 2462, "the": 2463, "HECK": 2464, "over": 2465, "head": 2466, "Ġparse": 2467, "ailable": 2468, "Do": 2469, "ua": 2470, "ilt": 2471, "HP": 2472, "filename": 2473, "Device": 2474, "ategory": 2475, "Ġ;": 2476, "NO": 2477, "etr": 2478, "BA": 2479, "ts": 2480, "Ġed": 2481, "ialog": 2482, "22": 2483, "*)": 2484, "MAX": 2485, "Listener": 2486, "bind": 2487, "tocol": 2488, "ops": 2489, "Ġ\"%": 2490, "Run": 2491, "{}": 2492, "Ġafter": 2493, "Ġeach": 2494, "enter": 2495, "[:": 2496, "ook": 2497, "oper": 2498, "by": 2499, "second": 2500, "require": 2501, "Val": 2502, "struction": 2503, "Location": 2504, "channel": 2505, "CL": 2506, "quence": 2507, "100": 2508, "GET": 2509, "Collection": 2510, "PA": 2511, "aint": 2512, "Ġurl": 2513, "Ġnon": 2514, "sm": 2515, "clear": 2516, "TO": 2517, "URL": 2518, "ICAg": 2519, "cal": 2520, "dma": 2521, "EM": 2522, "Ġfind": 2523, "NAME": 2524, "ĠerrnoErr": 2525, "rel": 2526, "40": 2527, ")->": 2528, "STAT": 2529, "Ġ(\"": 2530, "Types": 2531, "br": 2532, "Values": 2533, "Invalid": 2534, "Menu": 2535, "ĠFile": 2536, "ĠReturns": 2537, "','": 2538, "unlock": 2539, "Factory": 2540, "ĠCheck": 2541, "Option": 2542, "main": 2543, "ĠID": 2544, "assertEquals": 2545, "otal": 2546, "Vis": 2547, "exp": 2548, "Role": 2549, "Ġthere": 2550, "STR": 2551, "ĠType": 2552, "END": 2553, "oft": 2554, "Settings": 2555, "EE": 2556, "à¤": 2557, "Ac": 2558, "86": 2559, "fer": 2560, "FB": 2561, "Ġrow": 2562, "Ver": 2563, "session": 2564, "Cur": 2565, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 2566, "sb": 2567, "Ġframe": 2568, "CC": 2569, "Ġchild": 2570, "Obj": 2571, "ugh": 2572, "Ġport": 2573, "position": 2574, "ensor": 2575, "ground": 2576, "Task": 2577, "Writer": 2578, "cul": 2579, "Body": 2580, "Link": 2581, "card": 2582, "ĠK": 2583, "Ġmay": 2584, "erge": 2585, "False": 2586, "Ġdest": 2587, "ĠCh": 2588, "ification": 2589, "sn": 2590, "Ġcolumn": 2591, "Callback": 2592, "Ġdev": 2593, "Module": 2594, "Ġbit": 2595, "Auth": 2596, "OF": 2597, "px": 2598, "Mod": 2599, "ipp": 2600, "Byte": 2601, "delete": 2602, "Ġroot": 2603, "CI": 2604, "sert": 2605, "ng": 2606, "document": 2607, "Ġexp": 2608, "ffect": 2609, "si": 2610, "Process": 2611, "window": 2612, "Ġload": 2613, "double": 2614, "Async": 2615, "Ġquery": 2616, "ATA": 2617, "Ġ],": 2618, "td": 2619, "cd": 2620, "Ġok": 2621, "Ġbefore": 2622, "values": 2623, "Ġcor": 2624, "ices": 2625, "ession": 2626, "save": 2627, "ared": 2628, "Provider": 2629, ";\\": 2630, "angle": 2631, "Helper": 2632, "Net": 2633, "off": 2634, "Ġaddress": 2635, "inary": 2636, "Ġem": 2637, "Expression": 2638, "gress": 2639, "Ġsign": 2640, "Ġsame": 2641, "Container": 2642, "'.": 2643, "ĠY": 2644, "Parent": 2645, "Ġdocument": 2646, "MI": 2647, "yy": 2648, "Ġlabel": 2649, "annot": 2650, "search": 2651, "Access": 2652, "vide": 2653, "ĠException": 2654, "Ġheader": 2655, "DO": 2656, "Ġaction": 2657, "ency": 2658, "Ġarguments": 2659, "comment": 2660, "Comp": 2661, "pop": 2662, "ixel": 2663, "WR": 2664, "ĠArray": 2665, "Ġfunc": 2666, "SA": 2667, "23": 2668, "ym": 2669, "Ġempty": 2670, "Names": 2671, "\"],": 2672, "ottom": 2673, "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd": 2674, "any": 2675, "udio": 2676, "mutex": 2677, "Ġop": 2678, "ogle": 2679, "Ġmo": 2680, "Ġover": 2681, "mission": 2682, "Ġmod": 2683, "cket": 2684, "Ġgo": 2685, "cor": 2686, "SSERT": 2687, "03": 2688, "Top": 2689, "Document": 2690, "begin": 2691, "Reader": 2692, "address": 2693, "Ġnp": 2694, "ACE": 2695, "sec": 2696, "ä¸": 2697, ">>": 2764, "Tool": 2765, "button": 2766, "Store": 2767, "nil": 2768, "aster": 2769, "domain": 2770, "Ġfmt": 2771, "08": 2772, "script": 2773, "FS": 2774, "Ġ'/": 2775, "VM": 2776, "Decl": 2777, "ctl": 2778, "rate": 2779, "Local": 2780, "Ġcolor": 2781, "Ġreq": 2782, "Operation": 2783, "Kind": 2784, ")]": 2785, "headers": 2786, "while": 2787, "Ġ\"\"": 2788, "Connection": 2789, "Sign": 2790, "Parse": 2791, "ĠEn": 2792, "dition": 2793, "Host": 2794, "toString": 2795, "Argument": 2796, "Ġparams": 2797, "Ġiter": 2798, "oo": 2799, "Iter": 2800, "Ġpl": 2801, "Ġ})": 2802, "Ġtemp": 2803, "each": 2804, "ails": 2805, "pb": 2806, "Ġinst": 2807, "Exp": 2808, "sw": 2809, "mi": 2810, "ĠError": 2811, "asic": 2812, "Ġcopy": 2813, "keys": 2814, "If": 2815, "sys": 2816, "ular": 2817, "Debug": 2818, "rule": 2819, "stack": 2820, "Ġdelete": 2821, "66": 2822, "range": 2823, "tab": 2824, "Stack": 2825, "Float": 2826, "property": 2827, "etch": 2828, "chip": 2829, "ĉĉĊ": 2830, "imum": 2831, "isset": 2832, "wn": 2833, "roy": 2834, "AY": 2835, "QL": 2836, "Ġ'\\": 2837, "cap": 2838, "uster": 2839, "straint": 2840, "ĠHT": 2841, "ries": 2842, "Delete": 2843, "Copy": 2844, "cmp": 2845, "Configuration": 2846, "las": 2847, "ĠValue": 2848, "ĠReg": 2849, "Ġ--": 2850, "css": 2851, "service": 2852, "Returns": 2853, "ivity": 2854, "auto": 2855, "Ġauto": 2856, "df": 2857, "sl": 2858, "Ġview": 2859, "control": 2860, "access": 2861, "Ġreturned": 2862, "AS": 2863, "ba": 2864, "ization": 2865, "Ġfilter": 2866, "ĉĠ": 2867, "uple": 2868, "xff": 2869, "iag": 2870, "Has": 2871, "ssoc": 2872, "wise": 2873, "Tree": 2874, "reset": 2875, "ern": 2876, "]))": 2877, "ĠOn": 2878, "Ġ...": 2879, "Sup": 2880, "SB": 2881, "Ġregister": 2882, "Utils": 2883, "CO": 2884, "NULL": 2885, "exception": 2886, "ward": 2887, "'):": 2888, "29": 2889, ")?": 2890, "ĠTR": 2891, "full": 2892, "Ġcache": 2893, "ln": 2894, "Ġthan": 2895, "Lock": 2896, "items": 2897, "uri": 2898, "а": 2899, "parser": 2900, "05": 2901, "task": 2902, "Thread": 2903, "Ġsend": 2904, "Ġlink": 2905, "andard": 2906, "ĠDE": 2907, "PAR": 2908, "insert": 2909, "Ġcontain": 2910, "Session": 2911, "Ġparameter": 2912, "continue": 2913, "cr": 2914, "Ġqu": 2915, "Ġalready": 2916, "Ġ~": 2917, "tml": 2918, "Ġ.=": 2919, "imes": 2920, ".\\": 2921, "Ġver": 2922, "orld": 2923, "88": 2924, "cho": 2925, "should": 2926, "AND": 2927, "prefix": 2928, "'));": 2929, "Ġallow": 2930, "Reference": 2931, "ane": 2932, "ONE": 2933, "Ġopt": 2934, "]+": 2935, "ten": 2936, "achine": 2937, "esh": 2938, "handler": 2939, "pri": 2940, "ĠĠĠĠĠĠĠĠĊ": 2941, "pol": 2942, "Ġservice": 2943, "sing": 2944, "Ġhere": 2945, "Constant": 2946, "Ġwant": 2947, "Ġvariable": 2948, "----------------------------------------------------------------": 2949, ")));": 2950, "very": 2951, "ancel": 2952, "Ġcalled": 2953, "Last": 2954, "rad": 2955, "adapter": 2956, "pk": 2957, "tt": 2958, "ux": 2959, "LOCK": 2960, "web": 2961, ">();": 2962, "ignore": 2963, "Register": 2964, "vis": 2965, "Ġfiles": 2966, "Ġimp": 2967, "drop": 2968, "ORD": 2969, "conf": 2970, "conn": 2971, "Ġwhere": 2972, ")}": 2973, "Work": 2974, "ĠSe": 2975, "fmt": 2976, "DEBUG": 2977, "mac": 2978, "gl": 2979, "pha": 2980, "ORM": 2981, "Ġsuccess": 2982, "Ġcre": 2983, "Timeout": 2984, "READ": 2985, "aded": 2986, "ulti": 2987, "rivate": 2988, "Ġelements": 2989, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 2990, "Ġorder": 2991, "icon": 2992, "fp": 2993, "е": 2994, "fl": 2995, "known": 2996, "stamp": 2997, "ĠTrue": 2998, "change": 2999, "bits": 3000, "lower": 3001, "Mock": 3002, "Left": 3003, "This": 3004, "Ġglobal": 3005, "Ġ100": 3006, "Ġinterface": 3007, "Ġcmd": 3008, "thing": 3009, "fc": 3010, "files": 3011, "ãģ": 3012, "global": 3013, "200": 3014, "ITE": 3015, "ToString": 3016, "Func": 3017, "can": 3018, "less": 3019, "IR": 3020, "Changed": 3021, "Ġbeen": 3022, "Ġ\",": 3023, "'];": 3024, "Ġctx": 3025, "clk": 3026, "inish": 3027, "ĠIs": 3028, "ĠSyscall": 3029, "sz": 3030, "Msg": 3031, "Properties": 3032, "Ġremove": 3033, "Cal": 3034, "INE": 3035, "Que": 3036, "ats": 3037, "ique": 3038, "ination": 3039, "Ġexist": 3040, ".\",": 3041, "inding": 3042, "Ġ32": 3043, "iron": 3044, "ĠBu": 3045, "ĉĉĠĠĠ": 3046, "anch": 3047, "LAG": 3048, "Comple": 3049, "Ġparameters": 3050, "Ġcomple": 3051, "Ġinstanceof": 3052, "../": 3053, "Ġtypeof": 3054, "rapper": 3055, "Port": 3056, "Template": 3057, "hdr": 3058, "Det": 3059, "Enabled": 3060, "Items": 3061, "Order": 3062, "Send": 3063, "ĠMath": 3064, "ACK": 3065, "XT": 3066, "cpy": 3067, "abs": 3068, "ynam": 3069, "chr": 3070, "Ġ),": 3071, "LOG": 3072, "cfg": 3073, "ictionary": 3074, "tree": 3075, "Ġhost": 3076, "Bit": 3077, "ĠSer": 3078, "day": 3079, "Cl": 3080, "Ġ/**": 3081, "Ġheight": 3082, "bus": 3083, "@@@": 3084, "Ġraise": 3085, "hether": 3086, "now": 3087, ".'": 3088, "display": 3089, "Ġstore": 3090, "enc": 3091, "ĠDate": 3092, "Mon": 3093, "ram": 3094, "Ġio": 3095, "]]": 3096, "Ġdon": 3097, "=%": 3098, "CTION": 3099, "regs": 3100, "final": 3101, "proto": 3102, "bers": 3103, "Widget": 3104, "Ġ>>>": 3105, "ollow": 3106, "Root": 3107, "Close": 3108, "af": 3109, "FR": 3110, "(\".": 3111, "shape": 3112, "ware": 3113, "Ġ('": 3114, "vc": 3115, "ias": 3116, "essages": 3117, "interface": 3118, "ipe": 3119, "Ġexpect": 3120, "Change": 3121, "Ġph": 3122, "35": 3123, "Ġ{\\": 3124, "container": 3125, "anges": 3126, "Ġ-=": 3127, "board": 3128, "Inst": 3129, "member": 3130, "Ph": 3131, "tax": 3132, "pm": 3133, "Ġrc": 3134, "ĠTo": 3135, "ĠData": 3136, "36": 3137, "cent": 3138, "Ġdone": 3139, "DATA": 3140, "okie": 3141, "total": 3142, "vector": 3143, "Ġlevel": 3144, "Ġhandler": 3145, "ene": 3146, "span": 3147, "EL": 3148, "Ġform": 3149, "eric": 3150, "Ġ\"/": 3151, "Parameters": 3152, "WN": 3153, "Ġright": 3154, "FP": 3155, "stop": 3156, "Ġsession": 3157, "ds": 3158, "cat": 3159, "Ġnow": 3160, "ĠCol": 3161, "settings": 3162, "Ġreference": 3163, "thread": 3164, "Select": 3165, "Ġaddr": 3166, "side": 3167, "={": 3168, "MASK": 3169, "imal": 3170, "olume": 3171, "FAULT": 3172, "Windows": 3173, "lash": 3174, "OST": 3175, "MODE": 3176, "Ġcustom": 3177, "Sk": 3178, "GB": 3179, "SR": 3180, "lap": 3181, "idden": 3182, "heet": 3183, "Ġleft": 3184, "Ġmain": 3185, "Ġ$.": 3186, "rq": 3187, "signature": 3188, "Description": 3189, "KER": 3190, "+\"": 3191, "Ġjson": 3192, "First": 3193, "Ġtop": 3194, "Ġrel": 3195, "CF": 3196, "enable": 3197, "Ġpass": 3198, "ĠSh": 3199, "rm": 3200, "Ġtask": 3201, "26": 3202, "Ġsecond": 3203, "Down": 3204, "Remove": 3205, "Ġparser": 3206, "lean": 3207, "ART": 3208, "stats": 3209, "PP": 3210, "Ġcls": 3211, "Http": 3212, "chan": 3213, "iler": 3214, "Integer": 3215, "Fe": 3216, "pdev": 3217, "alk": 3218, "erru": 3219, "cel": 3220, "Ġstyle": 3221, "rie": 3222, "latform": 3223, "izer": 3224, "Ġchannel": 3225, "NS": 3226, "flag": 3227, "Ġconnection": 3228, "ĠFor": 3229, "curity": 3230, "ented": 3231, "Ġits": 3232, "Ġ{@": 3233, "OUT": 3234, "Ind": 3235, "imation": 3236, "OC": 3237, "Bar": 3238, "click": 3239, "limit": 3240, "lish": 3241, "31": 3242, "amples": 3243, "===": 3244, "ALL": 3245, "77": 3246, "Ġdate": 3247, "IE": 3248, "ian": 3249, "tool": 3250, "Append": 3251, "np": 3252, "timeout": 3253, "Expr": 3254, "rec": 3255, "ighlight": 3256, "CESS": 3257, "phy": 3258, "Ġent": 3259, "Ġjust": 3260, "font": 3261, "INFO": 3262, "lta": 3263, "rep": 3264, "alar": 3265, "encode": 3266, "Channel": 3267, "cause": 3268, "Ġ\"\",": 3269, "Ġsp": 3270, "verse": 3271, "ĠassertEquals": 3272, "FILE": 3273, "ODO": 3274, "imension": 3275, "Ġoperation": 3276, "TEST": 3277, "}\\": 3278, "Ġrecord": 3279, "edia": 3280, "prev": 3281, "Descriptor": 3282, "SD": 3283, "Operand": 3284, "man": 3285, "Ġresults": 3286, "Search": 3287, "lasses": 3288, "soft": 3289, "']);": 3290, "ribe": 3291, "igin": 3292, "(-": 3293, "Ġ12": 3294, "Ġlib": 3295, "ived": 3296, "<<": 3297, "EINVAL": 3298, "Ġexception": 3299, "Ġbuild": 3300, "Ġpointer": 3301, "Ġdb": 3302, "gment": 3303, "ĠUp": 3304, "iterator": 3305, "inode": 3306, "peed": 3307, "iant": 3308, "Ġmask": 3309, "xis": 3310, "exists": 3311, "step": 3312, "pool": 3313, "voke": 3314, "API": 3315, "RT": 3316, "Ġfe": 3317, "TER": 3318, "scroll": 3319, "stract": 3320, "о": 3321, "Custom": 3322, "Ġenv": 3323, "internal": 3324, "Ġstack": 3325, "rv": 3326, "ority": 3327, "AreEqual": 3328, "']['": 3329, "throw": 3330, "Del": 3331, "89": 3332, "done": 3333, "21": 3334, "ĠLog": 3335, "semb": 3336, "ssoci": 3337, "Ġmemory": 3338, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 3339, "make": 3340, "ynamic": 3341, "vb": 3342, "=>": 3343, "ĠAn": 3344, "Addr": 3345, "URE": 3346, "icro": 3347, "Ġsome": 3348, "Rules": 3349, "menu": 3350, "rowser": 3351, "########": 3352, "=\\\"": 3353, "vers": 3354, "ĠRE": 3355, "ernel": 3356, "Controller": 3357, "layout": 3358, "aaaa": 3359, "ggle": 3360, "custom": 3361, "icle": 3362, "Ġimport": 3363, "meta": 3364, "Ġinformation": 3365, "FLAG": 3366, "exec": 3367, "Extension": 3368, "Ġdst": 3369, "variable": 3370, "CD": 3371, "Font": 3372, "ultiple": 3373, "\"},{": 3374, "================================": 3375, "unds": 3376, "43": 3377, "ĠFalse": 3378, "types": 3379, "rer": 3380, "sql": 3381, "crypt": 3382, "AX": 3383, "fail": 3384, "Tab": 3385, "Wh": 3386, "ring": 3387, "Ġunsafe": 3388, "Ġ(_": 3389, "istance": 3390, "dict": 3391, "throws": 3392, "JSON": 3393, "fields": 3394, "ĉĉĉĉĉĉĉĉ": 3395, "anel": 3396, "seq": 3397, "ily": 3398, "Variable": 3399, "rough": 3400, "PAT": 3401, "Ġag": 3402, "Ġpo": 3403, "record": 3404, "exit": 3405, "etry": 3406, "apply": 3407, "Active": 3408, "Ġren": 3409, "Attributes": 3410, "ialized": 3411, "ĠIO": 3412, "Ġoff": 3413, "inst": 3414, "Space": 3415, "ential": 3416, "expect": 3417, "dec": 3418, "rb": 3419, "GR": 3420, "Ġ'%": 3421, "Fatal": 3422, "Find": 3423, "Ġundefined": 3424, "ĠĠĊ": 3425, "Ġargument": 3426, "arn": 3427, "ways": 3428, "Directory": 3429, "usb": 3430, "escape": 3431, "FE": 3432, "Ġfilename": 3433, "ek": 3434, "Can": 3435, "sort": 3436, "TIME": 3437, "assed": 3438, "ispatch": 3439, "Ġstrings": 3440, "/>": 3441, "Ġqueue": 3442, "lable": 3443, "Ġbody": 3444, "Ġ/>": 3445, "ĠByte": 3446, "short": 3447, "sizeof": 3448, "Ġbecause": 3449, "hs": 3450, "ached": 3451, "section": 3452, "shift": 3453, "ws": 3454, "Ġsys": 3455, "Ġdirectory": 3456, "prec": 3457, "Ġsearch": 3458, "equals": 3459, "Prefix": 3460, "Mask": 3461, "du": 3462, "zero": 3463, "testing": 3464, "Queue": 3465, "region": 3466, "39": 3467, "Sp": 3468, "PRE": 3469, "Ġ$(": 3470, ".\");": 3471, "76": 3472, "Ġalloc": 3473, "Ġdefined": 3474, "LEN": 3475, "ĠIt": 3476, "trigger": 3477, "Ġ'<": 3478, "ging": 3479, "Use": 3480, "Parser": 3481, "NOT": 3482, "Ġ\\\"": 3483, "Ġthread": 3484, "Convert": 3485, "emit": 3486, "amed": 3487, "prop": 3488, "dm": 3489, "undle": 3490, "tl": 3491, "ĠFALSE": 3492, "Impl": 3493, "Ġli": 3494, "ASSERT": 3495, "Ġ[];": 3496, "Ġ20": 3497, "ors": 3498, "ublish": 3499, "PH": 3500, "Ġsingle": 3501, "enum": 3502, "Ġlet": 3503, "Definition": 3504, "Ġlock": 3505, "points": 3506, "Click": 3507, ".\"": 3508, "0000000000000000000000000000000000000000000000000000000000000000": 3509, "scale": 3510, "Ġnullptr": 3511, "ason": 3512, "``": 3513, "bc": 3514, "medi": 3515, "valu": 3516, "lines": 3517, "posit": 3518, "Ġev": 3519, ")\\": 3520, "ĠAR": 3521, ".*": 3522, "Ġmy": 3523, "Ġdoc": 3524, "Ġrece": 3525, "Ġattr": 3526, "ifdef": 3527, "256": 3528, "Pr": 3529, "names": 3530, "ironment": 3531, "gp": 3532, "One": 3533, "Ġauth": 3534, "Over": 3535, "Ġpost": 3536, "STATUS": 3537, "SO": 3538, "Comment": 3539, "Ġexec": 3540, "Fields": 3541, "Display": 3542, "marshal": 3543, "Keys": 3544, "Ġ&=": 3545, "iod": 3546, "ATION": 3547, "inher": 3548, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 3549, "Right": 3550, "ids": 3551, "Ġexcept": 3552, "Ġword": 3553, "Doc": 3554, "Ġspace": 3555, "anguage": 3556, "define": 3557, "AGE": 3558, "Ġerrors": 3559, "()));": 3560, "Ġregex": 3561, "erm": 3562, "MT": 3563, "Ġwhether": 3564, "ween": 3565, "Ġinvalid": 3566, "и": 3567, "54": 3568, "FIG": 3569, "rary": 3570, "Ġca": 3571, "img": 3572, "Project": 3573, "ĠRead": 3574, "н": 3575, "gen": 3576, ":[": 3577, "Mark": 3578, "Non": 3579, "description": 3580, "Symbol": 3581, "Ġdir": 3582, "PL": 3583, "Ġchange": 3584, "ĠPHP": 3585, "trace": 3586, "PU": 3587, "term": 3588, "IM": 3589, "project": 3590, "Global": 3591, "connection": 3592, "Ty": 3593, "07": 3594, "ĠArg": 3595, "ĠInt": 3596, "oin": 3597, "OB": 3598, "Ġrepresent": 3599, "NT": 3600, "ĠDo": 3601, "59": 3602, "Ġprefix": 3603, "Ġflag": 3604, "ĠEX": 3605, "Ġ''": 3606, "GU": 3607, "Ġap": 3608, "tc": 3609, "Metadata": 3610, "Ġtypes": 3611, "romise": 3612, "Show": 3613, "parator": 3614, "Cell": 3615, "sync": 3616, "(\\": 3617, "timer": 3618, "ĠPar": 3619, "ï¼": 3620, "{\"": 3621, "Ġscope": 3622, "Ġ'';": 3623, "Failed": 3624, "Ġelif": 3625, "Json": 3626, "802": 3627, "Ġfact": 3628, "arguments": 3629, "FC": 3630, "aml": 3631, "ending": 3632, "Rel": 3633, "clo": 3634, "38": 3635, "Ġtemplate": 3636, "Ġtx": 3637, "lim": 3638, "('.": 3639, "extend": 3640, "Xml": 3641, "ÑĤ": 3642, "fr": 3643, "Ġaccess": 3644, "ered": 3645, "ĠAl": 3646, "Ġtwo": 3647, "gb": 3648, "Long": 3649, "Storage": 3650, "Ġfollow": 3651, "printk": 3652, "()))": 3653, "ĠCont": 3654, "Title": 3655, "ĠGL": 3656, "wd": 3657, "just": 3658, "44": 3659, "XG": 3660, "Ġvis": 3661, "Ġfull": 3662, "Icon": 3663, "([]": 3664, "Ġsnd": 3665, "include": 3666, "Scope": 3667, "fb": 3668, "Ġstrict": 3669, "Full": 3670, "\"}": 3671, "Ġawait": 3672, "amb": 3673, "hd": 3674, "Schema": 3675, "pv": 3676, "onent": 3677, "EXT": 3678, "Matrix": 3679, "IB": 3680, "SER": 3681, "Su": 3682, "Ġ##": 3683, "Graph": 3684, "Enumer": 3685, "rs": 3686, "atures": 3687, "Attr": 3688, "pci": 3689, "]*": 3690, "IH": 3691, "BQ": 3692, "Ġcontainer": 3693, "Uri": 3694, "urface": 3695, "_.": 3696, "Dest": 3697, "Ġ'.": 3698, "Core": 3699, "cnt": 3700, "Only": 3701, "component": 3702, "]->": 3703, "Ġtotal": 3704, "SL": 3705, "128": 3706, "slice": 3707, "leep": 3708, "etric": 3709, "Region": 3710, "::$": 3711, "VT": 3712, "Ġmark": 3713, "ings": 3714, "Internal": 3715, "Build": 3716, "BIT": 3717, "\":\"": 3718, "Transform": 3719, "Ġtitle": 3720, "Dialog": 3721, "Policy": 3722, "ead": 3723, "eek": 3724, "ĠName": 3725, "Render": 3726, "ibility": 3727, "DS": 3728, "opts": 3729, "Ġll": 3730, "Ġoriginal": 3731, "Post": 3732, "&&(": 3733, "arshall": 3734, "pay": 3735, "wp": 3736, "utf": 3737, "37": 3738, "Struct": 3739, "Short": 3740, "ideo": 3741, "gt": 3742, "ely": 3743, "Ġgot": 3744, "dp": 3745, "Exec": 3746, ")/": 3747, "buff": 3748, "ended": 3749, "Memory": 3750, "qui": 3751, "çļ": 3752, "Clo": 3753, "exports": 3754, "errupt": 3755, "network": 3756, "Ġ$_": 3757, "invalid": 3758, "åı": 3759, "Texture": 3760, "Engine": 3761, "yntax": 3762, "boolean": 3763, "Auto": 3764, "Files": 3765, "çļĦ": 3766, "cip": 3767, "olver": 3768, "Ġpr": 3769, "olution": 3770, "ĠTODO": 3771, "Math": 3772, "Ġcontrol": 3773, "Pool": 3774, "istry": 3775, "Scale": 3776, "Ġavailable": 3777, "driver": 3778, "....": 3779, "Ġactual": 3780, "CHECK": 3781, "Ġkeys": 3782, "ĠLo": 3783, "ĠST": 3784, "dated": 3785, "getName": 3786, "Ġbet": 3787, "era": 3788, "Cre": 3789, "Ġoc": 3790, "ced": 3791, "(\"\\": 3792, "ĠApp": 3793, "ĠInit": 3794, "Ġopts": 3795, "Ġwait": 3796, "wner": 3797, "ĠJSON": 3798, "Env": 3799, "Ġrequired": 3800, "Ġfields": 3801, "48": 3802, "tep": 3803, "entic": 3804, "Us": 3805, "ĠUpdate": 3806, "Db": 3807, "tip": 3808, "Ġinteger": 3809, "ippet": 3810, "('/": 3811, "GV": 3812, "ĠWrite": 3813, "Bl": 3814, "ICE": 3815, "allow": 3816, "!=": 3817, "Meta": 3818, "normal": 3819, "Flag": 3820, "ializer": 3821, "INIT": 3822, "Socket": 3823, "Fail": 3824, "chedule": 3825, "az": 3826, "language": 3827, "ilters": 3828, "Ġreflect": 3829, "ĠAPI": 3830, "Ġitems": 3831, "ense": 3832, "Ġdisplay": 3833, "FORM": 3834, ":%": 3835, "Player": 3836, "Ġdebug": 3837, "Selected": 3838, "arr": 3839, "ful": 3840, "dom": 3841, "Ġpacket": 3842, "sets": 3843, ">\\": 3844, "havi": 3845, "Ġcomponent": 3846, "-----": 3847, "release": 3848, "Ġbits": 3849, "STATE": 3850, "Ġloop": 3851, "Iterator": 3852, "imary": 3853, "Ġ[\"": 3854, "Ġ^": 3855, "Ġthem": 3856, "SION": 3857, "mall": 3858, "Account": 3859, "pipe": 3860, "Ġnames": 3861, "ged": 3862, "Ġsum": 3863, "Rep": 3864, "ZX": 3865, "////////////////////////////////": 3866, "istory": 3867, "argin": 3868, "only": 3869, "CODE": 3870, "di": 3871, "once": 3872, "Second": 3873, "defer": 3874, "Ġfree": 3875, "ĠTRUE": 3876, "Ġrule": 3877, "MO": 3878, "ius": 3879, "1000": 3880, "We": 3881, "keyword": 3882, "Ġalso": 3883, "pository": 3884, "imp": 3885, "Ġsettings": 3886, "Headers": 3887, "icode": 3888, "Nd": 3889, "OFF": 3890, "render": 3891, "Ġconvert": 3892, "Rece": 3893, "Ġpassed": 3894, "pid": 3895, "DEV": 3896, "uffix": 3897, "itional": 3898, "Src": 3899, "fix": 3900, "Ġprevious": 3901, "wr": 3902, "fx": 3903, "amily": 3904, "Ġtree": 3905, "Trace": 3906, "Ġproto": 3907, "Ġnormal": 3908, "------": 3909, "`,": 3910, "Ġcpu": 3911, "Buf": 3912, "Forms": 3913, "ORY": 3914, "Drawing": 3915, "ĠEvent": 3916, "TX": 3917, "vec": 3918, "ither": 3919, "ICAgICAg": 3920, "align": 3921, "Ġmon": 3922, "ÑĢ": 3923, "Ġshow": 3924, "draw": 3925, "hide": 3926, "mc": 3927, "lex": 3928, "Ġreset": 3929, "Ġclose": 3930, "vas": 3931, "ffff": 3932, "indexOf": 3933, "Ġ64": 3934, "Ġencode": 3935, "attributes": 3936, "argv": 3937, "Each": 3938, "RI": 3939, ")).": 3940, "lg": 3941, "ãĤ": 3942, "Ġsystem": 3943, "BE": 3944, "pass": 3945, "unit": 3946, "\"\"\"": 3947, "Application": 3948, "Ġcb": 3949, "FromString": 3950, "064": 3951, "decode": 3952, "iteral": 3953, ".__": 3954, "Ġtimeout": 3955, "Found": 3956, "ĠCHECK": 3957, "Ġzero": 3958, "Ġclear": 3959, "curs": 3960, "Dec": 3961, "DD": 3962, "WAR": 3963, "chunk": 3964, "Ġte": 3965, "PORT": 3966, "Nodes": 3967, "Ġidx": 3968, "EV": 3969, "Section": 3970, "xu": 3971, "Ne": 3972, "Ġcref": 3973, "Go": 3974, "']))": 3975, "lp": 3976, "Ġshift": 3977, "PER": 3978, "ĠVector": 3979, "ZW": 3980, "Grid": 3981, "\"+": 3982, "children": 3983, "Ġsure": 3984, "TEXT": 3985, "Ġsee": 3986, "amera": 3987, "USE": 3988, "Ġexpression": 3989, "Ġsupport": 3990, "]=": 3991, "licit": 3992, "xFF": 3993, "fill": 3994, "constant": 3995, "Domain": 3996, "sv": 3997, "chron": 3998, "border": 3999, "Ġam": 4000, "drv": 4001, "operator": 4002, "loy": 4003, "Ġdif": 4004, "()).": 4005, "OG": 4006, "Ġ\"-": 4007, "pattern": 4008, "Transaction": 4009, "where": 4010, "Ġdown": 4011, "bn": 4012, "}.": 4013, "atom": 4014, "RoleSize": 4015, "socket": 4016, "packet": 4017, "hi": 4018, "Ġour": 4019, "Ġenum": 4020, "ragment": 4021, "Packet": 4022, "win": 4023, "WORD": 4024, "åĪ": 4025, "irm": 4026, "ling": 4027, "Ġ'',": 4028, "ayload": 4029, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 4030, "Elements": 4031, "42": 4032, "PS": 4033, "Ġshort": 4034, "pg": 4035, "HER": 4036, "gor": 4037, "ĠNo": 4038, "Member": 4039, "Idx": 4040, "Ġheaders": 4041, "SUC": 4042, "Editor": 4043, "Av": 4044, "Ġconfiguration": 4045, "www": 4046, "Ġ\"#": 4047, "Track": 4048, "Ġvirtual": 4049, "Ġdec": 4050, "ĠTask": 4051, "acy": 4052, "XML": 4053, "Ret": 4054, "ĠNot": 4055, "LS": 4056, "]['": 4057, "Contains": 4058, "NUM": 4059, "Single": 4060, "Ġinclude": 4061, "Edit": 4062, "way": 4063, "Uint": 4064, "Ġfn": 4065, "disable": 4066, "Ġbl": 4067, "dbg": 4068, "undefined": 4069, "URI": 4070, "utes": 4071, "Ġignore": 4072, "lain": 4073, "WE": 4074, "setup": 4075, "Ġtf": 4076, "Ġ\"<": 4077, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 4078, "Ġ\".": 4079, "tail": 4080, "ãĥ": 4081, "vided": 4082, "support": 4083, "ped": 4084, "Selector": 4085, "thon": 4086, "ssible": 4087, "getValue": 4088, "ĠTime": 4089, "LINE": 4090, "Ġstep": 4091, "shot": 4092, "ions": 4093, "dt": 4094, "Lower": 4095, "Ġobjects": 4096, "plugin": 4097, "Ġsince": 4098, "Ġ',": 4099, "Ġoptional": 4100, "ited": 4101, "Panel": 4102, "dat": 4103, "proxy": 4104, "derer": 4105, "96": 4106, "ĠCON": 4107, "Ġ(!$": 4108, "dw": 4109, "ordin": 4110, "pair": 4111, "moved": 4112, "`.": 4113, "foreach": 4114, "EQ": 4115, "UD": 4116, "VALUE": 4117, "dc": 4118, "nr": 4119, "gra": 4120, "Ġskip": 4121, "(__": 4122, "UL": 4123, "PUT": 4124, "example": 4125, "Ġreplace": 4126, "Network": 4127, "cell": 4128, "Vo": 4129, "oly": 4130, "Ġconsole": 4131, "culate": 4132, "Ġsuper": 4133, "resp": 4134, "QT": 4135, "gorith": 4136, "75": 4137, "ertific": 4138, "80211": 4139, "ired": 4140, "Require": 4141, "ĠSee": 4142, "Bits": 4143, "Ġvector": 4144, "MC": 4145, "__,": 4146, "BY": 4147, "ĉĉĉĊ": 4148, "HTTP": 4149, "Ġthey": 4150, "product": 4151, "Ġdoesn": 4152, "ories": 4153, "Ġequal": 4154, "ferent": 4155, "NdEx": 4156, "random": 4157, "à¸": 4158, "ims": 4159, "ii": 4160, "arge": 4161, "Prop": 4162, ":'": 4163, "Ġ'\"": 4164, "tf": 4165, "REQ": 4166, "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd": 4167, "ĠSD": 4168, "Mapping": 4169, ")*": 4170, "Stop": 4171, "MB": 4172, "aved": 4173, "Ge": 4174, "issing": 4175, "alt": 4176, "Ġshape": 4177, "apture": 4178, "Ġotherwise": 4179, "admin": 4180, "Lib": 4181, "olute": 4182, "Ġdirect": 4183, "ĉĉĉĠĠĠ": 4184, "NC": 4185, "slot": 4186, "txt": 4187, ")\",": 4188, "DC": 4189, "llation": 4190, ")[": 4191, "https": 4192, "ialization": 4193, "cx": 4194, "Selection": 4195, "ĠOP": 4196, "Ġimplement": 4197, "ested": 4198, "Ġencoding": 4199, "edit": 4200, "ĠNote": 4201, "redential": 4202, "plat": 4203, "Ġcontains": 4204, "sample": 4205, "Namespace": 4206, "Ġund": 4207, "scan": 4208, "Layer": 4209, "OPT": 4210, "Ġaut": 4211, "keep": 4212, "inner": 4213, "destroy": 4214, "PECT": 4215, "ĠPy": 4216, "Ġcreated": 4217, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 4218, "Events": 4219, "Ġ'-": 4220, "ĠURL": 4221, "Api": 4222, "Raw": 4223, "Ġ[],": 4224, "ynchron": 4225, "ĠĠĠĠĠĠĠĠĠĠĠĠĊ": 4226, "Ab": 4227, "reference": 4228, "legate": 4229, "Plugin": 4230, "Ġ{};": 4231, "ECT": 4232, "HTML": 4233, "Ġsave": 4234, "Ġdomain": 4235, "bed": 4236, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 4237, "NotNull": 4238, "WRITE": 4239, "neg": 4240, "Ġcharacter": 4241, "pped": 4242, "Ins": 4243, "Ġstop": 4244, "merge": 4245, "Ġconnect": 4246, "Profile": 4247, "ips": 4248, "email": 4249, "bottom": 4250, "Ġbeing": 4251, "201": 4252, "CTRL": 4253, "ressed": 4254, "{@": 4255, "month": 4256, "book": 4257, "ĠBO": 4258, "Boolean": 4259, "execute": 4260, "46": 4261, "BL": 4262, "cheme": 4263, "Ġgl": 4264, "utable": 4265, "AtA": 4266, "ability": 4267, "toggle": 4268, "nb": 4269, "password": 4270, "Job": 4271, "sig": 4272, "selected": 4273, "Any": 4274, "Ġcontaining": 4275, "Category": 4276, "Simple": 4277, "Ġexit": 4278, "system": 4279, "jQuery": 4280, "real": 4281, "since": 4282, "Ġscript": 4283, "success": 4284, "mouse": 4285, "namespace": 4286, "Ġadded": 4287, "mock": 4288, "CM": 4289, "Ġ15": 4290, "cn": 4291, "FT": 4292, "legal": 4293, "contains": 4294, "ancellation": 4295, "bin": 4296, "vision": 4297, "proc": 4298, "Ġlines": 4299, "II": 4300, "97": 4301, "Results": 4302, "Ġraw": 4303, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb": 4304, "eeded": 4305, "transform": 4306, "ambda": 4307, "import": 4308, "etime": 4309, "events": 4310, "adow": 4311, "Ġsupported": 4312, "ĠOut": 4313, "Ġactive": 4314, "Man": 4315, "Red": 4316, "DEFAULT": 4317, "Ġthrough": 4318, "sock": 4319, "Pair": 4320, "Ġ``": 4321, "graph": 4322, "GF": 4323, "DIR": 4324, "Ġproperties": 4325, "Ġ[[": 4326, "æľ": 4327, "Ġcannot": 4328, "LECT": 4329, "Move": 4330, "Ġdefine": 4331, "MENT": 4332, "sq": 4333, "NEL": 4334, "acters": 4335, "ĠSk": 4336, ":{": 4337, "CTL": 4338, "adding": 4339, "trl": 4340, "complete": 4341, "Ġrender": 4342, "SUCCESS": 4343, "constructor": 4344, "common": 4345, "Ġhelp": 4346, "application": 4347, "transition": 4348, "')->": 4349, "Save": 4350, "85": 4351, "Scroll": 4352, "POST": 4353, "Ġselect": 4354, "LED": 4355, "fin": 4356, "ade": 4357, "DIS": 4358, "Ġcollection": 4359, "Br": 4360, "45": 4361, "ĠUse": 4362, "${": 4363, "Double": 4364, "icrosoft": 4365, "afe": 4366, "after": 4367, "Should": 4368, "87": 4369, "crement": 4370, "ES": 4371, "Tx": 4372, "fw": 4373, "Binding": 4374, "Standard": 4375, "inherit": 4376, "ĠDefault": 4377, "results": 4378, "Align": 4379, "()),": 4380, "EC": 4381, "After": 4382, "ĠHTTP": 4383, "ĠKey": 4384, "Ġ();": 4385, "dered": 4386, "\"/>": 4387, "Ġagain": 4388, "zz": 4389, "47": 4390, "tm": 4391, "prom": 4392, "attach": 4393, "ITY": 4394, "Ġpattern": 4395, "Bool": 4396, "Ġcorrect": 4397, "dig": 4398, "clean": 4399, "ves": 4400, "Ġlike": 4401, "Ġattributes": 4402, "codec": 4403, "then": 4404, "Ġwithout": 4405, "ACT": 4406, "Shape": 4407, "Success": 4408, "'re": 4409, "batch": 4410, "mount": 4411, "PATH": 4412, "Ġchunk": 4413, "itive": 4414, "scription": 4415, "track": 4416, "Ġxml": 4417, "****************************************************************": 4418, "CMD": 4419, ",-": 4420, "That": 4421, "JS": 4422, "author": 4423, "ta": 4424, "MIN": 4425, "60": 4426, "parameters": 4427, "aj": 4428, "aterial": 4429, "ĠParam": 4430, "leted": 4431, "El": 4432, "Pri": 4433, "Ġsb": 4434, "Ġnodes": 4435, "cing": 4436, "etrics": 4437, "gorithm": 4438, "errors": 4439, "avig": 4440, "gnore": 4441, "Ġselector": 4442, "Import": 4443, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 4444, "ADD": 4445, "Ġasync": 4446, "Ġsection": 4447, "Word": 4448, "Ġproject": 4449, "conv": 4450, "Depth": 4451, "hr": 4452, "ators": 4453, "pd": 4454, "Ġprovided": 4455, "[^": 4456, "ually": 4457, "delay": 4458, "Cap": 4459, "\\\":": 4460, "Clear": 4461, "Ġwriter": 4462, "Condition": 4463, "Ġexports": 4464, "Ġselected": 4465, "symbol": 4466, "MAP": 4467, "validate": 4468, "ĠText": 4469, "Ġbegin": 4470, "bose": 4471, "Ġrandom": 4472, "Ġscale": 4473, "reshold": 4474, "async": 4475, "INS": 4476, "loop": 4477, "RX": 4478, "zone": 4479, "Ġbr": 4480, "matches": 4481, "VERSION": 4482, "apshot": 4483, "Ġgoto": 4484, "Ġbutton": 4485, "ĠAt": 4486, "sr": 4487, "Ġinstead": 4488, "ĠCode": 4489, "YX": 4490, "lide": 4491, "Pers": 4492, "Ġip": 4493, "DateTime": 4494, "Wrapper": 4495, "Ġclean": 4496, "Ġsocket": 4497, "Ġentity": 4498, "enabled": 4499, "pret": 4500, "Insert": 4501, "acity": 4502, "rypt": 4503, "argument": 4504, "Ġbetween": 4505, "ĠQString": 4506, "before": 4507, "Cmd": 4508, "bp": 4509, "Database": 4510, "ĠTrans": 4511, "Ġsequence": 4512, "Ġalways": 4513, "addClass": 4514, "icate": 4515, "MSG": 4516, "DF": 4517, "sure": 4518, "Highlight": 4519, "Ġ1000": 4520, "ĠNode": 4521, "nodes": 4522, "Ġinternal": 4523, "IVE": 4524, "åIJ": 4525, "ulate": 4526, "ends": 4527, "cv": 4528, "ik": 4529, "AI": 4530, "Ġwrit": 4531, "(\"/": 4532, "pending": 4533, "Ġexists": 4534, "direct": 4535, "------------------------------------------------------------------------": 4536, "ploy": 4537, "Ġplatform": 4538, "ertificate": 4539, "schema": 4540, "Ids": 4541, "Free": 4542, "AV": 4543, "\">'": 5103, "force": 5104, "Ġrect": 5105, "Private": 5106, "Media": 5107, "Ġunit": 5108, "lation": 5109, "Points": 5110, "Ġ'')": 5111, "HighlightRules": 5112, "ga": 5113, "WA": 5114, "Children": 5115, "route": 5116, "Bound": 5117, "Ġapplication": 5118, "Ġtests": 5119, "Day": 5120, "Annot": 5121, "MAC": 5122, "ĠOpen": 5123, "uted": 5124, "Permission": 5125, "Ġinte": 5126, "PRO": 5127, "ĠRequest": 5128, "Rad": 5129, "ĠSQL": 5130, "kt": 5131, "roid": 5132, "Ġrv": 5133, "mediate": 5134, "ĠCal": 5135, "indent": 5136, ")},": 5137, "Ġdescription": 5138, "EB": 5139, "disabled": 5140, "Ġabs": 5141, "Ġbatch": 5142, "Ġcharacters": 5143, "them": 5144, "Py": 5145, "Ġmove": 5146, "ĠPR": 5147, "Ġentries": 5148, "ĠValid": 5149, "Reset": 5150, "aff": 5151, "Ġpred": 5152, "Ġpri": 5153, "Ġyield": 5154, "Sw": 5155, "Ġass": 5156, "Ġcons": 5157, "java": 5158, "ĠIR": 5159, "llegal": 5160, "[\\": 5161, "ById": 5162, "pred": 5163, "interval": 5164, "CRE": 5165, "gle": 5166, "áĥ": 5167, "lx": 5168, "Mesh": 5169, "QTtBQUN": 5170, "pcm": 5171, "Enable": 5172, "Details": 5173, "checked": 5174, "ĠHe": 5175, "IX": 5176, "UNT": 5177, "So": 5178, "tle": 5179, "PIO": 5180, "activ": 5181, "(:": 5182, "Stats": 5183, "axis": 5184, "DMA": 5185, "Ġextra": 5186, "MenuItem": 5187, "ĠjQuery": 5188, "Unmarshal": 5189, "Ġtoo": 5190, "tect": 5191, "Ġsplit": 5192, "Syscall": 5193, "Ġtool": 5194, "ĠXXX": 5195, "Ġelseif": 5196, "Ġui": 5197, "ensure": 5198, "{$": 5199, "Route": 5200, "mapping": 5201, "Sets": 5202, "rtl": 5203, "race": 5204, "yp": 5205, "Ġevery": 5206, "ze": 5207, "Transition": 5208, "hidden": 5209, "lack": 5210, "Ġman": 5211, "Ġdriver": 5212, "quires": 5213, "83": 5214, "Rows": 5215, "Ġtrack": 5216, "alias": 5217, "impl": 5218, "arted": 5219, "EP": 5220, "loaded": 5221, "Own": 5222, ":/": 5223, "Ġthese": 5224, "HA": 5225, "Ġuntil": 5226, "NONE": 5227, "grid": 5228, "æķ°": 5229, "Ġapply": 5230, "Ġpackage": 5231, "Ġpossible": 5232, "mer": 5233, "Tags": 5234, "apped": 5235, "Ġdepend": 5236, "\")]": 5237, "Exists": 5238, "trim": 5239, "lause": 5240, "matrix": 5241, "BT": 5242, "Ġvm": 5243, "Ġhttps": 5244, "Allow": 5245, "vid": 5246, "power": 5247, "ĠPL": 5248, "wm": 5249, "Sql": 5250, "Loop": 5251, "Ġbar": 5252, "REE": 5253, "rot": 5254, "ĠVALUE": 5255, "Password": 5256, "forEach": 5257, "ler": 5258, "help": 5259, "uplic": 5260, "Vec": 5261, "ĠStart": 5262, "Instruction": 5263, "scri": 5264, "virtual": 5265, "Join": 5266, "Sort": 5267, "su": 5268, "DT": 5269, "æĸ": 5270, "Ġspecific": 5271, "Ġargv": 5272, "Ġ{{": 5273, "Publish": 5274, "IGHT": 5275, "username": 5276, "...)": 5277, "Constants": 5278, "ĠBOOST": 5279, "Ġpool": 5280, "parts": 5281, "Report": 5282, "QTtBQUNBO": 5283, "Arch": 5284, "vok": 5285, "Ġ\"[": 5286, "Enumerable": 5287, "Ġmatches": 5288, "Ġwithin": 5289, "AUT": 5290, "Pixel": 5291, "strict": 5292, "ĠInvalid": 5293, "ĠRemove": 5294, "Slot": 5295, "World": 5296, "master": 5297, "Ġassign": 5298, "Framework": 5299, "ĠSub": 5300, "rieve": 5301, "Ġ'_": 5302, "Assign": 5303, "eff": 5304, "vd": 5305, "compare": 5306, "cessed": 5307, "cookie": 5308, "Ġconn": 5309, "Ġindent": 5310, "Ġemit": 5311, "ough": 5312, "Split": 5313, "payload": 5314, "PHP": 5315, "iddle": 5316, "freq": 5317, "Ġmethods": 5318, "Ġdw": 5319, "Ġ'#": 5320, "loader": 5321, "Abs": 5322, "orizont": 5323, "Random": 5324, "ĠInteger": 5325, "Ġchain": 5326, "+=": 5327, "Feature": 5328, "ĠLoad": 5329, "Cluster": 5330, "Ġhigh": 5331, "remote": 5332, "Ġcell": 5333, "Ġenabled": 5334, "Volume": 5335, "profile": 5336, "tokens": 5337, "Ġdescriptor": 5338, "Ġdelta": 5339, "Ġdig": 5340, "SV": 5341, "Ġconstant": 5342, "ands": 5343, "isEmpty": 5344, "Ġdiv": 5345, "Required": 5346, "Endpoint": 5347, "Execute": 5348, "variant": 5349, "ĠDelete": 5350, "imate": 5351, "Machine": 5352, "Ġreport": 5353, "Ġllvm": 5354, "job": 5355, "cer": 5356, "Ġmock": 5357, "(\"./": 5358, "Ġcommon": 5359, "rp": 5360, "ridge": 5361, "Native": 5362, "seg": 5363, "Controls": 5364, "Vert": 5365, "USER": 5366, "Ġsender": 5367, "]:": 5368, "anner": 5369, "INSERT": 5370, "trib": 5371, "Ġskb": 5372, "Language": 5373, "Ġ{\"": 5374, "tw": 5375, "nl": 5376, "Ġindic": 5377, "*(": 5378, "Lookup": 5379, "ĠSo": 5380, "createElement": 5381, "Ġsprintf": 5382, "\"==": 5383, "ĠOp": 5384, "groups": 5385, "Ignore": 5386, "Ob": 5387, "åħ": 5388, "havior": 5389, "ĠHttp": 5390, "extra": 5391, "Ġslot": 5392, "izes": 5393, "ents": 5394, "aut": 5395, "vance": 5396, "YW": 5397, "Static": 5398, "Ġsetting": 5399, "dl": 5400, "layers": 5401, "ving": 5402, "Ġecho": 5403, "Generic": 5404, "manager": 5405, "Ġdepth": 5406, "Edge": 5407, "Ġisinstance": 5408, "entries": 5409, "QUFDQTtBQUNBO": 5410, "Ġfill": 5411, "Ġfix": 5412, "loor": 5413, "Ġsyscall": 5414, "hook": 5415, "FFFF": 5416, "Bounds": 5417, "unct": 5418, "YY": 5419, "Ġusb": 5420, "Generated": 5421, "inished": 5422, "Ġregion": 5423, "Ġclock": 5424, "andid": 5425, "OFFSET": 5426, "Ġelem": 5427, ":!": 5428, "optional": 5429, "supported": 5430, "Ġ::": 5431, "pers": 5432, "BASE": 5433, "Month": 5434, "getId": 5435, "IFT": 5436, "ĠForm": 5437, "Help": 5438, "Ġfailure": 5439, "eners": 5440, "Attach": 5441, "voc": 5442, "Ġfin": 5443, "xc": 5444, "ycle": 5445, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": 5446, "decl": 5447, "objects": 5448, "ench": 5449, "Emit": 5450, "aaaaaaaa": 5451, "Ġkeep": 5452, "alf": 5453, "Ġdiff": 5454, "Gl": 5455, "!==": 5456, "Decode": 5457, "orizontal": 5458, "=!": 5459, "none": 5460, "builder": 5461, "(['": 5462, "Now": 5463, "ĠAct": 5464, "ithub": 5465, "Release": 5466, "Disk": 5467, "INK": 5468, "ioc": 5469, "ĠComp": 5470, "\\/": 5471, "UEST": 5472, "[-": 5473, "ĠRes": 5474, "ĠGFP": 5475, "+'": 5476, "Ġplugin": 5477, "jection": 5478, "Ġpipe": 5479, "ĉĠĠĠĠĠ": 5480, "70": 5481, "ĠAS": 5482, "************************************************************************": 5483, "Mac": 5484, "ĠJS": 5485, "Ġwhat": 5486, "Bean": 5487, "Ġcursor": 5488, "TF": 5489, "Try": 5490, "gative": 5491, "entral": 5492, "Ġgenerated": 5493, "Arguments": 5494, "Ġapi": 5495, "à¥": 5496, "agic": 5497, "hci": 5498, "Ġ--------": 5499, "Ġsignal": 5500, "paren": 5501, "Owner": 5502, "58": 5503, "LD": 5504, "illi": 5505, "abc": 5506, "tim": 5507, "Ġcalls": 5508, "tb": 5509, "ĠMem": 5510, "ĠId": 5511, "Elem": 5512, "ĠBlock": 5513, "PM": 5514, "Chain": 5515, "(\"../": 5516, "Throw": 5517, "HR": 5518, "78": 5519, "Ren": 5520, "Ġtab": 5521, "ied": 5522, "gc": 5523, "valuate": 5524, "Bind": 5525, "sumer": 5526, "ermin": 5527, "Unexpected": 5528, "parameter": 5529, "ĠRaw": 5530, "aN": 5531, "atalog": 5532, "PARAM": 5533, "pf": 5534, "writer": 5535, "Ġ\"+": 5536, "ĠField": 5537, "erred": 5538, "utdown": 5539, "iNdEx": 5540, "Ġob": 5541, "Ġinode": 5542, "Chunk": 5543, "tries": 5544, ".,": 5545, "AF": 5546, "Objects": 5547, "Ġmeta": 5548, "depend": 5549, "Ġprotected": 5550, "Te": 5551, "Fix": 5552, ");\\": 5553, "dn": 5554, "dim": 5555, "required": 5556, "ĠPre": 5557, "prepare": 5558, "Effect": 5559, "requency": 5560, "Ġpriv": 5561, "Columns": 5562, "Ġcontroller": 5563, "Ġpresent": 5564, "clus": 5565, "BLOCK": 5566, "unique": 5567, "~~": 5568, "Multi": 5569, "nv": 5570, "å®": 5571, "Ġremoved": 5572, "ĠRegister": 5573, "getInstance": 5574, "Animation": 5575, "entication": 5576, "Ġtuple": 5577, "Ġpixel": 5578, "53": 5579, "ured": 5580, "install": 5581, "protocol": 5582, "Ġsent": 5583, "ĠWindow": 5584, "Ġmenu": 5585, "Ġvalidate": 5586, "Ġ\")": 5587, "EventListener": 5588, "pointer": 5589, "contents": 5590, "CUR": 5591, "center": 5592, "Ġ${": 5593, "pell": 5594, "WIN": 5595, "ours": 5596, "VR": 5597, "writel": 5598, "EVENT": 5599, "ampl": 5600, "BC": 5601, "Ġ([]": 5602, "directory": 5603, "hc": 5604, "çĶ": 5605, "Year": 5606, "ident": 5607, "Ġprotocol": 5608, "Identity": 5609, "ĠLOG": 5610, "THOD": 5611, "dist": 5612, "blocks": 5613, "Exit": 5614, "kit": 5615, "Ġplayer": 5616, "Ġet": 5617, "Ġps": 5618, "Ġvariables": 5619, "Depend": 5620, "Frac": 5621, "DEF": 5622, "fil": 5623, "serv": 5624, "Binary": 5625, "Validation": 5626, "MON": 5627, "SULT": 5628, "ĠMethod": 5629, "edge": 5630, "umb": 5631, "Ġsuch": 5632, "Groups": 5633, "kg": 5634, "StatusCode": 5635, "cf": 5636, "Failure": 5637, "($_": 5638, "ullable": 5639, "IDE": 5640, "Ġmetadata": 5641, "TRACE": 5642, "ĉĉĉĠĠ": 5643, "FFER": 5644, "Complete": 5645, "IMP": 5646, "Ġsig": 5647, "'=>": 5648, "SUB": 5649, "watch": 5650, "asc": 5651, "SHIFT": 5652, "rpc": 5653, "Ġparsed": 5654, "ĉĉĉĠ": 5655, "Gen": 5656, "generate": 5657, "cancel": 5658, ">,": 5659, "ometh": 5660, "ategy": 5661, "Ġtrace": 5662, "encies": 5663, "ony": 5664, "KERNEL": 5665, "ARG": 5666, "_(": 5667, ">.": 5668, "omething": 5669, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 5670, "Direct": 5671, "which": 5672, "riteria": 5673, "Repository": 5674, "It": 5675, "Ġedge": 5676, "Background": 5677, "Ġpayload": 5678, "allet": 5679, "Ġextract": 5680, "Ġusage": 5681, "bove": 5682, "82": 5683, "Rot": 5684, "hex": 5685, "Cancel": 5686, "ĠNumber": 5687, "ones": 5688, "will": 5689, "notify": 5690, "Ġjob": 5691, "++]": 5692, "Driver": 5693, "curr": 5694, "console": 5695, "dot": 5696, "ĉĉĠĠĠĠĠĠ": 5697, "roke": 5698, "################": 5699, "FLO": 5700, "catch": 5701, "ĠSC": 5702, "na": 5703, "Ġ')": 5704, "vp": 5705, "Ġavoid": 5706, "concat": 5707, "Ġvec": 5708, "DOM": 5709, "rong": 5710, "Ġcorrespon": 5711, "memset": 5712, "kely": 5713, "precated": 5714, "92": 5715, "Note": 5716, "ĠBuild": 5717, "Ġstill": 5718, "bucket": 5719, "login": 5720, "high": 5721, "dropdown": 5722, "Ġruntime": 5723, "Ġpassword": 5724, "Operator": 5725, "GRO": 5726, "BYTE": 5727, "?(": 5728, "ĠHash": 5729, "Video": 5730, "orth": 5731, "FALSE": 5732, "ĠReset": 5733, "eds": 5734, "clone": 5735, "ĠAND": 5736, "Axis": 5737, "nn": 5738, "Cor": 5739, "Ġarch": 5740, "}\"": 5741, "GER": 5742, "Ġjava": 5743, "Ġnative": 5744, "holder": 5745, "CAP": 5746, "Angle": 5747, "got": 5748, "ĠASSERT": 5749, ">\"": 5750, "sym": 5751, "boot": 5752, "Tests": 5753, "åŃ": 5754, "Bundle": 5755, "olved": 5756, "HERE": 5757, "Ġbus": 5758, "Lines": 5759, "Ġ\";": 5760, "Ġmember": 5761, "è¿": 5762, "Methods": 5763, "play": 5764, "Ġfd": 5765, "reply": 5766, "Ġrad": 5767, "Ġtags": 5768, "Win": 5769, "ĉĉĉĉĠĠĠ": 5770, "Ġ14": 5771, "Ġmat": 5772, "Pred": 5773, "clu": 5774, "Compare": 5775, "cessary": 5776, "ĠRT": 5777, "(\"#": 5778, "UV": 5779, "cogn": 5780, "Zone": 5781, "attrs": 5782, "Ġallowed": 5783, "Ġtri": 5784, "numeric": 5785, "signal": 5786, "Ġ13": 5787, "Ġimg": 5788, "}),": 5789, "Ġrepresentation": 5790, "itespace": 5791, "Ġct": 5792, "509": 5793, "LY": 5794, "oted": 5795, "classes": 5796, "unch": 5797, "Ġrows": 5798, "Ġcm": 5799, "Ġfprintf": 5800, "Ġpci": 5801, "Ġway": 5802, "xl": 5803, "Ġidentifier": 5804, "Ġtheir": 5805, "chart": 5806, ":\"\\\\": 5807, "51": 5808, "Tick": 5809, "upper": 5810, "ĠFROM": 5811, "EventArgs": 5812, "Ġeditor": 5813, "ĠDebug": 5814, "ĉĉĉĠĠĠĠĠĠ": 5815, "tempt": 5816, "Ġsq": 5817, "chedul": 5818, "Ġ}\\": 5819, "Ġ{'": 5820, "factory": 5821, "modules": 5822, "/,": 5823, "?\"": 5824, "like": 5825, "ĠMMM": 5826, "cbiAg": 5827, "Ġrelease": 5828, "writ": 5829, "Filename": 5830, "Unlock": 5831, "ĠClose": 5832, "spi": 5833, "Cast": 5834, "SHA": 5835, "Ġhapp": 5836, "Ġsimple": 5837, "theme": 5838, "istrib": 5839, "Opt": 5840, "Ġcc": 5841, "helper": 5842, "Std": 5843, "tok": 5844, "Usage": 5845, "\\\",": 5846, "Ġrelative": 5847, "echo": 5848, "Ġschema": 5849, "Direction": 5850, "ĠOutput": 5851, "Ġonce": 5852, "pixel": 5853, "gd": 5854, "аÐ": 5855, "allel": 5856, "GA": 5857, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 5858, "Ġattach": 5859, "еÐ": 5860, "=$": 5861, "oot": 5862, "DM": 5863, "Ġverify": 5864, "Ġmatched": 5865, "METHOD": 5866, "Ġhead": 5867, "ĠServer": 5868, "Play": 5869, "Virtual": 5870, "CFG": 5871, "tk": 5872, "ĠRun": 5873, "Instr": 5874, "Ġla": 5875, "Ġcontents": 5876, "ĠDateTime": 5877, "ĠView": 5878, "Ġmonth": 5879, "panel": 5880, "ĉĉĠ": 5881, "padding": 5882, "ĠINTO": 5883, "TRAN": 5884, "starts": 5885, "Push": 5886, "ULE": 5887, "Bottom": 5888, "resses": 5889, "greg": 5890, "NET": 5891, "AST": 5892, "Ġwarning": 5893, "Site": 5894, "Real": 5895, "Ġleast": 5896, "LAN": 5897, "columns": 5898, "ĠEd": 5899, "Ġtrain": 5900, "Ġappro": 5901, "ĠJson": 5902, "'.$": 5903, "==\"": 5904, "usage": 5905, "covery": 5906, "Make": 5907, "Java": 5908, "ases": 5909, "Ġsock": 5910, "pkt": 5911, "Ġtimer": 5912, "lite": 5913, "Shader": 5914, "cut": 5915, ".(": 5916, "HW": 5917, "sin": 5918, "ĠWhen": 5919, "speed": 5920, "68": 5921, "direction": 5922, "Ġsz": 5923, "ifest": 5924, "Ġrunning": 5925, "elements": 5926, "duration": 5927, ")){": 5928, "Ġtimes": 5929, "eval": 5930, "Common": 5931, "expression": 5932, "inline": 5933, "HAND": 5934, "ĠDMA": 5935, "lict": 5936, "rev": 5937, "Sheet": 5938, "Ġrate": 5939, "^\\": 5940, "Ġdisable": 5941, ":`": 5942, "Ġdestination": 5943, "Fill": 5944, "RET": 5945, "Setup": 5946, "tick": 5947, "Ġwire": 5948, "Ġlua": 5949, "Ġsec": 5950, "Props": 5951, "Fixed": 5952, "DBG": 5953, "substring": 5954, "'].": 5955, "webpack": 5956, "Ġ30": 5957, ":]": 5958, "strcmp": 5959, "exist": 5960, ";}": 5961, "NN": 5962, "ĠLL": 5963, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 5964, "Ġmessages": 5965, "alert": 5966, "71": 5967, "Ġts": 5968, "åĬ": 5969, "netdev": 5970, "UB": 5971, "Ġlp": 5972, "ĠContext": 5973, "imitive": 5974, "ture": 5975, "Author": 5976, "Ġforce": 5977, "tests": 5978, "accept": 5979, "Dictionary": 5980, "Information": 5981, "CATE": 5982, "ĠCH": 5983, "DEX": 5984, "policy": 5985, "cluded": 5986, "methods": 5987, "FIX": 5988, "zer": 5989, "LETE": 5990, "RESULT": 5991, "ĠProcess": 5992, "Ġhw": 5993, ",'": 5994, "Ġsu": 5995, "Ġweb": 5996, "Seconds": 5997, "ĠDis": 5998, "flat": 5999, "IsNull": 6000, "Ġslice": 6001, "Ġlow": 6002, "Material": 6003, "Ġneeds": 6004, "Ġscan": 6005, "Remote": 6006, "weight": 6007, "Batch": 6008, "emon": 6009, "Marker": 6010, "arty": 6011, "Ġlower": 6012, "SSL": 6013, "Dig": 6014, "progress": 6015, "Ġprogram": 6016, "ĠConsole": 6017, "SCR": 6018, "zA": 6019, "idi": 6020, "ho": 6021, "soc": 6022, "Ġkernel": 6023, "LOB": 6024, "itude": 6025, "Ġblocks": 6026, "Modified": 6027, "sy": 6028, "Prev": 6029, "Ġdimension": 6030, "CONTR": 6031, "EST": 6032, "QUAL": 6033, "Atom": 6034, "Console": 6035, "gon": 6036, "atomic": 6037, "rypto": 6038, "ĠVALUES": 6039, "93": 6040, "98": 6041, "att": 6042, "ĠSource": 6043, "road": 6044, "ube": 6045, "ĠOther": 6046, "that": 6047, "strings": 6048, "grade": 6049, "rf": 6050, "Ġmight": 6051, "ĠValueError": 6052, "Shared": 6053, "agement": 6054, "Ġbinary": 6055, "relation": 6056, "math": 6057, "ĠPCI": 6058, "Ġassociated": 6059, ")-": 6060, "]\",": 6061, "ĠDOM": 6062, "Ġ<-": 6063, "NotFound": 6064, "Ġanother": 6065, "oment": 6066, "Audio": 6067, "front": 6068, "serialize": 6069, "äº": 6070, "Ġbuff": 6071, "BUFFER": 6072, "Ġvert": 6073, "VO": 6074, "tion": 6075, "istribution": 6076, "95": 6077, "Big": 6078, "Ġuses": 6079, "encoder": 6080, "Ġcp": 6081, "ĠVer": 6082, "Counter": 6083, "collapse": 6084, "ĠImage": 6085, "Ġdefinition": 6086, "Face": 6087, "Ġdid": 6088, "Ġlayout": 6089, "Ġsim": 6090, "Registry": 6091, "ĠOptional": 6092, "iform": 6093, "65": 6094, "iom": 6095, "Ġinterrupt": 6096, "reater": 6097, "Ġmaximum": 6098, "å¤": 6099, "channels": 6100, "zure": 6101, "\\'": 6102, ">';": 6103, "Ġgen": 6104, "Ġchildren": 6105, "ا": 6106, "SM": 6107, ":[{": 6108, "inheritdoc": 6109, "Ġfinally": 6110, "Ġoccur": 6111, "defaults": 6112, "ef": 6113, "utor": 6114, "ulator": 6115, "Locale": 6116, ">(\"": 6117, "changed": 6118, "CPU": 6119, ")\"": 6120, "ELD": 6121, "hl": 6122, "è®": 6123, "lua": 6124, "selection": 6125, "ĠArrayList": 6126, "TRY": 6127, "seed": 6128, "Ġarr": 6129, ">=": 6130, "marks": 6131, "Literal": 6132, "91": 6133, "&#": 6134, "days": 6135, "rece": 6136, "users": 6137, "Ġrequested": 6138, "Ġ#{": 6139, "commit": 6140, "au": 6141, "Ġ50": 6142, "123": 6143, "Indent": 6144, "ysis": 6145, "anaged": 6146, "ĠUN": 6147, "Ġtrigger": 6148, "vn": 6149, "URCE": 6150, "CLASS": 6151, "Ġcore": 6152, "Ġmeans": 6153, "ĠBuffer": 6154, "Drop": 6155, "Ġmac": 6156, "compile": 6157, "/{": 6158, "Ġyet": 6159, "High": 6160, "Tile": 6161, "Ġrout": 6162, "ble": 6163, "Merge": 6164, "ipher": 6165, "ĠMI": 6166, "untry": 6167, "Anchor": 6168, "ĠLe": 6169, "plan": 6170, "Focus": 6171, "Ġident": 6172, "Ġvia": 6173, "Ġ';": 6174, "Scene": 6175, "Ġscroll": 6176, "inc": 6177, "æĺ": 6178, "istic": 6179, "Ġdist": 6180, "Ġsubstr": 6181, "plot": 6182, "dent": 6183, "CLK": 6184, "mented": 6185, "GetType": 6186, "ĠResult": 6187, "game": 6188, "Ġeven": 6189, "inte": 6190, "\"].": 6191, "visible": 6192, "Ġpers": 6193, "TS": 6194, "hasClass": 6195, "ĠInitialize": 6196, "Ġbad": 6197, "ĠSize": 6198, "SUPP": 6199, "phys": 6200, "lave": 6201, "Ġ'[": 6202, "iro": 6203, "ette": 6204, "Ġlibc": 6205, "getOperand": 6206, "Hex": 6207, "Functions": 6208, "æĪ": 6209, "outer": 6210, "Ġinitialize": 6211, "UG": 6212, "Ġknow": 6213, "Ġer": 6214, "igr": 6215, "mk": 6216, "compress": 6217, "63": 6218, "PTR": 6219, "pector": 6220, "Timestamp": 6221, "Ġcfg": 6222, "Services": 6223, "Ġss": 6224, "parison": 6225, "Family": 6226, "Ns": 6227, "72": 6228, "Ġensure": 6229, "dispatch": 6230, "Ġatom": 6231, "ifo": 6232, "timestamp": 6233, "ĠSend": 6234, "__);": 6235, "Ġcompare": 6236, "OwnProperty": 6237, "ĠColor": 6238, ")+": 6239, "Suf": 6240, "deep": 6241, "angular": 6242, "unctuation": 6243, "Ġselection": 6244, "unknown": 6245, "84": 6246, "Ġcast": 6247, "-------": 6248, "lm": 6249, "Program": 6250, "verify": 6251, "ĉĉĉĉĠ": 6252, "Ġ).": 6253, "Ġresources": 6254, "GEN": 6255, "Ġparts": 6256, "ĠIndex": 6257, "Ġabove": 6258, "Ġms": 6259, "edi": 6260, "Ġpush": 6261, "Ġ*=": 6262, "RM": 6263, "Ġside": 6264, "binary": 6265, "Pod": 6266, "UINT": 6267, "ks": 6268, "Ġlistener": 6269, "Ġdirection": 6270, "FLAGS": 6271, "|\\\\": 6272, "SERVER": 6273, "isc": 6274, ">::": 6275, "Diff": 6276, "OBJECT": 6277, "Origin": 6278, "DAY": 6279, "Ġbest": 6280, "Ġwere": 6281, "RV": 6282, "!!": 6283, "Ġupdated": 6284, "GROUP": 6285, "docs": 6286, "rdev": 6287, "Environment": 6288, "probe": 6289, "appendChild": 6290, "---": 6291, "medium": 6292, "feature": 6293, "ARD": 6294, "export": 6295, "IND": 6296, "]));": 6297, "xpr": 6298, "ĠPHPExcel": 6299, "SOURCE": 6300, "upload": 6301, "dx": 6302, "rive": 6303, "ASE": 6304, "icient": 6305, "Ġchanges": 6306, "Anim": 6307, "RED": 6308, "}]": 6309, "Available": 6310, "REF": 6311, "Ġeffect": 6312, "orig": 6313, "istics": 6314, ".\"\"\"": 6315, "Invoke": 6316, "same": 6317, "Ġnothing": 6318, "Ġunique": 6319, "transaction": 6320, "Ġtensor": 6321, "ĉĉĉĉĠĠ": 6322, "Styles": 6323, "URN": 6324, "images": 6325, "Unm": 6326, "drvdata": 6327, "Signature": 6328, "ather": 6329, "submit": 6330, "]],": 6331, "ords": 6332, "YPE": 6333, "ĉĠĠ": 6334, "Ġgrid": 6335, "Setting": 6336, "ĠQt": 6337, "peer": 6338, "Ġ102": 6339, "sf": 6340, "sta": 6341, "Ġpt": 6342, "NODE": 6343, "Ġmp": 6344, "Term": 6345, "RS": 6346, "alled": 6347, "simple": 6348, "62": 6349, "Ġcluster": 6350, "LOC": 6351, "ĠRawSyscall": 6352, "cg": 6353, "nippet": 6354, "Ġtokens": 6355, "Guid": 6356, "Ġpromise": 6357, "Ok": 6358, "Ġfeature": 6359, "ĠMy": 6360, "ĠToken": 6361, "cert": 6362, "Ġbt": 6363, "](": 6364, "CALL": 6365, "FN": 6366, "Ġdrm": 6367, "utex": 6368, "ĠAd": 6369, "Ġdat": 6370, "ategories": 6371, "hp": 6372, "Segment": 6373, "malloc": 6374, "Alias": 6375, "Ġproxy": 6376, "verted": 6377, "raise": 6378, "){\"": 6379, "Ġpadding": 6380, "Ġdrop": 6381, "Ġdelay": 6382, "COUNT": 6383, "Ġduring": 6384, "ĠassertThat": 6385, "endor": 6386, "ilities": 6387, "beta": 6388, "Ġcolumns": 6389, "Ġsql": 6390, "ront": 6391, "Done": 6392, "Ġremote": 6393, "ĠService": 6394, "ulk": 6395, "Culture": 6396, "ĠResponse": 6397, "lies": 6398, "Ġuri": 6399, "VAR": 6400, "come": 6401, "ĠJava": 6402, "Ġge": 6403, "zon": 6404, "bine": 6405, "dy": 6406, "Delegate": 6407, "94": 6408, "cout": 6409, "Ġadditional": 6410, "(/\\": 6411, "Renderer": 6412, "lc": 6413, "ifies": 6414, "()}": 6415, "ĠAction": 6416, "refs": 6417, "Ġcurrently": 6418, "Card": 6419, "mr": 6420, "ĠCC": 6421, "margin": 6422, "Ġcompute": 6423, "strlen": 6424, "REQUEST": 6425, "istration": 6426, "ula": 6427, "paths": 6428, "Ġspecial": 6429, "amd": 6430, "Ġlabels": 6431, "DEVICE": 6432, "precision": 6433, "PARE": 6434, "Ġrx": 6435, "Ġcounter": 6436, "Sock": 6437, "Ġacc": 6438, "Receive": 6439, "Center": 6440, "Supported": 6441, "definition": 6442, "sprintf": 6443, "ĠXml": 6444, "Ġ(((": 6445, "DP": 6446, "wer": 6447, "Ġpad": 6448, "labels": 6449, "cos": 6450, "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd": 6451, "MIT": 6452, "Ġrot": 6453, "Validate": 6454, "jd": 6455, "Printf": 6456, "Suite": 6457, "PAGE": 6458, "Rec": 6459, "Head": 6460, "Ġmost": 6461, "bg": 6462, "Ġ\"_": 6463, "oop": 6464, "........": 6465, "Delay": 6466, "panded": 6467, "Dst": 6468, "Ġ256": 6469, "eded": 6470, "ĠPer": 6471, ",\\": 6472, "factor": 6473, "Ġstorage": 6474, "Messages": 6475, "bat": 6476, "ĠUSB": 6477, "001": 6478, "CATEG": 6479, "mesh": 6480, "Ġinner": 6481, "Ġ-----": 6482, "ĠOper": 6483, "Opcode": 6484, "(\"<": 6485, "Ġdecl": 6486, "ĠElement": 6487, "available": 6488, "Character": 6489, "Ġimplementation": 6490, "gate": 6491, "('\\": 6492, "Ġmissing": 6493, "Ġsmall": 6494, "ĉĉĠĠ": 6495, "PHY": 6496, "origin": 6497, "'+": 6498, "alette": 6499, "Ġreason": 6500, "Ġabstract": 6501, "racket": 6502, "ĠParameters": 6503, "Flow": 6504, "two": 6505, "Ġmatching": 6506, "alth": 6507, "multi": 6508, "Email": 6509, "Ġiterator": 6510, "IA": 6511, "******/": 6512, "Ġlanguage": 6513, "'\",": 6514, "panic": 6515, "Ġicon": 6516, "Ġmd": 6517, "uses": 6518, "TIM": 6519, "CAC": 6520, ")?|": 6521, "errno": 6522, "LowerCase": 6523, "fixed": 6524, "ĠMachine": 6525, "9999": 6526, "dialog": 6527, "filters": 6528, "BACK": 6529, "iltin": 6530, "Ġenumer": 6531, "ĠMock": 6532, ".',": 6533, "Border": 6534, "setting": 6535, "Microsoft": 6536, "IRQ": 6537, "Decimal": 6538, "ĠCopy": 6539, "unregister": 6540, "ĠIRQ": 6541, "Ġdtype": 6542, "Ġcard": 6543, "getLine": 6544, "PROP": 6545, "tile": 6546, "FW": 6547, "ARRAY": 6548, "Ġloaded": 6549, "initial": 6550, "ĠPrint": 6551, "Ġ*(": 6552, "CSS": 6553, "EXPR": 6554, "fully": 6555, "Ġaws": 6556, "Nil": 6557, "Ġday": 6558, "kwargs": 6559, "PROT": 6560, "Sound": 6561, "nav": 6562, "nsnippet": 6563, "ios": 6564, "Ġnecessary": 6565, "GTH": 6566, "rapped": 6567, "xa": 6568, "Ġconstructor": 6569, "043": 6570, "aws": 6571, "Ġpc": 6572, "Ġiss": 6573, "getMessage": 6574, "aving": 6575, "ANCE": 6576, "Checked": 6577, "@@@@@": 6578, "Into": 6579, "sequence": 6580, "Ġesc": 6581, "//------------------------------------------------------------------------": 6582, "resources": 6583, "Ġorg": 6584, "setValue": 6585, "ĉĉĉĠĠĠĠ": 6586, "Self": 6587, "epCopy": 6588, "Ġhold": 6589, "COMP": 6590, "stdout": 6591, "wb": 6592, "('<": 6593, "Put": 6594, "ssl": 6595, "Ġengine": 6596, "ĠOr": 6597, "History": 6598, "Entries": 6599, "Break": 6600, "orest": 6601, "Poly": 6602, "Bad": 6603, "HJ": 6604, "RECT": 6605, "wx": 6606, "ao": 6607, "cluster": 6608, "Platform": 6609, "Ġadapter": 6610, "Div": 6611, "Ñĥ": 6612, "avigation": 6613, "folder": 6614, "locity": 6615, "BER": 6616, "Ġcs": 6617, "Ġdma": 6618, "Ġprovider": 6619, "PRINT": 6620, "74": 6621, "Upper": 6622, "Ġvideo": 6623, "hy": 6624, "feed": 6625, ".');": 6626, "Ġlater": 6627, "Admin": 6628, "uspend": 6629, "expects": 6630, "serial": 6631, "ĉĠĠĠĠ": 6632, "Ġhard": 6633, "Ġprovide": 6634, "CATEGORY": 6635, "getAttribute": 6636, "Ġims": 6637, "Fragment": 6638, "ordinates": 6639, "transport": 6640, "LOAD": 6641, "uplicate": 6642, "Ġdetermin": 6643, "VF": 6644, "Ġutil": 6645, "cover": 6646, "Ġrt": 6647, "300": 6648, "xxx": 6649, "Ġseq": 6650, "Ġface": 6651, "configuration": 6652, "peg": 6653, "SSION": 6654, "cursive": 6655, "using": 6656, "Variant": 6657, "Pipe": 6658, "vf": 6659, "Ġ'(": 7160, "Opts": 7161, "Ipv": 7162, "ibling": 7163, "ĠConstant": 7164, "Ġnegative": 7165, "volume": 7166, "mV": 7167, "getData": 7168, "SEL": 7169, "tuple": 7170, "Ġmean": 7171, "ĠFIX": 7172, "tbl": 7173, "Extra": 7174, "getParent": 7175, "LONG": 7176, "ismatch": 7177, "Ġretval": 7178, "Tex": 7179, "plugins": 7180, "ively": 7181, "Dimension": 7182, "Ġ\"\")": 7183, "world": 7184, "Ġcases": 7185, "ĉĉĉĉĉĉĉĉĉ": 7186, "Present": 7187, "TestCase": 7188, "Login": 7189, "Ġendpoint": 7190, "Where": 7191, "Initialize": 7192, "Library": 7193, "ron": 7194, "Could": 7195, "Ġprofile": 7196, "NaN": 7197, "sess": 7198, "79": 7199, "frag": 7200, "Ġbottom": 7201, "voice": 7202, "radius": 7203, "ĉĉĉĉĊ": 7204, "Ġchip": 7205, "ĠGoogle": 7206, "ĠPl": 7207, "Ġgp": 7208, "fire": 7209, "DED": 7210, "Hook": 7211, "Export": 7212, "Used": 7213, "Ġworld": 7214, "transfer": 7215, "xe": 7216, "tty": 7217, "question": 7218, "Resolver": 7219, "REAM": 7220, "AMP": 7221, "hasOwnProperty": 7222, "UST": 7223, "Validator": 7224, "Ġieee": 7225, "Ġdynamic": 7226, "Ġinside": 7227, "çĶ¨": 7228, "Ġlang": 7229, "Ġproper": 7230, "pact": 7231, "Ġregisters": 7232, "FX": 7233, "missions": 7234, "GLOBAL": 7235, "ĠChar": 7236, "ipping": 7237, "Ġvo": 7238, "inux": 7239, "Ġ'{": 7240, "ĠThread": 7241, "Activ": 7242, "vertex": 7243, "des": 7244, "Ġcx": 7245, "Ġseed": 7246, "AK": 7247, "Ġsafe": 7248, "mix": 7249, "interrupt": 7250, "disk": 7251, "Ġexpr": 7252, "laim": 7253, "irty": 7254, "Ġunset": 7255, "Arr": 7256, "segment": 7257, "Factor": 7258, "enchmark": 7259, "redirect": 7260, "pping": 7261, "Ġ\"--": 7262, "preventDefault": 7263, "ae": 7264, "ĠFirst": 7265, "Ġclk": 7266, "getCurrent": 7267, "Cannot": 7268, "Ġrules": 7269, "Ġupper": 7270, "GUIC": 7271, "pexpr": 7272, "ITH": 7273, "inputs": 7274, "IsNullOr": 7275, "Ġlambda": 7276, "Ġedit": 7277, "ucce": 7278, "letion": 7279, ">\",": 7280, "Ġinputs": 7281, "VEL": 7282, "clip": 7283, "ĠMO": 7284, "ital": 7285, "Graphics": 7286, "/******/": 7287, "ĠAc": 7288, "xs": 7289, "pause": 7290, "when": 7291, "ĠMarshal": 7292, "Dynamic": 7293, "Switch": 7294, "ird": 7295, "Phys": 7296, "repeat": 7297, "need": 7298, "Bitmap": 7299, "ov": 7300, "slide": 7301, "ric": 7302, "rome": 7303, "HI": 7304, "cleanup": 7305, "amount": 7306, "Ġfil": 7307, "Ġdetermine": 7308, "Secret": 7309, "Alignment": 7310, "ĠTEST": 7311, "identifier": 7312, "sid": 7313, "Ġcookie": 7314, "æį": 7315, "Ġpin": 7316, ">',": 7317, "XY": 7318, "Gets": 7319, "Ġinstall": 7320, "COLOR": 7321, "effect": 7322, "Ġ..": 7323, "Asset": 7324, "Ġstarting": 7325, "apon": 7326, "surface": 7327, "UNK": 7328, "browser": 7329, "Inner": 7330, "okies": 7331, "subject": 7332, "duce": 7333, "ĠTra": 7334, "ĠRef": 7335, "ĉĉĠĠĠĠ": 7336, "NV": 7337, "ĠVis": 7338, "Ġborder": 7339, "Alpha": 7340, "/************************************************************************": 7341, "Transfer": 7342, "Ġclick": 7343, "Ġfolder": 7344, "Signal": 7345, "GUICtrl": 7346, "heel": 7347, "translate": 7348, "Ġrequires": 7349, "Generate": 7350, "Ġcenter": 7351, "Ġsl": 7352, "cryption": 7353, "Ġagainst": 7354, "USH": 7355, "ittle": 7356, "ĠWindows": 7357, "radient": 7358, "ever": 7359, "para": 7360, "scape": 7361, "nc": 7362, "LTER": 7363, "illiseconds": 7364, "crypted": 7365, "Ġescape": 7366, "Apply": 7367, "123456": 7368, ".(*": 7369, "Ġlogging": 7370, "Ġgr": 7371, "Ġins": 7372, "HH": 7373, "stride": 7374, "Promise": 7375, "Ġsite": 7376, "Ġseg": 7377, "IAL": 7378, "Ġusers": 7379, "ether": 7380, "bas": 7381, "ĠAttribute": 7382, "Ġpatch": 7383, "Ġes": 7384, "cons": 7385, "SIGN": 7386, "Priv": 7387, "Ġ{},": 7388, "ENC": 7389, "uce": 7390, "Gui": 7391, "poly": 7392, "Times": 7393, "Ġenvironment": 7394, "Optional": 7395, "Ġfixed": 7396, "Ġwords": 7397, "Tokens": 7398, "RU": 7399, "ster": 7400, "agon": 7401, "Ġ40": 7402, "expand": 7403, "Ġpolicy": 7404, "ĠTable": 7405, "typ": 7406, "Ġorigin": 7407, "aries": 7408, "frames": 7409, "Ġpages": 7410, "invoke": 7411, "HOST": 7412, "ĠLook": 7413, "Ġflush": 7414, "ni": 7415, "GO": 7416, "anit": 7417, "loss": 7418, "descriptor": 7419, "eries": 7420, "sep": 7421, "When": 7422, "Ms": 7423, ")$": 7424, "hello": 7425, "Ġtim": 7426, "Ġgame": 7427, "Rl": 7428, "HEADER": 7429, "Summary": 7430, "Chars": 7431, "Ġmouse": 7432, "ĠAddress": 7433, "Ġred": 7434, "family": 7435, "compute": 7436, "West": 7437, "Ġpoly": 7438, "pkg": 7439, "ĠMatch": 7440, "Plan": 7441, "NI": 7442, "ĠMMMM": 7443, "Ġsy": 7444, "ĠNO": 7445, "team": 7446, "clusive": 7447, "Week": 7448, "Proc": 7449, "norm": 7450, "xd": 7451, "Priority": 7452, "\\\">": 7453, "flash": 7454, "listener": 7455, "ĠGET": 7456, "::~": 7457, "dimension": 7458, "Ġcancel": 7459, "=-": 7460, "score": 7461, "ault": 7462, "ĠSw": 7463, "%%": 7464, "mitted": 7465, "Labels": 7466, "Ġzip": 7467, "texture": 7468, "ATOR": 7469, "Ġdefaults": 7470, "InputStream": 7471, "Payload": 7472, "Ġnamed": 7473, "ĠPa": 7474, "Ġmulti": 7475, "article": 7476, "VALID": 7477, "fake": 7478, "inf": 7479, "cluding": 7480, "ByName": 7481, "Ġactually": 7482, "cached": 7483, "Annotation": 7484, "some": 7485, "Ġtexture": 7486, "ĠSimple": 7487, "ĠThere": 7488, "Ġtransition": 7489, "RPC": 7490, "Speed": 7491, "Ġ\":": 7492, "Ġenough": 7493, "Ip": 7494, "Unable": 7495, ")',": 7496, "POS": 7497, "ĠSec": 7498, "æł": 7499, "*\\": 7500, "pub": 7501, "Ġduration": 7502, "CONNE": 7503, "ighb": 7504, "Enter": 7505, "Suffix": 7506, "Combo": 7507, "Ġdirectly": 7508, "UTE": 7509, "Relative": 7510, "haviour": 7511, "][$": 7512, "ship": 7513, "tpl": 7514, "spy": 7515, "lying": 7516, "Ġ%#": 7517, "Ġtimestamp": 7518, "strap": 7519, ">\";": 7520, "Ġ'''": 7521, "Ġsd": 7522, "Ġcurr": 7523, "sem": 7524, "Price": 7525, "fifo": 7526, "ĠWM": 7527, "Ġwatch": 7528, "sent": 7529, "OPEN": 7530, "caps": 7531, "ZERO": 7532, "ĠPAGE": 7533, "Ġmesh": 7534, "Detail": 7535, "irmware": 7536, "HV": 7537, "GC": 7538, "rg": 7539, "ĠYou": 7540, "cli": 7541, "uv": 7542, "Ġmedia": 7543, "datetime": 7544, "Ġflow": 7545, "ĠStringBuilder": 7546, "secret": 7547, "Ġdyn": 7548, "ĠStr": 7549, "IZ": 7550, "Ġcategory": 7551, "Ġremaining": 7552, "Ġmath": 7553, "Ġsa": 7554, "ĠModel": 7555, "logy": 7556, "connected": 7557, "prob": 7558, "Fore": 7559, "Dlg": 7560, "Ġdump": 7561, "Subject": 7562, "XXXX": 7563, "Ġhappen": 7564, "big": 7565, "seek": 7566, "ĠTypeError": 7567, "bot": 7568, "Ġnv": 7569, "Serializer": 7570, "pacing": 7571, "abb": 7572, "<=": 7573, "jax": 7574, "charset": 7575, "messageInfo": 7576, "rw": 7577, "================================================================": 7578, "ulated": 7579, "ĠWait": 7580, "Ġdialog": 7581, "Side": 7582, "Ġsomething": 7583, "Ġthose": 7584, "Ident": 7585, "69": 7586, "security": 7587, "sleep": 7588, "priate": 7589, "(()": 7590, "tun": 7591, "Ġjoin": 7592, "ĠValidate": 7593, "]?": 7594, "Include": 7595, "Dispose": 7596, "Snapshot": 7597, "irqsave": 7598, "marker": 7599, "Ġwell": 7600, "Trigger": 7601, "Ġ*_": 7602, "getMock": 7603, "uest": 7604, "([\"": 7605, "ĠResource": 7606, "Ġpb": 7607, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 7608, "partial": 7609, "Peer": 7610, "Foo": 7611, "Ġbackground": 7612, "argc": 7613, "Ap": 7614, "ĠCurrent": 7615, "CV": 7616, "ĉĉĉĉĠĠĠĠ": 7617, "Period": 7618, "Ġbucket": 7619, "Cloud": 7620, "cording": 7621, "Ġrecords": 7622, "fileName": 7623, "wake": 7624, "city": 7625, "fprintf": 7626, "Actions": 7627, "\\\\.": 7628, "isArray": 7629, "ĠURI": 7630, "Conv": 7631, "ĠFIXME": 7632, "л": 7633, "rier": 7634, "Codes": 7635, "ĠShould": 7636, "culation": 7637, "Original": 7638, "Codec": 7639, "Ġimages": 7640, "Hint": 7641, "ales": 7642, "plane": 7643, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 7644, "GT": 7645, "Google": 7646, "distance": 7647, "iw": 7648, "prag": 7649, "}'": 7650, "Ġcreates": 7651, "tor": 7652, "Processor": 7653, "inder": 7654, "Ly": 7655, "floor": 7656, "samples": 7657, "Ġ(($": 7658, "Accept": 7659, "ĉĠĠĠĠĠĠĠ": 7660, "Ġconversion": 7661, "ĠCur": 7662, "Bus": 7663, "RGB": 7664, "Extensions": 7665, "Ġpid": 7666, "Ġcached": 7667, "ĠExpression": 7668, "mf": 7669, "Dev": 7670, "ĠSV": 7671, "(&_": 7672, "verbose": 7673, "aching": 7674, "ĠĠĠĠĠĠĊ": 7675, "Ġperiod": 7676, "rase": 7677, "Ġpe": 7678, "Geometry": 7679, "ali": 7680, "Converter": 7681, "quival": 7682, "Tuple": 7683, "DL": 7684, "pragma": 7685, "special": 7686, "plain": 7687, "HO": 7688, "ĠAP": 7689, "++,": 7690, "dtype": 7691, "ĠWith": 7692, "ĠDep": 7693, "Classes": 7694, "Ġmm": 7695, "]\\": 7696, "VP": 7697, "Ġmanager": 7698, "Ġactiv": 7699, "Sprite": 7700, "enario": 7701, "Mail": 7702, "Ġ17": 7703, "})}": 7704, "Ġnone": 7705, "atile": 7706, "STD": 7707, "Ġjs": 7708, "Ġsepar": 7709, "seudo": 7710, "contact": 7711, "Ġbounds": 7712, "_)": 7713, "HB": 7714, "ĠiNdEx": 7715, "å¼": 7716, "Ġretry": 7717, "RW": 7718, "Ġ25": 7719, "Visual": 7720, "backdrop": 7721, "getText": 7722, "Ready": 7723, "xC": 7724, "Ġstride": 7725, "Ġclone": 7726, "Sym": 7727, "NUMBER": 7728, "Ġexact": 7729, "Ġbinding": 7730, "Worker": 7731, "relative": 7732, "sender": 7733, "Describe": 7734, "blue": 7735, "embed": 7736, "$_": 7737, "interpret": 7738, "currency": 7739, ">&": 7740, "dirfd": 7741, "QUE": 7742, "Ġspeed": 7743, "GPIO": 7744, "ells": 7745, "FRAME": 7746, "\"):": 7747, "dirty": 7748, "Ord": 7749, "EventHandler": 7750, "ota": 7751, "arrow": 7752, "csi": 7753, "SCRIPT": 7754, "ets": 7755, "Ġanimation": 7756, "Ġexplicit": 7757, "Strategy": 7758, "Ġalias": 7759, "BI": 7760, ",{": 7761, "getString": 7762, "sume": 7763, "Monitor": 7764, "Ġrs": 7765, "components": 7766, "scsi": 7767, "ĠAuth": 7768, "Trim": 7769, "raft": 7770, "ritical": 7771, "wrapper": 7772, "ino": 7773, "subscription": 7774, "pw": 7775, "publish": 7776, "walk": 7777, "Ġvolume": 7778, "Ġ19": 7779, "Ġadjust": 7780, "PLAY": 7781, "alan": 7782, "ĠEnable": 7783, "suffix": 7784, "preg": 7785, "times": 7786, "SF": 7787, "IntPtr": 7788, "WID": 7789, "Ġ[('": 7790, "zy": 7791, "ACTION": 7792, "CONT": 7793, "sha": 7794, "ysql": 7795, "pires": 7796, "Ġhelper": 7797, "fast": 7798, "ĠProperty": 7799, "coll": 7800, "Ġknown": 7801, "ĠSearch": 7802, "/.": 7803, "maj": 7804, "OutputStream": 7805, "Tensor": 7806, "Ġtermin": 7807, "pll": 7808, "DELETE": 7809, "Ġvertex": 7810, "Ġorig": 7811, "links": 7812, "cam": 7813, "price": 7814, "comments": 7815, "cision": 7816, "Ġprevent": 7817, "Ġprocessing": 7818, "Gu": 7819, "ĠCo": 7820, "ĠIntPtr": 7821, "ĠSY": 7822, "mean": 7823, ".\")": 7824, "Ġchecks": 7825, "Ġmodified": 7826, "DN": 7827, "Sig": 7828, "cpp": 7829, "NullException": 7830, "normalize": 7831, "Ġpartial": 7832, "LEVEL": 7833, "\"];": 7834, "Relation": 7835, "Blob": 7836, "Ġ18": 7837, "Padding": 7838, "mgr": 7839, "unmap": 7840, "riend": 7841, "deon": 7842, "Ñı": 7843, "Received": 7844, "ĠExample": 7845, "Ġregistered": 7846, "Ġexecution": 7847, "Notify": 7848, "Mapper": 7849, "fh": 7850, "Force": 7851, "Ġalgorithm": 7852, "ĠPython": 7853, "âĢĶ": 7854, "Ġtakes": 7855, "answer": 7856, "MAGE": 7857, "ĠLink": 7858, "folding": 7859, "git": 7860, "+-": 7861, "Aggreg": 7862, "ĠDon": 7863, "ĠSpec": 7864, "CACHE": 7865, "Ġ&$": 7866, "ajax": 7867, "Ġdel": 7868, "charAt": 7869, "Ġrestore": 7870, "Expect": 7871, "Called": 7872, "ye": 7873, "Ġbasic": 7874, "ODEV": 7875, "600": 7876, "mF": 7877, "Resolve": 7878, "branch": 7879, "intr": 7880, "ĠUint": 7881, "SN": 7882, "Radius": 7883, "Ġ(;": 7884, "assertFalse": 7885, "'ll": 7886, "WV": 7887, "isValid": 7888, "Serialize": 7889, "æĺ¯": 7890, "shadow": 7891, "ĠMage": 7892, "ĠARM": 7893, "Pending": 7894, "lapsed": 7895, "ĠSto": 7896, "Ġangle": 7897, "inv": 7898, "Ġcho": 7899, "Ġappropriate": 7900, "Ġ42": 7901, "ITION": 7902, "Extract": 7903, "Pay": 7904, "ĠFormat": 7905, "ĠSelect": 7906, "Heap": 7907, "Ġreject": 7908, "ised": 7909, "Dist": 7910, "USED": 7911, "LOW": 7912, "Loaded": 7913, "ping": 7914, "Ġetc": 7915, "Ġtw": 7916, "à®": 7917, "Ġnumbers": 7918, "nic": 7919, "MODULE": 7920, "override": 7921, "Ġattrs": 7922, "ĠSET": 7923, "Dot": 7924, "Ġyy": 7925, "Ġ----------": 7926, "åľ": 7927, "Ġdeleted": 7928, "*)(": 7929, "Zend": 7930, "rem": 7931, "codes": 7932, "Clean": 7933, "Ġbin": 7934, "grad": 7935, "åıĸ": 7936, "lk": 7937, "Instances": 7938, "Book": 7939, "в": 7940, "Ġquote": 7941, "ĠIter": 7942, "OperationException": 7943, "Ġĉ": 7944, "encoded": 7945, "Ġrb": 7946, "ĠNV": 7947, "400": 7948, "lare": 7949, "ventory": 7950, "Branch": 7951, "drag": 7952, "åº": 7953, "Primary": 7954, "ox": 7955, "tensor": 7956, "Ġbig": 7957, "Ġir": 7958, "Ġrtl": 7959, "yyyy": 7960, "MX": 7961, "Ġnr": 7962, "ï¿": 7963, "Ġignored": 7964, "Ġ(-": 7965, "incip": 7966, "Ġitself": 7967, "ĠERROR": 7968, "Ġtok": 7969, "Safe": 7970, "Ġlibrary": 7971, "Ġarrays": 7972, "Runner": 7973, "('_": 7974, "swap": 7975, ">()": 7976, "Ġ':": 7977, "TLS": 7978, "cols": 7979, "Ġmer": 7980, "insn": 7981, "ĠON": 7982, "ĠWork": 7983, "overflow": 7984, "Refresh": 7985, "Ġwrapper": 7986, "Ġoperations": 7987, "customer": 7988, "UnexpectedEOF": 7989, "unlikely": 7990, "substream": 7991, "igration": 7992, "ROW": 7993, "fade": 7994, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĊ": 7995, "uous": 7996, "Ġcommands": 7997, "Nullable": 7998, "most": 7999, "Parts": 8000, "ĠLT": 8001, "generator": 8002, "ifications": 8003, "Ġfails": 8004, "Ġcop": 8005, "sim": 8006, "ĠLine": 8007, "related": 8008, "ĠRegExp": 8009, "Fd": 8010, "Ġkw": 8011, "peated": 8012, "Pref": 8013, "COMPARE": 8014, "oct": 8015, "((*": 8016, "zalloc": 8017, "illis": 8018, "wire": 8019, "asy": 8020, "indices": 8021, "Ġ'/'": 8022, "tid": 8023, "Defaults": 8024, "ErrUnexpectedEOF": 8025, "Ġexplode": 8026, "onal": 8027, "rgb": 8028, "ores": 8029, "icator": 8030, "radio": 8031, "atient": 8032, "Master": 8033, "Ġmaster": 8034, "Chart": 8035, "Ġtyp": 8036, "Ġtre": 8037, "127": 8038, "Series": 8039, "ĠSave": 8040, "ĠERR": 8041, "ially": 8042, "GroupName": 8043, "mg": 8044, "WM": 8045, "BAD": 8046, "Absolute": 8047, "Canvas": 8048, "ĠGenerate": 8049, "erialize": 8050, "Ġinterval": 8051, "Ġindices": 8052, "ĉĉĉĉĠĠĠĠĠĠ": 8053, "bum": 8054, "ĠPack": 8055, "Weight": 8056, "Ġfuture": 8057, "789": 8058, "Ġdes": 8059, "Perform": 8060, "Ġauthor": 8061, "generic": 8062, "ĉĉĠĠĠĠĠ": 8063, "ANGE": 8064, "xD": 8065, "multip": 8066, "�": 8067, "lev": 8068, "uby": 8069, "BUS": 8070, "setText": 8071, "ĠSL": 8072, "MBB": 8073, "Reply": 8074, "agraph": 8075, "history": 8076, "ĠDocument": 8077, "basic": 8078, "Ġannot": 8079, "Ġcv": 8080, "\"])": 8081, "download": 8082, "AIL": 8083, "PG": 8084, "hour": 8085, "Writ": 8086, "tooltip": 8087, "Small": 8088, "getNum": 8089, "Inte": 8090, "Low": 8091, "lv": 8092, "Shell": 8093, "Ġrand": 8094, "ynth": 8095, "ATH": 8096, "wt": 8097, "xb": 8098, "locked": 8099, "Println": 8100, "Ġforward": 8101, "FLOAT": 8102, "ĠPromise": 8103, "æī": 8104, "Ġtransfer": 8105, "Zip": 8106, "sector": 8107, "ĠPos": 8108, "ano": 8109, "Final": 8110, "allen": 8111, "provide": 8112, "Customer": 8113, "ateway": 8114, "uncate": 8115, "VERIFY": 8116, "ORE": 8117, "Ġsummary": 8118, "Shadow": 8119, "ByteArray": 8120, "prod": 8121, "icense": 8122, "canvas": 8123, "Ġpeer": 8124, "ka": 8125, "reason": 8126, "EDIT": 8127, "Completed": 8128, "STREAM": 8129, "RB": 8130, "erase": 8131, "Endian": 8132, "Ġ\"{": 8133, "Margin": 8134, "FilePath": 8135, "regist": 8136, "Ġdf": 8137, "Ġplay": 8138, "running": 8139, "reverse": 8140, "Compiler": 8141, "eno": 8142, "mid": 8143, "oring": 8144, "Upload": 8145, "件": 8146, "amma": 8147, "Ġcleanup": 8148, "Pag": 8149, "Ġexternal": 8150, "RG": 8151, "parentNode": 8152, "ĠNow": 8153, "Allowed": 8154, "Ġassum": 8155, "ĠSign": 8156, "ism": 8157, "ENODEV": 8158, "Ġgenerator": 8159, "Power": 8160, "ĠInd": 8161, "Holder": 8162, "reflect": 8163, "best": 8164, "iding": 8165, "Ġpref": 8166, "Disable": 8167, "ĠLocal": 8168, "stit": 8169, "decimal": 8170, "Scheme": 8171, "aise": 8172, "You": 8173, "ĠContent": 8174, "AIN": 8175, "activity": 8176, "Members": 8177, "vr": 8178, "East": 8179, "Ġgets": 8180, "Ġdi": 8181, "topic": 8182, "Unique": 8183, "Ġimmediate": 8184, "processor": 8185, "Ġgoogle": 8186, "Ġlocale": 8187, "ĠEditor": 8188, "Ġsuccessful": 8189, "Ġjo": 8190, "nx": 8191, "(\",": 8192, "915": 8193, "Ġord": 8194, "ĠKEY": 8195, "ilation": 8196, "APP": 8197, "carousel": 8198, "FROM": 8199, "IndexOf": 8200, "SSAGE": 8201, "Org": 8202, "EF": 8203, "Ġeval": 8204, "sun": 8205, "Dll": 8206, "TypeId": 8207, "POINT": 8208, "ĠMain": 8209, "Ġ^=": 8210, "ifact": 8211, "ĠUTF": 8212, "Ġextends": 8213, "tagName": 8214, "Wnd": 8215, "fit": 8216, "Ġseries": 8217, "IsTrue": 8218, "present": 8219, "\"><": 8220, "AAAAAAAAAAAAAAAA": 8221, "vention": 8222, "Ġcreating": 8223, "192": 8224, "Ġnd": 8225, "Ġsoft": 8226, "Sm": 8227, "MONTH": 8228, "Ġpp": 8229, "Regex": 8230, "ĠARRAY": 8231, "Quote": 8232, "character": 8233, "Ġreceive": 8234, "moment": 8235, "Ġdisk": 8236, "Ġautomatic": 8237, "wind": 8238, "saved": 8239, "Paint": 8240, "Ġ]);": 8241, "Shift": 8242, "rain": 8243, "')])": 8244, "TabIndex": 8245, "////////////////////////////////////////////////////////////////": 8246, "ĠINT": 8247, "Lua": 8248, "ctr": 8249, "sWith": 8250, "Seq": 8251, "Fetch": 8252, "dataset": 8253, "Ġissue": 8254, "LK": 8255, "IsNullOrEmpty": 8256, "pdf": 8257, "Cho": 8258, "Curve": 8259, "Ġredirect": 8260, "[])": 8261, "ĠPage": 8262, "CEPT": 8263, "Ġclosed": 8264, "calc": 8265, "details": 8266, "Ġreading": 8267, "éĢ": 8268, "gered": 8269, "OPTION": 8270, "Ġdataset": 8271, "scheme": 8272, ")]],": 8273, "ToolStripMenuItem": 8274, "ĠNext": 8275, "mul": 8276, "Ġbitmap": 8277, "\\.": 8278, "Ġul": 8279, "ĠVerify": 8280, "ĠRect": 8281, "ĠGroup": 8282, "Ġusername": 8283, "_);": 8284, "Ġdot": 8285, "ĉĉĉĉĠĠĠĠĠ": 8286, "Ġest": 8287, "vered": 8288, "WOR": 8289, "Ġ}).": 8290, "INPUT": 8291, "ĠĠĠĊ": 8292, "Visibility": 8293, "SUPPORT": 8294, "Ġtouch": 8295, "ericht": 8296, "Ġextern": 8297, "Jl": 8298, "Ġhit": 8299, "mux": 8300, "ope": 8301, "grp": 8302, "________": 8303, "RES": 8304, "/\",": 8305, "0627": 8306, "}).": 8307, "quivalent": 8308, "rief": 8309, "MAN": 8310, "á": 8311, "cour": 8312, "Ġparsing": 8313, "More": 8314, "mv": 8315, "Ġconv": 8316, "home": 8317, "ligh": 8318, "ĠOR": 8319, "cesses": 8320, "FUNC": 8321, "bank": 8322, "lems": 8323, "ĠUINT": 8324, "ĠAb": 8325, "asing": 8326, "ĠFrame": 8327, "White": 8328, "âĢĶâĢĶ": 8329, "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": 8330, "å½": 8331, "Coord": 8332, "ĠMT": 8333, "Ġreply": 8334, "ORDER": 8335, "binding": 8336, "EqualTo": 8337, "Indices": 8338, "Reason": 8339, "Ġ31": 8340, "GetString": 8341, "popover": 8342, "/*!": 8343, "FG": 8344, "Ġready": 8345, "Ġcalculate": 8346, "ĠIEnumerable": 8347, ".%": 8348, "uf": 8349, "urnal": 8350, "ĠModule": 8351, "Ġmemcpy": 8352, "lared": 8353, "Ġturn": 8354, "istri": 8355, "ĠEntity": 8356, "wg": 8357, "Ġpartition": 8358, "destination": 8359, "Ġsamples": 8360, "Download": 8361, "Ġgroups": 8362, "FILTER": 8363, "ĠBIT": 8364, "ĠclassName": 8365, "may": 8366, "Ġlin": 8367, "ĠMin": 8368, "SCII": 8369, "Compute": 8370, ".)": 8371, "ç½": 8372, "iggered": 8373, "suite": 8374, "Unmarshaller": 8375, "Ġic": 8376, "UPDATE": 8377, "Ġcar": 8378, "ĠGlobal": 8379, "iffies": 8380, "dep": 8381, "posite": 8382, "Ġcause": 8383, "Ġ23": 8384, "series": 8385, "Ġremo": 8386, "ARCH": 8387, "amage": 8388, "ĠAny": 8389, "ĠPh": 8390, "tolower": 8391, "Li": 8392, "DX": 8393, "llvm": 8394, "cores": 8395, "Listeners": 8396, "Tip": 8397, "Press": 8398, "\"){": 8399, "animation": 8400, "(`": 8401, "Capture": 8402, "OLD": 8403, "capture": 8404, "vg": 8405, "RETURN": 8406, "Running": 8407, "abort": 8408, "Hello": 8409, "101": 8410, "stringify": 8411, "VS": 8412, "ĠApplication": 8413, "æį®": 8414, "Ġreceiver": 8415, "Feed": 8416, "archive": 8417, "Ġchecked": 8418, "BITS": 8419, "ĠBig": 8420, "å¯": 8421, "TIMEOUT": 8422, "Ġweight": 8423, "bundle": 8424, "trfs": 8425, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 8426, "Ġ\"(": 8427, "Ġaccording": 8428, "Ġallows": 8429, "services": 8430, "Clause": 8431, "aling": 8432, "Ġ~(": 8433, "Users": 8434, "Talk": 8435, "Ġsuffix": 8436, "Ġlarge": 8437, "adjust": 8438, "sources": 8439, "ĠNe": 8440, "addEventListener": 8441, "[_": 8442, "ĠCustom": 8443, "Flush": 8444, "ĠMAC": 8445, "Pur": 8446, "Ġvisible": 8447, "Ġtick": 8448, "Ġoverflow": 8449, "Percent": 8450, "Ġabsolute": 8451, "Algorithm": 8452, "ä¸Ģ": 8453, "Ġdx": 8454, "Commit": 8455, "ĠAST": 8456, "dummy": 8457, "Initial": 8458, "PROM": 8459, "guid": 8460, "[[": 8461, "ĠLong": 8462, "Ġaudio": 8463, "decoder": 8464, "Ġcomponents": 8465, "Ġrepresenting": 8466, "}{": 8467, "Css": 8468, "ĠTX": 8469, "baz": 8470, "Forward": 8471, "Ġnorm": 8472, "Ġwriting": 8473, "iface": 8474, "TM": 8475, "valueOf": 8476, "ampler": 8477, "ENTRY": 8478, "idual": 8479, "ARM": 8480, "Ġfl": 8481, "Partial": 8482, "ĠSND": 8483, "Ġnested": 8484, "Ġ\"\");": 8508, "Ġprimary": 8509, "Ġaround": 8510, "Ġcrypto": 8511, "ĠCR": 8512, "Ġgeneric": 8513, "ĠCentral": 8514, "updated": 8515, "Tim": 8516, "cture": 8517, "dll": 8518, "Ġcoll": 8519, "Ġnumpy": 8520, "ajor": 8521, "'d": 8522, "Loading": 8523, "Patch": 8524, "ĠLLVM": 8525, "============": 8526, "IOType": 8527, "'][$": 8528, "Keep": 8529, "Ġproc": 8530, "aking": 8531, "Ġsecurity": 8532, "Ġanything": 8533, "Ġ??": 8534, "white": 8535, "Ġmultip": 8536, "Mg": 8537, "band": 8538, "BS": 8539, "iq": 8540, "TestMethod": 8541, "getClass": 8542, "validator": 8543, "ĠBasic": 8544, "INST": 8545, "Ġsuite": 8546, "ros": 8547, "ĠDraw": 8548, "ĠRed": 8549, "SEP": 8550, "Ġdecimal": 8551, "Hz": 8552, "bio": 8553, "/'": 8554, "ĠHas": 8555, "have": 8556, "detail": 8557, "INTE": 8558, "ĠVM": 8559, "WAIT": 8560, "wi": 8561, "667": 8562, "ĠVersion": 8563, "Ġphy": 8564, "devices": 8565, "NEW": 8566, "ĠMVT": 8567, "usr": 8568, "disp": 8569, "Ġfilters": 8570, "iov": 8571, "Ġ'&": 8572, "vcpu": 8573, "lan": 8574, "CID": 8575, "Ġwalk": 8576, "km": 8577, "validation": 8578, "æĸĩ": 8579, "Ġssize": 8580, "xfer": 8581, "Ġib": 8582, "Ġinstances": 8583, "Ġdue": 8584, "ĠFilter": 8585, "('-": 8586, "visit": 8587, "Brush": 8588, "xfs": 8589, "Ġlim": 8590, "Retry": 8591, "lemented": 8592, "Mutex": 8593, "jb": 8594, "threshold": 8595, "åį": 8596, "ĠDictionary": 8597, "SizeInGB": 8598, "LEMENT": 8599, "//-----------------------------------------------------------------------------": 8600, "-%": 8601, "ably": 8602, "perm": 8603, "mous": 8604, "connector": 8605, "BAB": 8606, "Ġframes": 8607, "sembler": 8608, "anchor": 8609, "NOWN": 8610, "Install": 8611, ";)": 8612, "ensity": 8613, "Ġzone": 8614, "Ġhandled": 8615, "ĠHex": 8616, "failure": 8617, "getNode": 8618, "Enumerator": 8619, "Pane": 8620, "Ġ[]*": 8621, "umbn": 8622, "efficient": 8623, "strong": 8624, "Calendar": 8625, "FACE": 8626, "ĠMemory": 8627, "Keyword": 8628, "crease": 8629, "Ġchannels": 8630, "Ġrelated": 8631, "startswith": 8632, "LF": 8633, "Ġcomments": 8634, "ĠInsert": 8635, "insic": 8636, "Ġscalar": 8637, "Ġarchive": 8638, "finity": 8639, "ONT": 8640, "minor": 8641, "TMP": 8642, "ĠGUI": 8643, "ILD": 8644, "errupts": 8645, "Tasks": 8646, "ĠAlloc": 8647, "Ġminimum": 8648, "ters": 8649, "qr": 8650, "opcode": 8651, "BP": 8652, "ĠExp": 8653, "Accessor": 8654, "onymous": 8655, "CTOR": 8656, "Sim": 8657, "Many": 8658, "800": 8659, "Ġmodify": 8660, "ĠGraph": 8661, "registry": 8662, "ityEngine": 8663, "ically": 8664, "ograph": 8665, "framework": 8666, "Tmp": 8667, "AAA": 8668, "Ġconstruct": 8669, "Hub": 8670, "Ġfeatures": 8671, "Ġmet": 8672, "Ġcomm": 8673, "small": 8674, "Ġrec": 8675, "Ġpsz": 8676, "Round": 8677, "sensor": 8678, "anization": 8679, "lee": 8680, "1024": 8681, "EIO": 8682, "mine": 8683, "Popup": 8684, "Ġallocated": 8685, "servable": 8686, "ĠSymbol": 8687, "Tables": 8688, "BN": 8689, "digest": 8690, "Ġqual": 8691, "ilar": 8692, "SESSION": 8693, "GIN": 8694, "scalar": 8695, "ErrorCode": 8696, "ĠRecord": 8697, "é": 8698, "=\"'": 8699, "Ġ'.$": 8700, "typeparam": 8701, "к": 8702, "oline": 8703, "worker": 8704, "Two": 8705, "regmap": 8706, "inherits": 8707, "LEFT": 8708, "lator": 8709, "ToArray": 8710, "aves": 8711, "Ġkeyword": 8712, "ĠACE": 8713, "Ġctrl": 8714, "Ġvf": 8715, "CLO": 8716, "aaaaaaaaaaaaaaaa": 8717, "viders": 8718, "uk": 8719, "ĠPost": 8720, "library": 8721, "DWORD": 8722, "Ġagg": 8723, "atter": 8724, "Lex": 8725, "EMP": 8726, "Ġva": 8727, "achable": 8728, "ĠRange": 8729, "Matches": 8730, "cid": 8731, "Horizontal": 8732, "Particle": 8733, "LM": 8734, "Changes": 8735, "major": 8736, "linear": 8737, "Ġ!$": 8738, "(\"{": 8739, "Ġdeep": 8740, "oi": 8741, "ndef": 8742, "Rout": 8743, "Ġconverted": 8744, "Ġcnt": 8745, "Ġcanvas": 8746, "Theme": 8747, "Ġdestroy": 8748, "dif": 8749, "Clock": 8750, "uzz": 8751, "Qk": 8752, "Ġpol": 8753, "ĠwireType": 8754, "Ġhidden": 8755, "Ġprom": 8756, "xA": 8757, "ĠcancellationToken": 8758, "ulse": 8759, "forward": 8760, "Ġexport": 8761, "UNIT": 8762, "reserved": 8763, "Nl": 8764, "__)": 8765, "Ġplot": 8766, "TW": 8767, "hip": 8768, "Destination": 8769, "Ġtp": 8770, "ReadOnly": 8771, "Ġmachine": 8772, "lambda": 8773, "Ġring": 8774, "Ġ_.": 8775, "Example": 8776, "ctype": 8777, "Ġfactor": 8778, "AUTH": 8779, "DataType": 8780, "ĠTYPE": 8781, "Jy": 8782, "Ġabort": 8783, "ĠAL": 8784, "Eq": 8785, "PCI": 8786, "Ġ$('#": 8787, "jquery": 8788, "MESSAGE": 8789, "tools": 8790, "AUTO": 8791, "aX": 8792, "icast": 8793, "Score": 8794, "\",{": 8795, "incipal": 8796, "green": 8797, "FoldMode": 8798, "Kernel": 8799, "Ġ22": 8800, "Iss": 8801, "Ġspan": 8802, "Ġ----------------------------------------------------------------": 8803, "Ġblob": 8804, "Without": 8805, "ĠDeepCopy": 8806, "CREATE": 8807, "Sender": 8808, "(\"$": 8809, "bounds": 8810, "agento": 8811, "Ġ=================": 8812, "Ġsupplied": 8813, "targets": 8814, "062": 8815, "Partition": 8816, "javascript": 8817, "ĠBuilder": 8818, "|\"": 8819, "pod": 8820, "Defined": 8821, "promise": 8822, "orph": 8823, "\\\\\\\\": 8824, "[:,": 8825, "percent": 8826, "added": 8827, "Ġassume": 8828, "Than": 8829, "Ġdy": 8830, "brief": 8831, "Prepare": 8832, "LIMIT": 8833, "Analy": 8834, "VICE": 8835, "Mult": 8836, "ĠLO": 8837, "Utility": 8838, "ÑĮ": 8839, "Requests": 8840, "ampoline": 8841, ":\",": 8842, "IFI": 8843, "Multiple": 8844, "\\\":\\\"": 8845, "å°": 8846, "specific": 8847, "Js": 8848, ",_": 8849, "Throws": 8850, "Primitive": 8851, "South": 8852, "ĠCompute": 8853, "Conflict": 8854, "ĠSP": 8855, "2000": 8856, "Ġomp": 8857, "ZIP": 8858, "ARY": 8859, "('%": 8860, "ä¿": 8861, "Ġcharset": 8862, "lementation": 8863, "arb": 8864, "åĨ": 8865, "Ġvp": 8866, "Ġclip": 8867, "SOCK": 8868, "Ġphys": 8869, "allocate": 8870, "Ġcompleted": 8871, "ENCE": 8872, "Ġsuccessfully": 8873, "HD": 8874, "Implemented": 8875, "Ġoperand": 8876, "quant": 8877, "Ġimple": 8878, "Seg": 8879, "Ġæ": 8880, "Ġautorest": 8881, "mlink": 8882, "partition": 8883, "erms": 8884, "AMETER": 8885, "IDs": 8886, "Ġ!!": 8887, "ynchronous": 8888, "blog": 8889, "Fake": 8890, "sqrt": 8891, "Ġpriority": 8892, "ants": 8893, "erName": 8894, "éĩ": 8895, "Ġ*,": 8896, "inate": 8897, "toBe": 8898, "serted": 8899, "PLL": 8900, "CLE": 8901, "actor": 8902, "imize": 8903, "aring": 8904, "Ġverbose": 8905, "Ġgoog": 8906, "Colors": 8907, "_->": 8908, "Ġnetdev": 8909, "Ġprepare": 8910, "Ġ[{": 8911, "utation": 8912, "Ġbp": 8913, "LIB": 8914, "getC": 8915, "Wire": 8916, "Ġscore": 8917, "Outdent": 8918, "Ġops": 8919, "Azure": 8920, "Handlers": 8921, "rank": 8922, "Vol": 8923, "Ġmb": 8924, "Ġdiag": 8925, "ĠDec": 8926, "ĠMon": 8927, "Unicode": 8928, "(?=": 8929, "Ġpd": 8930, "DW": 8931, "Ġstdout": 8932, "Ġhandling": 8933, "Ġce": 8934, "foot": 8935, "tables": 8936, "åĩ": 8937, "OKEN": 8938, "gi": 8939, "Ġleg": 8940, "Disabled": 8941, "rss": 8942, "Nested": 8943, "Pt": 8944, "Ġsym": 8945, "ĠCO": 8946, "unicode": 8947, "localhost": 8948, "Ġimplemented": 8949, "(.": 8950, "osed": 8951, "Tools": 8952, "ĠEC": 8953, "Ġgreater": 8954, "Complex": 8955, "deepEqual": 8956, "Dump": 8957, "aper": 8958, "vie": 8959, "Ġworks": 8960, "1111": 8961, "oth": 8962, "Ġfinish": 8963, "stor": 8964, "Ġcommit": 8965, "monitor": 8966, "Ġ80": 8967, "ĠIllegalArgumentException": 8968, "EEK": 8969, "Ġbuffers": 8970, "EA": 8971, "ĠOffset": 8972, "Dat": 8973, "plus": 8974, "lazz": 8975, "written": 8976, "intel": 8977, ">)": 8978, "Ġacpi": 8979, "Ġattempt": 8980, "Ġlarg": 8981, "Ġinitialized": 8982, "ALIGN": 8983, "union": 8984, "ĠHeader": 8985, "Ġda": 8986, "ĠPTR": 8987, "ĠEqual": 8988, "diag": 8989, "('[": 8990, "Ġmlx": 8991, "NORM": 8992, "scene": 8993, "Ġpkg": 8994, "\"%": 8995, "Ġrespon": 8996, "Ġsubject": 8997, "pared": 8998, "phone": 8999, "ĠGame": 9000, "virt": 9001, "ĠDef": 9002, "Entities": 9003, "cepted": 9004, "sip": 9005, "repo": 9006, "ucer": 9007, "Threshold": 9008, "ĠsetTimeout": 9009, "Sem": 9010, "áŀ": 9011, "PIN": 9012, "ĠTag": 9013, "mn": 9014, "fA": 9015, "Ġhardware": 9016, "Pages": 9017, "UF": 9018, "Ġgood": 9019, "xp": 9020, "construct": 9021, "ĠInstruction": 9022, "TON": 9023, "()]": 9024, "?\\": 9025, "Ġschedule": 9026, "BF": 9027, "ious": 9028, "alg": 9029, "Extended": 9030, "extensions": 9031, "more": 9032, "boost": 9033, "TransitionEnd": 9034, "ĠNET": 9035, "ĠDevice": 9036, "DV": 9037, "python": 9038, "ر": 9039, "Ġproblem": 9040, "ĠDEFAULT": 9041, "ifs": 9042, "DESC": 9043, "archy": 9044, "TEMP": 9045, "cepts": 9046, "QUI": 9047, "PRI": 9048, "GP": 9049, "Ġbehavior": 9050, "Ġmt": 9051, "xffff": 9052, "commands": 9053, "ĠSO": 9054, "?.": 9055, "WER": 9056, "ĠThrow": 9057, "Ġactivity": 9058, "ĠCl": 9059, "��": 9060, "aken": 9061, "Hit": 9062, "Ġmade": 9063, "Ġsqlite": 9064, "Collision": 9065, "YP": 9066, "variables": 9067, "aker": 9068, "Ġembed": 9069, "affix": 9070, "OutOf": 9071, "Ġunicode": 9072, "Ġstrconv": 9073, "Ġfast": 9074, "Ġactions": 9075, "ä¸į": 9076, "ç½®": 9077, "Filters": 9078, "RUN": 9079, "MULT": 9080, ")((": 9081, "ordered": 9082, "Ġ'+": 9083, "atibility": 9084, "Ġear": 9085, "\"};": 9086, "ogram": 9087, "views": 9088, "structure": 9089, "Dependency": 9090, "Ġnb": 9091, "agation": 9092, "ACH": 9093, "ISD": 9094, "ĠEnsure": 9095, "WIDTH": 9096, "mob": 9097, "getContext": 9098, "Ġstrip": 9099, "REC": 9100, "ĠPHPUnit": 9101, "Actor": 9102, "FMT": 9103, "OUTPUT": 9104, "Quest": 9105, "Ġpairs": 9106, "DIV": 9107, "ention": 9108, "RESOURCE": 9109, "Ġdevices": 9110, "remarks": 9111, "NEXT": 9112, "iomem": 9113, "TODO": 9114, "Ġdc": 9115, "ieee": 9116, "Ġuid": 9117, "shader": 9118, "ĠSouth": 9119, "colors": 9120, "Ġ{$": 9121, "ĠSkip": 9122, "=_": 9123, "STOP": 9124, "NAL": 9125, "modified": 9126, "CONNECT": 9127, "cdev": 9128, "ffffff": 9129, "NON": 9130, "Matcher": 9131, "Ġfeed": 9132, "Components": 9133, "Ste": 9134, "RATE": 9135, "prog": 9136, "resume": 9137, "Ġroutine": 9138, "VV": 9139, "(/^": 9140, "Ġmarker": 9141, "Ġ'*": 9142, "Ġsupports": 9143, "NotFoundException": 9144, "emu": 9145, "ĠComponent": 9146, "ĠIE": 9147, "ен": 9148, "ĠCommon": 9149, "decor": 9150, "(':": 9151, "Records": 9152, "upted": 9153, "associ": 9154, "Ġupdates": 9155, "anging": 9156, "uages": 9157, "ste": 9158, "iso": 9159, "mime": 9160, "Subscription": 9161, "Ġchan": 9162, "Measure": 9163, "cmV": 9164, "usic": 9165, "uggest": 9166, ".')": 9167, "onom": 9168, "Ġfall": 9169, "ĠQCOMPARE": 9170, "Units": 9171, "Cnt": 9172, "vor": 9173, "ĠSI": 9174, "posed": 9175, "Ġ*)&": 9176, "smarty": 9177, "Suppress": 9178, "Ġcorrectly": 9179, "kb": 9180, "__.": 9181, "Ġ00": 9182, "Ġmult": 9183, "Ops": 9184, "DIRECT": 9185, "splice": 9186, "ITEM": 9187, "Ġdownload": 9188, "nel": 9189, "ONLY": 9190, "Ratio": 9191, "Ġweights": 9192, "PEG": 9193, "getKey": 9194, "Ġ500": 9195, "FORMATS": 9196, "~~~~": 9197, ")}}": 9198, "CNT": 9199, "Ġcompiler": 9200, "ATED": 9201, "crc": 9202, "Alert": 9203, "Comparison": 9204, "åŃĹ": 9205, "dh": 9206, "fm": 9207, "Ġ21": 9208, "tol": 9209, "Ġpanel": 9210, "Leg": 9211, "ĠfileName": 9212, "Closed": 9213, "uZ": 9214, "Consumer": 9215, "getElementById": 9216, "scriber": 9217, "ÙĦ": 9218, "LOCAL": 9219, "WF": 9220, "/',": 9221, "IsValid": 9222, "Updated": 9223, "attachment": 9224, "ARGET": 9225, "Ġpartic": 9226, "Behavior": 9227, "Chan": 9228, "absolute": 9229, "listen": 9230, "evaluate": 9231, "Ġpm": 9232, "<>();": 9233, "compos": 9234, "UC": 9235, "ĠAMD": 9236, "illa": 9237, "'>": 9238, "must": 9239, "ĠOK": 9240, "atar": 9241, "ĉĉĉĉĉĠĠĠ": 9242, "COMMAND": 9243, "Ġmx": 9244, "为": 9245, "CASE": 9246, "&&!": 9247, "ifndef": 9248, "BOOL": 9249, "atie": 9250, "TEXTURE": 9251, "separator": 9252, "ivot": 9253, "Ġexpand": 9254, "ĠInst": 9255, "'ve": 9256, "wards": 9257, "ĠPers": 9258, "Ġcr": 9259, "æķ°æį®": 9260, "CONF": 9261, "Ġconnected": 9262, "cognized": 9263, "2012": 9264, "Variables": 9265, "Ġ28": 9266, "Att": 9267, "Ġtargets": 9268, "Calling": 9269, "Ġappear": 9270, "Clone": 9271, "external": 9272, "conditions": 9273, ":])": 9274, "Configure": 9275, "Stub": 9276, "Ġdescribe": 9277, "Visitor": 9278, "'\"": 9279, "TRANS": 9280, "Ġfragment": 9281, "phase": 9282, "PREFIX": 9283, "rsp": 9284, "gICAg": 9285, "usters": 9286, "kill": 9287, "UTTON": 9288, "Ġparallel": 9289, "csv": 9290, "compressed": 9291, "Ġcompile": 9292, "Ġchars": 9293, "erial": 9294, "HZ": 9295, "Contain": 9296, "getProperty": 9297, "ATURE": 9298, "GPU": 9299, "()},": 9300, "Ġtesting": 9301, "ĠAnd": 9302, "aux": 9303, "Ġcapture": 9304, "Ġden": 9305, "Ġscpexpr": 9306, "reject": 9307, "Ġath": 9308, "DISABLE": 9309, "curl": 9310, "alancer": 9311, "Ġdesired": 9312, "SEC": 9313, "ĠConnection": 9314, "eat": 9315, "gSize": 9316, "Ġleading": 9317, "SIG": 9318, "ĠCount": 9319, "States": 9320, "ĠStack": 9321, "Ġsf": 9322, "qs": 9323, "Credentials": 9324, "SCA": 9325, "drm": 9326, "Ġdummy": 9327, "revision": 9328, "asci": 9329, "La": 9330, "Ġpur": 9331, "legacy": 9332, "vZ": 9333, "Ġfc": 9334, "ĠIB": 9335, "Operations": 9336, "ĠConfiguration": 9337, "Po": 9338, "Ġreally": 9339, "(\"_": 9340, "Ġfake": 9341, "ĠDouble": 9342, "Gr": 9343, "Pub": 9344, "unre": 9345, "Ġreverse": 9346, "Ġsin": 9347, "issue": 9348, "renderer": 9349, "Ġregular": 9350, "hz": 9351, "ante": 9352, "ons": 9353, "ĉĉĉĉĉĠĠ": 9354, "ssid": 9355, "tcbiAg": 9356, "iance": 9357, "posts": 9358, "Ġmodules": 9359, "Ġboot": 9360, "statement": 9361, "Ġimplode": 9362, "Ġdispatch": 9363, "Tracker": 9364, "ĠRet": 9365, "MR": 9366, "handlers": 9367, "Ġblk": 9368, "EW": 9369, "Constraints": 9370, "Kit": 9371, "lso": 9372, "rash": 9373, "ĠStop": 9374, "ium": 9375, "strn": 9376, "Ġtables": 9377, "trampoline": 9378, "ĠFloat": 9379, "buffers": 9380, "Translation": 9381, "../../": 9382, "ĠSSL": 9383, "hcd": 9384, "iness": 9385, "itter": 9386, "]}": 9387, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 9388, "Ġlonger": 9389, "atest": 9390, "StackTrace": 9391, "ĠStore": 9392, "UNKNOWN": 9393, "room": 9394, "ĠExit": 9395, "æĿ": 9396, "Ġincrement": 9397, "DataSource": 9398, "datepicker": 9399, "inger": 9400, "Ġsynchronized": 9401, "Multip": 9402, "ĠWP": 9403, "ipv": 9404, "QUF": 9405, "istogram": 9406, "Ġinstructions": 9407, "retry": 9408, "_[": 9409, "umbnail": 9410, "Ġinitialization": 9411, "unpack": 9412, "Ġ'.'": 9413, "ĠDescription": 9414, "Ġcss": 9415, "getTime": 9416, "slave": 9417, "ACTIVE": 9418, "@@@@@@@@": 9419, "Ġprocessed": 9420, "magic": 9421, "udc": 9422, "Ġinstalled": 9423, "REL": 9424, "isode": 9425, "HashCode": 9426, "æŀ": 9427, "ĠDI": 9428, "closed": 9429, "Ġradius": 9430, "ĠRender": 9431, "ĠRX": 9432, "Analysis": 9433, "Am": 9434, "Ġboost": 9435, "aps": 9436, "Catalog": 9437, "Diagnostics": 9438, "Sent": 9439, "UTC": 9440, "Observer": 9441, "Ġix": 9442, "unset": 9443, "(\"+": 9444, "parseInt": 9445, "isa": 9446, "lr": 9447, "\\\",\\\"": 9448, "Ep": 9449, "Combine": 9450, "SRC": 9451, "Ġve": 9452, "limiter": 9453, "glyph": 9454, "Ġuseful": 9455, "Ġseparator": 9456, "Ġbug": 9457, "ĠDEF": 9458, "ContentType": 9459, ",&": 9460, "Ġsurface": 9461, "Ġhalf": 9462, "Previous": 9463, "0001": 9464, "states": 9465, "aria": 9466, "calculate": 9467, "cost": 9468, "ACCESS": 9469, "Enc": 9470, "Ġliteral": 9471, "ĠCalculate": 9472, "Prototype": 9473, "nbsp": 9474, "uart": 9475, "ĠDest": 9476, "Ġbundle": 9477, "Models": 9478, "Ġadmin": 9479, "Ġhdr": 9480, "digit": 9481, "asmine": 9482, "veloper": 9483, "amaz": 9484, "Ġversions": 9485, "ĠDes": 9486, "ĠLen": 9487, "ĠAlso": 9488, "threads": 9489, "MPLE": 9490, "ientation": 9491, "Permissions": 9492, "Ndb": 9493, "ĠSetup": 9494, "[^\\": 9495, "ĠMust": 9496, "ĠSyntax": 9497, "vif": 9498, "CLI": 9499, "functions": 9500, "checkbox": 9501, "/\"": 9502, "TV": 9503, "Redirect": 9504, "covers": 9505, "Ġwon": 9506, "Ġsvn": 9507, "valuation": 9508, "HED": 9509, "Ġretrieve": 9510, "ĠClo": 9511, "prot": 9512, "avail": 9513, "ĠPop": 9514, "backend": 9515, "members": 9516, "called": 9517, "atable": 9518, "Ġglyph": 9519, "minInt": 9520, "heap": 9521, "svc": 9522, "Modifier": 9523, "Zoom": 9524, "[],": 9525, "Ġfw": 9526, "PublicKey": 9527, "maxFrac": 9528, "RIGHT": 9529, "posPre": 9530, "minFrac": 9531, "Reflection": 9532, "Known": 9533, "ĠTw": 9534, "ÙĨ": 9535, "named": 9536, "lgSize": 9537, "posSuf": 9538, "negPre": 9539, "negSuf": 9540, "Attachment": 9541, "MEMORY": 9542, "/^": 9543, "etype": 9544, "qt": 9545, "crypto": 9546, "Ġcy": 9547, "Ġ/=": 9548, "bw": 9549, "ĠPlugin": 9550, "ampling": 9551, "intf": 9552, "ables": 9553, "xE": 9554, "åIJį": 9555, "webkit": 9556, "?)": 9557, "camera": 9558, "ĠIEEE": 9559, "ational": 9560, "Expand": 9561, "Ġfit": 9562, "Matching": 9563, "NA": 9564, "Ġcf": 9565, "Hours": 9566, "ĠProject": 9567, "anted": 9568, "course": 9569, "Ġipv": 9570, "Preview": 9571, "Ġcout": 9572, "Ġalt": 9573, "Images": 9574, "fname": 9575, "unce": 9576, "XF": 9577, "Capacity": 9578, "rient": 9579, "Ġxxx": 9580, "closest": 9581, "PASS": 9582, "ĠJavaScript": 9583, "ĠACPI": 9584, "material": 9585, "Escape": 9586, "shouldReceive": 9587, "ĠUnknown": 9588, "xattr": 9589, "CTX": 9590, "123456789": 9591, "Ġnl": 9592, "THREAD": 9593, "returnValue": 9594, "Ġids": 9595, "Ġloader": 9596, "Ġmemset": 9597, "Ġdays": 9598, "ĠAccess": 9599, "Au": 9600, "PIPE": 9601, "ĠMark": 9602, "existing": 9603, "Ġcycle": 9604, "ĠParameter": 9605, "Ġsending": 9606, "ĠTree": 9607, "ĠSmall": 9608, "Using": 9609, "acpi": 9610, "aging": 9611, "regexp": 9612, "TD": 9613, "TypeName": 9614, "ĠTI": 9615, "èİ": 9616, "initialized": 9617, "Topic": 9618, "Features": 9619, "Ġvisit": 9620, "eg": 9621, "Cost": 9622, "Ġexecuted": 9623, "UCT": 9624, "objWriter": 9625, "Ġreturning": 9626, "250": 9627, "MG": 9628, "poch": 9629, "Fac": 9630, "och": 9631, "Design": 9632, "Asm": 9633, "ĠExecute": 9634, "mov": 9635, "Team": 9636, ">().": 9637, "bble": 9638, "Ġthreshold": 9639, "bined": 9640, "Intent": 9641, "Pad": 9642, "hover": 9643, "Must": 9644, "Creates": 9645, "IGH": 9646, "Ġautomatically": 9647, "urity": 9648, "Ġeq": 9649, "Days": 9650, "MU": 9651, "'m": 9652, "THER": 9653, "ascii": 9654, "Ġloading": 9655, "Spell": 9656, "ZS": 9657, "leaf": 9658, "shutdown": 9659, "Ġstarted": 9660, "Ġpan": 9661, "Ġmiddle": 9662, "Debugger": 9663, "Ġlists": 9664, "innerHTML": 9665, "CQ": 9666, "vendor": 9667, "riev": 9668, "amazon": 9669, "Ġsat": 9670, "ĠEmit": 9671, "stroke": 9672, "Ġ201": 9673, "Ġ*)(": 9674, "Glyph": 9675, "ĠCache": 9676, "machine": 9677, "cedure": 9678, "sTo": 9679, "Ġ'');": 9680, "rtlpriv": 9681, "hint": 9682, "Ġnotification": 9683, "bridge": 9684, "sil": 9685, "Management": 9686, "Sink": 9687, "idle": 9688, "ĠdomainObject": 9689, "Ġ-------": 9690, "Ġhide": 9691, "ĠGPIO": 9692, "abstract": 9693, "puts": 9694, "SED": 9695, "Rectangle": 9696, "à¦": 9697, "]|": 9698, "Super": 9699, "hold": 9700, "ĠNOTE": 9701, "Ġregs": 9702, "kl": 9703, "Compile": 9704, "IEW": 9705, "Ġserial": 9706, "Ġtransport": 9707, "extent": 9708, "Millis": 9709, "plural": 9710, "Jan": 9711, "cairo": 9712, ";',": 9713, "untu": 9714, "Ġthrown": 9715, "))))": 9716, "ROOT": 9717, "Ġpix": 9718, "iki": 9719, "ience": 9720, "Ġfold": 9721, "InstanceOf": 9722, "ĠFree": 9723, "eline": 9724, "tls": 9725, "syscall": 9726, "ĠHW": 9727, "Central": 9728, "hY": 9729, "Ġoutputs": 9730, "filepath": 9731, "ĠMove": 9732, "izing": 9733, "ĠDecode": 9734, "ifetime": 9735, "Unix": 9736, "Ġcomplex": 9737, "å®ļ": 9738, "Checks": 9739, "ighe": 9740, "èİ·": 9741, "wifi": 9742, "chk": 9743, "*>": 9744, "+\")": 9745, "vlan": 9746, "mapper": 9747, "iration": 9748, "Ġpick": 9749, "willReturn": 9750, "gether": 9751, "unexpected": 9752, "TagName": 9753, "RegExp": 9754, "Samples": 9755, "Ġ@\"": 9756, "Vars": 9757, "Ġtemporary": 9758, "Di": 9759, "etermine": 9760, "Decor": 9761, "ĠCS": 9762, "ĠMatrix": 9763, "payment": 9764, "Ġouter": 9765, "dap": 9766, "Illegal": 9767, "RA": 9768, "Ġcredentials": 9769, "Started": 9770, "ComboBox": 9771, "WITH": 9772, "Ġenc": 9773, "Ġupload": 9774, "VIS": 9775, "Ġinvoke": 9776, "Ġworker": 9777, "ratio": 9778, "Ġscheme": 9779, "Ġchecking": 9780, "202": 9781, "upal": 9782, "gK": 9783, "Ġincluding": 9784, "Ġreferences": 9785, "Person": 9786, "subdev": 9787, "ĠComple": 9788, "ALLOC": 9789, "ĠSTAT": 9790, "leave": 9791, "Hide": 9792, "UK": 9793, "Ġconfigure": 9794, "Ġatt": 9795, "hal": 9796, "deprecated": 9797, "Tw": 9798, "Ġ__(": 9799, "Commands": 9800, "Invariant": 9801, "Ġwhose": 9802, "Ġgoogleapi": 9803, "collect": 9804, "ĠCSS": 9805, "ĠBack": 9806, "fds": 9807, "MAL": 9808, "nV": 9809, "м": 9810, "Ġ'@": 9811, "Structure": 9812, "stub": 9813, "Ġtm": 9814, "Ġcamera": 9815, "zoom": 9816, "TT": 9817, "Ġchart": 9818, "ropped": 9819, "Ġtd": 9820, "ĠAuto": 9821, "Ġmembers": 9822, "calendar": 9823, "Associ": 9824, "abric": 9825, "boxes": 9826, "Ġutf": 9827, "Front": 9828, "Ġdrag": 9829, "bfa": 9830, "ini": 9831, "Authentication": 9832, "models": 9833, "Special": 9834, "ught": 9835, "ĠColumn": 9836, "Shown": 9837, "Dispatcher": 9838, "ĠThese": 9839, "exe": 9840, "Ġlat": 9841, "setTimeout": 9842, "Backend": 9843, "ĠArgumentNullException": 9844, "VC": 9845, "Ġcmp": 9846, "Ġfb": 9847, "uffle": 9848, "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd": 9849, "uess": 9850, "ĠAWS": 9851, "Disp": 9852, "dash": 9853, "complex": 9854, "ADDRESS": 9855, "getDefault": 9856, "Ġbeginning": 9857, "windows": 9858, "BOX": 9859, "Printer": 9860, "Ġii": 9861, "\"',": 9862, "many": 9863, "Completion": 9864, "maps": 9865, "Ġpixels": 9866, "LV": 9867, "Ġregistry": 9868, "ioctl": 9869, "ĠControl": 9870, "urope": 9871, "TOKEN": 9872, "PARATOR": 9873, "IES": 9874, "iet": 9875, "Added": 9876, "å¾": 9877, "$(": 9878, "Band": 9879, "GUID": 9880, "XP": 9881, "Ġmail": 9882, "Regs": 9883, "gain": 9884, "WORK": 9885, "个": 9886, "trinsic": 9887, "ISC": 9888, "ĠVER": 9889, "IMAGE": 9890, "Ġcos": 9891, "svg": 9892, "funcs": 9893, "Dem": 9894, "Ġlogin": 9895, "Ġthreads": 9896, "Ġdm": 9897, "Share": 9898, "CONTEXT": 9899, "FIRST": 9900, "builtin": 9901, ")&": 9902, "steps": 9903, "\")),": 9904, "EFAULT": 9905, "Ġocfs": 9906, "Ġcalcul": 9907, "mq": 9908, "Frames": 9909, "tz": 9910, "opacity": 9911, "xFE": 9912, "Sibling": 9913, "tempts": 9914, "Oc": 9915, "Ġdl": 9916, "`)": 9917, "Ġ(__": 9918, "getInt": 9919, "ctp": 9920, "Modules": 9921, "fragment": 9922, "Ġpg": 9923, "dai": 9924, "ana": 9925, "Ġnotify": 9926, "FIFO": 9927, "Ġpi": 9928, "Ġopcode": 9929, "Ġprecision": 9930, "Ġdim": 9931, "DAG": 9932, "ĠEntry": 9933, "ĠShow": 9934, "crete": 9935, "Ġcli": 9936, "fun": 9937, "Ġhint": 9938, "ĉĉĉĉĉĉĉĉĉĉ": 9939, "Ġvs": 9940, "Cond": 9941, "Marshaller": 9942, "-.": 9943, "aled": 9944, "FullName": 9945, "imag": 9946, "Ġenter": 9947, "GLOBALS": 9948, "ĠEventArgs": 9949, "preter": 9950, "outputs": 9951, "hicle": 9952, "Quick": 9953, "UA": 9954, "Ġtranslate": 9955, "ENTER": 9956, "Ġwaiting": 9957, "ĠPointer": 9958, "pacity": 9959, "anitize": 9960, "star": 9961, "Ġrank": 9962, "Ġflat": 9963, "Ġsi": 9964, "Ġlinks": 9965, "ĠSup": 9966, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 9967, "lica": 9968, "expanded": 9969, "Ġgpio": 9970, "Ġpositive": 9971, "Ġentire": 9972, "RR": 9973, "IgnoreCase": 9974, "BG": 9975, "Ġanim": 9976, "Ġbetter": 9977, "Ġaddresses": 9978, "unded": 9979, "Ġfocus": 9980, "ĠHH": 9981, "Ġdescri": 9982, "unused": 9983, "share": 9984, "===\"": 9985, "ech": 9986, "Infos": 9987, "ASS": 9988, "Tok": 9989, "Ġec": 9990, "preview": 9991, "POWER": 9992, "PD": 9993, "ĠSIGN": 9994, "NU": 9995, "IDX": 9996, "ĠSH": 9997, "ĠparseInt": 9998, "Vy": 9999, "ĠFrom": 10000, "Ġcoordinates": 10001, "PCM": 10002, "Ġhandlers": 10003, ")'": 10004, "uge": 10005, "ABA": 10006, "Rx": 10007, "icture": 10008, "gz": 10009, "multiple": 10010, "Published": 10011, "?:": 10012, "arf": 10013, "ListView": 10014, "åĢ": 10015, "Ġmargin": 10016, "Ġincluded": 10017, "ĠSp": 10018, "configure": 10019, "WU": 10020, "Ġproperly": 10021, "scriptions": 10022, "Ġtypedef": 10023, "commended": 10024, "æľī": 10025, "PAD": 10026, "Sep": 10027, "]',": 10028, "ĠFunc": 10029, "nable": 10030, "ĠRuntimeException": 10031, "SPI": 10032, "dirs": 10033, "Magento": 10034, "Ġutils": 10035, "hostname": 10036, "Increment": 10037, "assoc": 10038, "Ġtol": 10039, "OVER": 10040, "Ġty": 10041, "LX": 10042, ",%": 10043, "Live": 10044, "Ġ\"\\\"": 10045, "CSR": 10046, "[%": 10047, "ĠUnicode": 10048, "Ġsucce": 10049, "Ġalong": 10050, "WT": 10051, "caption": 10052, "flatten": 10053, "vma": 10054, "(\"\",": 10055, "Ġchr": 10056, "Ġteam": 10057, "Ġoccurred": 10058, "10000": 10059, "ĠClean": 10060, "ĠMode": 10061, "Ġscene": 10062, "Authorization": 10063, "ा": 10064, "')).": 10065, "ĠUri": 10066, "Ġmonitor": 10067, "ISTER": 10068, "ito": 10069, "Ġgoing": 10070, "CONST": 10071, "999": 10072, "Ġlogic": 10073, "soap": 10074, "2016": 10075, "Ġloss": 10076, "striction": 10077, "ĠAmazon": 10078, "andsh": 10079, "Ġnormalize": 10080, "lated": 10081, "LAB": 10082, "android": 10083, "ĠHexagon": 10084, "Fast": 10085, "Ġimmediately": 10086, "mes": 10087, "MOVE": 10088, "slug": 10089, "Ġ))": 10090, "Ġub": 10091, "ATT": 10092, "PARAMETER": 10093, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 10094, "Ġfinished": 10095, "Ġkzalloc": 10096, "dentry": 10097, "Ġ].": 10098, "Dead": 10099, "'=>'": 10100, "Ġsnapshot": 10101, "obile": 10102, "Regist": 10103, "Future": 10104, "usted": 10105, "nested": 10106, "Discard": 10107, "Qg": 10108, "Ġstderr": 10109, "trait": 10110, "ĠSession": 10111, "ATOM": 10112, "ĠsetUp": 10113, "PATTER": 10114, "Plain": 10115, "ĠHow": 10116, "cipient": 10117, "Overlay": 10118, "ĠDAG": 10119, "ndev": 10120, "strictEqual": 10121, "deg": 10122, "::$_": 10123, "Ġspi": 10124, "Ùħ": 10125, "æİ": 10126, "Under": 10127, "pic": 10128, "aligned": 10129, "notification": 10130, "ĠProto": 10131, "Have": 10132, "ToList": 10133, "vanced": 10134, "\")));": 10135, "Dock": 10136, "reduce": 10137, "iny": 10138, "Connected": 10139, "ĠRaise": 10140, "IsNotNull": 10141, "HAL": 10142, "Ġtasks": 10143, "Bin": 10144, "Ġstarts": 10145, "nameof": 10146, "Uniform": 10147, "çĽ": 10148, "ĠCL": 10149, "dojo": 10150, "DllImport": 10151, "AttributeValue": 10152, "Ġeverything": 10153, "éĻ": 10154, "secure": 10155, "ĠPHY": 10156, "ĠSDL": 10157, "}\");": 10158, "Ġtty": 10159, "Ġoccurs": 10160, "enumer": 10161, "except": 10162, "lbl": 10163, "etween": 10164, "pZ": 10165, "ĠDWORD": 10166, "æŶ": 10167, "Ġdead": 10168, "Ġtail": 10169, "ATTRIB": 10170, "Ġshell": 10171, "XXX": 10172, "increment": 10173, "Mer": 10174, "nes": 10175, "subscribe": 10176, "Ġfac": 10177, "Modal": 10178, "Cat": 10179, "Ġsleep": 10180, "Buttons": 10181, "Visit": 10182, "ceptor": 10183, "Ġmaybe": 10184, "æľĪ": 10185, "Soft": 10186, "XC": 10187, "ToInt": 10188, "ĠWhether": 10189, "protobuf": 10190, "Ui": 10191, "fac": 10192, "ahead": 10193, "333": 10194, "ĠLabel": 10195, "LASH": 10196, "rsa": 10197, "ĠEnv": 10198, "8000": 10199, "acon": 10200, "Prob": 10201, "Ġ[%": 10202, "adev": 10203, "instruction": 10204, "anim": 10205, "ĠBinary": 10206, "velope": 10207, "posing": 10208, "Ġadds": 10209, "ICAgICAgICAgICAg": 10210, "Ġ[])": 10211, "Ġpercent": 10212, "east": 10213, "Hidden": 10214, "IOException": 10215, "rcu": 10216, "adap": 10217, "Stage": 10218, "Slider": 10219, "Calculation": 10220, "Compact": 10221, "QP": 10222, "ned": 10223, "ĠEND": 10224, "Comments": 10225, "OTHER": 10226, "lighter": 10227, "pca": 10228, "den": 10229, "Polygon": 10230, "Ġspaces": 10231, "Ġapplied": 10232, "Ġfi": 10233, "basename": 10234, "Ġvery": 10235, "Ġrelation": 10236, "supp": 10237, "UnityEngine": 10238, "IDEO": 10239, "nf": 10240, "Ġdetect": 10241, "åĮ": 10242, "Ġomap": 10243, "Ġservices": 10244, "Phase": 10245, "WP": 10246, "Ġallocation": 10247, "NumberOf": 10248, "Fire": 10249, "iation": 10250, "Ġdelegate": 10251, "ÙĬ": 10252, "Ġmaterial": 10253, "Ġsem": 10254, "EDITOR": 10255, "Ġ26": 10256, "detach": 10257, "Amazon": 10258, "CU": 10259, "getContent": 10260, "OPY": 10261, "ĠMD": 10262, "Ġwhole": 10263, "yes": 10264, "otg": 10265, ")(\\\\": 10266, "mium": 10267, "Comm": 10268, "mixed": 10269, "quent": 10270, "à´": 10271, "hard": 10272, "XB": 10273, "aming": 10274, "instr": 10275, "KET": 10276, "Orient": 10277, "BBB": 10278, "NORMAL": 10279, "Conversion": 10280, "May": 10281, "hh": 10282, "Ġrefresh": 10283, "erance": 10284, "Ġatomic": 10285, "roker": 10286, "nop": 10287, "Ġsur": 10288, "Plot": 10289, "Ġunpack": 10290, "Ġinterrupts": 10291, "ĠPK": 10292, "Ġ\"*": 10293, "mbed": 10294, "qq": 10295, ":],": 10296, "ISO": 10297, "Ġ}));": 10298, "ongo": 10299, "Ġoct": 10300, "WC": 10301, "Ġgive": 10302, "Warnings": 10303, "atype": 10304, "GD": 10305, "ERY": 10306, "(\\\\": 10307, "jk": 10308, "]-": 10309, "Ġfrag": 10310, "Ġrgb": 10311, "ĠEm": 10312, "è§": 10313, "maximum": 10314, "rotation": 10315, "Ġedges": 10316, "Velocity": 10317, "Ġdistribution": 10318, "FM": 10319, "Ġconfigured": 10320, "Deployment": 10321, "XV": 10322, "ENO": 10323, "Finished": 10324, "ĠLay": 10325, "PEND": 10326, "Ñĭ": 10327, "asis": 10328, "Ġsources": 10329, "Ġadding": 10330, "ICATION": 10331, "Linear": 10332, "CHANNEL": 10333, "secs": 10334, "NL": 10335, "SEPARATOR": 10336, "Plane": 10337, "DEFAULTS": 10338, "REST": 10339, "Archive": 10340, "Ġintel": 10341, "UserId": 10342, "ĠTemplate": 10343, "BIN": 10344, "FileInfo": 10345, "through": 10346, "snprintf": 10347, "ĠArgumentError": 10348, "kv": 10349, "leter": 10350, "ĠBy": 10351, "peek": 10352, "Ġhistory": 10353, "Ġ>>=": 10354, "onomy": 10355, "())->": 10356, "tage": 10357, "TIMER": 10358, ")};": 10359, "Ġ&',": 10360, "completion": 10361, "Ġsg": 10362, "':'": 10363, "ILL": 10364, "Weapon": 10365, "Adjust": 10366, "Ġresolved": 10367, "Ġable": 10368, "OBJ": 10369, "keydown": 10370, "quired": 10371, "Ġcolors": 10372, "ĠOperation": 10373, "ĠSql": 10374, "Ġfrequency": 10375, "closing": 10376, "asset": 10377, "ĠEast": 10378, "tasks": 10379, "ZSB": 10380, "Ñĩ": 10381, "èİ·åıĸ": 10382, "+\\": 10383, "TCP": 10384, "TOP": 10385, "Ġdisp": 10386, "Health": 10387, "Mar": 10388, "ĠDisplay": 10389, "Ġplane": 10390, "uting": 10391, "gm": 10392, "DLL": 10393, "ĠRo": 10394, "Ġsyntax": 10395, "Ġtopic": 10396, "Ġnumeric": 10397, "Geo": 10398, "Ġtrailing": 10399, "MessageWindow": 10400, "################################": 10401, "åŃĺ": 10402, "etic": 10403, "angles": 10404, "Vertices": 10405, "Ġfig": 10406, "ĠImm": 10407, "WINDO": 10408, "Ġmakes": 10409, "zeros": 10410, "land": 10411, "Ġplt": 10412, "live": 10413, "ctxt": 10414, "+/": 10415, "ĠRelease": 10416, "atial": 10417, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 10418, "sch": 10419, "Ġri": 10420, "ĠSrc": 10421, "ENV": 10422, "Ġanchor": 10423, "iment": 10424, "Dirty": 10425, "MAIN": 10426, "ĠReact": 10427, "Ġcurl": 10428, "ĠSTR": 10429, "mmc": 10430, "umes": 10431, "ĠChange": 10432, "Ġdp": 10433, "EXIT": 10434, "ĠSince": 10435, "ĠReplace": 10436, "ANK": 10437, "'},": 10438, "Ġalignment": 10439, "Ġformatted": 10440, "WH": 10441, "LLVM": 10442, "Ġwhitespace": 10443, "icted": 10444, "optParams": 10445, "ĠTABLE": 10446, "OV": 10447, "æĶ": 10448, "Ġthings": 10449, "ongs": 10450, "pur": 10451, "ĠRFC": 10452, "black": 10453, "ĠtestGet": 10454, "åľ¨": 10455, "omial": 10456, "mapped": 10457, "表": 10458, "ĠEach": 10459, "Ġcertificate": 10460, "Ġrepository": 10461, "ENABLED": 10462, "Ġindicating": 10463, "hot": 10464, "mirror": 10465, "Ġperf": 10466, "Ġpod": 10467, "र": 10468, "Pipeline": 10469, "remaining": 10470, "vertices": 10471, "sound": 10472, "isDefault": 10473, "ildcard": 10474, "weights": 10475, "Cmp": 10476, "Ġrr": 10477, "moz": 10478, "Quant": 10479, "yb": 10480, "stage": 10481, "ä¼": 10482, "Links": 10483, "Ġobt": 10484, "WL": 10485, "toArray": 10486, "ĠMA": 10487, "disc": 10488, "country": 10489, "Ġdecoder": 10490, "shell": 10491, "OIN": 10492, "outb": 10493, "Ġphase": 10494, "literal": 10495, "Digest": 10496, "]])": 10497, "()+": 10498, "ulong": 10499, "Prom": 10500, "ĠAD": 10501, "Ġcodec": 10502, "adr": 10503, "Ġreserved": 10504, "ife": 10505, "Ġ*/\\": 10506, "PROC": 10507, "ÑģÑĤ": 10508, "flex": 10509, "paint": 10510, "exclude": 10511, "netif": 10512, "readl": 10513, "Ġextensions": 10514, "Ġkwargs": 10515, "0631": 10516, "ãģ®": 10517, "libc": 10518, "hid": 10519, "Ġserialized": 10520, "apache": 10521, "Ġfilepath": 10522, "Wallet": 10523, "Toggle": 10524, "Seek": 10525, "PIX": 10526, "EXP": 10527, "Ġcost": 10528, "Ġcompletion": 10529, ".*]]": 10530, "uman": 10531, "ĠSettings": 10532, "Mono": 10533, "DY": 10534, "rab": 10535, "Ġfreq": 10536, "Annotations": 10537, "WriteString": 10538, "logical": 10539, "QUEUE": 10540, "ĠExpr": 10541, "FULL": 10542, "Ġevt": 10543, "Persistent": 10544, "AUD": 10545, "asses": 10546, "Ġ/^": 10547, "Callbacks": 10548, "edges": 10549, "Ġmalloc": 10550, "ĠDATA": 10551, "--------------------------------------------------------": 10552, "[\\\\": 10553, "д": 10554, "encrypt": 10555, "zc": 10556, "Ġboundary": 10557, "ĠOne": 10558, "quot": 10559, "Ġ512": 10560, "Ġextend": 10561, "Ġmid": 10562, "')],": 10563, "HASH": 10564, "Ġmount": 10565, "ĠChr": 10566, "Ġaggreg": 10567, "Ġfire": 10568, "ĠTool": 10569, "sx": 10570, "ACPI": 10571, "defineProperty": 10572, "<>": 10573, "retty": 10574, ")&&": 10575, "Vk": 10576, "Ġstates": 10577, "TextBox": 10578, "urable": 10579, "Ġidentity": 10580, "manual": 10581, "apsed": 10582, "WO": 10583, "110": 10584, "Ġsil": 10585, "elf": 10586, "ea": 10587, "unlink": 10588, "North": 10589, "Ġmk": 10590, "('--": 10591, "}:": 10592, "catalog": 10593, "ĠButton": 10594, "formed": 10595, ")];": 10596, "Ġblank": 10597, "Ġmuch": 10598, "(\":": 10599, "Diag": 10600, "inject": 10601, "Manifest": 10602, "whitespace": 10603, "Ordinal": 10604, "ä¸Ń": 10605, "pwr": 10606, "Ġflash": 10607, "Ġmetric": 10608, "Ġparticular": 10609, "verity": 10610, "Ġast": 10611, "ighest": 10612, "åī": 10613, "Ġbtrfs": 10614, "sprite": 10615, "esis": 10616, "PF": 10617, "Ġmapped": 10618, "Socklen": 10619, "Inf": 10620, "Star": 10621, "urls": 10622, "Joint": 10623, "Void": 10624, "ĠNull": 10625, "Ġut": 10626, "Ġ27": 10627, "overlay": 10628, "/\\": 10629, "ĠReference": 10630, "ĠInstance": 10631, "Termin": 10632, "amel": 10633, "snapshot": 10634, "ĠSPI": 10635, "fid": 10636, "formats": 10637, "Mount": 10638, "Ġdecor": 10639, "Cons": 10640, "ĠLogger": 10641, "OrDefault": 10642, "getS": 10643, "backup": 10644, "arante": 10645, ")/,": 10646, "Ġpast": 10647, "Retrieve": 10648, "ffic": 10649, "æĪIJ": 10650, "Ġrepo": 10651, "Ġseparate": 10652, "é¡": 10653, "(\"../../": 10654, "INTR": 10655, "andshake": 10656, "Logic": 10657, "records": 10658, "metric": 10659, "microsoft": 10660, "ĠNUM": 10661, "=\"\"": 10662, "Resize": 10663, "Ġ\\'": 10664, "ĠEV": 10665, "UMENT": 10666, "ICK": 10667, "categories": 10668, "Ġequivalent": 10669, "Ġ\"&": 10670, "SQ": 10671, "Ġstmt": 10672, "Ġ&(": 10673, "TableName": 10674, "cinfo": 10675, "ĠExec": 10676, "Serialization": 10677, "geometry": 10678, "ENU": 10679, "Ġ'?": 10680, ")\\\\": 10681, "Mime": 10682, "Da": 10683, "TEX": 10684, "Ġswap": 10685, "åĽŀ": 10686, "tures": 10687, "urlParams": 10688, "defaultToken": 10689, "Ġbtn": 10690, "Ġpreviously": 10691, "']:": 10692, "offsets": 10693, "Ġcontact": 10694, "former": 10695, "analy": 10696, "celer": 10697, "ffected": 10698, "Attrs": 10699, "FLOW": 10700, "Bag": 10701, "Ġtoggle": 10702, "ĠMicrosoft": 10703, "\")},": 10704, "Vertical": 10705, "getItem": 10706, "rott": 10707, "ĠDL": 10708, "eros": 10709, "ERTY": 10710, "imply": 10711, "Ġindicates": 10712, "Ġtor": 10713, "csr": 10714, "Ġencoder": 10715, "ĠRule": 10716, "Gateway": 10717, "ĠIgnore": 10718, "ĠLast": 10719, "inted": 10720, "||\"": 10721, "ĠDisable": 10722, "Ġart": 10723, "HAS": 10724, "Ġagent": 10725, "ierarchy": 10726, "+-+-": 10727, "Ġseen": 10728, "omap": 10729, "cha": 10730, "Ġ[$": 10731, "Unsupported": 10732, "ĠHost": 10733, "iate": 10734, "Layers": 10735, "operand": 10736, "Ġlight": 10737, "Ġclause": 10738, "AsString": 10739, "Ġshader": 10740, "Prevented": 10741, "SZ": 10742, "await": 10743, "": 10744, "ĠRel": 10745, "ĠPart": 10746, "Ġsigned": 10747, "elseif": 10748, "ĠVariable": 10749, "Ġlex": 10750, "repository": 10751, "look": 10752, "getReg": 10753, "dq": 10754, "kcontrol": 10755, "ĠGets": 10756, "Criteria": 10757, "XJ": 10758, "avg": 10759, "MEDI": 10760, "ĠQue": 10761, "Cycle": 10762, "Bericht": 10763, "Ġtriggered": 10764, "zen": 10765, "Ġtraining": 10766, "Stri": 10767, "Navigation": 10768, "')[": 10769, "ĠSm": 10770, "ĠCK": 10771, "coun": 10772, "0430": 10773, "Ġwa": 10774, "ĠDescribe": 10775, "ä¹": 10776, "Hi": 10777, "Ġmetrics": 10778, "slash": 10779, "frequency": 10780, "vv": 10781, "OSI": 10782, "Ġpie": 10783, "Ġmix": 10784, "Undefined": 10785, "ĠCloseMessageWindow": 10786, "Sleep": 10787, "æĮ": 10788, "Img": 10789, "Signed": 10790, "ĠSLOT": 10791, "logging": 10792, "compatible": 10793, "Chat": 10794, "PN": 10795, "ĠMIN": 10796, "Emitter": 10797, "Translate": 10798, "PTX": 10799, "Does": 10800, "\"===": 10801, "strpos": 10802, "Ġreplacement": 10803, "Ġoutside": 10804, "Ġcross": 10805, "éĹ": 10806, "ICAL": 10807, "})},": 10808, "confirm": 10809, "igen": 10810, "Until": 10811, "under": 10812, "Swap": 10813, "ensupport": 10814, "detect": 10815, "Ġstrpos": 10816, "Predicate": 10817, "Bridge": 10818, "ĠAF": 10819, "Ġrg": 10820, "ĠĠĠĠĉ": 10821, "Words": 10822, "ĠHashMap": 10823, "Ġfront": 10824, "getElements": 10825, "Premium": 10826, "EXEC": 10827, "~\\": 10828, "ROG": 10829, "Ġenumerate": 10830, "($\"": 10831, "olicies": 10832, "................": 10833, "iving": 10834, "based": 10835, "Ġ*>(": 10836, "BJ": 10837, "ĠCP": 10838, "iframe": 10839, "TU": 10840, "nullptr": 10841, "Ġ'-'": 10842, "Sur": 10843, "Projects": 10844, "stand": 10845, "Ġdetected": 10846, "Ġthree": 10847, "EMPTY": 10848, "SEND": 10849, "Ġtex": 10850, "Ġdimensions": 10851, "GM": 10852, "Propagation": 10853, "chat": 10854, "Ġunexpected": 10855, "Ġiteration": 10856, "Ġunmarshal": 10857, "yd": 10858, "Lim": 10859, "Ġoffsets": 10860, "Numeric": 10861, "Ġcps": 10862, "Ġboard": 10863, "ĠDescriptor": 10864, "Ġworking": 10865, "STEM": 10866, "VOID": 10867, "IPS": 10868, "resolved": 10869, "è¡Į": 10870, "pitch": 10871, "processing": 10872, "dns": 10873, "},\"": 10874, "=='": 10875, "ĠDecl": 10876, "Aut": 10877, "Maximum": 10878, "cannot": 10879, "Deserialize": 10880, "Username": 10881, "FoldWidget": 10882, "what": 10883, "Helpers": 10884, "adv": 10885, "Ġbb": 10886, "scrollTop": 10887, "scr": 10888, "Ġdeprecated": 10889, "statusCode": 10890, "@@@@@@": 10891, "gbe": 10892, "oney": 10893, "RAM": 10894, "Ġci": 10895, "Restore": 10896, "ĠOUT": 10897, "010": 10898, "ication": 10899, "п": 10900, "ACKET": 10901, "Once": 10902, "Plus": 10903, "roken": 10904, "hwnd": 10905, "Keyboard": 10906, "对": 10907, "latest": 10908, "Ġtogether": 10909, "Ġrhs": 10910, "Locked": 10911, "ĠCreates": 10912, "ĠNetwork": 10913, "reed": 10914, "Cached": 10915, "Too": 10916, "Ġmeasure": 10917, "}'": 11048, "vlet": 11049, "Ġsector": 11050, "Ġdidn": 11051, "Buffers": 11052, "inuation": 11053, "Ġdatetime": 11054, "ĠSIGNAL": 11055, "Ġ');": 11056, "hn": 11057, "BEGIN": 11058, "ads": 11059, "ScriptValue": 11060, "(${": 11061, "epoch": 11062, "Ġsecret": 11063, "ĠEurope": 11064, "MALL": 11065, "busy": 11066, "LET": 11067, "router": 11068, "ĠCalling": 11069, "today": 11070, "cross": 11071, "nonce": 11072, "Serial": 11073, "Ġplan": 11074, "\"'": 11075, "DK": 11076, "\")[": 11077, "NR": 11078, "Ġtheme": 11079, "Ġgc": 11080, "ĠAzure": 11081, "userId": 11082, "SECON": 11083, "ceed": 11084, "HC": 11085, "+(": 11086, "Ġleave": 11087, "Zl": 11088, "asd": 11089, "\"]);": 11090, "æ³": 11091, "andbox": 11092, "istor": 11093, "units": 11094, "ibly": 11095, "Finish": 11096, "dayNames": 11097, "TB": 11098, "AQ": 11099, "receive": 11100, "ASN": 11101, "VK": 11102, "suspend": 11103, "mooth": 11104, "âĶ": 11105, "Ġhad": 11106, "Ġ400": 11107, "handled": 11108, "120": 11109, "ĠArguments": 11110, "INTEGER": 11111, "Ġattached": 11112, "UNUSED": 11113, "Calls": 11114, "Ġvertices": 11115, "Ġstuff": 11116, "Ġdocumentation": 11117, "coord": 11118, "rcv": 11119, "placeholder": 11120, "rotate": 11121, "ĠFix": 11122, "Ġhandles": 11123, "Ġfallback": 11124, "ĠPr": 11125, "ĠOptions": 11126, "\")}": 11127, "Dataset": 11128, "POL": 11129, "polation": 11130, "REQUI": 11131, "antic": 11132, "Ġdoing": 11133, "Ġdigits": 11134, "Ġgetting": 11135, "\"}],": 11136, "Acc": 11137, "Ġpermissions": 11138, "Toolbar": 11139, "150": 11140, "Ġcopied": 11141, "Ġpkt": 11142, "dog": 11143, "',$": 11144, "ViewModel": 11145, "Ġperm": 11146, "Ġdevm": 11147, "dependent": 11148, "Ġrecv": 11149, "ĠQueue": 11150, "Operands": 11151, "Mul": 11152, "Hdr": 11153, "UMN": 11154, "Ġdependency": 11155, "\\\"\\": 11156, "duced": 11157, "Closing": 11158, "hit": 11159, "Ġserialize": 11160, "Ġxfs": 11161, "inct": 11162, "ĠAppend": 11163, "MOT": 11164, "æĸĩ件": 11165, "TRA": 11166, "CWE": 11167, "0645": 11168, "buttons": 11169, "puted": 11170, "RESP": 11171, "160": 11172, "nm": 11173, "TARGET": 11174, "via": 11175, "Ġpk": 11176, "Ġmc": 11177, "GS": 11178, "LB": 11179, "enticate": 11180, "Abb": 11181, "formatter": 11182, "INF": 11183, "ĠIL": 11184, "rum": 11185, "ĠImport": 11186, "è¾": 11187, "Globals": 11188, "Revision": 11189, "arest": 11190, "Za": 11191, "0648": 11192, "Ġcurve": 11193, "segments": 11194, "/(": 11195, "WD": 11196, "raises": 11197, "()){": 11198, "Ġtcp": 11199, "mtd": 11200, "Ġclosing": 11201, "lax": 11202, "]'": 11203, "projects": 11204, "dget": 11205, "Stroke": 11206, "PROPERTY": 11207, "svn": 11208, "Ġpermission": 11209, "rename": 11210, "Lm": 11211, "hdev": 11212, "Home": 11213, "ĠFe": 11214, "ari": 11215, "Ġ_(\"": 11216, "Ġmv": 11217, "Ġimplements": 11218, "dv": 11219, "CXX": 11220, "paign": 11221, "IsPremium": 11222, "PublisherName": 11223, "xB": 11224, "ems": 11225, "ĠBB": 11226, "ĠDirectory": 11227, "Payment": 11228, "frontend": 11229, "LABEL": 11230, "MV": 11231, "bulk": 11232, "spe": 11233, "Ġextent": 11234, "counts": 11235, "HQ": 11236, "SYM": 11237, "Sockaddr": 11238, "gui": 11239, "Stamp": 11240, "iguous": 11241, "ÙĪ": 11242, "Ġpublish": 11243, "finite": 11244, "ĠChrTalk": 11245, "CString": 11246, "flip": 11247, "()-": 11248, "Requested": 11249, "ErrCode": 11250, "_%": 11251, "Exact": 11252, "LastError": 11253, "OLE": 11254, "kp": 11255, "lint": 11256, "INITION": 11257, "Ġhy": 11258, "è½": 11259, "Resolution": 11260, "ĠSDValue": 11261, "Ġpag": 11262, "cwd": 11263, "lists": 11264, "tabs": 11265, "Tax": 11266, "ĠGe": 11267, "Ġtb": 11268, "EOL": 11269, "herit": 11270, "Nav": 11271, "Ġsymbols": 11272, "Ġpointers": 11273, "Ġmodels": 11274, "enant": 11275, "ushort": 11276, "slots": 11277, "environ": 11278, "mbus": 11279, "Age": 11280, "Modify": 11281, "gY": 11282, "Ġsockaddr": 11283, "Ġcinfo": 11284, "Alt": 11285, "readable": 11286, "stral": 11287, "Gradient": 11288, "]\"": 11289, "geo": 11290, "Ġpaint": 11291, "{\\": 11292, "abcdef": 11293, "ourse": 11294, "Chr": 11295, "CLIENT": 11296, "ĠfileDescriptor": 11297, "wpdb": 11298, "Ġstub": 11299, "ĠADD": 11300, "todo": 11301, "Ġcollect": 11302, "MLE": 11303, "Feb": 11304, "Pe": 11305, "mysql": 11306, "unshift": 11307, "Bracket": 11308, "ople": 11309, "possible": 11310, "getPath": 11311, "isDefaultPrevented": 11312, "zh": 11313, "revi": 11314, "ĠAllocate": 11315, "encil": 11316, "Ġbel": 11317, "reat": 11318, "Ġreadl": 11319, "azy": 11320, "WI": 11321, "ĠChannel": 11322, "going": 11323, "ĠAllow": 11324, "ELEMENT": 11325, "Ġinf": 11326, "DEP": 11327, "textarea": 11328, "âĢ¦": 11329, "CONTENT": 11330, "rink": 11331, "ĠPM": 11332, "ĠBinding": 11333, "moves": 11334, "Ġ\"-\",": 11335, "rieves": 11336, "Fs": 11337, "Ġsprite": 11338, "pie": 11339, "Assignment": 11340, "ĠAbstract": 11341, "FFFFFF": 11342, "retch": 11343, "yl": 11344, "Ġwhite": 11345, "Ġsteps": 11346, "KT": 11347, "Ġwrapped": 11348, "reshape": 11349, "CultureInfo": 11350, "Patient": 11351, "Ġstage": 11352, "vertical": 11353, "Deep": 11354, "pull": 11355, "Cross": 11356, "lw": 11357, "fixture": 11358, "fv": 11359, "Verbose": 11360, "ĠLP": 11361, "Ġurb": 11362, "ĠLE": 11363, "*,": 11364, "isk": 11365, "ĠTensor": 11366, "Ġauthentication": 11367, "iagnostic": 11368, "ĠdAtA": 11369, "Dif": 11370, "Spy": 11371, "HM": 11372, "Latin": 11373, "ĠPort": 11374, "IOC": 11375, "dating": 11376, "Ġshadow": 11377, "Ġhi": 11378, "Ġband": 11379, "ĠPut": 11380, "registered": 11381, "Ġbook": 11382, "urther": 11383, "Ġff": 11384, "perf": 11385, "dismiss": 11386, "Ġangular": 11387, "Ġincludes": 11388, "]];": 11389, "GUILayout": 11390, "une": 11391, "096": 11392, "elif": 11393, "ĠSM": 11394, "xuICAg": 11395, "Pol": 11396, "Ġroom": 11397, "Construct": 11398, "Submit": 11399, "Backup": 11400, "weak": 11401, "Milliseconds": 11402, "111": 11403, "CAST": 11404, "Ġresulting": 11405, "quoted": 11406, "Ġmi": 11407, "iry": 11408, "atern": 11409, "ĠVK": 11410, "mmio": 11411, "ĠEnum": 11412, "Ġcomput": 11413, "Jul": 11414, "ĠDet": 11415, "pte": 11416, "ĠSome": 11417, "ĠDispose": 11418, "Ġcoordinate": 11419, "uck": 11420, "uniform": 11421, "ĠMan": 11422, "BAR": 11423, "sur": 11424, "nan": 11425, "rength": 11426, "Ġol": 11427, "'}": 11428, "Macro": 11429, ":\"\\": 11430, "Jap": 11431, "Ġsimply": 11432, "ĠWord": 11433, "delegate": 11434, "ĠInfo": 11435, "DONE": 11436, "Met": 11437, "è¦": 11438, "softc": 11439, "KV": 11440, "ĠEnvironment": 11441, "ZV": 11442, "Ġprobably": 11443, "Ġconstants": 11444, "Ġexplicitly": 11445, "Ġ?>": 11446, "SERVICE": 11447, "vdev": 11448, "Ġmismatch": 11449, "CHANGE": 11450, "bootstrap": 11451, "rieved": 11452, "IconUri": 11453, "ĠSets": 11454, "Caching": 11455, "Ġdependencies": 11456, "Invok": 11457, "BYTES": 11458, "BM": 11459, "ĠPAR": 11460, "Registration": 11461, "InvalidArgumentException": 11462, "ĠTrace": 11463, "Ġreadonly": 11464, "wheel": 11465, "Ł¥": 11466, "irc": 11467, "ĠCURL": 11468, "adj": 11469, "mbox": 11470, "Ġcipher": 11471, "ĠUInt": 11472, "ĠIPv": 11473, "ssh": 11474, "lst": 11475, "QW": 11476, "Ġchecksum": 11477, "æģ": 11478, "Deleted": 11479, "Negative": 11480, "oauth": 11481, "andReturn": 11482, "ĠWebInspector": 11483, "ĠCM": 11484, "InlineData": 11485, "trip": 11486, "half": 11487, "hasNext": 11488, "Minutes": 11489, "åħ¥": 11490, "andidates": 11491, "Ġquant": 11492, "iA": 11493, "iline": 11494, "ĠSchema": 11495, "visitor": 11496, "ĠAsia": 11497, "ĠStep": 11498, "YPT": 11499, "ABC": 11500, "Ġrevision": 11501, "ĠProperties": 11502, "ĠISD": 11503, "coin": 11504, "Substring": 11505, "templates": 11506, "allenge": 11507, "ZXJ": 11508, "bx": 11509, "React": 11510, "cart": 11511, "anned": 11512, "GBE": 11513, "Ġconditions": 11514, "emy": 11515, "LIT": 11516, "buted": 11517, "instances": 11518, "_'": 11519, "Look": 11520, "Ġide": 11521, "Phone": 11522, "ĠMOD": 11523, "KeyValue": 11524, "DH": 11525, "Large": 11526, "getObject": 11527, "isShown": 11528, "Computed": 11529, "Middle": 11530, "styles": 11531, "isNull": 11532, "SUM": 11533, ")?)|": 11534, ".<": 11535, "Ġcomputed": 11536, "umps": 11537, "[]{": 11538, "drive": 11539, "*)&": 11540, "ĠApply": 11541, "Ġrather": 11542, "Formats": 11543, "ĠUnmarshal": 11544, "night": 11545, "ĠCE": 11546, "Prod": 11547, "environment": 11548, "FileSystem": 11549, "Updates": 11550, "Ġthing": 11551, "ĠGrid": 11552, "timezone": 11553, "padapter": 11554, "References": 11555, "nod": 11556, "Maps": 11557, "ializes": 11558, "Room": 11559, "0644": 11560, "132": 11561, "vx": 11562, "ners": 11563, "eeprom": 11564, "Ġndarray": 11565, "ropy": 11566, "dprintk": 11567, "utter": 11568, "balance": 11569, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 11570, "Ġ-->": 11571, "Ġbc": 11572, "Ġduplicate": 11573, "Streams": 11574, "Currency": 11575, "Ġexactly": 11576, "Asc": 11577, "paque": 11578, "//================================================================": 11579, "ofs": 11580, "matcher": 11581, "Ġescaped": 11582, "102": 11583, "loads": 11584, "æĢ": 11585, "ased": 11586, "Ġcare": 11587, "Ul": 11588, "ĠDb": 11589, "}|": 11590, "exc": 11591, "scratch": 11592, "ĠUsed": 11593, "Ġsubscription": 11594, "Behaviour": 11595, "sumed": 11596, "Processing": 11597, "Kill": 11598, "Ġlayers": 11599, "ĠCMD": 11600, "Insensitive": 11601, "SDL": 11602, "384": 11603, "Ġsound": 11604, "CheckBox": 11605, "fieldName": 11606, "PRIV": 11607, "ĠTCP": 11608, "Ġdigest": 11609, "Ġpub": 11610, "restart": 11611, "Idle": 11612, "Ġdirectories": 11613, "assertEqual": 11614, "Ġasset": 11615, "Lists": 11616, "Ġrepresents": 11617, "VD": 11618, "contain": 11619, "ĠUtils": 11620, "Ġ}),": 11621, "ан": 11622, "Paren": 11623, "Viewer": 11624, "Ġresize": 11625, "syntax": 11626, "}()": 11627, "HDR": 11628, "Ġpoll": 11629, "3333": 11630, "edium": 11631, "qc": 11632, "SEQ": 11633, "NING": 11634, "ĠSTATUS": 11635, "ĠETH": 11636, "curacy": 11637, "Minimum": 11638, "ĠActive": 11639, "Ġdeclaration": 11640, "perform": 11641, "adc": 11642, "charCode": 11643, "Blue": 11644, "ĠMS": 11645, "coped": 11646, "terms": 11647, "Dim": 11648, "ĠVT": 11649, ";'": 11650, "ç§": 11651, ",(": 11652, "Nb": 11653, "Ġlive": 11654, "Picker": 11655, "ب": 11656, "Symbols": 11657, "NY": 11658, "olation": 11659, ">');": 11660, "Ġcodes": 11661, "Ġamd": 11662, "SetValue": 11663, "ĠPyObject": 11664, "crop": 11665, "Ġasc": 11666, "dater": 11667, "curve": 11668, "kd": 11669, "Integr": 11670, "ĠDBG": 11671, "Rew": 11672, "attrib": 11673, "ADER": 11674, "za": 11675, "capacity": 11676, "Ġentities": 11677, "chemas": 11678, "Wifi": 11679, "ena": 11680, "åĬł": 11681, "Ġpot": 11682, "Actual": 11683, "getParam": 11684, "Sy": 11685, "??": 11686, "enus": 11687, "ĠDS": 11688, "Templ": 11689, "ĠLevel": 11690, "Ġ90": 11691, "Statistics": 11692, "Brace": 11693, ":-": 11694, "Dr": 11695, "Ġsensor": 11696, "Eval": 11697, "Ġnfs": 11698, "Coverage": 11699, "jar": 11700, "Car": 11701, "Ġguarante": 11702, "aud": 11703, "middle": 11704, "-'": 11705, "ĠFailed": 11706, "ĠRET": 11707, "Sat": 11708, "bias": 11709, "ĠDrop": 11710, "toUpperCase": 11711, "FROG": 11712, "filtered": 11713, "ç±": 11714, "();\");": 11715, "lications": 11716, "Fmt": 11717, "setData": 11718, "EAR": 11719, "Ġgid": 11720, "laps": 11721, "CORE": 11722, "Launch": 11723, "PublishedDate": 11724, "Ġpredicate": 11725, "illing": 11726, "Ġexclude": 11727, "Ġinject": 11728, "serialized": 11729, "Ġpay": 11730, "XN": 11731, "Triple": 11732, "Dial": 11733, "ĉĉĉĉĉĠĠĠĠ": 11734, "Ġranges": 11735, "Ġpackets": 11736, "Ġkeywords": 11737, "Respon": 11738, "RSA": 11739, "Ġputs": 11740, "Ġextended": 11741, "outine": 11742, "ivers": 11743, "Japan": 11744, "ju": 11745, "deleted": 11746, "ĠSecurity": 11747, "Ġheap": 11748, "Ġtrying": 11749, "ĠCF": 11750, "Embed": 11751, "getB": 11752, "outline": 11753, "Ġrd": 11754, "CY": 11755, "Exchange": 11756, "Ġrenderer": 11757, "TK": 11758, "Ġmagic": 11759, "RANGE": 11760, "changes": 11761, "Ġsizes": 11762, "agger": 11763, "LASS": 11764, "044": 11765, "Austral": 11766, "additional": 11767, "mtime": 11768, "Ġcoefficient": 11769, "->__": 11770, "wchar": 11771, "matched": 11772, "parents": 11773, "requests": 11774, "CLOSE": 11775, "ĠCompare": 11776, "Ġunused": 11777, "Ġprior": 11778, "ĠPRI": 11779, "ternate": 11780, "arc": 11781, "ATIVE": 11782, "ializing": 11783, "ĠMP": 11784, "Ġeps": 11785, "Cls": 11786, "ĠSort": 11787, "Ġ\"#{": 11788, "Ġsolution": 11789, "WW": 11790, "Ġп": 11791, "MOV": 11792, "opa": 11793, "STATIC": 11794, "ynomial": 11795, "tableName": 11796, "without": 11797, "prompt": 11798, "Ġinvoked": 11799, "PY": 11800, "grees": 11801, "uw": 11802, "Ġwm": 11803, "popup": 11804, "sizes": 11805, "Oneof": 11806, "aggreg": 11807, "180": 11808, "gif": 11809, "dyn": 11810, "Ġ(!_": 11811, "Ġssl": 11812, "Ġresolution": 11813, "tribs": 11814, "mtu": 11815, "Plural": 11816, "ImageFamily": 11817, "Ġsip": 11818, "Ġ\".\"": 11819, "keyCode": 11820, "Ġinstr": 11821, "anning": 11822, "sections": 11823, "2017": 11824, "orrow": 11825, "Flat": 11826, "')),": 11827, "Ġpython": 11828, "AU": 11829, "Ġrepeat": 11830, "ĠTIM": 11831, "Ġcut": 11832, "dead": 11833, "enticated": 11834, "ERAL": 11835, "nodeName": 11836, "SURE": 11837, "RuntimeException": 11838, "Ġlisteners": 11839, "cw": 11840, "BUTTON": 11841, "nvar": 11842, "Ġ}.": 11843, "Ġeth": 11844, "Need": 11845, "ĠRectangle": 11846, "++);": 11847, "ĠRC": 11848, "Ġpres": 11849, "ĠFill": 11850, "EG": 11851, "Scenario": 11852, "Ġtranslation": 11853, "Ġpow": 11854, "plug": 11855, "was": 11856, "ValueOf": 11857, "ĠSingle": 11858, "tokenize": 11859, "Privacy": 11860, "Ġws": 11861, "åīį": 11862, "Ġmarshal": 11863, "Versions": 11864, "CIMAL": 11865, "ç±»": 11866, "animate": 11867, "visibility": 11868, "uni": 11869, "æģ¯": 11870, "Ln": 11871, "Ġsheet": 11872, "Ġresc": 11873, "Ġanaly": 11874, "filePath": 11875, "Ġintegr": 11876, "ĠObj": 11877, "BufferSize": 11878, "bars": 11879, "ĠHowever": 11880, "Den": 11881, "ĠFLAG": 11882, "getState": 11883, "aternion": 11884, "ToLower": 11885, "Ġindicate": 11886, "Await": 11887, "Sizes": 11888, "dsp": 11889, "Ġvars": 11890, "entities": 11891, "Ġmonths": 11892, "ause": 11893, "PROTO": 11894, "annotation": 11895, "Ġie": 11896, "Ġrune": 11897, "Ġoverr": 11898, "Define": 11899, "les": 11900, "?|": 11901, "Executor": 11902, "]\");": 11903, "anity": 11904, "Ġbot": 11905, "reload": 11906, "processed": 11907, "ĠBT": 11908, "ĠRece": 11909, "assets": 11910, "footer": 11911, "((\"": 11912, "VOL": 11913, "ĠTop": 11914, "ĠSNDRV": 11915, "FORE": 11916, "fony": 11917, "popr": 11918, "serve": 11919, "JK": 11920, "dataProvider": 11921, "ĠNotImplemented": 11922, "SCAN": 11923, "xxxx": 11924, "Ġratio": 11925, "Some": 11926, "Offsets": 11927, "ĠWR": 11928, "Ġglob": 11929, "getElementsBy": 11930, "Ġtell": 11931, "Australia": 11932, "linux": 11933, "Ġanswer": 11934, "Encrypt": 11935, "DeepCopy": 11936, "ĠEXT": 11937, "ĠNormal": 11938, "levels": 11939, "Foreign": 11940, "rightness": 11941, "NF": 11942, "marshall": 11943, "Country": 11944, "Issue": 11945, "QQ": 11946, "']),": 11947, "Refs": 11948, "ĠPlease": 11949, "STRUCT": 11950, "RELE": 11951, "SAFE": 11952, "rena": 11953, "ĠME": 11954, "VoCollection": 11955, "Inv": 11956, "Ġinstanti": 11957, "/?": 11958, "Ġsha": 11959, "periment": 11960, "xyz": 11961, "mobile": 11962, "NB": 11963, "mdev": 11964, "Based": 11965, "ĠSection": 11966, "yield": 11967, "QUERY": 11968, "orders": 11969, ".'/": 11970, "Ġbg": 11971, "Ġsoftware": 11972, "RegisterType": 11973, "iser": 11974, "bufs": 11975, "Ġslave": 11976, "}\";": 11977, "Ġuv": 11978, "ErrorMessage": 11979, "calls": 11980, "does": 11981, "ruby": 11982, "Shutdown": 11983, "Diagnostic": 11984, "Sharp": 11985, "timing": 11986, "Ġ\\\\": 11987, "documentElement": 11988, "USY": 11989, "ĠUART": 11990, "Ġdecoded": 11991, "JavaScript": 11992, "]()": 11993, "ĠCre": 11994, "Radio": 11995, "ĠDIS": 11996, "Targets": 11997, "Ġconnections": 11998, "GridView": 11999, "Ġreads": 12000, "Tracking": 12001, "Ġruns": 12002, "Fprintf": 12003, "HCI": 12004, "Ġbs": 12005, "ighbor": 12006, "Ġtaken": 12007, "LES": 12008, "formatted": 12009, "rammar": 12010, "Pan": 12011, "Pdf": 12012, "limits": 12013, "OME": 12014, "CLOCK": 12015, "Ġwarn": 12016, "Ġwarnings": 12017, "Ġfully": 12018, "ASCII": 12019, "STER": 12020, "scripts": 12021, "trail": 12022, "FOUND": 12023, ":#": 12024, "VIDEO": 12025, "expectedException": 12026, "Ġaccum": 12027, "imm": 12028, "domainObject": 12029, "NX": 12030, "Ġreplaced": 12031, "ĠExtract": 12032, "ĠLocation": 12033, "aches": 12034, "ansion": 12035, "åĪĨ": 12036, "Fil": 12037, "Lambda": 12038, "hba": 12039, "ĠTy": 12040, "CLR": 12041, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 12042, "how": 12043, "Drawable": 12044, "ipt": 12045, "fy": 12046, "Ġ300": 12047, "mtx": 12048, "PHPExcel": 12049, "ĠVisit": 12050, "Pen": 12051, "Ġmerged": 12052, "getUser": 12053, "sbi": 12054, "istribute": 12055, "wpa": 12056, "Ġspecifies": 12057, "ObjectMeta": 12058, "Ġlarger": 12059, "ĠStringRef": 12060, "journal": 12061, "measure": 12062, "Rpc": 12063, "ssibly": 12064, "luent": 12065, "']->": 12066, "Testing": 12067, "coords": 12068, "Ġvisitor": 12069, "Removed": 12070, "ĠNon": 12071, "setName": 12072, "ARE": 12073, "Detect": 12074, "take": 12075, "querySelector": 12076, "qe": 12077, "Ġsom": 12078, "Pix": 12079, "HttpRequest": 12080, "Gh": 12081, "Ġ'__": 12082, "Ġasynchronous": 12083, "Walk": 12084, "xuICAgICAg": 12085, "Fixture": 12086, "ĠNative": 12087, "=/": 12088, "CancellationToken": 12089, "ĠPI": 12090, "General": 12091, "Dimensions": 12092, "frm": 12093, "Ġfar": 12094, "ĠStandard": 12095, "Workflow": 12096, "Attrib": 12097, "etter": 12098, "Less": 12099, "EventType": 12100, "Ġfirmware": 12101, "noConflict": 12102, "Ġbfd": 12103, "ĠExamples": 12104, "Pixels": 12105, "ih": 12106, "Inventory": 12107, "bone": 12108, "AnchorStyles": 12109, "ĠUns": 12110, "ContainsKey": 12111, "Composite": 12112, "Plugins": 12113, "ĠGC": 12114, "Fl": 12115, "ĠFail": 12116, ",\"\\": 12117, "scrollspy": 12118, "åĢ¼": 12119, "OSImage": 12120, "\")))": 12121, "ä¸Ĭ": 12122, "Ġformats": 12123, "Blend": 12124, "SYSTEM": 12125, "prox": 12126, "expires": 12127, "Vz": 12128, "Ġcandidate": 12129, "Addresses": 12130, "googleapi": 12131, "modify": 12132, "ĠAtom": 12133, "bios": 12134, "Cam": 12135, "AVE": 12136, "firstChild": 12137, "2014": 12138, "Ġrescue": 12139, "Ġreinterpret": 12140, "0628": 12141, "Ġimplicit": 12142, "READY": 12143, "sol": 12144, "Ġshare": 12145, "Est": 12146, "ĠRPC": 12147, "ĠgetName": 12148, "park": 12149, "printLine": 12150, "hdmi": 12151, "Ġwindows": 12152, "0646": 12153, "Ġcompatibility": 12154, "getNext": 12155, "consumer": 12156, "cade": 12157, "rees": 12158, "ĠEncode": 12159, "checksum": 12160, "DNS": 12161, "sequent": 12162, "***": 12163, "Ġfiltered": 12164, "Continue": 12165, "Ġ/\\": 12166, "PACK": 12167, "LogicalSizeInGB": 12168, "permission": 12169, "Specific": 12170, "terminal": 12171, "cookies": 12172, "Adds": 12173, "ĠTri": 12174, "'<": 12175, "Ġmaps": 12176, "د": 12177, "ĠSYS": 12178, "Definitions": 12179, "ĠFUN": 12180, "Ġunion": 12181, "itr": 12182, "MATCH": 12183, "ĠWin": 12184, "DECIMAL": 12185, "Ġindexes": 12186, "Skill": 12187, "\")).": 12188, "blur": 12189, "klass": 12190, "fff": 12191, "RTC": 12192, "ĠDEFINITION": 12193, "UU": 12194, "smp": 12195, "Ġplugins": 12196, "Sq": 12197, "pany": 12198, "getAll": 12199, "negative": 12200, "rowse": 12201, "ValueType": 12202, "(\"--": 12203, "Ġconstraints": 12204, "Ġjasmine": 12205, "ت": 12206, "ĉĉĉĉĉĠĠĠĠĠ": 12207, "Ġrestart": 12208, "Singleton": 12209, "ĠTO": 12210, "hooks": 12211, "VA": 12212, "ĠQVERIFY": 12213, "getField": 12214, "XR": 12215, "ĠFoo": 12216, "Ġperformance": 12217, "Ġpv": 12218, "cular": 12219, "ç¬": 12220, "oned": 12221, "Aggregate": 12222, "Ġblack": 12223, "pectrum": 12224, "versions": 12225, "letter": 12226, "Ġepoch": 12227, "Ġquoted": 12228, "Ġxmlns": 12229, "Ġ10000": 12230, "IOS": 12231, "Conditional": 12232, "Ġinserted": 12233, "CodeMirror": 12234, "rollers": 12235, "CMP": 12236, "ĠONE": 12237, "ä¿¡": 12238, "ibr": 12239, "DOUBLE": 12240, "DisplayName": 12241, "Ġrpc": 12242, "204": 12243, "izations": 12244, "ĠDatabase": 12245, "Ġannotation": 12246, "MetaData": 12247, "ĠAudio": 12248, "Ġ$\"": 12249, "Implementation": 12250, "Balancer": 12251, "Ġpx": 12252, "outil": 12253, "Palette": 12254, "Ġcam": 12255, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 12256, "ality": 12257, "PubKey": 12258, "Ġcapacity": 12259, "ĠUs": 12260, "Indexes": 12261, "WINDOW": 12262, "INTERFACE": 12263, "Ġreduce": 12264, "DAT": 12265, "ĠCloud": 12266, "Unsigned": 12267, "Ġlisten": 12268, "设": 12269, "PropertyName": 12270, "Ġsegments": 12271, "ε": 12272, "around": 12273, "Ġnormalized": 12274, "fld": 12275, "UGIN": 12276, "Ġnn": 12277, "SPEED": 12278, "ĉĠĠĠĠĠĠĠĠĠĠĠ": 12279, "recursive": 12280, "ĠRoute": 12281, "DRM": 12282, "valueObject": 12283, "phrase": 12284, "Ill": 12285, "fatal": 12286, "æŃ": 12287, ",.": 12288, "includes": 12289, "OWN": 12290, "boundary": 12291, "ftp": 12292, "WEEK": 12293, "glob": 12294, "sas": 12295, "};\\": 12296, "Encoded": 12297, "offsetWidth": 12298, "unity": 12299, "Ġexceptions": 12300, "Needed": 12301, "Rank": 12302, "Ġcred": 12303, "GetName": 12304, "([^": 12305, "Ġdigit": 12306, "getOpcode": 12307, "Repo": 12308, "strcpy": 12309, "(&$": 12310, "EK": 12311, "syn": 12312, "vity": 12313, "Ġrendered": 12314, "vk": 12315, "Ġder": 12316, "Ġbank": 12317, "Apr": 12318, "Cipher": 12319, "]):": 12320, "0440": 12321, "åIJ¦": 12322, "IPv": 12323, "audit": 12324, "tfm": 12325, "')));": 12326, "ĠRaises": 12327, "packets": 12328, "Logs": 12329, "MessageBox": 12330, "icons": 12331, "cursively": 12332, "tour": 12333, "toEqual": 12334, "iggers": 12335, "Inputs": 12336, "izard": 12337, "ĠNAME": 12338, "Ġshouldn": 12339, "ĠProtoMessage": 12340, "Hard": 12341, "Ġincorrect": 12342, "//----------------------------------------------------------------": 12343, "ĠMOZ": 12344, "Finder": 12345, "BIG": 12346, "à¹": 12347, "ĠSys": 12348, "Mismatch": 12349, "ĠDomain": 12350, "algorithm": 12351, "anger": 12352, "ĠCPL": 12353, "Spe": 12354, ");}": 12355, "Ġfloor": 12356, "amps": 12357, "=\\": 12358, "orthand": 12359, "ĠLength": 12360, "Ġchunks": 12361, "atory": 12362, "ĠEquals": 12363, "Frequency": 12364, "While": 12365, "Ġgetattr": 12366, "α": 12367, "Nz": 12368, "inite": 12369, "Ġsmaller": 12370, "MY": 12371, "Ġincoming": 12372, "Scheduler": 12373, "ĠFS": 12374, "\"][\"": 12375, "Boundary": 12376, "Ġterms": 12377, "always": 12378, "ĠAss": 12379, "Delim": 12380, "ĠCalled": 12381, "Ġfew": 12382, "264": 12383, "CAN": 12384, "esting": 12385, "Ġaff": 12386, "Repeat": 12387, "joint": 12388, "Ġdash": 12389, "Ġaddition": 12390, "ĠÃ": 12391, "itable": 12392, "sched": 12393, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 12394, "Ġrem": 12395, "Ġ\\\"%": 12396, "bracket": 12397, "DELAY": 12398, "ĠSmallVector": 12399, "Ġmoment": 12400, "ups": 12401, "GetInstance": 12402, "REEN": 12403, "finished": 12404, "Ġ36": 12405, "minimum": 12406, "س": 12407, "ArrayList": 12408, "ĠGot": 12409, "ocab": 12410, "bbox": 12411, "aven": 12412, "misc": 12413, "NoError": 12414, "Router": 12415, "ĠTx": 12416, "JJ": 12417, "Ġfollowed": 12418, "ĠAnal": 12419, "COR": 12420, "EH": 12421, "Sources": 12422, "yB": 12423, "Ġcounts": 12424, "ĠGeneric": 12425, "OPCODE": 12426, "Ġboxes": 12427, "could": 12428, "ĠPosition": 12429, "ĠRow": 12430, "Timeval": 12431, "follow": 12432, "ining": 12433, "docker": 12434, "translation": 12435, "[][]": 12436, "PB": 12437, "Ġminor": 12438, "ĠCodeMirror": 12439, "DATETIME": 12440, "vq": 12441, "Ġgradient": 12442, "ĠassertFalse": 12443, "Ġminutes": 12444, "xi": 12445, "Ġcalc": 12446, "è¦ģ": 12447, "ĠMay": 12448, "aliases": 12449, "TextString": 12450, "Flash": 12451, "proj": 12452, "Ġdeferred": 12453, "ĠNdb": 12454, "ĠCV": 12455, "Ġassembly": 12456, "ĠWIN": 12457, "opaque": 12458, "dividual": 12459, "inside": 12460, "!--": 12461, "IQ": 12462, "isFunction": 12463, "dark": 12464, "Views": 12465, "ticks": 12466, "RESH": 12467, "ĠSDK": 12468, "thisfile": 12469, "?>": 12470, "large": 12471, "ANG": 12472, "dependencies": 12473, "ĠGuid": 12474, "CEPTION": 12475, "Solver": 12476, "udelay": 12477, "Hy": 12478, "Connector": 12479, "Ġlocked": 12480, "Ġ++$": 12481, "Ġsimilar": 12482, "Additional": 12483, "separ": 12484, "epi": 12485, "controls": 12486, "564": 12487, "INTERNAL": 12488, "uer": 12489, "1010": 12490, "beat": 12491, "Wx": 12492, "Ġoverwrite": 12493, "ĉĉĉĉĉĊ": 12494, "ĠOrder": 12495, "_*": 12496, "ĠCWE": 12497, "Ġask": 12498, "enerated": 12499, "Confirm": 12500, "INSTANCE": 12501, "Wa": 12502, "ghi": 12503, "SAMPLE": 12504, "WithError": 12505, "ADC": 12506, "Ġscratch": 12507, "Ġhappens": 12508, "ATOMIC": 12509, "Ġslash": 12510, "ternative": 12511, "ĠDefaults": 12512, "Ub": 12513, "AJ": 12514, "ĠVal": 12515, "ĠPerform": 12516, "Ġ**/": 12517, "STORE": 12518, "Boot": 12519, "prise": 12520, "aat": 12521, "Ġ])": 12522, "mkdir": 12523, "lations": 12524, "------------------------------------------------": 12525, "nfs": 12526, "DROP": 12527, "Pressed": 12528, "Tabs": 12529, "Glvb": 12530, "ĠInvoke": 12531, "Initialized": 12532, "queues": 12533, "POLL": 12534, "keywords": 12535, "chunks": 12536, "Ġbi": 12537, "$/,": 12538, "Dependencies": 12539, "FIN": 12540, "ingerprint": 12541, "EXPECT": 12542, "Review": 12543, "NAMESPACE": 12544, "palette": 12545, "(!(": 12546, "Ġstyles": 12547, "Ġconsider": 12548, "(?:[": 12549, "Ġgeneral": 12550, "Ġevaluate": 12551, "Aq": 12552, "DiscardUnknown": 12553, "ALPH": 12554, "Typed": 12555, ")==": 12556, "ÃŃ": 12557, "FEATURE": 12558, "CURRENT": 12559, "KB": 12560, "Ġiv": 12561, "Ġti": 12562, "OID": 12563, "square": 12564, "Ġgetter": 12565, "ĠPlayer": 12566, "æŀľ": 12567, "Na": 12568, "wall": 12569, "nth": 12570, "Ranges": 12571, "jit": 12572, "DAC": 12573, "sat": 12574, "125": 12575, "Ġkvm": 12576, "Slide": 12577, "air": 12578, "Union": 12579, "ETH": 12580, "Creature": 12581, "fallback": 12582, "çī": 12583, "ĠVec": 12584, "Ġhasattr": 12585, "ĠTemp": 12586, "rn": 12587, "elding": 12588, "122": 12589, "asList": 12590, "Ġsvc": 12591, "Ġ%(": 12592, "ERIC": 12593, "ĠMB": 12594, "Projection": 12595, "SUPPORTED": 12596, "Norm": 12597, "Accessible": 12598, "Ġ%%": 12599, "Ġreached": 12600, "pick": 12601, "ĠGoString": 12602, "RING": 12603, "<>(": 12604, "Ġmicro": 12605, "Ġimpl": 12606, "groupBox": 12607, "Ġhigher": 12608, "TING": 12609, "ĠMM": 12610, "cells": 12611, "ĉĉĉĉĉĉĉĉĉĉĉ": 12612, "ĠSocket": 12613, "Ġstrtolower": 12614, "************************": 12615, "Utf": 12616, "Minus": 12617, "Ġconcat": 12618, "constants": 12619, "jiffies": 12620, "pal": 12621, "alignment": 12622, "lparen": 12623, "Ġprovides": 12624, "startsWith": 12625, "did": 12626, "NCY": 12627, "SOR": 12628, "URIComponent": 12629, "^^": 12630, "credentials": 12631, "Ġtxt": 12632, "Ġdentry": 12633, "KG": 12634, "Ġdr": 12635, "Ġdirty": 12636, "Ġfurther": 12637, "osen": 12638, "Ġali": 12639, "ango": 12640, "Ġformatter": 12641, "Ġ%.": 12642, "ards": 12643, "autorest": 12644, ",\\\"": 12645, "Ġans": 12646, "compar": 12647, "rtw": 12648, "pairs": 12649, "Terminal": 12650, "CEE": 12651, "general": 12652, "inical": 12653, "ĠCore": 12654, "ĠNPT": 12655, ">());": 12656, "ker": 12657, "mw": 12658, "Ġaligned": 12659, "Fy": 12660, "å¼ı": 12661, "ele": 12662, "paused": 12663, "Upgrade": 12664, "('./": 12665, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": 12666, "ĠAv": 12667, "ĠBytes": 12668, "103": 12669, "IEnumerable": 12670, "ZG": 12671, "Vl": 12672, "ĠSupport": 12673, "б": 12674, "Ġxs": 12675, "pcie": 12676, "resolver": 12677, "Exceptions": 12678, "ĠRequired": 12679, "ĠOTHER": 12680, "ZU": 12681, "callbacks": 12682, "Existing": 12683, "STACK": 12684, "ĠVirtual": 12685, "bos": 12686, "icip": 12687, "!\",": 12688, "modifier": 12689, "Mappings": 12690, "ĠLinux": 12691, "ACTIV": 12692, "esp": 12693, "EBUSY": 12694, "ĠThen": 12695, "rates": 12696, "ĠDel": 12697, "verts": 12698, "ĠFound": 12699, "Ġchecker": 12700, "Blank": 12701, "Ġvi": 12702, "Cells": 12703, "BackColor": 12704, "Lun": 12705, "Immediate": 12706, "ĠPur": 12707, "ĠBLOCK": 12708, "about": 12709, "vey": 12710, "ACL": 12711, "descr": 12712, "Ġcontained": 12713, "DQ": 12714, "fan": 12715, "urst": 12716, "Ġcomedi": 12717, "printStackTrace": 12718, "TREE": 12719, "emulate": 12720, "VERT": 12721, "Ġrev": 12722, "assertInstanceOf": 12723, "Locations": 12724, "Viewport": 12725, "indio": 12726, "Reserved": 12727, "åij": 12728, "Ġsnprintf": 12729, "ieve": 12730, "gfx": 12731, "ĠFont": 12732, "Ġdisplayed": 12733, "Ġvolatile": 12734, "specified": 12735, "Ġack": 12736, "Dao": 12737, "thenReturn": 12738, "ĠMulti": 12739, "Infinity": 12740, "ellow": 12741, "lavor": 12742, "Ġcompression": 12743, "Ġleaf": 12744, "Ġlatest": 12745, "StartTime": 12746, "Bg": 12747, "locations": 12748, "Listen": 12749, "Positions": 12750, "Arn": 12751, "\"/": 12752, "exceptions": 12753, "sidered": 12754, "StateException": 12755, ".*?": 12756, "removeChild": 12757, "ĠMBB": 12758, "ĠLib": 12759, "adget": 12760, "versal": 12761, "Ġvc": 12762, "POINTER": 12763, "Calculate": 12764, "Ġfamily": 12765, "ĠDT": 12766, "Capabilities": 12767, "xmit": 12768, "Ġsrv": 12769, "getFile": 12770, "ĠPrepare": 12771, "erce": 12772, "vY": 12773, ")],": 12774, "ĠBE": 12775, "Ġdifference": 12776, "bss": 12777, "cov": 12778, "writable": 12779, "DURATION": 12780, "ĠConfigure": 12781, "Ġfr": 12782, "childNodes": 12783, "016": 12784, "åĪ°": 12785, "ä": 12786, "Ġevalu": 12787, "mmetric": 12788, "gree": 12789, "Aug": 12790, "Ġ'&#": 12791, "_]+": 12792, "Ġels": 12793, "lencode": 12794, "ĠBody": 12795, "operations": 12796, "Ġ<<=": 12797, "./": 12798, "Ġjiffies": 12799, "ĠCOL": 12800, "Ġintent": 12801, "Ġapr": 12802, "DOC": 12803, "person": 12804, "nodeType": 12805, "Roles": 12806, "à¥į": 12807, "Bindings": 12808, "arity": 12809, "ObjC": 12810, "qb": 12811, "ĠTimeSpan": 12812, "ĠSQLException": 12813, "wrong": 12814, "gf": 12815, "Ġcertain": 12816, "Ġtid": 12817, "Ġretrieved": 12818, "inspect": 12819, "SuppressWarnings": 12820, "getRequest": 12821, "ĠPO": 12822, "Steps": 12823, "numpy": 12824, "Ġuuid": 12825, "Ġuc": 12826, "ENSION": 12827, "Ġmarked": 12828, "jpeg": 12829, "LAST": 12830, "levant": 12831, "âĢĶâĢĶâĢĶâĢĶ": 12832, "Hour": 12833, "Assertion": 12834, "ools": 12835, "xpath": 12836, "getM": 12837, "Jax": 12838, "initializer": 12839, "Geom": 12840, "directive": 12841, "Cols": 12842, "ï¼ļ": 12843, "Parallel": 12844, "Ġautog": 12845, "lcd": 12846, "upported": 12847, "EXIST": 12848, "getTarget": 12849, "Ġ(++": 12850, "STATS": 12851, "Ġaddrlen": 12852, "ĠEmpty": 12853, "WithContext": 12854, "Rune": 12855, "xor": 12856, "Ġprobe": 12857, "Arrow": 12858, ")&&(": 12859, "SID": 12860, "icates": 12861, "tras": 12862, "lements": 12863, "CAL": 12864, "LCB": 12865, "LR": 12866, "ĠDetermine": 12867, "inet": 12868, "ceeded": 12869, "->$": 12870, "TypeOf": 12871, "å·": 12872, "offs": 12873, "Ġ'=": 12874, "fence": 12875, "udev": 12876, "Ġexc": 12877, "setEnabled": 12878, "supports": 12879, "wdt": 12880, "Android": 12881, "ĠReport": 12882, "Ġ*>": 12883, "BUILD": 12884, "Damage": 12885, "Cb": 12886, "Pie": 12887, "COLUMN": 12888, "ĠATA": 12889, "Illum": 12890, "Spacing": 12891, "Threads": 12892, "ently": 12893, "IsEmpty": 12894, "inity": 12895, "Ġmanaged": 12896, "escaped": 12897, "oe": 12898, "Ġtrunc": 12899, "wiki": 12900, "Lexer": 12901, "\")){": 12902, "Ġthough": 12903, "Ġrecent": 12904, "delayed": 12905, "Ġgeometry": 12906, "éĶ": 12907, "COPY": 12908, "Ġdirective": 12909, "rans": 12910, "ircular": 12911, "Ġcrc": 12912, "Tail": 12913, "thumb": 12914, "Ġpositions": 12915, "ĠParser": 12916, "Canonical": 12917, "GetCurrent": 12918, "PrivateKey": 12919, "Ġhaving": 12920, "ki": 12921, "ĠpostIndex": 12922, ",!": 12923, "Ġsolid": 12924, "srv": 12925, "Ġconflict": 12926, "getChild": 12927, "ĠPRO": 12928, "bra": 12929, "Ġtv": 12930, "cod": 12931, "manifest": 12932, "Bra": 12933, "xffffffff": 12934, "Cred": 12935, "éĿ": 12936, "Ġletter": 12937, "needs": 12938, "allocated": 12939, "ĠEOF": 12940, "PageToken": 12941, "mii": 12942, "+)": 12943, "Cleanup": 12944, "Ġ\"__": 12945, "StringRef": 12946, "Uses": 12947, "EXPORT": 12948, "die": 12949, "but": 12950, "Ġnewline": 12951, "*/,": 12952, "VG": 12953, "Reverse": 12954, "xhr": 12955, "Ġwi": 12956, "nor": 12957, "å±": 12958, "ALLOW": 12959, "Linux": 12960, "qd": 12961, "training": 12962, "Coords": 12963, "ĠASN": 12964, "ĠHtml": 12965, "kobj": 12966, "Ġlooking": 12967, "Highlighter": 12968, "nid": 12969, "ĠPORT": 12970, "callable": 12971, "isor": 12972, "ĠArgumentException": 12973, "ĠErrInvalid": 12974, "eh": 12975, "notifier": 12976, "METHODIMP": 12977, "Physics": 12978, "ROUND": 12979, "MaxLength": 12980, "stitution": 12981, "ZT": 12982, "clusion": 12983, "currence": 12984, "OCOL": 12985, "Ġtun": 12986, "NodeType": 12987, "Ġoperands": 12988, "choice": 12989, "Git": 12990, "ĠJust": 12991, "Curr": 12992, "received": 12993, "åıĤ": 12994, "()];": 12995, "Ġrsa": 12996, "gap": 12997, "GX": 12998, "Ġ'('": 12999, "pio": 13000, "}],": 13001, "ĠCor": 13002, "ĠNaN": 13003, "Ġjump": 13004, "Strict": 13005, "ãĥ¼": 13006, "Ack": 13007, "Ġ{})": 13008, "IMPORT": 13009, "Dummy": 13010, "Ġprototype": 13011, "ddr": 13012, "lsl": 13013, "Please": 13014, "Ġfour": 13015, "\"]',": 13016, "ADE": 13017, ":\"[": 13018, "shown": 13019, "Ġinc": 13020, "Like": 13021, "tracker": 13022, "ecause": 13023, "tgt": 13024, "urlencode": 13025, ".\";": 13026, "еÑĢ": 13027, "ĠIX": 13028, "Ġaway": 13029, "ĠUnsupported": 13030, "currentTime": 13031, "Ġgit": 13032, "è¿Ķ": 13033, "Ġata": 13034, "Pause": 13035, "Numbers": 13036, "ĠArrays": 13037, "shost": 13038, "ĠOb": 13039, "Unary": 13040, "BIND": 13041, "Ġends": 13042, "Given": 13043, "radeon": 13044, "Ġcond": 13045, "ĠNVPTX": 13046, "Px": 13047, "charCodeAt": 13048, "getColumn": 13049, "fcp": 13050, "pwm": 13051, "TASK": 13052, "Ġsubprocess": 13053, "CRYPT": 13054, "')))": 13055, "GI": 13056, "icky": 13057, "æłĩ": 13058, "ored": 13059, "horizontal": 13060, "alformed": 13061, "trap": 13062, "getX": 13063, "ĠMember": 13064, "micro": 13065, "DiskConfiguration": 13066, "PID": 13067, "els": 13068, "Ġsep": 13069, "ĠTrack": 13070, "udent": 13071, "issues": 13072, "Ġopened": 13073, "ĠAfter": 13074, "Ġdepending": 13075, "Correct": 13076, "Critical": 13077, "getElementsByTagName": 13078, "Ġsubmit": 13079, "gateway": 13080, "ĠTransaction": 13081, "Shortcut": 13082, "Elt": 13083, "tics": 13084, "Thumb": 13085, "txq": 13086, "Ġprocessor": 13087, "Deleter": 13088, "Allocator": 13089, "rivers": 13090, "Ġfilled": 13091, "GetHashCode": 13092, "ĠTransform": 13093, "Edges": 13094, "maybe": 13095, "Clicked": 13096, "Ġmanifest": 13097, "FJ": 13098, "thers": 13099, "MLElement": 13100, "hu": 13101, "RAW": 13102, "Cli": 13103, "completed": 13104, "Else": 13105, "ĠOver": 13106, "Ġvertical": 13107, "Pull": 13108, "VU": 13109, "Bounding": 13110, "Ġpipeline": 13111, "ĠIDC": 13112, "Sid": 13113, "tar": 13114, "Ġrespect": 13115, "compat": 13116, "++];": 13117, "Ġlogical": 13118, "ĠIterator": 13119, "XXXXXXXX": 13120, "çĤ": 13121, ":\"+": 13122, "2015": 13123, "mlme": 13124, "extends": 13125, "apis": 13126, "ĠOPT": 13127, "Ġslow": 13128, "ĠHashSet": 13129, "Receiver": 13130, "ĠStruct": 13131, "alog": 13132, "Datum": 13133, "IsNil": 13134, "'=>$": 13135, "PPC": 13136, "Templates": 13137, "Did": 13138, "roles": 13139, "dispatcher": 13140, "Invocation": 13141, "0002": 13142, "ο": 13143, "RTL": 13144, "Ġcd": 13145, "ĠXFS": 13146, "UART": 13147, "QUOT": 13148, "Mk": 13149, "appendTo": 13150, "riendly": 13151, "PUSH": 13152, "Ġprediction": 13153, "Ġsatis": 13154, "Devices": 13155, "Dto": 13156, "Ġlittle": 13157, "Ġwho": 13158, "Fx": 13159, "pended": 13160, "SLOT": 13161, "\"&&": 13162, "请": 13163, "ĠMac": 13164, "Ġioutil": 13165, "ĠIntrinsic": 13166, "Accounts": 13167, "Ġwl": 13168, "pology": 13169, "ãĤĴ": 13170, "started": 13171, "Fallback": 13172, "è´": 13173, "Ġconsidered": 13174, "forum": 13175, "dword": 13176, "ĠRegion": 13177, "ioaddr": 13178, "Inc": 13179, "ĠStorage": 13180, "Ġperformed": 13181, "ranges": 13182, "orientation": 13183, "ãĤĭ": 13184, "Ġ------------------------------------------------------------------------": 13185, "Ġ):": 13186, "ов": 13187, "ĠUSE": 13188, "cipe": 13189, "TypeError": 13190, "Ġgithub": 13191, "scaled": 13192, "unix": 13193, "Ġsqrt": 13194, "Ġls": 13195, "Ring": 13196, "rozen": 13197, "gog": 13198, "ĠHttpResponse": 13199, "Workspace": 13200, "Dash": 13201, "ĠStyle": 13202, "exact": 13203, "itecture": 13204, "removed": 13205, "hm": 13206, "nat": 13207, "meth": 13208, "VI": 13209, "003": 13210, "bG": 13211, "arily": 13212, "ĠJob": 13213, "Hw": 13214, "MK": 13215, "ĉĉĉĉĉĠĠĠĠĠĠ": 13216, "ĠEncoding": 13217, "combo": 13218, "etermin": 13219, "MAGIC": 13220, "umask": 13221, "permissions": 13222, "Vs": 13223, "ology": 13224, "graphics": 13225, "enqueue": 13226, "Ġha": 13227, "tg": 13228, "aged": 13229, "ĠATTR": 13230, "regional": 13231, ")])": 13232, "rror": 13233, "Ġkill": 13234, "ĠSW": 13235, "rtype": 13236, "mvm": 13237, "optim": 13238, ";\"": 13239, "/);": 13240, "YPTO": 13241, "SING": 13242, "å¸": 13243, ")*(": 13244, "ZZ": 13245, "tif": 13246, "Declar": 13247, "*.": 13248, "Ġ29": 13249, "streams": 13250, "getSub": 13251, "ĠPublic": 13252, "pValue": 13253, "BQU": 13254, "jump": 13255, "Ġpull": 13256, "rew": 13257, "IsNot": 13258, "Tokenizer": 13259, "###": 13260, "authorized": 13261, "Physical": 13262, "Ġcurrency": 13263, "Ġcompiled": 13264, "RQ": 13265, "Encryption": 13266, "erral": 13267, "ailability": 13268, "Rotate": 13269, "*\\\\": 13270, "ĠCar": 13271, "Alive": 13272, "guard": 13273, "Article": 13274, "Bank": 13275, "pmu": 13276, "&&\"": 13277, "Ġperson": 13278, ";\",": 13279, "STY": 13280, "Evalu": 13281, "Connections": 13282, "/\\\\": 13283, "ComponentModel": 13284, "expire": 13285, "Ġautogenerated": 13286, "----------------------------------------------------------------------": 13287, "Ġconsumer": 13288, "Lite": 13289, "ĠProgram": 13290, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 13291, "Ġkv": 13292, "VX": 13293, "picture": 13294, "modes": 13295, "ffffffff": 13296, "Black": 13297, "ĠHelper": 13298, "Ġaverage": 13299, "Ġordered": 13300, "foreign": 13301, "PCL": 13302, "nsI": 13303, "Illuminate": 13304, "isEqualTo": 13305, "ĠJOIN": 13306, "NM": 13307, "å¦": 13308, "0435": 13309, "Ġphysical": 13310, "Leave": 13311, "Supp": 13312, "ĠBr": 13313, "ctrine": 13314, "ĉĉĉĉĉĉĠ": 13315, "STA": 13316, "ilon": 13317, "ĠIF": 13318, "VARI": 13319, "uD": 13320, "demo": 13321, "ĠPass": 13322, "ĠScan": 13323, "Ġrectangle": 13324, "Ġvirt": 13325, "Ġ>',": 13326, "truncate": 13327, "ETCH": 13328, "inp": 13329, "uplex": 13330, "Distribution": 13331, "Ġdefines": 13332, "RELEASE": 13333, "Ġmime": 13334, "Ġbuttons": 13335, "Ġbas": 13336, "ĠALL": 13337, "Ġ---": 13338, "Configs": 13339, "helpers": 13340, "=-=-": 13341, "Picture": 13342, "Ġreferenced": 13343, "mh": 13344, "设置": 13345, "Uid": 13346, "Ġzoom": 13347, "Ġbackup": 13348, "firmware": 13349, "pmd": 13350, "Ġtip": 13351, "broadcast": 13352, "HRESULT": 13353, "Ġcols": 13354, "relax": 13355, "Freq": 13356, "See": 13357, "Circle": 13358, "midi": 13359, "390": 13360, "ĠCALL": 13361, "Seed": 13362, "nowled": 13363, "ĠValues": 13364, "Leaf": 13365, "icmp": 13366, "energy": 13367, "Eula": 13368, "Outer": 13369, "Ġcells": 13370, "Ñĸ": 13371, "ĠDown": 13372, "xuIC": 13373, "BLIC": 13374, "Ġglobals": 13375, "Ġphp": 13376, "Ġinsn": 13377, "ĠAArch": 13378, "Ass": 13379, "pq": 13380, "Wl": 13381, "deps": 13382, "ĠFF": 13383, "REV": 13384, "weep": 13385, "Scaling": 13386, "Skin": 13387, "Throwable": 13388, "Categories": 13389, "еÑĤ": 13390, "('',": 13391, "DataSet": 13392, "Ġdeepcopy": 13393, "Major": 13394, "Ġ2000": 13395, "notes": 13396, "ĠCancellationToken": 13397, "EEEE": 13398, "ä¸ĭ": 13399, "compression": 13400, "Ġsyn": 13401, "AES": 13402, "UPT": 13403, "CURRENCY": 13404, "minute": 13405, "slider": 13406, "Ġngx": 13407, "002": 13408, "AO": 13409, "unted": 13410, "TAIL": 13411, "BOOST": 13412, "rhs": 13413, "OPERAT": 13414, "sessment": 13415, "ĠHE": 13416, "ViewById": 13417, "Tester": 13418, "pipeline": 13419, "Hd": 13420, "bv": 13421, "Ġlevels": 13422, "ĠValidation": 13423, "ĠÑģ": 13424, "efx": 13425, "ract": 13426, "ĠQual": 13427, "æĺ¯åIJ¦": 13428, "ĠImmutable": 13429, "IVER": 13430, "ĠRTC": 13431, "Ġ$(\"#": 13432, "Ġcompressed": 13433, "symbols": 13434, "ĠvalueObject": 13435, "SOCKET": 13436, "Decimals": 13437, "inym": 13438, "getLength": 13439, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĊ": 13440, "inymce": 13441, "qh": 13442, "shop": 13443, "listeners": 13444, "tell": 13445, "Generation": 13446, "ĠBut": 13447, "circle": 13448, "ĠLock": 13449, "æĸ¹": 13450, "/////": 13451, "bfd": 13452, "bk": 13453, "\":{": 13454, "semble": 13455, "imap": 13456, "dylib": 13457, "InvariantCulture": 13458, "ERS": 13459, "compiled": 13460, "notice": 13461, "Ġmatcher": 13462, "htable": 13463, "Ġcontrols": 13464, "REPL": 13465, "Jobs": 13466, "Half": 13467, "Stride": 13468, "Qualified": 13469, "Ax": 13470, "PSB": 13471, "=\"#": 13472, "covered": 13473, "ROLL": 13474, "sidebar": 13475, "Ġinterest": 13476, "Square": 13477, "Ġ\"@": 13478, "elt": 13479, "Digit": 13480, "DEN": 13481, "SCALE": 13482, "ike": 13483, "ĠVAR": 13484, "ior": 13485, "ergy": 13486, "icol": 13487, "ĠMat": 13488, "fsm": 13489, "Ġgeneration": 13490, "ĠLookup": 13491, "references": 13492, "TZ": 13493, "PROCESS": 13494, "Undo": 13495, "ĠCollections": 13496, "Ġfname": 13497, "mib": 13498, "erp": 13499, "SDK": 13500, "ĠSwift": 13501, "Ġshutdown": 13502, "Ġhours": 13503, "pcs": 13504, "Ġapplies": 13505, "JNI": 13506, "sts": 13507, "CLU": 13508, "dependency": 13509, "Ġterminal": 13510, "ifec": 13511, "Ġquestion": 13512, "istence": 13513, "Sector": 13514, "beans": 13515, "describe": 13516, "ablish": 13517, "legend": 13518, "Purifier": 13519, "DEC": 13520, "æĸ°": 13521, "éĻ¤": 13522, "AUDIO": 13523, "CompactTextString": 13524, "Roll": 13525, "ĠDoc": 13526, "å¹": 13527, "[@": 13528, "Ġaux": 13529, "Recommended": 13530, "abcdefghi": 13531, "ĠConnect": 13532, "ticket": 13533, "Ġinspect": 13534, "ĠJump": 13535, "gradient": 13536, "Ġsink": 13537, "``.": 13538, "terminate": 13539, "correlation": 13540, "Ġvectors": 13541, "Pairs": 13542, "âµ": 13543, "pel": 13544, "Since": 13545, "ĠProduct": 13546, "Ġ\":\"": 13547, "Ġ180": 13548, "Will": 13549, "coverage": 13550, "implify": 13551, "MAT": 13552, "Ġdvb": 13553, "pathname": 13554, "AAC": 13555, "Ġguid": 13556, "endswith": 13557, "pring": 13558, "rgba": 13559, "{}{": 13560, "Jump": 13561, "Ġ\",\",": 13562, "istributed": 13563, "getConfig": 13564, "Ġunix": 13565, "224": 13566, "Creator": 13567, "ĠHD": 13568, "Ġactivation": 13569, "Ġvalidator": 13570, "Balance": 13571, "Ġ123": 13572, "çĤ¹": 13573, "è¿ĶåĽŀ": 13574, "matching": 13575, "ĠTRACE": 13576, "rection": 13577, "pline": 13578, "parm": 13579, "Streamer": 13580, "addChild": 13581, "editable": 13582, "avor": 13583, "åĩº": 13584, "ifecycle": 13585, "dz": 13586, "lastic": 13587, "Ġblue": 13588, "ĠTab": 13589, "Tech": 13590, "Ray": 13591, "ÛĮ": 13592, "Ġв": 13593, "æĪ·": 13594, "reet": 13595, "ĠEnter": 13596, "(\\\"": 13597, "][\"": 13598, "Ġ33": 13599, "ĠCLASS": 13600, "getAs": 13601, "Ġcompatible": 13602, "Ġcanonical": 13603, "getCurrentToken": 13604, "Ġbbox": 13605, "ĠEE": 13606, "Starting": 13607, "snap": 13608, "mnt": 13609, "CRC": 13610, "sink": 13611, "strtolower": 13612, "Ġwallet": 13613, "lipse": 13614, "ĠBegin": 13615, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA": 13616, "Best": 13617, "longDate": 13618, "ecc": 13619, "Ġ(),": 13620, "Locator": 13621, "Attack": 13622, "_{": 13623, "ĠdefaultValue": 13624, "Hero": 13625, "erv": 13626, "ĠTWO": 13627, "åĽ¾": 13628, "Ġ__('": 13629, "Ġmoved": 13630, "Catch": 13631, "GetObject": 13632, "Fee": 13633, "Backward": 13634, "wave": 13635, "Ġ127": 13636, "reqHeaders": 13637, "Ġexecutable": 13638, "ĠCA": 13639, "ferred": 13640, "Mass": 13641, "Defs": 13642, "monthNames": 13643, "FQ": 13644, "Ġaxes": 13645, "mad": 13646, "quad": 13647, "ircu": 13648, "TRANSITION": 13649, "Gra": 13650, "isNaN": 13651, "toInt": 13652, "NewLine": 13653, "ĠGiven": 13654, "899": 13655, "Counts": 13656, "Ġlogs": 13657, "Ġpytest": 13658, "ĠBN": 13659, "ĠretVal": 13660, "IEEE": 13661, "WhiteSpace": 13662, "markup": 13663, "WK": 13664, "Incoming": 13665, "Suspend": 13666, "ĠSIG": 13667, "smtp": 13668, "Ġgt": 13669, "IDLE": 13670, "skin": 13671, "Duplicate": 13672, "dic": 13673, "llx": 13674, "ç¤": 13675, "outdent": 13676, "ĠSER": 13677, "ENOENT": 13678, "ĠASCII": 13679, "Ġearly": 13680, "kele": 13681, "LayoutPanel": 13682, "Ġft": 13683, "Dirs": 13684, "Nj": 13685, "MARY": 13686, "NP": 13687, "udp": 13688, "Magic": 13689, "redis": 13690, "Poll": 13691, "RefCount": 13692, "ĠMEM": 13693, ":\"#": 13694, "Servlet": 13695, "Ġdie": 13696, "EXCEPTION": 13697, "Ġheld": 13698, "Ġopening": 13699, "ializable": 13700, "ĠCallingConvention": 13701, "Ġmag": 13702, "DoesNot": 13703, "errorCode": 13704, "Outcome": 13705, "Ġprompt": 13706, "cases": 13707, "Ġacross": 13708, "Ġbean": 13709, "%=": 13710, "armon": 13711, "Ġcomma": 13712, "iommu": 13713, "Vi": 13714, "cms": 13715, "keyboard": 13716, "allocator": 13717, "ĠlocalVar": 13718, "mmap": 13719, "']]": 13720, "IntOverflow": 13721, "UNLOCK": 13722, "getLast": 13723, "ĠArr": 13724, "Sorted": 13725, "Ġdocs": 13726, "Sensor": 13727, "ĠSplit": 13728, "Scanner": 13729, "Ticks": 13730, "OLEAN": 13731, "few": 13732, "ShowIn": 13733, "BOT": 13734, "ĠTEXT": 13735, "Caller": 13736, "Deprecated": 13737, "1234567890": 13738, "ĠPC": 13739, "ĠMPI": 13740, "HEIGHT": 13741, "normalized": 13742, "Ġplaceholder": 13743, "TAB": 13744, "ĠErrIntOverflow": 13745, "errain": 13746, "ĠMerge": 13747, "=\",": 13748, "аÑĤ": 13749, "Frag": 13750, "decrypt": 13751, "RGBA": 13752, "Implicit": 13753, "ĠACT": 13754, "Setter": 13755, "dg": 13756, "Python": 13757, "Been": 13758, "prio": 13759, "HL": 13760, "dbc": 13761, "Animator": 13762, "Tooltip": 13763, "Principal": 13764, ")(),": 13795, "dj": 13796, "åŀ": 13797, "Ġhorizontal": 13798, "à¯": 13799, "RP": 13800, "routes": 13801, "There": 13802, "ĠMe": 13803, "210": 13804, "Ġ45": 13805, "Charset": 13806, "GG": 13807, "Wrong": 13808, "cI": 13809, "ĠUnit": 13810, "æĹ¥": 13811, "Ġtooltip": 13812, "Deferred": 13813, "ĠToString": 13814, "Ġign": 13815, "ĠRO": 13816, "LOOP": 13817, "CBC": 13818, "Ġslide": 13819, "ĠREAD": 13820, "Ġsctp": 13821, "(@\"": 13822, "Ġarm": 13823, "GetData": 13824, "اÙĦ": 13825, "BK": 13826, "å¦Ĥ": 13827, "DES": 13828, "abling": 13829, "sliding": 13830, "yo": 13831, "Ġlaunch": 13832, "ĠLI": 13833, "Episode": 13834, "pixels": 13835, "versed": 13836, "Optim": 13837, "OfType": 13838, "ĠIDs": 13839, "Ġfraction": 13840, "Closure": 13841, "lz": 13842, "thr": 13843, "Aw": 13844, "Assembler": 13845, "})\\": 13846, "ĠApi": 13847, "respond": 13848, "subscriptions": 13849, ".+": 13850, "Checksum": 13851, "HostCaching": 13852, "Vm": 13853, "undo": 13854, "integr": 13855, "DEPTH": 13856, "sense": 13857, "Question": 13858, "hist": 13859, "ãĢģ": 13860, "åıĤæķ°": 13861, "illisecond": 13862, "avigate": 13863, "Triangle": 13864, "ancestor": 13865, "()\",": 13866, "ConfigureAwait": 13867, "Ġstores": 13868, "indexes": 13869, "Ġ63": 13870, "eof": 13871, "BigEndian": 13872, "marshaller": 13873, "Ġplease": 13874, "otor": 13875, "Ïģ": 13876, "ĠTC": 13877, "Ġaccepts": 13878, "________________": 13879, ";&": 13880, "idence": 13881, "ĠSync": 13882, "å½ķ": 13883, "TryGetValue": 13884, "Parsed": 13885, "Persoon": 13886, "PACKET": 13887, "nu": 13888, "also": 13889, "@@@@@@@": 13890, "ection": 13891, "Ġrp": 13892, "DESCRIPT": 13893, "getWidth": 13894, "ĠUUID": 13895, "Ġroll": 13896, "alive": 13897, "COMMENT": 13898, "Ym": 13899, "Ġpf": 13900, "Ġ//$": 13901, "ä¿¡æģ¯": 13902, "jan": 13903, "çŃ": 13904, "ĠProtocol": 13905, "Ġrendering": 13906, "Managed": 13907, "Ġexponent": 13908, "Ġpassing": 13909, "æŁ¥": 13910, "Ġiterate": 13911, "packages": 13912, "Ġhelpers": 13913, "SEN": 13914, "ĠZero": 13915, "upt": 13916, "mixer": 13917, "ny": 13918, "ед": 13919, "SENT": 13920, "ĠRF": 13921, "ToolTip": 13922, "LU": 13923, "Motion": 13924, "ĠLD": 13925, "Ship": 13926, "future": 13927, "Ġquick": 13928, "leting": 13929, "Ġfun": 13930, "OutOfRange": 13931, "ATTRIBUTE": 13932, "Saved": 13933, "Ġbn": 13934, "ĠLayout": 13935, "ĠFull": 13936, "StringValue": 13937, "IDI": 13938, "ĠSK": 13939, "NER": 13940, "Ġsections": 13941, "Ġ99": 13942, "ĠSerialize": 13943, "SHARED": 13944, "Between": 13945, "PART": 13946, "extended": 13947, "Ġqp": 13948, "Ġexpressions": 13949, "candidate": 13950, "ĠMips": 13951, "CNTL": 13952, "Ġnc": 13953, "ĠFields": 13954, "STAND": 13955, "gable": 13956, "toolbar": 13957, "nand": 13958, "unable": 13959, "eE": 13960, "Orig": 13961, "AppendLine": 13962, "è·": 13963, "cgo": 13964, "Ġarbit": 13965, "UserName": 13966, "JE": 13967, "hand": 13968, "('');": 13969, "mpeg": 13970, "Ġrf": 13971, "Ġvb": 13972, "Ġencrypted": 13973, "Ġmacro": 13974, "xuICB": 13975, "Ġraised": 13976, "ALPHA": 13977, "undef": 13978, "ĠHelp": 13979, "Ġkmalloc": 13980, "åı¯": 13981, "Ġpanic": 13982, "ĠReal": 13983, "Ġ35": 13984, "velop": 13985, "CONN": 13986, "userAgent": 13987, "utc": 13988, ":/\\": 13989, "700": 13990, "Ġhd": 13991, "Ġcancellation": 13992, "lazy": 13993, "Ġdep": 13994, "ĠPIX": 13995, "workspace": 13996, "Pres": 13997, "declare": 13998, "rating": 13999, "Ġcle": 14000, "deli": 14001, "ĠerrorResponse": 14002, "Ġstrcmp": 14003, "ĠOpt": 14004, "Raster": 14005, "ĠGu": 14006, "014": 14007, "apps": 14008, "Whitespace": 14009, "ĠDiag": 14010, "ĠCondition": 14011, "mesa": 14012, "Ġdojo": 14013, "ĠScal": 14014, "Handles": 14015, "dispose": 14016, "rng": 14017, "coeff": 14018, "izable": 14019, "¨¡": 14020, "Ġqueries": 14021, "Ġassignment": 14022, "setopt": 14023, "Rendering": 14024, "Ġhton": 14025, "lope": 14026, "scanf": 14027, "ĠNL": 14028, "Ajax": 14029, "}`": 14030, "Quad": 14031, "linkname": 14032, "ĠErrInvalidLength": 14033, "GED": 14034, "gh": 14035, "MaxValue": 14036, "234": 14037, "dbgs": 14038, "Ġvisual": 14039, ";/": 14131, "Ġdet": 14132, "charge": 14133, "getter": 14134, "Servers": 14135, "ĠScroll": 14136, "sdev": 14137, "runner": 14138, "Levels": 14139, "RequestId": 14140, "æİ¥": 14141, "\"}]": 14142, "ceil": 14143, "readyState": 14144, "ey": 14145, "nitude": 14146, "Ġsv": 14147, "ilege": 14148, "ODING": 14149, "ĠQTest": 14150, "åĬ¨": 14151, "posable": 14152, "(**": 14153, "+=\"": 14154, "irected": 14155, "ĠOPEN": 14156, "msgs": 14157, "volatile": 14158, "Ġmut": 14159, "Ġ(--": 14160, "prepend": 14161, "configs": 14162, "èĩ": 14163, "Ġidle": 14164, "RAD": 14165, "multiply": 14166, "Ġlinked": 14167, "hf": 14168, "Aff": 14169, "PCLZIP": 14170, "AH": 14171, "egid": 14172, "PARSE": 14173, "456": 14174, "VID": 14175, "OFT": 14176, "Ġonto": 14177, "Reject": 14178, "addrlen": 14179, "Ġclazz": 14180, "ccb": 14181, "sysfs": 14182, "TreeNode": 14183, "Ġna": 14184, "gogo": 14185, "postIndex": 14186, "resentation": 14187, "Ġderived": 14188, ":\"\",": 14189, "pkey": 14190, "spell": 14191, "GID": 14192, "Ġaren": 14193, "operands": 14194, "transitioning": 14195, "Segments": 14196, "elist": 14197, "Then": 14198, "Vd": 14199, "PrivacyUri": 14200, "Prefs": 14201, ">>>": 14202, "obs": 14203, "ORITY": 14204, "ĠRHS": 14205, "ListItem": 14206, "Ġfilesystem": 14207, "apr": 14208, "IBLE": 14209, "ĠSHA": 14210, "hore": 14211, "wqe": 14212, "Ġiio": 14213, "ĠBenchmark": 14214, "moveTo": 14215, "ĠModal": 14216, "arded": 14217, "ĠRoot": 14218, "ming": 14219, "pat": 14220, "Mn": 14221, "needed": 14222, "()};": 14223, "shortDate": 14224, "Ġnf": 14225, "emulateTransitionEnd": 14226, "NPC": 14227, "Utc": 14228, "ĠFLAGS": 14229, "kvm": 14230, "chmod": 14231, "Arc": 14232, "ĠUP": 14233, "Ġcalendar": 14234, "134": 14235, "vest": 14236, "Ġiwl": 14237, "ENA": 14238, "('$": 14239, "Ġbeta": 14240, "ager": 14241, "Ġfloating": 14242, "'/": 14243, "Allocate": 14244, "Ho": 14245, "Ġseek": 14246, "Ġln": 14247, "Ġmajor": 14248, "shortTime": 14249, "Ġrecursive": 14250, "ĠParent": 14251, "ĠWest": 14252, "Ġmaint": 14253, "Subscriber": 14254, "ObjectType": 14255, "lhs": 14256, "\":{\"": 14257, "IsFalse": 14258, "Emp": 14259, "album": 14260, "ĠCharacter": 14261, "å½ĵ": 14262, "ĠDirect": 14263, "hub": 14264, "ICON": 14265, "NK": 14266, "stored": 14267, "0633": 14268, "getHeader": 14269, "izz": 14270, "ocused": 14271, "STS": 14272, "Ġillegal": 14273, "dictionary": 14274, "FieldName": 14275, "Ġthird": 14276, "curse": 14277, "))}": 14278, "uplicates": 14279, "ĠMANY": 14280, "digits": 14281, "++++": 14282, "Ġtorch": 14283, "erve": 14284, "ertificates": 14285, "who": 14286, "Opacity": 14287, "Hand": 14288, "seen": 14289, "examples": 14290, "Ġpolygon": 14291, "nullable": 14292, "IDENT": 14293, "compact": 14294, "Blur": 14295, "Ġstatistics": 14296, "RECORD": 14297, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 14298, "phan": 14299, "resourceGroupName": 14300, "Ġregistration": 14301, "Ġ']": 14302, "ĠTAG": 14303, "strncmp": 14304, "Greater": 14305, "ement": 14306, "sge": 14307, "Fr": 14308, "TG": 14309, "Mag": 14310, "Recogn": 14311, "Ġspecification": 14312, ".\",\"": 14313, "ĠBad": 14314, "ĠInvalidOperationException": 14315, "ina": 14316, "getHeight": 14317, "({\"": 14318, "IPV": 14319, "ĠHTMLPurifier": 14320, "cpus": 14321, "FirstOrDefault": 14322, "ĠSVG": 14323, "ÑĨ": 14324, "Scripts": 14325, "scb": 14326, "comes": 14327, "ĠSTATE": 14328, ";\\\\": 14329, "rogate": 14330, "é¢": 14331, "ENUM": 14332, "PWR": 14333, "\"});": 14334, "Ġ\".\",": 14335, "Ġprog": 14336, "served": 14337, "AGAIN": 14338, "artbeat": 14339, "BUSY": 14340, "ENSURE": 14341, "ĠFW": 14342, "MBOL": 14343, "Ġholds": 14344, "Routing": 14345, "getTable": 14346, "THROW": 14347, "Bot": 14348, "GINE": 14349, "Credential": 14350, "stricted": 14351, "ullet": 14352, "Ġmsm": 14353, "DIG": 14354, "ĠQScriptValue": 14355, "orb": 14356, "Php": 14357, "Ġsess": 14358, "Ġ'['": 14359, "UDP": 14360, "ARGS": 14361, "IME": 14362, "contentType": 14363, "zZ": 14364, "104": 14365, "Ġconfirm": 14366, "SHORTMONTH": 14367, "Ġissues": 14368, "fullDate": 14369, "cheduling": 14370, "ĠThrowable": 14371, "VL": 14372, "iow": 14373, "reo": 14374, "relu": 14375, "ĠPLL": 14376, "Ensure": 14377, "ĠTexture": 14378, "Ig": 14379, "ression": 14380, "VERBO": 14381, "Ġfixture": 14382, "mlx": 14383, "AMPMS": 14384, "duces": 14385, "visual": 14386, "GameObject": 14387, "SHORTDAY": 14388, "pev": 14389, "ĠgetVF": 14390, "ffs": 14391, "Calcul": 14392, "åĪĹ": 14393, "ĠSmarty": 14394, "ĠPOST": 14395, "Ġcome": 14396, "ACC": 14397, "Written": 14398, "CEEDED": 14399, "ssian": 14400, "Fraction": 14401, "Ġctor": 14402, "}});": 14403, "laims": 14404, "ĠSB": 14405, "stopPropagation": 14406, "Ġequals": 14407, "Ġnameof": 14408, "ĠAlign": 14409, "mediumTime": 14410, "mediumDate": 14411, "Fault": 14412, "ission": 14413, "Ġ[:": 14414, "ifp": 14415, "tions": 14416, "mic": 14417, "('{": 14418, "REMOT": 14419, "ĠController": 14420, "////////////////////////////////////////////////////////////////////////": 14421, "pluralCat": 14422, "çIJĨ": 14423, "KS": 14424, "tu": 14425, "health": 14426, "JO": 14427, "Instanti": 14428, "allery": 14429, "Ġseems": 14430, "(/^\\": 14431, "Ġbounding": 14432, "Such": 14433, "Assignable": 14434, "CommandLine": 14435, "rottle": 14436, "IW": 14437, "Ġinverse": 14438, "Timespec": 14439, "mgmt": 14440, "Modifiers": 14441, "Ġlooks": 14442, "Ġgreen": 14443, "rk": 14444, "ĠDR": 14445, "ĠPattern": 14446, "WriteByte": 14447, "Fit": 14448, "з": 14449, "Ġcompress": 14450, "phab": 14451, "paddr": 14452, "Ġdetection": 14453, "stamps": 14454, "Ġadvance": 14455, "nh": 14456, "waitFor": 14457, "qK": 14458, "[*": 14459, "Pick": 14460, "wrapped": 14461, "lips": 14462, "NonNull": 14463, "SIGNED": 14464, "CLEAR": 14465, "æ³ķ": 14466, "168": 14467, "ĠMessageBox": 14468, "PV": 14469, "jac": 14470, "assembly": 14471, "Xd": 14472, "mel": 14473, "Ġelsif": 14474, "Ġ)->": 14475, "ĠLet": 14476, "ĠRx": 14477, "Mj": 14478, "Recv": 14479, "licable": 14480, "TreeView": 14481, "Ġgrunt": 14482, "Ġ34": 14483, "!(": 14484, "setState": 14485, "HN": 14486, "Ġdeli": 14487, "ĠGraphics": 14488, "Ġchrome": 14489, "TOOL": 14490, "аÑĢ": 14491, "Cr": 14492, "sdata": 14493, "Ġspell": 14494, "ĠFEW": 14495, "bold": 14496, "ĠFlags": 14497, "ĠResolve": 14498, "pet": 14499, "goog": 14500, "2007": 14501, "åIJİ": 14502, "Ġindividual": 14503, "_\"": 14504, "Ġincrease": 14505, "Wrapped": 14506, "Cpp": 14507, "sparse": 14508, "userid": 14509, "005": 14510, "finally": 14511, "Ġcat": 14512, "Ġĉĉ": 14513, "Ġintegers": 14514, "QS": 14515, "registers": 14516, "Ġdeclared": 14517, "foobar": 14518, "Ġports": 14519, "Secure": 14520, "ĠFP": 14521, "jq": 14522, "ĠWAR": 14523, "ibl": 14524, "ONSE": 14525, "2011": 14526, "Ġimm": 14527, "/#": 14528, "Temporary": 14529, "JC": 14530, "ITCH": 14531, "ising": 14532, "PERM": 14533, "PROTOCOL": 14534, "Mu": 14535, "ĠMsg": 14536, "sockopt": 14537, "ĠDC": 14538, "heading": 14539, "Ġmodifier": 14540, "regions": 14541, "Ġ(;;)": 14542, "STYLE": 14543, "etc": 14544, "Recursive": 14545, "funcPC": 14546, "Ġobserver": 14547, "hours": 14548, "Fi": 14549, "Lazy": 14550, "LW": 14551, "Ġunlock": 14552, "STEP": 14553, "Intn": 14554, "RegisterInfo": 14555, "relatedTarget": 14556, "Ġidentify": 14557, "ko": 14558, "ĠFIFO": 14559, "even": 14560, "ĠBitmap": 14561, "PropertyChanged": 14562, "Ġmappings": 14563, "arbage": 14564, "Concat": 14565, ">())": 14566, "ĠPackage": 14567, "ufficient": 14568, "ĠBYTE": 14569, "Ġservers": 14570, "aes": 14571, "çł": 14572, "Ġcustomer": 14573, "Wide": 14574, "bz": 14575, "nR": 14576, "mips": 14577, "ĠNeed": 14578, "ĥ½": 14579, "Ġwake": 14580, "Ġpdev": 14581, "Ug": 14582, "charts": 14583, "quick": 14584, "Ġum": 14585, "Bi": 14586, "Os": 14587, "ReturnType": 14588, "Ġpopulate": 14589, "clause": 14590, "rfc": 14591, "limited": 14592, "ĠMouse": 14593, "NIC": 14594, "GVy": 14595, "*(\\": 14596, "atives": 14597, "Ġregexp": 14598, "([])": 14599, "cursion": 14600, "Der": 14601, "Ġke": 14602, "ĠSuccess": 14603, "XHR": 14604, "ATAL": 14605, "DECL": 14606, "FETCH": 14607, "counters": 14608, "Ġplus": 14609, "Writable": 14610, "getP": 14611, "INTERR": 14612, "Ġvisibility": 14613, "ĠFL": 14614, "Good": 14615, "ShouldBe": 14616, "methodName": 14617, "glish": 14618, "INITIAL": 14619, "getStart": 14620, "('\\\\": 14621, "Ġcg": 14622, "toupper": 14623, "Ġndb": 14624, "advance": 14625, "****/": 14626, "Tor": 14627, "DSP": 14628, "ittleEndian": 14629, "Ġamdgpu": 14630, "AccessToken": 14631, "Ġpthread": 14632, "LEX": 14633, "NORE": 14634, "DataDiskConfiguration": 14635, "Unsafe": 14636, "147": 14637, "RHS": 14638, "hdl": 14639, "Ġ$('.": 14640, "VJ": 14641, "Ġoverlap": 14642, "bmp": 14643, "Ġcookies": 14644, "executable": 14645, "Ġresolver": 14646, "Markup": 14647, "\"!=": 14648, "LHS": 14649, "ama": 14650, "ĠOF": 14651, "udy": 14652, "InstanceState": 14653, "DIRECTORY": 14654, "hv": 14655, "Ġuart": 14656, "ĠMask": 14657, "btree": 14658, "Ġobtain": 14659, "oss": 14660, ")\")": 14661, "Hot": 14662, "filled": 14663, "Ġbasename": 14664, "SSE": 14665, "resented": 14666, "Ġgrad": 14667, "}}}": 14668, "Ġiterations": 14669, "Ġequ": 14670, "DefaultDeleter": 14671, "(\"\\\\": 14672, "Compound": 14673, "invalidParams": 14674, "UJ": 14675, "ShowInGui": 14676, "Ġcriteria": 14677, "Ġhack": 14678, "Ġcoords": 14679, "Board": 14680, "WebInspector": 14681, "delimiter": 14682, "ascade": 14683, "\\/\\": 14684, "checker": 14685, "Deser": 14686, "Ġ$('": 14687, "Ġcrash": 14688, "liance": 14689, "eventName": 14690, "propertyName": 14691, "Ra": 14692, "\"})": 14693, "LATE": 14694, "YWN": 14695, "ĠtoString": 14696, "ĠCAN": 14697, "Ġbfa": 14698, "))->": 14699, "ĠHAL": 14700, "Ġmanually": 14701, "Nr": 14702, "defs": 14703, "Ġframework": 14704, "Medium": 14705, "wallet": 14706, "']));": 14707, "ModelIndex": 14708, "libSystem": 14709, "ĠNotImplementedException": 14710, "conditional": 14711, "Ġvals": 14712, "199": 14713, "serializer": 14714, "Ġupon": 14715, "/+": 14716, "imator": 14717, "widgets": 14718, "quared": 14719, "arter": 14720, "TestCaseOperation": 14721, "ĠSwitch": 14722, "ĠMV": 14723, "FH": 14724, "$$": 14725, "getComputed": 14726, "ardown": 14727, "dsa": 14728, "igid": 14729, "Ġgtk": 14730, "Handling": 14731, "Ġsubsequent": 14732, "Claim": 14733, "vport": 14734, "Ġdirname": 14735, "Ġmsglen": 14736, "POSITION": 14737, "given": 14738, "Ġ((*": 14739, "ircuit": 14740, "Uuid": 14741, "Ġremain": 14742, "ĠHRESULT": 14743, "ĠDir": 14744, "Abort": 14745, "cop": 14746, "usec": 14747, "ĠPlatform": 14748, "[:-": 14749, "voltage": 14750, "Ġbail": 14751, "MAPP": 14752, "kZ": 14753, "YYY": 14754, "aste": 14755, "unbind": 14756, "Ġmysql": 14757, "ĠLicense": 14758, "noise": 14759, "ĠStringComparison": 14760, "Ġpn": 14761, "Notes": 14762, "Cy": 14763, "Was": 14764, "getResource": 14765, "Ġoverlay": 14766, "chanism": 14767, "]++;": 14768, "Ġpopup": 14769, "×ķ": 14770, "Ġgain": 14771, "Ġcalculated": 14772, "Ġserializer": 14773, "pgid": 14774, "Solution": 14775, "ĠIntent": 14776, "ĠFOR": 14777, "mios": 14778, "Slash": 14779, "packed": 14780, "Ġintval": 14781, "...\\": 14782, "credit": 14783, "ĠSEC": 14784, "...\");": 14785, "(\"'": 14786, "xuXG": 14787, "alic": 14788, "Ġsit": 14789, "ĠSample": 14790, "filesystem": 14791, "ĠCHK": 14792, "Ġpseudo": 14793, "ĉĉĉĉĉĉĠĠ": 14794, "ĠSecond": 14795, "vocab": 14796, ")>": 14797, "ILITY": 14798, "clients": 14799, "Normalize": 14800, "erature": 14801, "Ġhome": 14802, "Discovery": 14803, "Gx": 14804, "ĠRGB": 14805, "clr": 14806, "Ġ*[": 14807, "oser": 14808, "getMockBuilder": 14809, "!\"": 14810, "EO": 14811, "Music": 14812, "Ġrename": 14813, "Endpoints": 14814, "VMSize": 14815, "Ry": 14816, "disposing": 14817, "COMPLETE": 14818, "globals": 14819, "Ġmaking": 14820, "Ġprojection": 14821, "Ġparen": 14822, "ypes": 14823, "(/.*": 14824, "Fa": 14825, "arDown": 14826, "Ġhot": 14827, "ĠSVN": 14828, "æĽ": 14829, "PROG": 14830, "Ġneg": 14831, "cmds": 14832, "languages": 14833, "debugfs": 14834, "Quantity": 14835, "Derived": 14836, "Mi": 14837, "Ġeff": 14838, "AutoSize": 14839, "Ġ\",\"": 14840, "NEG": 14841, "ulp": 14842, "Mobile": 14843, "gw": 14844, "NextToken": 14845, "textBox": 14846, "2013": 14847, "nextToken": 14848, "092": 14849, "Ġcollision": 14850, "Jar": 14851, "endian": 14852, "FullYear": 14853, "getOption": 14854, "astic": 14855, "Ġresponses": 14856, "ĠGr": 14857, "ĠPurpose": 14858, "Warn": 14859, "jobs": 14860, "ites": 14861, "ĠThat": 14862, "Linked": 14863, "WARE": 14864, "Ġrgba": 14865, "Ġshorthand": 14866, "information": 14867, "strategy": 14868, "hwfn": 14869, "Ġworkspace": 14870, "ListCall": 14871, "Scrollbar": 14872, "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd": 14873, "euid": 14874, "Symfony": 14875, "(',',": 14876, "ili": 14877, "ĠFB": 14878, "regular": 14879, "Ġurls": 14880, "Specifier": 14881, "ĠRemote": 14882, "ValueRef": 14883, "SupportedException": 14884, "Ġhighlight": 14885, "installed": 14886, "classList": 14887, "ĠComment": 14888, "Quality": 14889, "Office": 14890, "Ġremoving": 14891, ")||": 14892, "ĠDW": 14893, "SHOW": 14894, "getCode": 14895, "SockaddrAny": 14896, "Ġ{});": 14897, "ĠDynamic": 14898, "plits": 14899, "Transformer": 14900, "rval": 14901, "requires": 14902, "Ġtz": 14903, "Ġwhy": 14904, "Allocation": 14905, "BBBB": 14906, "Ġcontract": 14907, "herent": 14908, "fox": 14909, "=[];": 14910, "ĠKeep": 14911, "Ġlst": 14912, "Ġemitter": 14913, "WREG": 14914, "quential": 14915, "llu": 14916, "msm": 14917, "âĶĢ": 14918, "spawn": 14919, "ĠGem": 14920, "errs": 14921, "Parsing": 14922, "Pitch": 14923, "ssize": 14924, "Concurrent": 14925, "\\\"\",": 14926, "Ġmutex": 14927, "ĠSim": 14928, "Ġdetail": 14929, "ĠEVP": 14930, "åĿ": 14931, "queued": 14932, "Ct": 14933, "Follow": 14934, "Ġioctl": 14935, "contrib": 14936, "Outputs": 14937, "accum": 14938, "Wave": 14939, "Ġpdata": 14940, "Ġgra": 14941, "Characters": 14942, "cmnd": 14943, "polygon": 14944, "DOUT": 14945, "825": 14946, "Ġanyway": 14947, "wakeup": 14948, "以": 14949, "Ġcloud": 14950, "Ġsense": 14951, "Ġlhs": 14952, "bber": 14953, "iring": 14954, "ĠAccount": 14955, "prep": 14956, "090": 14957, "å¿": 14958, "lined": 14959, "ĠCI": 14960, "predict": 14961, "~~~~~~~~": 14962, "azure": 14963, "Ġrotate": 14964, "consume": 14965, "Got": 14966, "ĠSTART": 14967, "Fri": 14968, "Ġsparse": 14969, "SSH": 14970, "ĠChanged": 14971, "Ġapprox": 14972, "Ġodd": 14973, "queryParameters": 14974, "bidden": 14975, "YXJ": 14976, "Docs": 14977, "rowsers": 14978, "Proj": 14979, "getBase": 14980, "ĠSleep": 14981, "scpexpr": 14982, "``,": 14983, "kr": 14984, "Ġreuse": 14985, "OfWeek": 14986, "deserialize": 14987, "ĠTHREE": 14988, "Ġdefinitions": 14989, "Ġtax": 14990, "singleton": 14991, "ĠTwig": 14992, "Ġaf": 14993, "MAIL": 14994, "getLocation": 14995, "istency": 14996, "ĠCOMP": 14997, "INED": 14998, "Ġresume": 14999, "éĹ´": 15000, "pdu": 15001, "Digits": 15002, "Ġinterfaces": 15003, "[{": 15004, "isr": 15005, "=\"'+": 15006, "Ġchoose": 15007, "oremap": 15008, "BigInteger": 15009, "Dep": 15010, "Ġpackages": 15011, "ĠDeserialize": 15012, "ĠStat": 15013, "×Ļ": 15014, "}'.": 15015, "isation": 15016, "dac": 15017, "igrate": 15018, "Analyzer": 15019, "([\\": 15020, "stitute": 15021, "bean": 15022, "åįķ": 15023, "NewRequest": 15024, "025": 15025, "Ġmu": 15026, "getDate": 15027, "Audit": 15028, "recip": 15029, "ado": 15030, "Ġ({": 15031, "Ġgem": 15032, "aystack": 15033, "={},": 15034, "Artifact": 15035, "ĠIXGBE": 15036, "ttl": 15037, "å§": 15038, "Ari": 15039, "det": 15040, "RecommendedVMSize": 15041, "launch": 15042, "ĠISO": 15043, "keleton": 15044, "Ġfclose": 15045, "stdin": 15046, "PW": 15047, "Ġiface": 15048, "Ġskipped": 15049, "Ġhooks": 15050, "ĠErrCode": 15051, "lout": 15052, "Ġexpanded": 15053, "ĠBOOL": 15054, "Ġstroke": 15055, "ĠINTE": 15056, "distribution": 15057, "ĠIList": 15058, "ĠPS": 15059, "authorization": 15060, "Ġattachment": 15061, "Ġnx": 15062, "Ġfigure": 15063, "LIGHT": 15064, "Mvc": 15065, "tos": 15066, "reflection": 15067, "receiver": 15068, "ĠWRITE": 15069, "$/.": 15070, "Ġisl": 15071, "Ġanonymous": 15072, "ighbors": 15073, "Ġconverts": 15074, "passed": 15075, "Ġbroadcast": 15076, "chrome": 15077, "Rm": 15078, "ServiceClient": 15079, "Ġqt": 15080, "Ġinitializer": 15081, "ei": 15082, "Association": 15083, "С": 15084, "Indexed": 15085, "Ġlogged": 15086, "scaling": 15087, "Ġclosest": 15088, "quality": 15089, "poses": 15090, "Ġassumed": 15091, "ĠUrl": 15092, "StartMarker": 15093, "Binder": 15094, "Ġeas": 15095, "Ġincre": 15096, "įç½®": 15097, "Ġshortcut": 15098, "Ġcoefficients": 15099, "æı": 15100, "Marshaler": 15101, "Letter": 15102, "addAll": 15103, "SetError": 15104, "Equ": 15105, "TimeSpan": 15106, "Average": 15107, "Ġbd": 15108, "))),": 15109, "toa": 15110, "Ġfx": 15111, "ITLE": 15112, "eper": 15113, "170": 15114, "countered": 15115, "rupt": 15116, "beacon": 15117, "Ġproduce": 15118, "RSS": 15119, "iobase": 15120, "Ġmtd": 15121, "Ġdelimiter": 15122, "Ġsolver": 15123, "addir": 15124, "casecmp": 15125, "NNP": 15126, "/><": 15127, "ALG": 15128, "Ġjoint": 15129, "Uni": 15130, "Reporter": 15131, "ĠScale": 15132, "ppos": 15133, "ARB": 15134, "Recipient": 15135, "Ġaccepted": 15136, "Signing": 15137, "lorer": 15138, "Clamp": 15139, "]*)": 15140, "*****": 15141, "ĠBuff": 15142, "raid": 15143, "3000": 15144, "Compress": 15145, "ĠRCC": 15146, "btScalar": 15147, "nZ": 15148, "QUENCE": 15149, "Ġdebugging": 15150, "Ġarc": 15151, "Ordered": 15152, "Ġ655": 15153, "({'": 15154, "trac": 15155, "gets": 15156, "ĠPPC": 15157, "ULONG": 15158, "Sa": 15159, "Ġlldb": 15160, "Ġ***": 15161, "ĠSelection": 15162, "Energy": 15163, "Ġcategories": 15164, "ĠSPE": 15165, "ĠSem": 15166, "MIME": 15167, "ordinal": 15168, "ktop": 15169, "Ġimportant": 15170, "åĪĻ": 15171, "107": 15172, "rdma": 15173, "ι": 15174, "Ġparticle": 15175, "Ġprice": 15176, "XM": 15177, "design": 15178, "gray": 15179, "Aspect": 15180, "Disposed": 15181, "ĠCT": 15182, "registration": 15183, "lastIndexOf": 15184, "Ġvarious": 15185, "364": 15186, "ĠDialog": 15187, "ĠOpc": 15188, "Compression": 15189, "bosity": 15190, "Ġstatements": 15191, "pthread": 15192, "ĠNotes": 15193, "Resp": 15194, "AMD": 15195, "mal": 15196, "nick": 15197, "ResponseWriter": 15198, "avatar": 15199, "herited": 15200, "çłģ": 15201, "Ġanalysis": 15202, "gee": 15203, "][]": 15204, "Ġrm": 15205, "ramer": 15206, "iS": 15207, "FK": 15208, "Quota": 15209, "ĠAUT": 15210, "TestSuite": 15211, "Ġ());": 15212, "ĠPush": 15213, "ABI": 15214, "ĠnumberOf": 15215, "Mut": 15216, "Wheel": 15217, "bdev": 15218, "getMethod": 15219, "Ġlegacy": 15220, "license": 15221, "Ġmodes": 15222, "chant": 15223, "npc": 15224, "ÏĦ": 15225, "etched": 15226, "xr": 15227, "Ġbat": 15228, "ssi": 15229, "Ġaerr": 15230, "Ġstopped": 15231, "postBody": 15232, "QR": 15233, "photo": 15234, "(?:\\": 15235, "Ġdeployment": 15236, "ABORT": 15237, "-]+": 15238, "ubic": 15239, "IHtcbiAg": 15240, "Uk": 15241, "canonical": 15242, "PREC": 15243, "pY": 15244, "httpRequest": 15245, "+\"/": 15246, "ĠCulture": 15247, "spacing": 15248, "specs": 15249, "Mgmt": 15250, "HashMap": 15251, "ि": 15252, "_:": 15253, "Ġhighest": 15254, "ĠBind": 15255, "sectors": 15256, "Decorator": 15257, "sysnb": 15258, "noc": 15259, "Comparator": 15260, "WAY": 15261, "erruptedException": 15262, "Ùĩ": 15263, "Ġmigration": 15264, "ĠPrivate": 15265, "qa": 15266, "Ġsequences": 15267, "Paragraph": 15268, "-(": 15269, "rend": 15270, "oting": 15271, "Ġintr": 15272, "Expanded": 15273, "solver": 15274, "particle": 15275, "Ġray": 15276, "Ġai": 15277, "ĠAssign": 15278, "Ġrefer": 15279, "Rv": 15280, "managed": 15281, "metic": 15282, "ĠAB": 15283, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 15284, "Byb": 15285, "armony": 15286, "blend": 15287, "Caps": 15288, "indic": 15289, "Ġchained": 15290, "ĠCG": 15291, "ĠFast": 15292, "HasKey": 15293, "qualified": 15294, "Esc": 15295, "equ": 15296, "Ġdesign": 15297, "Cases": 15298, "ysq": 15299, "Ġpreview": 15300, "VECTOR": 15301, "fq": 15302, "bla": 15303, "GetMethod": 15304, "hosts": 15305, "Ġholder": 15306, "Ġeasy": 15307, "quee": 15308, "Generates": 15309, "900": 15310, "Ġcn": 15311, "Ġregions": 15312, "geom": 15313, "åĨħ": 15314, "Ġembedded": 15315, "Unre": 15316, "OpCodes": 15317, "qos": 15318, "OrderBy": 15319, "Registered": 15320, "isIn": 15321, "(&(": 15322, "Ġspecifying": 15323, "ĠLinked": 15324, "commend": 15325, "#[^\\": 15326, "ĠTimer": 15327, "*/)": 15328, "illed": 15329, "Vals": 15330, ",\"%": 15331, "polate": 15332, "Ġspe": 15333, "ĠTitle": 15334, "Arm": 15335, "SCHE": 15336, "smc": 15337, "ĠShort": 15338, "Ġasm": 15339, "deferred": 15340, "iphy": 15341, "msleep": 15342, "bination": 15343, "Ġpretty": 15344, "observer": 15345, "Ġgenerates": 15346, "à°": 15347, "sdl": 15348, "STAMP": 15349, "ClickListener": 15350, "ол": 15351, "(<": 15352, "velocity": 15353, "ĠPER": 15354, "ìĿ": 15355, "Ġ*************************************************************************": 15356, "SEARCH": 15357, "Ġatoi": 15358, "caller": 15359, "sktop": 15360, "foldingStartMarker": 15361, "veral": 15362, "Ĺãģ": 15363, "Ġslim": 15364, "INC": 15365, "Ġdescriptors": 15366, "Probe": 15367, "Attempt": 15368, "符": 15369, "interfaces": 15370, "(\"@": 15371, "ĠEFI": 15372, "pageSize": 15373, "Nano": 15374, "Sections": 15375, "Ġpatterns": 15376, "iversal": 15377, "ĠAre": 15378, "!=\"": 15379, "(/.*(?=": 15380, "cmb": 15381, "Ġtransmit": 15382, "uler": 15383, "EndOf": 15384, "assignment": 15385, "Ġsov": 15386, "INode": 15387, "Ġchoice": 15388, "getTitle": 15389, "ĠSha": 15390, "Ġitr": 15391, "built": 15392, "phi": 15393, "Activate": 15394, "Answer": 15395, "mach": 15396, "Ġ'\\'": 15397, "Requires": 15398, "(/.*(?=#[^\\": 15399, "ĠAws": 15400, "Ġld": 15401, "Drive": 15402, "ĠHandler": 15403, "Watcher": 15404, "-\",": 15405, "Ġtwice": 15406, "ĠYYYY": 15407, "agate": 15408, "Ġclients": 15409, "Cod": 15410, "NOP": 15411, "Ġ150": 15412, "ListOptions": 15413, "lexer": 15414, "ĠMLX": 15415, "pretty": 15416, "DUMP": 15417, "JB": 15418, "Ġ\".$": 15419, "ĠInterface": 15420, "schemas": 15421, "\"][": 15422, "ĠDoes": 15423, "Ġupgrade": 15424, "sdp": 15425, "QE": 15426, "sday": 15427, "lbn": 15428, "Studio": 15429, "getParameter": 15430, "CARD": 15431, "])<<": 15432, "ppc": 15433, "setVisible": 15434, "tokenizer": 15435, "*****/": 15436, "Breakpoint": 15437, "codemirror": 15438, "Formatting": 15439, "]){": 15440, "zo": 15441, "Ġnt": 15442, "both": 15443, "RESPONSE": 15444, "unication": 15445, "Ġreadable": 15446, "Spin": 15447, "ufact": 15448, "constraints": 15449, "inuous": 15450, "Phy": 15451, ",)": 15452, "rh": 15453, "ĠPlace": 15454, "Ld": 15455, "axes": 15456, "startTime": 15457, "conversion": 15458, "ĠMSG": 15459, "msr": 15460, "ĠMachineBasicBlock": 15461, "pH": 15462, "=\"%": 15463, "Ġkeyboard": 15464, "ĠAMDGPU": 15465, "DeepCopyInto": 15466, "SPEC": 15467, "Yes": 15468, "odies": 15469, "Ġsta": 15470, "ĠReader": 15471, "ove": 15472, "Ġlocales": 15473, "imx": 15474, "Ġ120": 15475, "]==": 15476, "4000": 15477, "SMB": 15478, "iop": 15479, "Ġcarry": 15480, "����": 15481, "lli": 15482, "Ġmasm": 15483, "2010": 15484, "Ġtreat": 15485, "Zk": 15486, "Ġfm": 15487, "Ġhs": 15488, "ĠKind": 15489, "Ġsends": 15490, "()/": 15491, "Ġthus": 15492, "ĠTurn": 15493, "Already": 15494, "Rename": 15495, "CONSTANT": 15496, "versation": 15497, "Ġprocesses": 15498, "Ġ=~": 15499, "wf": 15500, "Ġnotice": 15501, "PRIORITY": 15502, "ĠGD": 15503, "\"?": 15504, "getBytes": 15505, "();\\": 15506, "SECONDS": 15507, "IGZ": 15508, "Organization": 15509, "Bone": 15510, "hWnd": 15511, "adapt": 15512, "Precision": 15513, "populate": 15514, "REGE": 15515, "btVector": 15516, "upgrade": 15517, "Explicit": 15518, "Ġtabs": 15519, "ServerResponse": 15520, "Ġfa": 15521, "Ġtracing": 15522, "SEG": 15523, "cmF": 15524, "fuzz": 15525, "DEST": 15526, "ĠExtension": 15527, "ĠCook": 15528, "CX": 15529, "orn": 15530, "(/*": 15531, "Ġctl": 15532, "algo": 15533, "ĠCell": 15534, "phba": 15535, "License": 15536, "vh": 15537, "CAPT": 15538, "REQUIRE": 15539, "CTP": 15540, "äºĨ": 15541, "WX": 15542, "contract": 15543, "WEBP": 15544, "ĠActivity": 15545, "isl": 15546, "GetItem": 15547, "ighted": 15548, "éħ": 15549, "ĠFact": 15550, "ĠConstruct": 15551, "Ġpcm": 15552, "sanitize": 15553, "Keywords": 15554, "Ġ38": 15555, "]].": 15556, "vote": 15557, "Ġnewly": 15558, "ABAB": 15559, "unchecked": 15560, "MARK": 15561, "OrCreate": 15562, "VOKE": 15563, "MASTER": 15564, "Prompt": 15565, "posal": 15566, ")_": 15567, "Footer": 15568, "Ġaudit": 15569, "getTag": 15570, "ĠSum": 15571, "\"]').": 15572, "INV": 15573, "Ġpalette": 15574, "clang": 15575, "memcmp": 15576, "ĠMASK": 15577, "getComment": 15578, "secondary": 15579, "Bw": 15580, "GetBytes": 15581, "SETTING": 15582, "ĠArrange": 15583, "mpi": 15584, "WaitFor": 15585, "TRI": 15586, "$)/,": 15587, "ĠForce": 15588, "Ġtransactions": 15589, "Ġslots": 15590, "Ġvocab": 15591, "pares": 15592, "5000": 15593, "DST": 15594, "inverse": 15595, "hier": 15596, "Ġscripts": 15597, "water": 15598, "collision": 15599, "verb": 15600, "Docker": 15601, "iator": 15602, "Ġothers": 15603, "Weak": 15604, "getStyle": 15605, "ĠMetadata": 15606, "queries": 15607, "ĠDump": 15608, "cdata": 15609, "tinymce": 15610, "AddRange": 15611, "åħ³": 15612, "Ġocc": 15613, "Ġcoord": 15614, "subscriptionId": 15615, "Extent": 15616, "Ġssh": 15617, "ĠGen": 15618, "YA": 15619, "pch": 15620, "Ġrepla": 15621, "ibration": 15622, "newline": 15623, "msi": 15624, "ĠSetting": 15625, "los": 15626, "StopMarker": 15627, "PDF": 15628, "fft": 15629, "plist": 15630, "lY": 15631, "ElementType": 15632, "TokenType": 15633, "tuner": 15634, "Ġixgbe": 15635, "Ġinvocation": 15636, "ĠCalendar": 15637, "Ġsentence": 15638, "()):": 15639, "Ġvid": 15640, "Ġchanging": 15641, "gv": 15642, "Ġbracket": 15643, "SendMessage": 15644, "={};": 15645, "Ġshown": 15646, "Ġcorner": 15647, "ĠCallback": 15648, "WHERE": 15649, "Ġguess": 15650, "Cc": 15651, "locals": 15652, "ĠDeepCopyInto": 15653, "Ġunable": 15654, "insertBefore": 15655, "ĠRETURN": 15656, "ificant": 15657, "BRE": 15658, "}));": 15659, "模": 15660, "Ġspy": 15661, "SIL": 15662, "ACCEPT": 15663, "FromFile": 15664, "Ġ'|": 15665, "ynamics": 15666, "Ġnoise": 15667, "THRESH": 15668, "OO": 15669, "rices": 15670, "RegClass": 15671, "ĠIsSet": 15672, "ftime": 15673, "buckets": 15674, "unwrap": 15675, "Ġiframe": 15676, "DRIVER": 15677, "Ġexamples": 15678, "Ġphi": 15679, "iblings": 15680, "certificate": 15681, "isActive": 15682, "icult": 15683, "readonly": 15684, "Fade": 15685, "ĠGMT": 15686, "reloc": 15687, "ĠChild": 15688, "setStyle": 15689, "containsKey": 15690, "Comparer": 15691, "Ġbio": 15692, "pData": 15693, "Ġ||=": 15694, ":\");": 15695, "ura": 15696, "Interpreter": 15697, "fraction": 15698, "partment": 15699, "Ġpossibly": 15700, "Ġtar": 15701, "Ġassertion": 15702, "discard": 15703, "Ġelapsed": 15704, "Repeated": 15705, "dpa": 15706, "Restart": 15707, "ContextMenu": 15708, "Ġsigma": 15709, "ü": 15710, "uspended": 15711, "JQ": 15712, "jZ": 15713, "pseudo": 15714, "getID": 15715, "))},": 15716, ")|(?:": 15717, "turn": 15718, "Ġremoves": 15719, "=*/": 15720, "Daemon": 15721, "($(": 15722, "lineno": 15723, "\"`": 15724, "pection": 15725, "aptcha": 15726, "DITION": 15727, "ÑĪ": 15728, "persistent": 15729, "lane": 15730, "etimes": 15731, "Ġpitch": 15732, "ĠPlay": 15733, "'){": 15734, "DescriptorProto": 15735, "ĠLive": 15736, "website": 15737, "PRINTF": 15738, "ĠCommonJS": 15739, "foldingStopMarker": 15740, "*',": 15741, "IMIT": 15742, "ĠFE": 15743, "न": 15744, "Hover": 15745, "logo": 15746, "Ġens": 15747, "Ġnullable": 15748, "CharCode": 15749, "Ġarbitrary": 15750, "synchron": 15751, "chown": 15752, "),\"": 15753, "Ġcrop": 15754, "Ġlv": 15755, "PyObject": 15756, "Hierarchy": 15757, "paring": 15758, "spaces": 15759, "]||": 15760, "decoded": 15761, "dG": 15762, "GetInt": 15763, "Packed": 15764, "Ġtriangle": 15765, "VN": 15766, "'}}": 15767, "apd": 15768, "moving": 15769, "pective": 15770, "Ġ2012": 15771, "DlgItem": 15772, "ĠDepend": 15773, "Ġste": 15774, "reviated": 15775, "Ġcombined": 15776, "PlainObject": 15777, "HF": 15778, "tbody": 15779, "ç»Ħ": 15780, "Ġ59": 15781, "getResponse": 15782, "nz": 15783, "Ġnla": 15784, "Ġ};\\": 15785, "ĠHere": 15786, "Pow": 15787, "Adapt": 15788, "ĠNotify": 15789, "invalidate": 15790, "assertNull": 15791, "Urls": 15792, "COMPtr": 15793, "}};": 15794, "Ġ'='": 15795, "veal": 15796, ")<<": 15797, "setDefault": 15798, "Ġunsupported": 15799, "Ġdiscard": 15800, "BeNull": 15801, "toc": 15802, "ZWN": 15803, "association": 15804, "('.');": 15805, "Acl": 15806, "getImage": 15807, "Ġmoving": 15808, "ya": 15809, "erg": 15810, "four": 15811, "JU": 15812, "alone": 15813, "Ġtls": 15814, "ĠSR": 15815, "ĠAssertion": 15816, "Ġbuilding": 15817, "frac": 15818, "ä½ľ": 15819, "Mach": 15820, "setColor": 15821, "Ġavg": 15822, "predicate": 15823, "ĠMarshalJSON": 15824, "ĠGUILayout": 15825, "çĶ¨æĪ·": 15826, "Ġtreated": 15827, "MEDIA": 15828, "ĠEffect": 15829, "ĠGit": 15830, "Slots": 15831, "DISPLAY": 15832, "REFER": 15833, "Ġtiming": 15834, "Ġfreed": 15835, "Regular": 15836, "accounts": 15837, "Ġparagraph": 15838, "Ping": 15839, "iowrite": 15840, "ĠUsing": 15841, "Evaluate": 15842, "fre": 15843, "ĠOMAP": 15844, "ĠByteArray": 15845, "à½": 15846, "IFICATION": 15847, "Secondary": 15848, "011": 15849, "getIs": 15850, "ĠSpecial": 15851, "['_": 15852, "BW": 15853, "Ġpdf": 15854, "Ġcent": 15855, "Through": 15856, ")})": 15857, "Ġ44": 15858, "Presentation": 15859, "velopment": 15860, "åĻ": 15861, "Ġ\"]": 15862, "ystick": 15863, "Ġidentical": 15864, "Ġbridge": 15865, "ĠgetType": 15866, "CRIT": 15867, "etermines": 15868, "Ġviews": 15869, "?\",": 15870, "Ġ56": 15871, "иÑĤ": 15872, "ĠOGR": 15873, "linked": 15874, "éĩı": 15875, ";&#": 15876, "Ġobs": 15877, "toggleClass": 15878, "Ġrepresented": 15879, "ĠAdds": 15880, "WRAP": 15881, "mZ": 15882, "grammar": 15883, "Ġsuitable": 15884, "behaviour": 15885, "Ġtl": 15886, "umper": 15887, "Minor": 15888, "PRIVATE": 15889, "jj": 15890, "scrollElement": 15891, "scrollHeight": 15892, "è¿ĩ": 15893, "Ġiterable": 15894, "Ġdaemon": 15895, "/************************************************************************/": 15896, "MPEG": 15897, "ares": 15898, "irth": 15899, "Streaming": 15900, "rokken": 15901, "Vendor": 15902, "qi": 15903, "Ġorientation": 15904, "Tenant": 15905, "Ġwchar": 15906, "Ġindexed": 15907, "visor": 15908, "KSB": 15909, "getModel": 15910, "getIndent": 15911, "ĠCPP": 15912, "ĠFlag": 15913, "minus": 15914, "fixup": 15915, "Ġreported": 15916, "brush": 15917, "CommentHighlightRules": 15918, "nom": 15919, "Ġ*/,": 15920, "Ġcopies": 15921, "OutOfRangeException": 15922, "uary": 15923, ":[],": 15924, "recipient": 15925, "Ġlazy": 15926, "coordinates": 15927, "ĠPo": 15928, "HasValue": 15929, "Candidate": 15930, "abuf": 15931, "salt": 15932, "ĠEINVAL": 15933, "OPTIONS": 15934, "WEBPACK": 15935, "addAction": 15936, "Tk": 15937, "xh": 15938, "Ġiw": 15939, "getY": 15940, "Ġactor": 15941, "gdb": 15942, "fixtures": 15943, "relaxed": 15944, "//!": 15945, "Ġgrpc": 15946, "Qs": 15947, "dvb": 15948, "consistent": 15949, "çº": 15950, "Ġformatting": 15951, "Ll": 15952, "Ġdisconnect": 15953, "rbd": 15954, ").'": 15955, "Ġrunner": 15956, "clusters": 15957, "OPE": 15958, "Ġbroken": 15959, "Disconnect": 15960, "entially": 15961, "Ġ\"(\"": 15962, "Rem": 15963, "ALT": 15964, "XPath": 15965, "har": 15966, "Interfaces": 15967, "Ġvelocity": 15968, "Ġfilenames": 15969, "Ġusually": 15970, "Soap": 15971, "intValue": 15972, "addrs": 15973, "Ġconsume": 15974, "NetDevice": 15975, "vides": 15976, "Funcs": 15977, "åİ": 15978, "InstrInfo": 15979, "Ġtemplates": 15980, "numbers": 15981, "Vehicle": 15982, "ĠnsCOMPtr": 15983, "HID": 15984, "\",!": 15985, "('\"": 15986, "Delimiter": 15987, "Ġnear": 15988, "ĠInitial": 15989, "APTER": 15990, "ĠYii": 15991, "Ġ*\\": 15992, "ĠMUST": 15993, "noop": 15994, "Ġsquare": 15995, "ofday": 15996, "Ġstrategy": 15997, "important": 15998, "ĠSetChr": 15999, "bre": 16000, "ente": 16001, "Drv": 16002, "Ġscheduler": 16003, "Ġbw": 16004, "à¤ķ": 16005, "YU": 16006, "Busy": 16007, "HU": 16008, "Suggest": 16009, "Compilation": 16010, "eX": 16011, "PX": 16012, "Ġrepeated": 16013, "Ġflatten": 16014, "unrecognized": 16015, "thumbnail": 16016, "Ports": 16017, "ĠLocale": 16018, "è±": 16019, "addresses": 16020, "ĠBound": 16021, "'\");": 16022, ">>(": 16023, "lvl": 16024, "Protection": 16025, "ĠExpand": 16026, "strdup": 16027, "/***/": 16028, "Ġauthorization": 16029, "Ij": 16030, "ĠRestore": 16031, "Ġnavigation": 16032, "Ġ','": 16033, "Migration": 16034, "Packages": 16035, "etag": 16036, "ZC": 16037, "ĠAuthor": 16038, "MENU": 16039, "ECD": 16040, "SINGLE": 16041, "Ġmis": 16042, "Ġwc": 16043, "imagick": 16044, "+\".": 16045, ";\");": 16046, "Ġ{!": 16047, "SYMBOL": 16048, "ĠLOCK": 16049, "Ġandroid": 16050, "ĠORD": 16051, "Ġupdating": 16052, "Mixed": 16053, "Enumeration": 16054, "Recent": 16055, "tunnel": 16056, "eql": 16057, "Ġxx": 16058, "ICS": 16059, "Ġscaled": 16060, "ufacture": 16061, "adoc": 16062, "اØ": 16063, "eng": 16064, "Quoted": 16065, "Ġprec": 16066, "('_'),": 16067, "ĠAM": 16068, "tap": 16069, "Ġexpires": 16070, "decess": 16071, "ulative": 16072, "Ġgui": 16073, "ĠMeta": 16074, "HOO": 16075, "jul": 16076, "Ġ01": 16077, "Ġtries": 16078, "PKEY": 16079, "placement": 16080, "annotations": 16081, "PKT": 16082, "ĠSELECT": 16083, "Caption": 16084, "/_": 16085, "ĠCmd": 16086, "Ġsid": 16087, "ç®": 16088, "IsEnabled": 16089, "vmx": 16090, "Documents": 16091, "ĠOld": 16092, "Callable": 16093, "IZED": 16094, "Ġled": 16095, "VERBOSE": 16096, "gorithms": 16097, "Micro": 16098, "getQuery": 16099, "mos": 16100, "Ġbm": 16101, "ĠencodeVarint": 16102, "Green": 16103, "rett": 16104, "CallbackImpl": 16105, "getEnd": 16106, "effects": 16107, "scanner": 16108, "..)": 16109, "*******": 16110, "Ġaggregate": 16111, "801": 16112, "cancellationToken": 16113, "easy": 16114, "Ġexpired": 16115, "è°": 16116, "Ġproblems": 16117, "ĠSIZE": 16118, "Ġminute": 16119, "Stopped": 16120, "Ġdepends": 16121, "isObject": 16122, "IsIn": 16123, "Ġgoes": 16124, "translator": 16125, "REMOVE": 16126, "ĠAccept": 16127, "ĠFetch": 16128, "blocking": 16129, "Ġconnector": 16130, "gadget": 16131, "Ġflex": 16132, "Legacy": 16133, "textContent": 16134, "GRAM": 16135, "Gain": 16136, "105": 16137, "Ġscaling": 16138, "ĠOB": 16139, "ArgumentNullException": 16140, "Oi": 16141, "SUS": 16142, "bian": 16143, "Turn": 16144, "attribs": 16145, "theta": 16146, "getResult": 16147, "Ġdetermined": 16148, "Ġreload": 16149, "ndarray": 16150, "Ġguard": 16151, "Ġxy": 16152, "Effects": 16153, "alter": 16154, "ĠChain": 16155, "ographic": 16156, "Ġdocker": 16157, "('/^": 16158, "231": 16159, "åĻ¨": 16160, "timeofday": 16161, "waiting": 16162, "Informer": 16163, "Registers": 16164, "ICT": 16165, "Widgets": 16166, "vfs": 16167, "assertNotNull": 16168, "lfw": 16169, "Detector": 16170, "Ġradio": 16171, "Ġspawn": 16172, "Working": 16173, "parallel": 16174, "ĉĉĉĉĉĉĠĠĠ": 16175, "SKIP": 16176, "*$": 16177, "ĠTRAN": 16178, "Ġwr": 16179, "vember": 16180, "|$": 16181, "Ġaffect": 16182, "Ġhid": 16183, "(?!": 16184, "Policies": 16185, "appro": 16186, "gsub": 16187, "defaultValue": 16188, "Iteration": 16189, "ĠGR": 16190, "ĠBasicBlock": 16191, "PROFILE": 16192, "HANDLER": 16193, "Ġsx": 16194, "addReg": 16195, "ĠAsm": 16196, "WorkItem": 16197, "ãģĻ": 16198, "360": 16199, "Ġmr": 16200, "intersect": 16201, "Preferred": 16202, "ĠAdjust": 16203, "Ġig": 16204, "getUrl": 16205, "ĠPri": 16206, "lit": 16207, "Ġconverter": 16208, "777": 16209, "SOL": 16210, "Ġfault": 16211, "ReadInt": 16212, "ĠSOCK": 16213, "ãģ«": 16214, "Populated": 16215, "USTOM": 16216, "Ġgd": 16217, "ZXR": 16218, "ĠIllegalStateException": 16219, "IFIER": 16220, "LittleEndian": 16221, "ĠMachineInstr": 16222, "Adres": 16223, "AZ": 16224, "minutes": 16225, "Ġnonce": 16226, "éĿ¢": 16227, "Ġì": 16228, "vic": 16229, "icolon": 16230, "cerr": 16231, "calloc": 16232, "writeAttribute": 16233, "Ġviewport": 16234, "Ġfaster": 16235, "stp": 16236, "ulary": 16237, "aco": 16238, "collapsed": 16239, "stable": 16240, "wide": 16241, "orient": 16242, "SAVE": 16243, "review": 16244, "holders": 16245, "riterion": 16246, "cG": 16247, "LRS": 16248, "Ġlocations": 16249, "COUN": 16250, "=['": 16251, "ELE": 16252, "uu": 16253, "ADMIN": 16254, "DOMAIN": 16255, "stone": 16256, "erical": 16257, "Ġtbl": 16258, "ATFORM": 16259, "ĠBindingFlags": 16260, "Cut": 16261, "zi": 16262, "Ġsay": 16263, "Ġquotes": 16264, "too": 16265, "\"(": 16266, "Cop": 16267, "cps": 16268, "Wk": 16269, "оÑĢ": 16270, "Td": 16271, "REPORT": 16272, "Routes": 16273, "Ġ[(": 16274, "ĠMathf": 16275, "pmc": 16276, "NPT": 16277, "Water": 16278, "scl": 16279, "PENDING": 16280, "ĠIdentifier": 16281, "bond": 16282, "qla": 16283, "tember": 16284, "MII": 16285, "Ġrecipient": 16286, "HANDLED": 16287, "DUP": 16288, "yyy": 16289, "Ġpause": 16290, "Pose": 16291, "ĠINVALID": 16292, "Preparer": 16293, "ĠBM": 16294, "ä¸Ģ个": 16295, "Ġpieces": 16296, "Ġ{|": 16297, "igrations": 16298, "99999999": 16299, "ATER": 16300, "ensit": 16301, "aid": 16302, "licas": 16303, "decay": 16304, "Qy": 16305, "VH": 16306, "getBlock": 16307, "Ġnbytes": 16308, "Ev": 16309, "Ġbulk": 16310, "positor": 16311, "StringBuilder": 16312, "AVAIL": 16313, ":\\": 16452, "management": 16453, "SERIAL": 16454, "Ġawserr": 16455, "MIC": 16456, "pV": 16457, "<-": 16458, "Positive": 16459, "duplicate": 16460, "Ġclamp": 16461, "Ġpen": 16462, "Ġcounters": 16463, "Ġpacked": 16464, "FullPath": 16465, "Placeholder": 16466, "Succe": 16467, "ars": 16468, "PointerException": 16469, "zu": 16470, "Ġdocuments": 16471, "190": 16472, "selves": 16473, "REAL": 16474, "ifold": 16475, "atever": 16476, "Ġrelevant": 16477, "astype": 16478, "Ġregulator": 16479, "BOOLEAN": 16480, "ĠCookie": 16481, "Ġpll": 16482, "OnError": 16483, "Embedded": 16484, "LEEP": 16485, "setHeader": 16486, "rssi": 16487, "InProgress": 16488, "weet": 16489, "ĠSn": 16490, "ĠScope": 16491, "acquire": 16492, "Ġprimitive": 16493, "CHIP": 16494, "solution": 16495, "ĠStringUtils": 16496, "xen": 16497, "Procedure": 16498, "Ġqueued": 16499, "Ġcauses": 16500, "ForeignKey": 16501, "manage": 16502, "(\"\")": 16503, "Sparse": 16504, "æĭ": 16505, "deploy": 16506, "Always": 16507, "ingular": 16508, "Ġdecoding": 16509, "QX": 16510, "||!": 16511, "faces": 16512, "MathJax": 16513, "Ġcod": 16514, "IHRo": 16515, "BX": 16516, "Ġ>::": 16517, "Ġcheckpoint": 16518, "Runs": 16519, "scores": 16520, "positions": 16521, "anizations": 16522, "0442": 16523, "SSID": 16524, "MethodImpl": 16525, "masked": 16526, "Ġdetach": 16527, "ĠMAP": 16528, "Providers": 16529, "Ġsun": 16530, "sampler": 16531, "DISABLED": 16532, "IMPORTED": 16533, "ĠUnsupportedOperationException": 16534, "Ġdescrib": 16535, "ulus": 16536, "ĠORDER": 16537, "ä¾": 16538, "()\\": 16539, "moused": 16540, "MEMB": 16541, "Ġstrcpy": 16542, "Ġqemu": 16543, "Ġdeploy": 16544, "DOT": 16545, "Ġdirs": 16546, "Ma": 16547, "ĠCould": 16548, "cedence": 16549, "merged": 16550, "endant": 16551, "shipping": 16552, "Cookies": 16553, "Ġfailures": 16554, "Plug": 16555, "Coordinates": 16556, "wlan": 16557, "stype": 16558, "Ġ#=>": 16559, "prediction": 16560, "ASC": 16561, "NDER": 16562, "published": 16563, "GPR": 16564, "TUN": 16565, "avax": 16566, "Blk": 16567, "ĠRetrieve": 16568, "ODY": 16569, "authentication": 16570, "Ġoptionally": 16571, "Ġwiret": 16572, "itation": 16573, "getStatus": 16574, "ĠTile": 16575, "Ġtested": 16576, "Ġopacity": 16577, "ĠSoft": 16578, "使": 16579, "hind": 16580, "avctx": 16581, "pure": 16582, "ysqli": 16583, "401": 16584, "DJ": 16585, "ÐŁ": 16586, "olang": 16587, "DIST": 16588, "brace": 16589, "vaddr": 16590, "Observable": 16591, "already": 16592, "Ġlpfc": 16593, "Guard": 16594, "Ġsubset": 16595, "Problem": 16596, "Ġcourse": 16597, "ĠMODE": 16598, "SUCCEEDED": 16599, "ö": 16600, "ToObject": 16601, "Ġrespond": 16602, "'''": 16603, "é»": 16604, "avadoc": 16605, "Outline": 16606, "transpose": 16607, "odb": 16608, "RH": 16609, "Rk": 16610, "Ġever": 16611, "ĠNT": 16612, "2008": 16613, "Ġhp": 16614, "Ġbecome": 16615, "RequestMarshaller": 16616, "Album": 16617, "uve": 16618, "chrom": 16619, "Ġrouter": 16620, "Ġcleared": 16621, "Ġcover": 16622, "getSession": 16623, "mailbox": 16624, "ĠSTRING": 16625, "mce": 16626, "namespaces": 16627, "FONT": 16628, "NodeId": 16629, "asp": 16630, "BAA": 16631, "DG": 16632, "isNot": 16633, "arer": 16634, "MediaType": 16635, "antics": 16636, "Ġattempts": 16637, "Mean": 16638, "BLE": 16639, "Interceptor": 16640, "Patterns": 16641, "ĠTmp": 16642, "FLASH": 16643, "Take": 16644, "eventObject": 16645, "news": 16646, "Ġ<<<": 16647, "offsetHeight": 16648, "ĠOpcode": 16649, "CRL": 16650, "ĠPacket": 16651, "nsec": 16652, "Ġlimits": 16653, "Nk": 16654, "Ġrtw": 16655, "ĠRole": 16656, "BOARD": 16657, "//#": 16658, "Ġnav": 16659, "refcount": 16660, "Ġdeal": 16661, "filp": 16662, "èĩª": 16663, "pres": 16664, "Ġcalculation": 16665, "Filtered": 16666, "Ġpotential": 16667, "Ġcsv": 16668, "ALI": 16669, "+)?": 16670, "GFP": 16671, "Ġpreserve": 16672, "ĠCRC": 16673, "quit": 16674, "getIndex": 16675, "Ġseveral": 16676, "Ġphone": 16677, "wra": 16678, "lookups": 16679, "Lifetime": 16680, "Ġmapper": 16681, "ĠTotal": 16682, "Ġprot": 16683, "EDGE": 16684, "AWS": 16685, "á»": 16686, "ĠgetDefault": 16687, "Ġmanagement": 16688, "ĠBuffered": 16689, "benchmark": 16690, "arange": 16691, "ResponseUnmarshaller": 16692, "tpg": 16693, "scopes": 16694, "Ġseparated": 16695, "ĠEditorGUILayout": 16696, "ĠOps": 16697, "Ġencryption": 16698, "Way": 16699, "Ġ\"),": 16700, "6708": 16701, "symlink": 16702, "Ġcompilation": 16703, "fuse": 16704, "æµ": 16705, "patterns": 16706, ".'.": 16707, "Ġinherit": 16708, "Ġ1000000": 16709, "âĶĢâĶĢ": 16710, "zier": 16711, "emo": 16712, "por": 16713, "Elapsed": 16714, "ĠCursor": 16715, "Sun": 16716, "Ġappended": 16717, "COMM": 16718, "mdb": 16719, "WebKit": 16720, "ĠCHAR": 16721, "ĠstructPointer": 16722, "Translator": 16723, "bitrate": 16724, "jp": 16725, "interp": 16726, "Demo": 16727, "ĠReflection": 16728, "}\".": 16729, "attached": 16730, "JSContext": 16731, "indexed": 16732, "capabilities": 16733, "allest": 16734, "LCD": 16735, "ease": 16736, "locks": 16737, "012": 16738, "isString": 16739, "gICAgICAg": 16740, "ACCE": 16741, "preted": 16742, "Loss": 16743, "Ga": 16744, "fopen": 16745, "2001": 16746, "Stencil": 16747, "Ġ37": 16748, "=\"\",": 16749, "SEQUENCE": 16750, "dro": 16751, "WHITE": 16752, "]\\\\": 16753, "imated": 16754, "prim": 16755, "([],": 16756, "cycl": 16757, "mass": 16758, "ĠRep": 16759, "Bulk": 16760, "intent": 16761, "calcul": 16762, "Activation": 16763, "xm": 16764, "getIn": 16765, "220": 16766, "Deploy": 16767, "PED": 16768, "Terms": 16769, "ships": 16770, "Ġenumerable": 16771, "Ġcircle": 16772, "hljs": 16773, "ĠCultureInfo": 16774, "RFC": 16775, "zt": 16776, "FILEN": 16777, "Ġartifact": 16778, "Ġflip": 16779, "andatory": 16780, "Ġconsistent": 16781, "lZ": 16782, "ĠAX": 16783, "explicit": 16784, "Compat": 16785, "DataProvider": 16786, "ĠRight": 16787, "Movie": 16788, "FRAG": 16789, "tlv": 16790, "```": 16791, "ĠBlockly": 16792, "Ġrace": 16793, "lh": 16794, "station": 16795, "thesis": 16796, "FFF": 16797, "Ġconditional": 16798, "度": 16799, "attempt": 16800, "ĠDIRECT": 16801, "ĠAlert": 16802, "DRV": 16803, "6659": 16804, "slow": 16805, "ĠUnix": 16806, "768": 16807, "fee": 16808, "Oid": 16809, "TRACK": 16810, "Wxl": 16811, "traction": 16812, "LG": 16813, "åıij": 16814, "Ġprece": 16815, "Ġeg": 16816, "Declared": 16817, "REMOTE": 16818, "-*": 16819, "Crypt": 16820, "MIX": 16821, "================================================": 16822, "Ġassumes": 16823, "ĠFUNCTION": 16824, "ĠGPU": 16825, "repeated": 16826, "Ġevaluation": 16827, "firm": 16828, "assembler": 16829, "Formula": 16830, "greater": 16831, "agram": 16832, "tery": 16833, "encrypted": 16834, "dlm": 16835, "IllegalArgumentException": 16836, "Ġwritable": 16837, "Ġspin": 16838, ":(": 16839, "subs": 16840, "utoff": 16841, "Compressed": 16842, "Serialized": 16843, "Ġannotations": 16844, "colour": 16845, "FREQ": 16846, "Ġholding": 16847, "arrays": 16848, "OSS": 16849, "pM": 16850, "ĠBar": 16851, "ĠHigh": 16852, "Threading": 16853, "Ġ(~": 16854, "setUp": 16855, "CALLBACK": 16856, "åĮĸ": 16857, "Ġ×": 16858, "oral": 16859, "æīĢ": 16860, "Quotes": 16861, "ĠFC": 16862, "Ġ39": 16863, "Ġnor": 16864, "%%%%": 16865, "304": 16866, "ĠSEEK": 16867, "CKEDITOR": 16868, "AssignableFrom": 16869, "Tol": 16870, "something": 16871, "infos": 16872, "tepret": 16873, "elemetry": 16874, "repr": 16875, "Ġmov": 16876, "SelectedIndex": 16877, "Replica": 16878, "\"]:": 16879, "Related": 16880, "GetComponent": 16881, "Ġpasses": 16882, "ĠQVariant": 16883, "Ġ{:": 16884, "Clipboard": 16885, "Checkbox": 16886, "CTYPE": 16887, "Coins": 16888, "Pixmap": 16889, "contexts": 16890, "म": 16891, "Dw": 16892, "Ġiso": 16893, "Ġgives": 16894, "ĠSite": 16895, "TITLE": 16896, "dates": 16897, "\"}},": 16898, "Ġ--------------------------------------------------------------------": 16899, "Ġ4096": 16900, "Rz": 16901, "retrieve": 16902, "chg": 16903, "Voice": 16904, "èĥ½": 16905, "SDNode": 16906, "对象": 16907, "Trunc": 16908, "ordering": 16909, "Ġmodifiers": 16910, "txn": 16911, "reporter": 16912, "ĠCAI": 16913, "æľ¬": 16914, "ĠCLI": 16915, "स": 16916, "ĠExport": 16917, "FLUSH": 16918, "quotes": 16919, "Land": 16920, "XIO": 16921, "Ġsalt": 16922, "ky": 16923, "Ġ...)": 16924, "Ġtolerance": 16925, "Snippet": 16926, "Ġdrv": 16927, "startup": 16928, "UserData": 16929, "FILES": 16930, "112": 16931, "ĠgetValue": 16932, "Ġregard": 16933, "(\"(": 16934, "',\\": 16935, "'),('": 16936, "ĠNoMethod": 16937, "å»": 16938, "Ġcolour": 16939, "WB": 16940, "Ġbnx": 16941, "computed": 16942, "tlb": 16943, "8192": 16944, "SOFT": 16945, "finalize": 16946, "clazz": 16947, "REGION": 16948, "WebAPI": 16949, "datum": 16950, "DeepEqual": 16951, "ĠLIB": 16952, "\"/>.": 16953, "ĠstartIndex": 16954, "Ġintern": 16955, "Closer": 16956, "production": 16957, "BraceOutdent": 16958, "xz": 16959, "Ġnvkm": 16960, "Ġ'!": 16961, "Ġrid": 16962, "nB": 16963, "ĠTII": 16964, "STE": 16965, "Ġ`,": 16966, "interruptible": 16967, "Ġvx": 16968, "rst": 16969, "Ġpivot": 16970, "Gap": 16971, "angent": 16972, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 16973, "Collect": 16974, "Ġundo": 16975, "Middleware": 16976, "Ġ'->": 16977, "CENTER": 16978, "Ġdescribed": 16979, "ĠByteBuffer": 16980, "PATTERN": 16981, "æ±": 16982, "newRow": 16983, "ChangeListener": 16984, "æĮĩ": 16985, "uveau": 16986, "comparison": 16987, ":\")": 16988, "ĠMockito": 16989, "Ġlargest": 16990, "specialchars": 16991, "Designer": 16992, "Pk": 16993, "Ġ((!": 16994, "}\\\"": 16995, "aaa": 16996, "ĠPIXEL": 16997, "ians": 16998, "exponent": 16999, "ĠEXIT": 17000, "btrfs": 17001, "ĠisValid": 17002, "xel": 17003, "stock": 17004, "Ġpreferred": 17005, "bpp": 17006, "|^": 17007, "bssid": 17008, "Completions": 17009, "strictions": 17010, "Ġarrow": 17011, "alarm": 17012, "GetProperty": 17013, "Bug": 17014, "oken": 17015, "scheduler": 17016, "ldap": 17017, "IK": 17018, "Reads": 17019, "Hooks": 17020, "Glob": 17021, "{{.*": 17022, "Responder": 17023, "debugger": 17024, "Ġqualified": 17025, "Ts": 17026, "ALEN": 17027, "Ġhowever": 17028, "persist": 17029, "ĠTerm": 17030, "VED": 17031, "Ġmmc": 17032, "ĠCX": 17033, "ByIndex": 17034, "108": 17035, "Ġpress": 17036, "ĠLHS": 17037, "Ġencountered": 17038, "Ġ'_'": 17039, "AbsolutePath": 17040, "pO": 17041, "Ġaspect": 17042, "olete": 17043, "ĠArch": 17044, "enet": 17045, "Ġ250": 17046, "ENDOR": 17047, "tepreter": 17048, "ĠPLUGIN": 17049, "Ġregmap": 17050, "'][]": 17051, "?,": 17052, "indicator": 17053, "DropDown": 17054, "Deleg": 17055, "octet": 17056, "vin": 17057, "variance": 17058, "Pager": 17059, "ENTITY": 17060, "uber": 17061, "addColumn": 17062, "Ġsystems": 17063, "Cause": 17064, "Pseudo": 17065, "Ġthink": 17066, "getArg": 17067, "CANCE": 17068, "Ġqs": 17069, "ServiceName": 17070, "zil": 17071, "delim": 17072, "Ġdup": 17073, "ĠShared": 17074, "nN": 17075, "Ġ][": 17076, "ĠShape": 17077, "ĠExecution": 17078, "grunt": 17079, "Ġtransformation": 17080, "eder": 17081, "Ġgamma": 17082, "Ġearlier": 17083, "stringstream": 17084, "Ġencrypt": 17085, "standing": 17086, "Ġrespons": 17087, "PIXEL": 17088, "rnd": 17089, "ICMP": 17090, "EAGAIN": 17091, "irs": 17092, "Ang": 17093, "*?": 17094, "Sz": 17095, "PROB": 17096, "Ġ)(": 17097, "Ġ($_": 17098, "tmpl": 17099, "enance": 17100, "Ġxrange": 17101, "TimeZone": 17102, "sdk": 17103, "Ġceph": 17104, "+-+-+-+-": 17105, "ĠPP": 17106, "IPHER": 17107, "|\"+": 17108, "getMonth": 17109, "ĠAttach": 17110, "Ġbackwards": 17111, "bindings": 17112, "Orders": 17113, "aug": 17114, "TRACT": 17115, "$('#": 17116, "FV": 17117, "logic": 17118, "neigh": 17119, "Monster": 17120, "guide": 17121, "erc": 17122, "ĠQByteArray": 17123, "Ġgs": 17124, "mdio": 17125, "Expiration": 17126, "ubuntu": 17127, "iles": 17128, "trunc": 17129, "FlagSet": 17130, "=>$": 17131, "Facet": 17132, "Tod": 17133, "APPL": 17134, "composition": 17135, "invocation": 17136, "TextHighlightRules": 17137, "CAM": 17138, "Ġmodal": 17139, "getCursor": 17140, "Intepreter": 17141, "accel": 17142, "ASH": 17143, "Lin": 17144, "Ġfabric": 17145, "ĠAlways": 17146, "cgi": 17147, "olar": 17148, "ĠCancel": 17149, "ĠEdit": 17150, "Qj": 17151, "Ġ70": 17152, "Folders": 17153, "PrimaryKey": 17154, "IGNORE": 17155, "Ġdns": 17156, "backtrace": 17157, "ĠJc": 17158, "HasPrefix": 17159, "ĠAtomic": 17160, "Cx": 17161, "Grammar": 17162, "ipheral": 17163, "coexist": 17164, "Ġtodo": 17165, "Reload": 17166, "Ġdecorator": 17167, "àµ": 17168, "Ġaliases": 17169, "__('": 17170, "FileSync": 17171, "TextNode": 17172, "ĠBox": 17173, "FER": 17174, "Ñİ": 17175, "Ġpch": 17176, "Swift": 17177, "Dark": 17178, "setContent": 17179, "quota": 17180, "getEntity": 17181, "clZip": 17182, "ĠgetInstance": 17183, "ĠRot": 17184, "åĬŁ": 17185, ">')": 17186, "getHours": 17187, "WebSocket": 17188, "acle": 17189, "ZWF": 17190, "bid": 17191, "од": 17192, "Corner": 17193, ")),\"": 17194, "=[\"": 17195, "three": 17196, "Ġrte": 17197, "ĠOAuth": 17198, "pars": 17199, "Ġreleased": 17200, "JNIEnv": 17201, "ĠDst": 17202, "Ġmarkup": 17203, "Referral": 17204, "Ġlocals": 17205, "privacy": 17206, "ĠContract": 17207, "DEFINED": 17208, "Jun": 17209, "(\"(()": 17241, "Ġdrawing": 17242, "Ġdwarf": 17243, "ĠProfile": 17244, "charg": 17245, "ĠTe": 17246, "Ġtranslated": 17247, "Lj": 17248, "xsd": 17249, "stuff": 17250, "esModule": 17251, "ĠWITH": 17252, "iagnostics": 17253, "LANG": 17254, "MarshalTo": 17255, ")%": 17256, "eras": 17257, "Ġroutes": 17258, "Scheduled": 17259, "106": 17260, "Painter": 17261, "Waiting": 17262, "æ®": 17263, "ReadWrite": 17264, "Ġк": 17265, "ĠCUR": 17266, "_$": 17267, "Ġmf": 17268, "ĠREQ": 17269, "gtk": 17270, "Descriptors": 17271, "ĠGeneral": 17272, "intp": 17273, "Advanced": 17274, "ĠresourceGroupName": 17275, "ĠpropertyName": 17276, "Sphere": 17277, "Train": 17278, "ByteBuffer": 17279, "mousedown": 17280, "ĠII": 17281, "Nov": 17282, ")});": 17283, "dumps": 17284, "getPointer": 17285, "ãĥ³": 17286, "Angles": 17287, "NewError": 17288, "BSD": 17289, "Ġcompletely": 17290, "lus": 17291, ";//": 17292, "Qz": 17293, "inally": 17294, "ĠAE": 17295, "declaration": 17296, "bounce": 17297, "DateFormat": 17298, "onload": 17299, "ancy": 17300, "ем": 17301, "musb": 17302, "Ġoverridden": 17303, "currentTimeMillis": 17304, "indicators": 17305, ":\\\\": 17306, "HK": 17307, "Zz": 17308, "Ġsimd": 17309, "Portal": 17310, "fol": 17311, "arations": 17312, "Ġnat": 17313, "parms": 17314, ")}),": 17315, "Histogram": 17316, "vue": 17317, "ORAGE": 17318, ")+\"": 17319, "hx": 17320, "å¼Ģ": 17321, "âķ": 17322, "èµ": 17323, "subtract": 17324, "Parm": 17325, "Executable": 17326, "PHPUnit": 17327, "dashboard": 17328, "ĠCategory": 17329, "ĠDefine": 17330, "setCurrent": 17331, "MW": 17332, "dbl": 17333, "phydev": 17334, "Aggregation": 17335, "831": 17336, "daemon": 17337, "Detection": 17338, "ISR": 17339, "ĠFactory": 17340, "Ce": 17341, "Ġtot": 17342, "Subtarget": 17343, "320": 17344, "Subscribe": 17345, "\".$": 17346, "EVT": 17347, "Ġvt": 17348, "ĠMaterial": 17349, "enumerable": 17350, "LIC": 17351, "LOCATION": 17352, "\"\":": 17353, "SIMPLE": 17354, "omp": 17355, "Ġcatalog": 17356, "aspect": 17357, "mdp": 17358, "SmallIconUri": 17359, "GroupId": 17360, "separated": 17361, "Cart": 17362, "DTO": 17363, "StringLen": 17364, "invoice": 17365, "shm": 17366, "ĠFiles": 17367, "Ascii": 17368, "Within": 17369, "ĠChecks": 17370, "094": 17371, "Ġposts": 17372, "pearance": 17373, "è°ĥ": 17374, "erator": 17375, "INLINE": 17376, "Queries": 17377, "extern": 17378, "CodeAttribute": 17379, "ĠCFG": 17380, "poser": 17381, "Sizer": 17382, "Ġloff": 17383, "Ġeffects": 17384, "FORCE": 17385, "Ġtimed": 17386, "ĠEl": 17387, "Ġpayment": 17388, ")(((": 17389, "Ġlicense": 17390, "Recorder": 17391, "invert": 17392, "Ġnamespaces": 17393, "ãĢĤ\\": 17394, "å½ĵåīį": 17395, "Profiles": 17396, "TextView": 17397, "OPER": 17398, "don": 17399, "ĠCODE": 17400, "Buffered": 17401, "Fm": 17402, "xFFFFFFFF": 17403, "nowledge": 17404, "Insn": 17405, "Ġvendor": 17406, "ĠTimes": 17407, "Nt": 17408, "vial": 17409, "shint": 17410, "Converts": 17411, "Âł": 17412, "ú": 17413, "Ġinterceptor": 17414, "ĠWill": 17415, "connections": 17416, "TRUN": 17417, "Ġbackward": 17418, "Ġoverrides": 17419, "Mutation": 17420, "\")?": 17421, "DRAW": 17422, "Jq": 17423, "ĠfilePath": 17424, "()==": 17425, "creation": 17426, "vict": 17427, "Ġgdb": 17428, "AILED": 17429, "smbus": 17430, "Ġrecover": 17431, "IOD": 17432, "Ġbitcast": 17433, "Ġtools": 17434, "PATCH": 17435, "Editable": 17436, "ĠRUN": 17437, "jdGlvb": 17438, "inja": 17439, "JIT": 17440, "modifiers": 17441, "desired": 17442, "MMMM": 17443, "ĠTimestamp": 17444, "Ctor": 17445, "áĥĺ": 17446, "pem": 17447, "hsotg": 17448, "Ġcollections": 17449, "大": 17450, "åĪłéĻ¤": 17451, "ÑĦ": 17452, "ĠIND": 17453, "Ġslider": 17454, "rewrite": 17455, "addListener": 17456, "bW": 17457, "ĠRS": 17458, "çİ": 17459, "About": 17460, "PageSize": 17461, "sigma": 17462, "Ġ360": 17463, "ав": 17464, "average": 17465, "Injection": 17466, "ĠNamed": 17467, "Relationship": 17468, "Spaces": 17469, "NOTICE": 17470, "ĠAsset": 17471, "Cube": 17472, "cern": 17473, "masks": 17474, "ĠCluster": 17475, "nfunction": 17476, "ĠBl": 17477, "ĠLED": 17478, "ucene": 17479, "Ġdeps": 17480, "devs": 17481, "Ġintended": 17482, "Sales": 17483, "Ġindirect": 17484, "Ġcomes": 17485, "INTERVAL": 17486, "Ġpts": 17487, "ĠFunctions": 17488, "Pkg": 17489, "SAS": 17490, "Spot": 17491, "csum": 17492, "ĠAN": 17493, "ĠBrowser": 17494, "PKCS": 17495, "Ġoptimization": 17496, "Ġepsilon": 17497, "Caret": 17498, "spot": 17499, "ĠArt": 17500, "à¤Ĥ": 17501, "Regions": 17502, "Selfer": 17503, "NAM": 17504, "(\"&": 17505, "Millisecond": 17506, "]},": 17507, "nbytes": 17508, "ĠPH": 17509, "printer": 17510, "choices": 17511, "Capability": 17512, "ĠWC": 17513, "gameObject": 17514, "Ġrq": 17515, "Couldn": 17516, "pipes": 17517, "tomorrow": 17518, "dss": 17519, "Ġ&_": 17520, "Evaluation": 17521, "HOME": 17522, "NW": 17523, "unload": 17524, "Ġ>(": 17525, "ĠRunnable": 17526, "Iam": 17527, "Ġnormally": 17528, "Minute": 17529, "Ġgrow": 17530, "implicit": 17531, "Menus": 17532, "ouch": 17533, "8859": 17534, "Ġformula": 17535, "ĠSourceLocation": 17536, "ĠComplex": 17537, "Ġbh": 17538, "feat": 17539, "Ance": 17540, "Passed": 17541, "Ġerase": 17542, "KX": 17543, "г": 17544, "ĠVideo": 17545, "Transactions": 17546, "Ġ}}": 17547, "ĠstartTime": 17548, "chn": 17549, "INTERRUPT": 17550, "Ġgeo": 17551, "httpResponse": 17552, "çĶŁ": 17553, "Ġ96": 17554, "claim": 17555, "Multiply": 17556, "Envelope": 17557, "äºİ": 17558, "Ġbeg": 17559, "implemented": 17560, "OneOf": 17561, "Ġini": 17562, "Dependent": 17563, "phabet": 17564, "WARF": 17565, "assigned": 17566, "icipant": 17567, "SourceMap": 17568, "ĠIW": 17569, "Ġdg": 17570, "ominator": 17571, "ĠPopover": 17572, "Ġdropped": 17573, "ĠCBase": 17574, "NZ": 17575, "Ġ`$": 17576, "Histor": 17577, "jklm": 17578, "Ġ'(": 17579, "Ġloads": 17580, "venience": 17581, "使çĶ¨": 17582, "Ġrecursively": 17583, "prof": 17584, "addWidget": 17585, "BOOT": 17586, "removeAll": 17587, "109": 17588, "finder": 17589, "ToFile": 17590, "Determine": 17591, "pmlme": 17592, "Ġefx": 17593, "checkOutdent": 17594, "Ġexecuting": 17595, "YYYY": 17596, "ĠErrInvalidLengthGenerated": 17597, "Ut": 17598, "Ġtst": 17599, "AsyncResult": 17600, "ĠVisual": 17601, "Ġfo": 17602, "/****************************************************************": 17603, "developer": 17604, "questions": 17605, "stors": 17606, "EEPROM": 17607, "Ġvisited": 17608, "Ġtegra": 17609, "bcd": 17610, "rus": 17611, "idr": 17612, "Ġrw": 17613, "LogLevel": 17614, "ĠDESC": 17615, "CEV": 17616, "Fw": 17617, "PROJECT": 17618, "xk": 17619, "ĠbeforeEach": 17620, "Ġinvalidate": 17621, "Preset": 17622, ">*": 17623, "workflow": 17624, "Echo": 17625, "YXRl": 17626, "GTK": 17627, "?\");": 17628, "Ġsubclass": 17629, "getDocument": 17630, "Rev": 17631, "Ġimported": 17632, "ĠLOGGER": 17633, "ifiable": 17634, "definitions": 17635, "getRoot": 17636, "projection": 17637, "ĠEEPROM": 17638, "ãģĦ": 17639, "('/',": 17640, "Ġdeclare": 17641, "olr": 17642, "Ġtuples": 17643, "Errno": 17644, "SCREEN": 17645, "mis": 17646, "lapping": 17647, "Ġrval": 17648, "Ġprocedure": 17649, "NOTE": 17650, "Ġtk": 17651, "blocksize": 17652, "prefs": 17653, "Rating": 17654, "ĠIss": 17655, "Attached": 17656, "ĠNDB": 17657, "SECTION": 17658, "Cpu": 17659, "Ġ02": 17660, "Ġparses": 17661, "LayoutParams": 17662, "LoadBalancer": 17663, "Ġunmarshaller": 17664, "erscore": 17665, "Ġloops": 17666, "ĠrelatedTarget": 17667, "dapm": 17668, "VZ": 17669, "ilio": 17670, "ĠCB": 17671, "ĠSQLITE": 17672, "parseFloat": 17673, "Jz": 17674, "åĴ": 17675, "FIXED": 17676, "Ġquality": 17677, "-\"": 17678, "CreateInstance": 17679, "è¿Ļ": 17680, "hood": 17681, "Mz": 17682, "ç´": 17683, "ĠHeaders": 17684, "iated": 17685, "ĠIT": 17686, "typeName": 17687, "Ġpathname": 17688, "loit": 17689, "Ġhl": 17690, "tableLayoutPanel": 17691, "ĠAPInt": 17692, "iscsi": 17693, "ĉĉĉĉĉĉĉĉĉĉĉĉ": 17694, "TypeInfo": 17695, "UW": 17696, "Raise": 17697, "uA": 17698, "ColumnName": 17699, "Ġlr": 17700, "exchange": 17701, "aily": 17702, "compareTo": 17703, ">%": 17704, "cmap": 17705, "Weights": 17706, "gx": 17707, "yond": 17708, "ago": 17709, "ĠSA": 17710, "ĠPIPE": 17711, "problem": 17712, "TRIES": 17713, "PDO": 17714, "ĠfieldNum": 17715, "ĠRegex": 17716, ":\"%": 17717, "coherent": 17718, "Desktop": 17719, "subtype": 17720, "åı·": 17721, "))*": 17722, "ç±»åŀĭ": 17723, "navigation": 17724, "й": 17725, "Inverse": 17726, "velopers": 17727, ")')": 17728, "Ġpolynomial": 17729, "ĠPtr": 17730, "EVP": 17731, "cuda": 17732, "rettify": 17733, "Ps": 17734, "121": 17735, "ĠIdx": 17736, "ĠULONG": 17737, "OE": 17738, "BIO": 17739, "IMETHODIMP": 17740, "rport": 17741, "MISC": 17742, "IFS": 17743, "('../": 17744, "ĠBIO": 17745, "Ġsetter": 17746, "kbd": 17747, "CPP": 17748, "FontSize": 17749, "napi": 17750, "ĠfieldName": 17751, "Ġparents": 17752, "Ġ75": 17753, "Ġenviron": 17754, "umented": 17755, "Collapsed": 17756, "ResumeLayout": 17757, "Ġwave": 17758, "tmpdir": 17759, "RUNNING": 17760, "addElement": 17761, "DIAN": 17762, "qrst": 17763, "tolua": 17764, "Ġfunctionality": 17765, "Ġgateway": 17766, "ĠConst": 17767, "Ġgraphics": 17768, "SuspendLayout": 17769, "ĠTM": 17770, "ĠExpect": 17771, "GetNext": 17772, "==============": 17773, "Ġbone": 17774, "Inject": 17775, "readcr": 17776, "Ġscores": 17777, "DBB": 17778, "physical": 17779, "Ġordinal": 17780, "Cs": 17781, "Ġfg": 17782, "checkPosition": 17783, "ĠFAILED": 17784, "Ġhal": 17785, "Ġ```": 17786, "2018": 17787, "=\\\"\"": 17788, "FY": 17789, "getConnection": 17790, "(;": 17791, "ership": 17792, "Ġcombine": 17793, "2019": 17794, "ragma": 17795, "|%": 17796, "AttributeChecker": 17797, "vLy": 17798, "Ġpeek": 17799, "Ġ\"//": 17800, "ĠWLAN": 17801, "Ġstrn": 17802, "rust": 17803, "onus": 17804, "ora": 17805, "ĠFR": 17806, "reqs": 17807, "NewReader": 17808, "VERTEX": 17809, "Tm": 17810, "drupal": 17811, "Ġpersoon": 17812, "InstancePtr": 17813, "PluralRule": 17814, "ACTIVITY": 17815, "Ġexpects": 17816, "Fo": 17817, "Es": 17818, "æ¬": 17819, "Builtin": 17820, "Gtk": 17821, "Ġscanner": 17822, "Synchron": 17823, "bag": 17824, "iounmap": 17825, "DIM": 17826, "equalsIgnoreCase": 17827, "ALTER": 17828, "callee": 17829, "ĠPSU": 17830, "early": 17831, "Ji": 17832, "prime": 17833, "CDATA": 17834, "argins": 17835, "domains": 17836, "Ġinsertion": 17837, "Mapped": 17838, "thresh": 17839, "Ġqueues": 17840, "ĠAff": 17841, "dB": 17842, "xmm": 17843, "ĠBool": 17844, "*$/": 17845, "nam": 17846, "Trailing": 17847, "BREAK": 17848, "Ġfiltering": 17849, "Timing": 17850, "cycler": 17851, "kk": 17852, "ISH": 17853, "seealso": 17854, "goods": 17855, "BINARY": 17856, "ĠNamespace": 17857, "Ġhierarchy": 17858, "ills": 17859, "Ġrewrite": 17860, "ĠMCS": 17861, "Brazil": 17862, "ĠlastNode": 17863, "utr": 17864, "ĠINIT": 17865, "Ġexecutor": 17866, "NonUser": 17867, "(($": 17868, "Aws": 17869, "ĠINDEX": 17870, "Availability": 17871, "Ġdependent": 17872, "Ġarticle": 17873, "ipy": 17874, "Ġexchange": 17875, "MinValue": 17876, "Stderr": 17877, "strncpy": 17878, "clamp": 17879, "Ġsecure": 17880, "Che": 17881, "SIX": 17882, "Publisher": 17883, "Ġindentation": 17884, "primitive": 17885, "Ġassociation": 17886, "(*(": 17887, "VENDOR": 17888, "ç©": 17889, "coef": 17890, "MEMBER": 17891, "gdG": 17892, "xn": 17893, "QObject": 17894, "ĠtableName": 17895, "writing": 17896, "Southeast": 17897, "Ġdial": 17898, ":$": 17899, "èĢ": 17900, "reamble": 17901, "Syn": 17902, "atin": 17903, "Gdata": 17904, "åĵ": 17905, "FILL": 17906, "Ġbf": 17907, "getSelection": 17908, "Icons": 17909, "à¥ĩ": 17910, "=',": 17911, "APH": 17912, "ĠCamera": 17913, "compose": 17914, "scaler": 17915, "ĠTIME": 17916, "Ġtracking": 17917, "bench": 17918, "ĠstatusCode": 17919, "ĠSelector": 17920, "elcome": 17921, "Replication": 17922, "Comma": 17923, "ï¼ī": 17924, ">:": 17925, "EOP": 17926, "Ñħ": 17927, "mpdf": 17928, "Profiler": 17929, "Ġbusy": 17930, "ĠSignature": 17931, "ĠInputStream": 17932, "reinterpret": 17933, "----------------------------------------": 17934, "creator": 17935, "UserAgent": 17936, "abi": 17937, "ĠTimeout": 17938, "ĠuserId": 17939, "ĠblockSize": 17940, "ConnectionString": 17941, "ddy": 17942, "ĠSF": 17943, "ï¼Ī": 17944, "VISIBLE": 17945, "collections": 17946, "dial": 17947, "Ġcpp": 17948, "setOn": 17949, "ensus": 17950, "5555": 17951, "ĠACL": 17952, "pwd": 17953, "Ġscenario": 17954, "dispatchEvent": 17955, "ĠWatch": 17956, "FAST": 17957, ")');": 17958, "dW": 17959, "Photo": 17960, "ĠOPTION": 17961, "ĠCarousel": 17962, "Ġforms": 17963, "Ġlost": 17964, "ĠAnnot": 17965, "Mb": 17966, "Fp": 17967, "fall": 17968, "ĠCannot": 17969, "brightness": 17970, "Selects": 17971, "Ġactivate": 17972, "Ġvan": 17973, "Ġ{}\",": 17974, "EXTENSION": 17975, "ĠmethodName": 17976, "outed": 17977, "aussian": 17978, "wav": 17979, "xo": 17980, "ä¼ł": 17981, "lon": 17982, "tsk": 17983, "}_": 17984, "Ġsnippet": 17985, "Ġscheduled": 17986, "starting": 17987, "Skipped": 17988, "ĠBC": 17989, "mtab": 17990, "THE": 17991, "Ġwor": 17992, "setType": 17993, "Febru": 17994, "SUR": 17995, "ĠYAML": 17996, "ĠVP": 17997, "Ġks": 17998, "vga": 17999, "Ġfine": 18000, "Chip": 18001, "aggregate": 18002, "容": 18003, "Ġembedding": 18004, ">\")": 18005, "Ġrl": 18006, "Ġpurpose": 18007, "InstanceId": 18008, "~/": 18009, "ĠObjC": 18010, "Ġur": 18011, "eps": 18012, "converter": 18013, "tester": 18014, "=============": 18015, "Ġ\"=": 18016, "Ġи": 18017, "inventory": 18018, "VLAN": 18019, "Ġsymlink": 18020, "stringValue": 18021, "atalen": 18022, "Party": 18023, "Playing": 18024, "lq": 18025, "à¥Ģ": 18026, "Ġmkdir": 18027, "ĠCast": 18028, "playback": 18029, "ĠgetId": 18030, "KeyDown": 18031, "FU": 18032, "Ġgfs": 18033, "ufacturer": 18034, "getActive": 18035, "otos": 18036, "Lowering": 18037, "Ġsuspend": 18038, "ico": 18039, "Canada": 18040, "\"\",": 18041, "302": 18042, "jklmnop": 18043, "ban": 18044, "ĉĉĠĠĠĠĠĠĠ": 18045, "freeze": 18046, "removeListener": 18047, "utive": 18048, "addon": 18049, "ĠPersoon": 18050, "Ġhasn": 18051, "bmN": 18052, "Ġmeaning": 18053, "Ġck": 18054, "Ġsorting": 18055, "{'": 18056, "readInt": 18057, "sky": 18058, "JZ": 18059, "VIR": 18060, "Ġbrowsers": 18061, "Inet": 18062, "ĠTS": 18063, "655": 18064, "FieldValue": 18065, "ĠActiv": 18066, "stopped": 18067, "Ġcompact": 18068, "PIE": 18069, "Containers": 18070, "Movement": 18071, "wnd": 18072, "Ġstartup": 18073, "TYPES": 18074, "Recording": 18075, "activation": 18076, "Ġ-(": 18077, "OrUpdate": 18078, "PROGRESS": 18079, "wers": 18080, "Ġmasked": 18081, "INITY": 18082, "omb": 18083, "ĠCXX": 18084, "ĠNotification": 18085, "spa": 18086, "hat": 18087, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 18088, "isF": 18089, "()*": 18090, "å®ŀ": 18091, "GOT": 18092, "TestData": 18093, "COVER": 18094, "ек": 18095, "Anonymous": 18096, "Cms": 18097, "|_": 18098, "mdc": 18099, "ĠQT": 18100, "ĠcontentType": 18101, "åºĶ": 18102, "ĠErrIntOverflowGenerated": 18103, "ConvertTo": 18104, "ĠPair": 18105, "Ġclang": 18106, "Removes": 18107, "Pi": 18108, "ĠES": 18109, "ĠScreen": 18110, "Ġ\"=\"": 18111, "movie": 18112, "DAO": 18113, "gmt": 18114, "Ġunre": 18115, "cyc": 18116, "izzle": 18117, "ĠAnaly": 18118, "Ast": 18119, "mci": 18120, "pename": 18121, "OAuth": 18122, "Vote": 18123, "Ġbenchmark": 18124, "Ġbalance": 18125, "weekday": 18126, "Ġtyped": 18127, "Ġopaque": 18128, "FFIX": 18129, "Ġ},\\": 18130, "(\"*": 18131, "Unmarshall": 18132, "igure": 18133, "Ġ\")\");": 18134, "MPI": 18135, "UME": 18136, "ĠSCR": 18137, "ĠProgress": 18138, "Ġappears": 18139, "().(*": 18140, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 18141, "Hostname": 18142, "Ġjournal": 18143, "vout": 18144, "Ġtruncate": 18145, "Ġstdin": 18146, "Vectors": 18147, "åŃĹ符": 18148, "ĠĠĠĠĠĊ": 18149, "enticator": 18150, "dataType": 18151, "Ġ47": 18152, "fk": 18153, "ĠKER": 18154, "Hold": 18155, "ĠDat": 18156, "ĠSeek": 18157, "ĠLeft": 18158, "ĠPatch": 18159, "tracking": 18160, "routing": 18161, "Ġsatisfy": 18162, "asi": 18163, "ynos": 18164, "SETUP": 18165, "conflict": 18166, "assertNot": 18167, "COMPRE": 18168, "CSharp": 18169, "enses": 18170, "indirect": 18171, "0441": 18172, "Ġterminate": 18173, "Peek": 18174, "Ġcontinuation": 18175, "ĠMII": 18176, "ĠFace": 18177, "Ġdecide": 18178, "Ġrestrict": 18179, "vectors": 18180, "xdr": 18181, "camel": 18182, "ĠØ": 18183, "ĠVertex": 18184, "**/": 18185, "Ġdegrees": 18186, "ĠNE": 18187, "Ġprinted": 18188, "gpi": 18189, "SIM": 18190, "executor": 18191, "Ġ160": 18192, "ĠSwap": 18193, "smb": 18194, "Edm": 18195, "Ġaborted": 18196, "Bh": 18197, "======": 18198, "VarP": 18199, "CSSPrefix": 18200, "8080": 18201, "Dns": 18202, "ĠManager": 18203, "SSED": 18204, "adb": 18205, "=========": 18206, "Authority": 18207, "GRE": 18208, "pSrc": 18209, "rack": 18210, "Ġmul": 18211, "implode": 18212, "MULTI": 18213, "è·¯": 18214, "Ġfifo": 18215, "365": 18216, "ĠQStringList": 18217, "uar": 18218, "etrokken": 18219, "intval": 18220, "Ġ[['": 18221, "past": 18222, "%(": 18223, "386": 18224, "inel": 18225, "MISS": 18226, "dense": 18227, "ĠQLatin": 18228, "Ġjobs": 18229, "dateFormat": 18230, "createMock": 18231, "StdString": 18232, "ĠTrigger": 18233, "Ġ1234": 18234, "}))": 18235, "Ġintro": 18236, "VQ": 18237, "unpin": 18238, "Requirement": 18239, "sap": 18240, "áĥIJ": 18241, "οÏ": 18242, "ĠMs": 18243, "ASM": 18244, "ĠUsage": 18245, "114": 18246, "BasePath": 18247, "NOTSUPP": 18248, "ĠEdge": 18249, "Desired": 18250, "Solid": 18251, "TypeDef": 18252, "Ġlead": 18253, "firstDay": 18254, "LICT": 18255, "Ġworkflow": 18256, "Ġlowest": 18257, "baseCSSPrefix": 18258, "Prettify": 18259, "trast": 18260, "Ġping": 18261, "keyup": 18262, "ENDIAN": 18263, "ĠQU": 18264, "CallOption": 18265, "SMALL": 18266, "Ġharmony": 18267, "ĠPF": 18268, "unittest": 18269, "ĠCollapse": 18270, "ARGUMENT": 18271, "Ġlengths": 18272, "Ġ&,": 18273, "msghdr": 18274, "umulative": 18275, "slid": 18276, "getMax": 18277, "ALAR": 18278, "userdata": 18279, "battery": 18280, "Ġ404": 18281, "quantity": 18282, "ĠAddr": 18283, "Ġterminated": 18284, "Rob": 18285, "ĠProxy": 18286, "Ġuniform": 18287, "(_(\"": 18288, "LCJ": 18289, "cbl": 18290, "/},{": 18291, "grow": 18292, "Ġist": 18293, "ializers": 18294, "ParseError": 18295, "endsWith": 18296, "询": 18297, "BANK": 18298, "GJ": 18299, "Ġ(@": 18300, "ĠBR": 18301, "Ġimpro": 18302, "DIFF": 18303, "ENDED": 18304, "Broker": 18305, "ĠDP": 18306, "Imports": 18307, "Ġbelongs": 18308, "ensitivity": 18309, "Ġlc": 18310, "Invalidate": 18311, "Domains": 18312, "Latest": 18313, "Ur": 18314, "CAA": 18315, "ĠCGF": 18316, "Gate": 18317, "unsupported": 18318, "Products": 18319, "Gro": 18320, "TOM": 18321, "PUBLIC": 18322, "SimpleRefCount": 18323, "Directories": 18324, "gZ": 18325, "|[^": 18326, "unref": 18327, "COLL": 18328, "directories": 18329, "bcs": 18330, "eting": 18331, "voked": 18332, "ubernet": 18333, "SetString": 18334, "<<\"": 18335, "riptions": 18336, "ValuePair": 18337, "transparent": 18338, "146": 18339, "ĠWS": 18340, "equalTo": 18341, "MAPPING": 18342, "hed": 18343, "ĠInclude": 18344, "between": 18345, "nJ": 18346, "Ġcanceled": 18347, "ĠTT": 18348, "Least": 18349, "Ġql": 18350, "Ġ\"-\"": 18351, "BLK": 18352, "Limits": 18353, "Ġstand": 18354, "SIGNAL": 18355, "checks": 18356, "Ġawsutil": 18357, "vise": 18358, "into": 18359, "Ġdistribute": 18360, "Assessment": 18361, "Ki": 18362, "ubernetes": 18363, "ĠPipe": 18364, "ĠAssembly": 18365, "/$": 18366, "topology": 18367, "InputService": 18368, "154": 18369, "CW": 18370, "ĠDA": 18371, "Md": 18372, "CREF": 18373, "CAPTURE": 18374, "ubi": 18375, "handles": 18376, "rolled": 18377, "Txt": 18378, "ĠCard": 18379, "Ġgrab": 18380, "Ġbuiltin": 18381, "Ġ[]);": 18382, "ĠPerson": 18383, "Ġcwd": 18384, "ergency": 18385, "rendered": 18386, "ĠWidth": 18387, "Leader": 18388, "Ġpersistent": 18389, "(++": 18390, "Ġ:'": 18391, "}/{": 18392, "Ġyes": 18393, "ICY": 18394, "MultiLine": 18395, "Sampler": 18396, "Ġ?>;": 18542, "anc": 18543, "004": 18544, "addItem": 18545, "ENXIO": 18546, "rawler": 18547, "762": 18548, "Exclusive": 18549, "113": 18550, "Writes": 18551, "ReadAll": 18552, ")))|": 18553, "Ġgst": 18554, "Ġportion": 18555, "XYZ": 18556, "SECOND": 18557, "Advance": 18558, "Faces": 18559, "CONNECTED": 18560, "Reduce": 18561, "Canceled": 18562, "ListBox": 18563, "ĠHZ": 18564, "SYN": 18565, "preferred": 18566, "hmac": 18567, "mlog": 18568, "POOL": 18569, "é»ĺ认": 18570, ",,": 18571, "Tue": 18572, "Ġhints": 18573, "Stock": 18574, "Ġdestroyed": 18575, "Ġanimate": 18576, "COMMON": 18577, "ployee": 18578, "SWAP": 18579, "232": 18580, "MACH": 18581, "Bootstrap": 18582, "Die": 18583, "Ġ/^\\": 18584, "drain": 18585, "MessageType": 18586, "Ġ192": 18587, "Ġweekdays": 18588, "IOCTL": 18589, "pagination": 18590, "fabric": 18591, "æł¼": 18592, "patient": 18593, "viation": 18594, "Ġexcluded": 18595, "sentence": 18596, "ĠIo": 18597, "MET": 18598, "Ġrecovery": 18599, "COOKIE": 18600, "Redis": 18601, "Ġolder": 18602, "Ġ())": 18603, "ĠFLASH": 18604, "],\"": 18605, "Ġtransitions": 18606, "Ġgeom": 18607, "celeration": 18608, "ENGINE": 18609, "ĠnsI": 18610, "ल": 18611, "wifiex": 18612, "npos": 18613, "Ġtheta": 18614, "443": 18615, "ĠSafe": 18616, "è¯ģ": 18617, "TEMPLATE": 18618, "thca": 18619, "ĠCase": 18620, "ocfs": 18621, "ToEnd": 18622, "Ġ/**\\": 18623, ")}},": 18624, "ĠMemoryStream": 18625, "Hl": 18626, "ĠAssume": 18627, "éª": 18628, "jklmnopqrst": 18629, "Ġoid": 18630, "ileges": 18631, "оÑĤ": 18632, "Verts": 18633, "Care": 18634, "strm": 18635, "Ġrepr": 18636, "0930": 18637, "Ġobtained": 18638, "pins": 18639, "Unused": 18640, "Floor": 18641, "Ġunlink": 18642, "Performance": 18643, "triple": 18644, "Ġ$('<": 18645, "ĠSecure": 18646, "readed": 18647, "Ġtrust": 18648, "ĠEP": 18649, "cma": 18650, "ĠHAVE": 18651, ":\"^": 18652, "RemoveAll": 18653, "PrototypeOf": 18654, "Ġnearest": 18655, "æ¯": 18656, "recent": 18657, "ĠNewPopulated": 18658, "ĠShift": 18659, "Ġwide": 18660, "formula": 18661, "newValue": 18662, "hance": 18663, "Ġmetav": 18664, "nock": 18665, "Ġinfinite": 18666, "Ds": 18667, "Ġgenerating": 18668, "apic": 18669, "Linkage": 18670, "ĠSoutheast": 18671, "Ġot": 18672, "007": 18673, "SingleValue": 18674, "ĠDIRECTORY": 18675, "Ġdro": 18676, "barrier": 18677, "ĠIORESOURCE": 18678, "Ġ?:": 18679, "Ġspecs": 18680, "rte": 18681, "Expired": 18682, "ipc": 18683, "nextSibling": 18684, "Disposition": 18685, "Ġbreakpoint": 18686, "zs": 18687, "cssText": 18688, "Ġrefers": 18689, "\"+\"": 18690, "/*------------------------------------------------------------------------": 18691, "(_.": 18692, "ResultSet": 18693, "Handled": 18694, "CUSTOM": 18695, "Unpack": 18696, "Ġtherefore": 18697, "Ġinvariant": 18698, "Inspect": 18699, "PLAYER": 18700, "éĢī": 18701, "City": 18702, "Ġshall": 18703, "dwc": 18704, "Ġ(/": 18705, "realm": 18706, "Ġsubtract": 18707, "ĠLinear": 18708, "odd": 18709, "tector": 18710, "ĠluaL": 18711, "gzip": 18712, "ĠDispatch": 18713, "getPosition": 18714, "ĠOFF": 18715, "Stored": 18716, "ALOG": 18717, "Ġ::=": 18718, "])))": 18719, "Counters": 18720, "6000": 18721, "analysis": 18722, "Ġunregister": 18723, "Instructions": 18724, "ORS": 18725, "ferer": 18726, "Exponent": 18727, "ĠUSER": 18728, "Comput": 18729, "listed": 18730, "Ġsysfs": 18731, "Pal": 18732, "swig": 18733, "ĠDestroy": 18734, ".\"),": 18735, "TSource": 18736, "ĠLIMIT": 18737, "Ġconsumed": 18738, "ivative": 18739, "solid": 18740, "thernet": 18741, "ĠLeg": 18742, ">}": 18743, "SFER": 18744, "tel": 18745, "ENSE": 18746, "Ġyyyy": 18747, "ν": 18748, "shapes": 18749, "Ġrecogn": 18750, "Ġtimezone": 18751, "Routines": 18752, "空": 18753, "Flex": 18754, "Ġ$$": 18755, "sal": 18756, "Creating": 18757, "à¨": 18758, "NewErrParam": 18759, "leading": 18760, "ccw": 18761, "never": 18762, "NOTIFY": 18763, "googleapis": 18764, "ately": 18765, "Ġomitted": 18766, "restrict": 18767, "Ġdv": 18768, "ĠgetData": 18769, "orderby": 18770, "JR": 18771, "mpt": 18772, "loom": 18773, "Localized": 18774, "Underlying": 18775, "Ġcycles": 18776, "]&&": 18777, "Å¡": 18778, "gines": 18779, "Scopes": 18780, "Ġpiece": 18781, "OWER": 18782, "pubkey": 18783, "ctime": 18784, "è¿Ľ": 18785, "ĠGameObject": 18786, "EntityType": 18787, "Ġclosure": 18788, "CONNECTION": 18789, "Ġ(`": 18790, "Ġsynchronous": 18791, "Ġ\\$": 18792, "DebuggerNonUser": 18793, "inated": 18794, "ONCE": 18795, "Eye": 18796, "sibling": 18797, "ĠAgg": 18798, "Ġinterpreter": 18799, "HttpResponse": 18800, "Nonce": 18801, "Ġcomputation": 18802, "baseline": 18803, "ccc": 18804, "datatype": 18805, "DefaultValue": 18806, "ĠNothing": 18807, "sth": 18808, "Ġoperators": 18809, "ãģĹãģ": 18810, "Vel": 18811, "Ġmed": 18812, "getOptions": 18813, "ĠEvaluate": 18814, "fX": 18815, "little": 18816, "UTDOWN": 18817, "ucontrol": 18818, "/*.": 18819, "rds": 18820, "ĠMesh": 18821, "Ġancestor": 18822, "tasklet": 18823, "ĠOff": 18824, "æĬ": 18825, "Transparent": 18826, "clearTimeout": 18827, "Verification": 18828, "LogicException": 18829, "flater": 18830, "bookmark": 18831, "ç«": 18832, "Enemy": 18833, "OTAL": 18834, "Clients": 18835, "ToBe": 18836, "ClassLoader": 18837, "ĠNFS": 18838, "ooth": 18839, "dto": 18840, "ĠObservable": 18841, "divider": 18842, "754": 18843, "Ġ=&": 18844, "Ġisa": 18845, "ĠQModelIndex": 18846, "bby": 18847, "hom": 18848, "ĠKeyError": 18849, "omation": 18850, "Ġwasn": 18851, "SUBTEST": 18852, "Accum": 18853, "MN": 18854, "replacement": 18855, "ACTER": 18856, "|-": 18857, "cember": 18858, "Avg": 18859, "eatWhile": 18860, ",[": 18861, "MSK": 18862, "Ġunc": 18863, "*)?": 18864, "Deadline": 18865, "ĠEVENT": 18866, "Ġensures": 18867, "USR": 18868, "ĠErrno": 18869, "Guide": 18870, "retries": 18871, "declared": 18872, "Qo": 18873, "ĠBecause": 18874, "swing": 18875, "/********************************": 18876, "Il": 18877, "lipsis": 18878, "ĠBus": 18879, "ivery": 18880, "];\\": 18881, "ARGE": 18882, "Ġending": 18883, "ĠZSTD": 18884, "corner": 18885, "转": 18886, "Ġhuman": 18887, "subprocess": 18888, "Ql": 18889, "Yy": 18890, "Percentage": 18891, "Ġaffected": 18892, "unday": 18893, "216": 18894, ";}.": 18895, "Ġgetid": 18896, "typed": 18897, "unless": 18898, "RECTION": 18899, "Lz": 18900, "TN": 18901, "subset": 18902, "Zy": 18903, "chi": 18904, "ĠCurrently": 18905, "replay": 18906, "fib": 18907, "Ġdlg": 18908, "AddTo": 18909, "SEEK": 18910, "pbm": 18911, "Ġaa": 18912, "ĠOPENSSL": 18913, "motion": 18914, "MISSION": 18915, "Ġdbg": 18916, "vio": 18917, "Ġ`,`,": 18918, "TextField": 18919, "ĠwxT": 18920, "Ġoptimizer": 18921, "aping": 18922, "[]>": 18923, "mmu": 18924, "ĠWriter": 18925, "Iterations": 18926, "Ġteams": 18927, "ĠPKIX": 18928, "Ġsaving": 18929, "Defn": 18930, "={}": 18931, "getView": 18932, "Ġ101": 18933, "段": 18934, "QueryString": 18935, "Ġcrtc": 18936, "ScriptEngine": 18937, "OU": 18938, "mozilla": 18939, "æĪIJåĬŁ": 18940, "CRYPTO": 18941, "ignored": 18942, "Ġignoring": 18943, "zones": 18944, "ĠADC": 18945, "Ticket": 18946, "ج": 18947, "strain": 18948, "navigator": 18949, "Installed": 18950, "abcdefghijklmnopqrst": 18951, "moo": 18952, "Ġcomparator": 18953, "iterable": 18954, "DbType": 18955, "DEFINE": 18956, "TopLevel": 18957, "Convex": 18958, "latin": 18959, "ĠConverts": 18960, "trig": 18961, "ĠRADE": 18962, "ĠSUB": 18963, "displayName": 18964, "Ġcouldn": 18965, "VARIABLE": 18966, "kref": 18967, "EndPoint": 18968, "ĠRADEON": 18969, "dcb": 18970, "deployment": 18971, "))?": 18972, "Ġscatter": 18973, "ĠCD": 18974, "nob": 18975, "ulo": 18976, "outs": 18977, "ĠBFA": 18978, "Ġendif": 18979, "IGF": 18980, "}[": 18981, "åĬ¡": 18982, "iam": 18983, "nativeObj": 18984, "Rand": 18985, "Ġshuffle": 18986, "cycles": 18987, "Ġdrbd": 18988, "Ġnotifications": 18989, "PAY": 18990, "zilla": 18991, "Notifications": 18992, "rxq": 18993, "Yz": 18994, "ĠPolicy": 18995, "Ġ{}\".": 18996, "Ġints": 18997, "496": 18998, "Zv": 18999, "getVersion": 19000, "COMPONENT": 19001, "Mage": 19002, "Ġ#%": 19003, "iterations": 19004, "Dbg": 19005, "Normalized": 19006, "jack": 19007, "lood": 19008, "colon": 19009, "Ġweak": 19010, "ĠPhys": 19011, "Instrument": 19012, "ени": 19013, "ĠUni": 19014, "Ġplural": 19015, "PFN": 19016, "Ġinp": 19017, "Ġstm": 19018, "sci": 19019, "ĠCPPUNIT": 19020, "addTo": 19021, "Ġcombo": 19022, "0100": 19023, "sdio": 19024, "Alarm": 19025, "ĠRedirect": 19026, "2400": 19027, "Ġdeletes": 19028, "needle": 19029, "pB": 19030, "(\"//": 19031, "Ġ});\\": 19032, "organization": 19033, "MUX": 19034, "YEAR": 19035, "Ġâ": 19036, "startElement": 19037, "getTotal": 19038, "Ġnotes": 19039, "mip": 19040, "ĠSym": 19041, "ĠFake": 19042, "Ġbuffered": 19043, "pnt": 19044, "yellow": 19045, "Backdrop": 19046, "Ġprobability": 19047, "Opaque": 19048, "eli": 19049, "KeyValuePair": 19050, "NoneMatch": 19051, "ĠPx": 19052, "iteration": 19053, "Ġperforms": 19054, "ĠQuick": 19055, "Um": 19056, "umbs": 19057, "JD": 19058, "lyr": 19059, "è¾ĵ": 19060, "ĠQList": 19061, "%;": 19062, "Ġfired": 19063, "spinlock": 19064, "pyx": 19065, "Led": 19066, "isDirectory": 19067, "comma": 19068, "Callee": 19069, "gent": 19070, "Ġ}]": 19071, "Severity": 19072, "Fb": 19073, "ku": 19074, "etooth": 19075, "Cover": 19076, "Ġexecutes": 19077, "PAN": 19078, "ĠModify": 19079, "rlimit": 19080, "yer": 19081, "rip": 19082, "pivot": 19083, "UseVisualStyle": 19084, "stm": 19085, "Ġrefs": 19086, "phpcs": 19087, "Benchmark": 19088, "aq": 19089, "ĠtypeName": 19090, "CHK": 19091, "CONTA": 19092, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 19093, "Exclude": 19094, "ĠHAND": 19095, "ĠRest": 19096, "affixed": 19097, "WireType": 19098, "ел": 19099, "UseVisualStyleBackColor": 19100, "}(": 19101, "endElement": 19102, "0254": 19103, "AutoScale": 19104, "Smart": 19105, "ervation": 19106, "getClient": 19107, "ĠtearDown": 19108, "*=": 19109, "Ġba": 19110, "central": 19111, "ĠTranslate": 19112, "MarshalJSON": 19113, "æŶéĹ´": 19114, "Editing": 19115, "Qualifier": 19116, "Producer": 19117, "qtscript": 19118, "decoration": 19119, "pdb": 19120, "typeahead": 19121, "129": 19122, "Ġ5000": 19123, "Extractor": 19124, "ByVersion": 19125, "BlockSize": 19126, "Rollback": 19127, "JT": 19128, "Sdk": 19129, "017": 19130, "Coin": 19131, "ĠPCL": 19132, "*)(\\\\": 19133, "ĠĠĠĠĠĠĠĊ": 19134, "APB": 19135, "Ġurllib": 19136, "à§": 19137, "mdir": 19138, "Ġ65": 19139, "MIPS": 19140, "arena": 19141, "ĠGST": 19142, "assertArray": 19143, "assertCount": 19144, "COMPAT": 19145, "2004": 19146, "ĠDependency": 19147, "elems": 19148, "ĠStringBuffer": 19149, "timings": 19150, "Ġ55": 19151, "Ġserialization": 19152, "221": 19153, "Ġcandidates": 19154, "Ġche": 19155, "collaps": 19156, "Ġsimpl": 19157, "ĠFD": 19158, "rollback": 19159, "Ġculture": 19160, "RENDER": 19161, "usp": 19162, "paragraph": 19163, "Ġelf": 19164, "RAND": 19165, "Ġcritical": 19166, "*(\\/\\": 19167, "XS": 19168, "isEnabled": 19169, "Ġchance": 19170, "viewer": 19171, "DebuggerNonUserCodeAttribute": 19172, "ĠLONG": 19173, "ĠOk": 19174, "SIO": 19175, "NewSource": 19176, "Ssl": 19177, "lng": 19178, "configured": 19179, "Zj": 19180, "nla": 19181, "hole": 19182, "getDecl": 19183, "asn": 19184, "JP": 19185, "pDevice": 19186, "213": 19187, "every": 19188, "PLATFORM": 19189, "Gray": 19190, "ал": 19191, "Ġ----------------": 19192, "Textures": 19193, "Ġhyper": 19194, "Separ": 19195, "cdb": 19196, "ADAPTER": 19197, "AccountId": 19198, "EFF": 19199, "Runnable": 19200, "ĠRefresh": 19201, "memo": 19202, "ĠShare": 19203, "YWx": 19204, "Ġage": 19205, "Aligned": 19206, "Ġffi": 19207, "Ġ\"?": 19208, "Ġdatastore": 19209, "latency": 19210, "Wed": 19211, "/:": 19212, "306": 19213, "shuffle": 19214, "Ġforeign": 19215, "Ġrng": 19216, "ĠHR": 19217, "doctype": 19218, "Nonnull": 19219, "composite": 19220, "Ġcompared": 19221, "Psr": 19222, "pressed": 19223, "())).": 19224, "fieldset": 19225, "iculty": 19226, "Ġmatter": 19227, "Unmanaged": 19228, "Ġhosts": 19229, "FATAL": 19230, "Clusters": 19231, "éľĢ": 19232, "Multicast": 19233, "\"],\"": 19234, "gpr": 19235, "Ġaccessed": 19236, "EOPNOTSUPP": 19237, "listOf": 19238, "失": 19239, "getFoldWidgetRange": 19240, "CSV": 19241, "å¤Ħ": 19242, "CBase": 19243, "OiB": 19244, "Contexts": 19245, "Ġintermediate": 19246, "Ġinterpolation": 19247, "Ġremember": 19248, "Ġindependent": 19249, "\">';": 19250, "getError": 19251, "ystate": 19252, "FieldType": 19253, "Ġsubstream": 19254, "Latency": 19255, "ĠNVPTXISD": 19256, "Nm": 19257, "ĠWidget": 19258, "Rewrite": 19259, "ĠĠĠĠĠĠĠĠĠĠĊ": 19260, "Representation": 19261, "ĠDriver": 19262, "===========": 19263, "Namespaces": 19264, "errorMessage": 19265, "aG": 19266, "ĠPoly": 19267, "DBF": 19268, "Tele": 19269, "152": 19270, "Ġrequirements": 19271, "ctlr": 19272, "BLANK": 19273, "Ġdatum": 19274, "parc": 19275, "HasBeen": 19276, "å°ı": 19277, "μ": 19278, "imc": 19279, "ĠED": 19280, "sse": 19281, "dlg": 19282, "Ġvma": 19283, "SWITCH": 19284, "QV": 19285, "ĠPclZip": 19286, "ĠTalk": 19287, "ç»ĵ": 19288, "440": 19289, "ITS": 19290, "8500": 19291, "}|\\": 19292, "oread": 19293, "Reading": 19294, "Bs": 19295, "Far": 19296, "baseUrl": 19297, "RSP": 19298, "Changing": 19299, "-_]+": 19300, "Ni": 19301, "]._": 19302, "Retrieves": 19303, "wid": 19304, "META": 19305, "Ġbelong": 19306, "Ġtruncated": 19307, "ĠAssoci": 19308, "blocked": 19309, "CIPHER": 19310, "figure": 19311, "Ġmeth": 19312, "Thing": 19313, "ĠScene": 19314, "identifiers": 19315, "ZY": 19316, "ptime": 19317, ":,": 19318, "mcast": 19319, "Perf": 19320, "Ġaffix": 19321, "rootScope": 19322, "Feedback": 19323, "Ġsage": 19324, "Rc": 19325, "ddata": 19326, "ICh": 19327, "Ġvlan": 19328, "Ġwildcard": 19329, "Reports": 19330, "SHADER": 19331, "goal": 19332, "Ġdelayed": 19333, "supply": 19334, "wik": 19335, "Intersect": 19336, "maries": 19337, "fers": 19338, "Shipping": 19339, "QueryInterface": 19340, "elm": 19341, "Dt": 19342, "REGS": 19343, "Ġplatforms": 19344, "ĠMaximum": 19345, "xX": 19346, "ati": 19347, "Ġfatal": 19348, "ĠMMC": 19349, "ĠqDebug": 19350, "gene": 19351, "Ġtap": 19352, "Ġdeser": 19353, "ĠgetParent": 19354, "Ġguest": 19355, "Decrypt": 19356, "Ġunwrap": 19357, "Expressions": 19358, "Ġbericht": 19359, "Ġmux": 19360, "(\">": 19361, "stripe": 19362, "nocache": 19363, "getValueType": 19364, "Ġpurposes": 19365, "clinical": 19366, "pager": 19367, "Cos": 19368, "Fun": 19369, "Wizard": 19370, "Ġlisted": 19371, "NewErrorWithError": 19372, "Song": 19373, "Ġwebs": 19374, "DSS": 19375, "ĠAES": 19376, "CAT": 19377, "olt": 19378, "baton": 19379, "ĠRD": 19380, "nothing": 19381, "UNSIGNED": 19382, "mbx": 19383, "orderBy": 19384, "Ġapplicable": 19385, "xid": 19386, "Ġpredict": 19387, "ĠAI": 19388, "PROD": 19389, "responses": 19390, "Ġrelationship": 19391, "Dense": 19392, "strftime": 19393, "éªĮ": 19394, "VW": 19395, "EY": 19396, "perms": 19397, "NETWORK": 19398, "Ġtypically": 19399, "cgroup": 19400, "ServerError": 19401, "stretch": 19402, "Ġ###": 19403, "Piece": 19404, "Ġcombination": 19405, "ĠQPoint": 19406, "Subnet": 19407, "Ġtensors": 19408, "Ġbeyond": 19409, "TIMESTAMP": 19410, "ок": 19411, "âĢ¦âĢ¦": 19412, "Campaign": 19413, "DOCUMENT": 19414, "->{$": 19415, "third": 19416, "aby": 19417, "Ġshard": 19418, "Ġ\"_\"": 19419, "Ġcloned": 19420, "CopyTo": 19421, "ĠQObject": 19422, "ĠDuration": 19423, "ĠPU": 19424, "RY": 19425, "zm": 19426, "FileType": 19427, "FileSize": 19428, "GreaterThan": 19429, "KILL": 19430, "AtIndex": 19431, "ĠURLs": 19432, "weapon": 19433, "2222": 19434, "Ġtracker": 19435, "coup": 19436, "GetCall": 19437, "ĠRound": 19438, "Formatted": 19439, "QUFB": 19440, "Ġ320": 19441, "routine": 19442, "Amb": 19443, "CURL": 19444, "व": 19445, "Ġassociative": 19446, "Ġnice": 19447, "ĠAli": 19448, "ĠstdClass": 19449, "MMC": 19450, "Ġelt": 19451, "gested": 19452, "trc": 19453, "Ġwanted": 19454, ">`": 19455, "eol": 19456, "ulted": 19457, "smart": 19458, "Ġplaced": 19459, "cbiAq": 19460, "Pid": 19461, "realloc": 19462, "isOpen": 19463, "Sil": 19464, "emplace": 19465, "ARC": 19466, "aneous": 19467, "classname": 19468, "Ġcorresponds": 19469, "mixin": 19470, "Ġchat": 19471, "amdgpu": 19472, "ISION": 19473, "308": 19474, "Verb": 19475, "(\"__": 19476, "Scratch": 19477, "ĠATOM": 19478, "Ġleak": 19479, "ĠJan": 19480, "dpm": 19481, "Ġgoal": 19482, "Just": 19483, "setVisibility": 19484, "ĠTArg": 19485, "ddd": 19486, "nest": 19487, "CDC": 19488, "Checking": 19489, ")/(": 19490, "Cancelled": 19491, "attery": 19492, "pus": 19493, "ĠWalk": 19494, "135": 19495, "vw": 19496, "Ġexclusive": 19497, "REGEX": 19498, "burst": 19499, "Ġlineno": 19500, "Txn": 19501, "Perm": 19502, "BODY": 19503, "portal": 19504, "ĠOverride": 19505, "त": 19506, "preserve": 19507, "setPosition": 19508, "stantiate": 19509, ")}.": 19510, "åIJĪ": 19511, "isTrue": 19512, "ĠMk": 19513, "hints": 19514, "repos": 19515, ":\"-": 19516, "BlockComment": 19517, "ĠInterrupt": 19518, "Tiles": 19519, "pgs": 19520, "strl": 19521, "smi": 19522, "samp": 19523, "Registr": 19524, "LineNumber": 19525, "fireEvent": 19526, "incoming": 19527, "Ġ'}": 19528, "imitives": 19529, "lid": 19530, "Ġisp": 19531, "///////": 19532, "Ġtried": 19533, ",//": 19534, "Ck": 19535, "Ko": 19536, "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": 19537, "Ġexported": 19538, "Ġblocking": 19539, "ĠLPC": 19540, "ĠQWidget": 19541, "Ġia": 19542, "Stand": 19543, "Ġestablish": 19544, "Flip": 19545, "tiny": 19546, "opened": 19547, "lport": 19548, "lifetime": 19549, "returned": 19550, "Rigid": 19551, "Trie": 19552, "Thumbnail": 19553, "TryParse": 19554, "lru": 19555, "Ini": 19556, "Ġrk": 19557, "ĠbtScalar": 19558, "Tap": 19559, "Ġroles": 19560, "apsz": 19561, "AMES": 19562, "`.`": 19563, "ĠAttributes": 19564, "golang": 19565, "ĠLayer": 19566, "Ġground": 19567, "CHO": 19568, "Employee": 19569, "Ġnic": 19570, "Ġconcurrent": 19571, "Ġadv": 19572, "mouseup": 19573, "fps": 19574, "Ġqed": 19575, "QualifiedName": 19576, "Cent": 19577, "ĠDiagnostic": 19578, "maphore": 19579, "TERM": 19580, "mailer": 19581, "('*": 19582, "OwnerId": 19583, "sto": 19584, "Ġpng": 19585, "Ġsoc": 19586, "EndTime": 19587, "semblies": 19588, "ĠCAIRO": 19589, "Ci": 19590, "itness": 19591, "Ġnoop": 19592, "Money": 19593, "ensible": 19594, "pageY": 19595, "opp": 19596, "GetSize": 19597, "565": 19598, "Indexer": 19599, "TERNAL": 19600, "MsRest": 19601, "uchar": 19602, "xhtml": 19603, "Ġbasis": 19604, "Infof": 19605, "Occurrence": 19606, "Wildcard": 19607, "dio": 19608, "there": 19609, "secutive": 19610, "TRANSFER": 19611, "Ġfavor": 19612, "Buckets": 19613, "Ġhtons": 19614, "phpcsFile": 19615, "UTIL": 19616, "Ġcapabilities": 19617, "ography": 19618, "Dn": 19619, "Encrypted": 19620, "CHUNK": 19621, "MOUSE": 19622, "8723": 19623, "logged": 19624, "icing": 19625, "GetAll": 19626, "ĠBSON": 19627, "Ġxt": 19628, "InitStruct": 19629, "filing": 19630, "ĠIdentity": 19631, "far": 19632, "ABS": 19633, "quiet": 19634, "ĠQR": 19635, "getColor": 19636, "ĠtagName": 19637, "sam": 19638, "Aabb": 19639, "MCE": 19640, "inb": 19641, "ĠDirection": 19642, "MAKE": 19643, "Apps": 19644, "Ġsignals": 19645, "Players": 19646, "Incorrect": 19647, "jacent": 19648, "Ġcapability": 19649, "activated": 19650, "ĠCmp": 19651, "servation": 19652, "ehci": 19653, "nfd": 19654, "PropertyValue": 19655, "Algo": 19656, "BZ": 19657, "\"<": 19658, "Your": 19659, "FormatException": 19660, "MID": 19661, "Argv": 19662, "ĠPDF": 19663, "ĠTypes": 19664, "Volumes": 19665, "Ġ\")\";": 19666, "ĠSCIP": 19667, "OPERATION": 19668, "THRESHOLD": 19669, "\\\\-": 19670, "OrdinalIgnoreCase": 19671, "ĠStackObject": 19672, "Grpc": 19673, "Ġthumb": 19674, "Recovery": 19675, "Provision": 19676, "Insights": 19677, "!!!!": 19678, "Ġ%+": 19679, "btcoexist": 19680, "ĠHeight": 19681, "Ġwebkit": 19682, "Tolerance": 19683, "Ġbehaviour": 19684, "PointerType": 19685, "Enumerate": 19686, "xprt": 19687, "RULE": 19688, "wiphy": 19689, "Ġverts": 19690, "ĠFAIL": 19691, "implementation": 19692, "Thrown": 19693, "iterate": 19694, "GenericType": 19695, "Composition": 19696, "Snap": 19697, "oob": 19698, "Ġsvg": 19699, "phdr": 19700, "Ġdetailed": 19701, "saddr": 19702, "Returned": 19703, "ĠDataType": 19704, "ĠDNS": 19705, "you": 19706, "Ġele": 19707, "ĠUTC": 19708, "rij": 19709, "Specs": 19710, "chieve": 19711, "rparen": 19712, "ĠÑĤ": 19713, "Ġrights": 19714, "Ġsays": 19715, "lining": 19716, "Ġstrong": 19717, "daddr": 19718, "Evaluator": 19719, "ogn": 19720, "Heading": 19721, "twig": 19722, "Ak": 19723, "qn": 19724, "Never": 19725, "urator": 19726, "Ġclaim": 19727, "Ġdlm": 19728, "lldb": 19729, "Ġblend": 19730, "TrimSpace": 19731, "hk": 19732, "Difference": 19733, "Intern": 19734, "Ġcloses": 19735, "carrier": 19736, "Ġoptimize": 19737, "REQUIRED": 19738, "ĠSlot": 19739, "Webhook": 19740, "Ġmanual": 19741, "ç": 19742, "Ġcaching": 19743, "Ġdeletion": 19744, "Ġ43": 19745, "markdown": 19746, "ï¼ģ": 19747, "Ġinternally": 19748, "ĠwxString": 19749, "ownerDocument": 19750, "apiVersion": 19751, "Ġorganization": 19752, "ĠDrag": 19753, "Ġsignificant": 19754, "|<": 19755, "ĠTransfer": 19756, "NATIVE": 19757, "ĠBuildMI": 19758, "Ġhealth": 19759, "ä¼ļ": 19760, "ORIG": 19761, "Ġblocked": 19762, "Coeff": 19763, "XATTR": 19764, "LessThan": 19765, "ĠWebSocket": 19766, "HashSet": 19767, "SendFields": 19768, "dib": 19769, "Ġdamage": 19770, "144": 19771, "cas": 19772, "desktop": 19773, "169": 19774, "767": 19775, "Rights": 19776, "çŃ¾": 19777, "ĠInvalidArgumentException": 19778, ":.": 19779, "Ġamb": 19780, "xfe": 19781, "entered": 19782, "Ġmotion": 19783, "8888": 19784, "Ġsearching": 19785, "PARENT": 19786, "getStore": 19787, "IDS": 19788, "ODER": 19789, "Dy": 19790, "tee": 19791, "Frontend": 19792, "mas": 19793, "tan": 19794, "crt": 19795, "115": 19796, "Ġcoeff": 19797, "12345": 19798, "TIFF": 19799, "uffman": 19800, "Spatial": 19801, "UCH": 19802, "ĠBefore": 19803, "'].'": 19804, "ĠSignal": 19805, "wy": 19806, "drawable": 19807, "HexString": 19808, "tain": 19809, "ĠAuthentication": 19810, "plt": 19811, "Mismatched": 19812, "Qn": 19813, "responseText": 19814, "è½½": 19815, "heid": 19816, "ĠJoin": 19817, "existent": 19818, "olated": 19819, "Ġrdev": 19820, "âĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶ": 19821, "IsSet": 19822, "ĠINPUT": 19823, "nVuY": 19824, "ValueObject": 19825, "...\"": 19826, "tabPage": 19827, "italize": 19828, "enger": 19829, "=====": 19830, "Ġadjusted": 19831, "pD": 19832, "attle": 19833, "Ġdates": 19834, "Ġfork": 19835, "æ±Ĥ": 19836, "Matched": 19837, "UnixNano": 19838, "ĠCons": 19839, "ILY": 19840, "ãģĮ": 19841, "getAddress": 19842, "Ġalter": 19843, "ContainerState": 19844, "Ġrsp": 19845, "022": 19846, "0432": 19847, "Ġmechanism": 19848, "IsNullOrWhiteSpace": 19849, "cake": 19850, "MCS": 19851, "Ġproj": 19852, "writew": 19853, "ĠappendVarint": 19854, "ĠClock": 19855, "Initialization": 19856, "Cv": 19857, "srb": 19858, "Ġmmap": 19859, "coe": 19860, "FdSet": 19861, "Lab": 19862, "ĠAttributeError": 19863, "StringUtils": 19864, "Ġ'^": 19865, "Ġ03": 19866, "oq": 19867, "Ġsigning": 19868, "ç¼ĵ": 19869, "ensive": 19870, "OriginalConstructor": 19871, "YUV": 19872, "antis": 19873, "'[": 19874, "DEL": 19875, "strength": 19876, "Ġdegree": 19877, "posure": 19878, "writeInt": 19879, "Clinical": 19880, "æĢ§": 19881, "positories": 19882, "Yii": 19883, "ĠKeys": 19884, "Ġfread": 19885, "Ignored": 19886, ")})}": 19887, "getLoc": 19888, "ĠclearTimeout": 19889, "\")&&": 19890, "Ġassertions": 19891, "ĠConv": 19892, "2006": 19893, "fonts": 19894, "321": 19895, "Updater": 19896, "MESH": 19897, "MSR": 19898, "LPC": 19899, "profiles": 19900, "ĉĉĉĉĉĉĠĠĠĠ": 19901, "Atlas": 19902, "())));": 19903, "lover": 19904, "feren": 19905, "Ġxfer": 19906, "Impulse": 19907, "ĠCompiler": 19908, "æ²": 19909, "NotImplemented": 19910, "===//": 19911, "ASYNC": 19912, "ICODE": 19913, "ForEach": 19914, "Noise": 19915, "Phi": 19916, "Hosts": 19917, "ĠSerial": 19918, "recovery": 19919, "Ii": 19920, "£Ģ": 19921, "ĠDecimal": 19922, "purge": 19923, ">]": 19924, "Ġrtc": 19925, "Ġapplications": 19926, "ĠIssue": 19927, "('@": 19928, "ĠThey": 19929, "houd": 19930, "otify": 19931, "Ġoffs": 19932, "Ġhole": 19933, "nodeValue": 19934, "buffered": 19935, "CONTIN": 19936, "PRIMARY": 19937, "fz": 19938, "ĠWarning": 19939, "ormap": 19940, "ADV": 19941, "codecSelfer": 19942, "rectangle": 19943, "SCRIPTION": 19944, "ĠDone": 19945, "Ġ*/)": 19946, "parency": 19947, "он": 19948, "Protocols": 19949, "vha": 19950, "Ġdetermines": 19951, "Rom": 19952, ">{": 19953, "Ġ`[": 19954, "('.',": 19955, "Bold": 19956, "ĠmodelBuilder": 19957, "80000000": 19958, "åķ": 19959, "æĸ¹æ³ķ": 19960, "Mm": 19961, "ĠAdmin": 19962, "Ġsampling": 19963, "ENOT": 19964, "ĠRad": 19965, "Ġcompat": 19966, "Ġ'./": 19967, ":`~": 19968, "Ġpercentage": 19969, "Stretch": 19970, "notifications": 19971, "OpCode": 19972, "375": 19973, "Med": 19974, "[/": 19975, "gIH": 19976, "Ġendian": 19977, "MMM": 19978, "Ġprincipal": 19979, "perimental": 19980, "}})": 19981, "arde": 19982, "]>": 19983, "EPERM": 19984, "isdir": 19985, "isVisible": 19986, "Hints": 19987, "INFINITY": 19988, "entropy": 19989, "Ġ\"^": 19990, "Modification": 19991, "éĢļ": 19992, "tenant": 19993, "ELF": 19994, "Ġ'').": 19995, "PHYS": 19996, "XCJ": 19997, "getZ": 19998, "Ġcombin": 19999, "okemon": 20000, "Credit": 20001, "gus": 20002, "uced": 20003, "getMode": 20004, "ĠPROT": 20005, "Lenum": 20006, "ĠSame": 20007, "UAL": 20008, "//===": 20009, "abfd": 20010, "scm": 20011, "findViewById": 20012, "shrink": 20013, "IFMT": 20014, "parable": 20015, "PASSWORD": 20016, "Inherit": 20017, "odium": 20018, "irks": 20019, "ĠTests": 20020, "hardware": 20021, "ĠerrorCode": 20022, "776": 20023, "isted": 20024, "GetService": 20025, "252": 20026, "PRINTK": 20027, "Malloc": 20028, "Ġestimate": 20029, "Ġsuggest": 20030, "libs": 20031, "triangle": 20032, "ISP": 20033, "ĠSwagger": 20034, "ĠDownload": 20035, "Ġ85": 20036, "NotModified": 20037, "ceeds": 20038, "sso": 20039, "]*?": 20040, "('')": 20041, "[:]": 20042, "timeline": 20043, "SELF": 20044, "ForceSendFields": 20045, "eck": 20046, "caseInsensitive": 20047, "Different": 20048, "dag": 20049, "ĠTE": 20050, "ĠPixel": 20051, "Languages": 20052, "ĠFORM": 20053, "ppid": 20054, "Ġtimeval": 20055, "ĠExternal": 20056, "Ġconfigurable": 20057, "CONSTR": 20058, "ãĤ¹": 20059, "Ġfaces": 20060, "fullscreen": 20061, "facet": 20062, "Ġsibling": 20063, "eventType": 20064, "ball": 20065, "ĠTValue": 20066, "MethodName": 20067, "Ġguide": 20068, "ĉĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 20069, "Ġsix": 20070, "Goal": 20071, "shard": 20072, "ĠLUA": 20073, "Online": 20074, "unread": 20075, "Ġdecrypt": 20076, "Ġ')';": 20077, "Focused": 20078, "xv": 20079, "dateTime": 20080, "Ġequality": 20081, "Ġdiagnostic": 20082, "Ġland": 20083, "ĠAjax": 20084, ").>();": 20618, "|__": 20619, "å°Ĩ": 20620, "*)(\\\\()\",": 20621, "BORDER": 20622, "Ġwheel": 20623, "Ġlearning": 20624, "åĪ¶": 20625, "tq": 20626, "ı": 20627, "Ġcrypt": 20628, "BAND": 20629, "dbus": 20630, "AXIS": 20631, "Replacement": 20632, "%\",": 20633, "getPage": 20634, "ĠSchedule": 20635, "Ġios": 20636, "Ġhaven": 20637, "FALL": 20638, "accessor": 20639, "Activities": 20640, "yZ": 20641, "ĠSUC": 20642, "nfc": 20643, "Ġrecommended": 20644, "Ġioaddr": 20645, "Containing": 20646, "MATH": 20647, "Station": 20648, "307": 20649, "Ġoss": 20650, "ĠMRI": 20651, "subscriber": 20652, "ĠOperand": 20653, "amil": 20654, "reading": 20655, "Addon": 20656, "cue": 20657, "Ġhistogram": 20658, "Ġ600": 20659, "428": 20660, "LQ": 20661, "ĠResources": 20662, "Ġproceed": 20663, "Ġcaused": 20664, "PartialEq": 20665, "Ġ{}'.": 20666, "Ġxor": 20667, ")|(": 20668, "qstring": 20669, "getLogger": 20670, "Ø´": 20671, "BackgroundColor": 20672, "Possible": 20673, "èģ": 20674, "cstyle": 20675, "uFF": 20676, "Parses": 20677, "Ġallocator": 20678, "ĠTimeUnit": 20679, "Ġbindings": 20680, "OX": 20681, "ëĭ": 20682, "ĠFixed": 20683, "GetNum": 20684, "Ġstrm": 20685, "ĠSuper": 20686, "}-": 20687, "Ġ%{{.*": 20688, "ĠCho": 20689, "Chooser": 20690, "Browse": 20691, "duplex": 20692, "SHUTDOWN": 20693, "OPERAND": 20694, "LITERAL": 20695, "NAMIC": 20696, "ints": 20697, "ĠCOR": 20698, "ç¼ĵåŃĺ": 20699, "140": 20700, "Ġability": 20701, "Ġpredictions": 20702, "": 24878, "FAD": 24879, "QB": 24880, "WG": 24881, "sex": 24882, ",\"%\":": 24883, "FIRM": 24884, "LineIndent": 24885, "ار": 24886, "Ġpreceding": 24887, "ĠMotion": 24888, "ROID": 24889, "atime": 24890, "368": 24891, "ĠCHAN": 24892, "Hive": 24893, "='.$": 24894, "EMAIL": 24895, "NIL": 24896, "pptr": 24897, "ReadLine": 24898, "Ġgrouped": 24899, "Ġworksheet": 24900, "ĠPOLL": 24901, "Ġsong": 24902, "ĠFi": 24903, "Ġbeacon": 24904, "Ġalloca": 24905, "pZiA": 24906, "Ġtunnel": 24907, "KP": 24908, "mdelay": 24909, "compilation": 24910, "BBD": 24911, "ExtendedProperty": 24912, "abcdefghij": 24913, "PodAutoscaler": 24914, "ori": 24915, "Ġslight": 24916, "ĠSorted": 24917, ":\"(?:": 24918, "196": 24919, "ĠChrome": 24920, "IHR": 24921, "UChar": 24922, "ĠChe": 24923, "grouping": 24924, "mus": 24925, "('>": 24926, "Ġneedle": 24927, "ĠChat": 24928, "Ġsessions": 24929, "adratic": 24930, "\",'[": 24931, "ĠTLI": 24932, "ĠBin": 24933, "041": 24934, "ĠAlgorithm": 24935, "ĠIPPROTO": 24936, "åħ¨": 24937, "ĠBits": 24938, "ĠHead": 24939, "inalg": 24940, "Ġserve": 24941, "corr": 24942, "mContext": 24943, "pct": 24944, "Ġcas": 24945, "agp": 24946, "Ġxf": 24947, "CurrentCulture": 24948, "Alloca": 24949, "ä¹ī": 24950, "filt": 24951, "oliday": 24952, "fldEl": 24953, "deque": 24954, "Versioned": 24955, "ĠOpenLayers": 24956, "\\\\.\\\\": 24957, "Prefixes": 24958, "atively": 24959, "IOP": 24960, "isLoading": 24961, "intilla": 24962, "Tray": 24963, "ZnVuY": 24964, "zf": 24965, "loded": 24966, "ĠGetValue": 24967, "NELS": 24968, "touchstart": 24969, "æł¹": 24970, "ĠCreature": 24971, "Motor": 24972, "OI": 24973, "ĠFx": 24974, "moothing": 24975, "onth": 24976, "187": 24977, "FindProperty": 24978, "ĠYAHOO": 24979, "ĠCv": 24980, ".\"+": 24981, "ĠMonitor": 24982, "ĠGuide": 24983, "Jj": 24984, "Soc": 24985, "Ġmol": 24986, "ĠFlat": 24987, "SIVE": 24988, "ĠparamsArray": 24989, "Ġ})();": 24990, "anitized": 24991, "Smooth": 24992, "(';": 24993, "ĠROM": 24994, "ĠRemember": 24995, "ImageList": 24996, "1970": 24997, "MachineFunction": 24998, "ÐIJ": 24999, "ĠEnumerable": 25000, "mpy": 25001, "775": 25002, "Ġdownloaded": 25003, "Ġowned": 25004, "Sqrt": 25005, "Jh": 25006, "Ġcw": 25007, "Ġverified": 25008, "åĿĢ": 25009, "Ġscatterlist": 25010, "ĠtestRunner": 25011, "Ġprecedence": 25012, "USHORT": 25013, "presentation": 25014, "项": 25015, "tegra": 25016, "7000": 25017, "sType": 25018, "']=": 25019, "ĠGT": 25020, "Ġtracks": 25021, "/\"+": 25022, "éķ": 25023, "preload": 25024, "PERMISSION": 25025, "æĪij": 25026, "\"}]},{": 25027, "230": 25028, "Elect": 25029, "candidates": 25030, "nX": 25031, "ppp": 25032, "msglen": 25033, "TERMIN": 25034, "ĠStrip": 25035, "<\\/": 25036, "Ġreview": 25037, "SSES": 25038, "utors": 25039, "ĠICMP": 25040, "Overwrite": 25041, "GOOD": 25042, "ĠMHz": 25043, "ĠnodeName": 25044, "550": 25045, "PERF": 25046, "sockaddr": 25047, "expressions": 25048, "adjusted": 25049, "Ġsemantic": 25050, "Framer": 25051, "bubble": 25052, "Ġgetenv": 25053, "onChange": 25054, "Ġice": 25055, "ĠdoTest": 25056, "Ġkmem": 25057, "MoveNext": 25058, "rist": 25059, "ĠLLL": 25060, "0634": 25061, "Ġ]))": 25062, "207": 25063, "littlefuzz": 25064, "gev": 25065, "insics": 25066, "SApi": 25067, "WORDS": 25068, "MonoPInvokeCallbackAttribute": 25069, "SECURITY": 25070, "aphore": 25071, "Exc": 25072, "Backoff": 25073, "execCommand": 25074, "Ġattempting": 25075, "GetParent": 25076, "ĠFIELD": 25077, "!=-": 25078, "hape": 25079, "onClick": 25080, "ĠDLL": 25081, "Ġarith": 25082, "ContentLength": 25083, "capable": 25084, "PRED": 25085, "Ġvariants": 25086, "Ġanalyze": 25087, "itv": 25088, "Ġ$(\".": 25089, "PRT": 25090, "BadWireType": 25091, "Ik": 25092, "[--": 25093, "ĠCGM": 25094, "SetActive": 25095, "SDIO": 25096, "Prime": 25097, "VRAM": 25098, "gdata": 25099, "Ġlatch": 25100, "haser": 25101, "ProfileId": 25102, "اÙĨ": 25103, "directives": 25104, "η": 25105, "ĠVID": 25106, "Latitude": 25107, "udd": 25108, "Ġfout": 25109, "ORIGIN": 25110, "ĠLC": 25111, "sourceRoot": 25112, "Ġshowing": 25113, "SyntaxKind": 25114, "Ġ})(": 25115, "ĠTEMP": 25116, "rawl": 25117, "Ġdefining": 25118, "Ġmovement": 25119, "AutoScaleMode": 25120, "ĠMIB": 25121, "ĠBUS": 25122, "feb": 25123, "Ġtestcase": 25124, "xDol": 25125, "Analyze": 25126, "ĠWH": 25127, "YXI": 25128, "Density": 25129, "larg": 25130, "ĠCTL": 25131, "Ġicmp": 25132, "emoji": 25133, "Mp": 25134, "ninterface": 25135, "Ġeen": 25136, "Ġrounded": 25137, "iot": 25138, "prt": 25139, "statuses": 25140, "Protobuf": 25141, "Ġbarrier": 25142, "Ġauthorized": 25143, "ael": 25144, "Ġbins": 25145, "capitalize": 25146, "LOGGER": 25147, "ĠVisibility": 25148, "Ġoctet": 25149, "highest": 25150, "outl": 25151, "authenticated": 25152, "hostdata": 25153, "TILE": 25154, "=$(": 25155, "Ġна": 25156, "GING": 25157, "{};": 25158, "approx": 25159, "Ġ@__": 25160, "Qp": 25161, "][:": 25162, "MPTY": 25163, "330": 25164, "eu": 25165, "axe": 25166, "Appointment": 25167, "InternalBadWireType": 25168, "askell": 25169, "LookupInstance": 25170, "pbuf": 25171, "isChecked": 25172, "Ġinventory": 25173, "Iy": 25174, "Wo": 25175, "ĠdataSource": 25176, "archical": 25177, "253": 25178, "ĠPrev": 25179, "ĠWaitFor": 25180, "urbs": 25181, "Ġmwifiex": 25182, "getUTC": 25183, "liable": 25184, "findAll": 25185, "Paginator": 25186, "ASSOC": 25187, "(~": 25188, "Ġfv": 25189, "DataGridView": 25190, "Ġleader": 25191, "LOCKED": 25192, "ĠTP": 25193, "SetContext": 25194, "pld": 25195, "ĠCLog": 25196, ":\"(": 25197, "atoms": 25198, "EBML": 25199, "Ġhdmi": 25200, "ĠSCI": 25201, "Ġtrusted": 25202, "ĠHistory": 25203, "Ġcounting": 25204, "HORIZONTAL": 25205, "Inactive": 25206, "Inserted": 25207, "Ġstamp": 25208, "fops": 25209, "ĠWrit": 25210, "ibdev": 25211, "ucing": 25212, "CGM": 25213, "Ġnavigator": 25214, "ĠInte": 25215, "067": 25216, "errcode": 25217, "ĠDense": 25218, "ethtool": 25219, "='$": 25220, "MATRIX": 25221, "8001": 25222, "abbr": 25223, "éĽĨ": 25224, "scc": 25225, "066": 25226, "/<": 25227, "ride": 25228, "bbed": 25229, "ĠTermin": 25230, "subdevice": 25231, "FAMILY": 25232, "mclk": 25233, "ĠNR": 25234, "Argb": 25235, "assemble": 25236, "beled": 25237, "ам": 25238, "Cdecl": 25239, "uming": 25240, "ilestone": 25241, "GetFloat": 25242, "cacheKey": 25243, "ĠShutdown": 25244, "bmc": 25245, "pctl": 25246, "Ġgf": 25247, "KeyPair": 25248, "Ġmultipart": 25249, "ica": 25250, "ltas": 25251, "Ġbacking": 25252, "ĠTransition": 25253, "ĠPhone": 25254, "Ġ'//": 25255, "locities": 25256, "ĠHAS": 25257, "Ġ62": 25258, "DBD": 25259, "EventId": 25260, "AABB": 25261, "Ġpropagate": 25262, "FontStyle": 25263, "Ġindicated": 25264, "AddItem": 25265, "Ġsubscriber": 25266, "æĶ¾": 25267, "ĠOMP": 25268, "EMIT": 25269, "Nearest": 25270, "Ġdecision": 25271, "FLAC": 25272, "Ġctr": 25273, "DATABASE": 25274, "dce": 25275, "rme": 25276, "lach": 25277, "Ġinclusive": 25278, "Ġresidual": 25279, "ĠGetCurrent": 25280, "selectors": 25281, "ĠPossible": 25282, "Draft": 25283, "Friendly": 25284, "frozen": 25285, "ToUse": 25286, "reorder": 25287, "Ġpaused": 25288, "RDY": 25289, "APPEND": 25290, "?!": 25291, "QText": 25292, "haps": 25293, "ItemCount": 25294, "Ġcaref": 25295, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 25296, "LogEntry": 25297, "='%": 25298, "VBInfo": 25299, "864": 25300, "JL": 25301, "seud": 25302, "Ġmar": 25303, "Ġinfer": 25304, "REPE": 25305, "ĠonError": 25306, "ĠQSize": 25307, "CoreOS": 25308, "MIS": 25309, "pinfo": 25310, "trial": 25311, "Ġexpress": 25312, "tesian": 25313, "LUA": 25314, "PING": 25315, "ĠActor": 25316, "PEM": 25317, "MessageId": 25318, "clientdata": 25319, "177": 25320, "]`": 25321, "BitCast": 25322, "Ġfixup": 25323, "Aan": 25324, "getG": 25325, "clientWidth": 25326, "MockObject": 25327, "*)(=": 25328, ")].": 25329, "TID": 25330, "ULong": 25331, "cule": 25332, "lpsz": 25333, "ĠSWT": 25334, "accepted": 25335, "0200": 25336, ")(\\": 25337, "ĠTk": 25338, "INO": 25339, "userName": 25340, "cvt": 25341, "Ġouts": 25342, "Ġnormalization": 25343, "getNdbError": 25344, "ĠMPT": 25345, "ĠGTK": 25346, "nearest": 25347, "Ġcorrection": 25348, "PLACE": 25349, "getResources": 25350, "ĠPool": 25351, "Validity": 25352, "Rects": 25353, "Ġpul": 25354, "InOut": 25355, "ĠPD": 25356, "HES": 25357, "Ġ68": 25358, "Ġperforming": 25359, "+\")(\\\\": 25360, "clocks": 25361, "ĠidentifierRe": 25362, "Ġfeedback": 25363, "ISupportInitialize": 25364, "Ġ{//": 25365, "Ġopus": 25366, "vL": 25367, "factoring": 25368, "thdr": 25369, "orte": 25370, "psr": 25371, "Configured": 25372, "bernate": 25373, "ĠRelation": 25374, "WAL": 25375, "]<<": 25376, "nP": 25377, "vy": 25378, "ofdpa": 25379, "на": 25380, "autop": 25381, "ĠCa": 25382, "IDER": 25383, "hideModal": 25384, "ĠMySql": 25385, "Guild": 25386, "prefetch": 25387, "Communication": 25388, "Uy": 25389, "mbuf": 25390, "SessionId": 25391, "Ġspans": 25392, "PrimitiveType": 25393, "0020": 25394, "licated": 25395, "Below": 25396, "Ġoperate": 25397, "biB": 25398, "whitelist": 25399, "Lost": 25400, "ĠGive": 25401, "discount": 25402, "ĠTestRunner": 25403, "ermios": 25404, "('=": 25405, "wcm": 25406, "Ġldap": 25407, "varname": 25408, "334": 25409, "WATCH": 25410, "Xl": 25411, "refer": 25412, "FunctionName": 25413, "learn": 25414, "Vc": 25415, "aio": 25416, "uDF": 25417, "Ú©": 25418, "CallOptions": 25419, "Ġcomputes": 25420, "sockets": 25421, "ighbour": 25422, "Ign": 25423, "ham": 25424, "jvm": 25425, "NUMERIC": 25426, "Ġ2017": 25427, "ĠTW": 25428, "ĠFLOAT": 25429, "Ġminimal": 25430, "dicts": 25431, "]<": 25432, "aGlz": 25433, "licenses": 25434, "ALERT": 25435, "localName": 25436, "sds": 25437, "acct": 25438, "URLs": 25439, "XMLString": 25440, "NamedItem": 25441, "pods": 25442, "ĠArea": 25443, "ĠToggle": 25444, "]\",\"\",": 25445, "Ġftp": 25446, "odata": 25447, "Ġtester": 25448, "Ġauthenticate": 25449, "Ġourselves": 25450, "UtcNow": 25451, "ĠMet": 25452, "ViewTranslation": 25453, "Ġreleases": 25454, "ĠDbg": 25455, "Sam": 25456, "Trap": 25457, "held": 25458, "SetWindow": 25459, "ĠIntern": 25460, "viding": 25461, "Ġ'=',": 25462, "]\",\"\",,\"\",": 25463, "Ġtpl": 25464, "RDONLY": 25465, "ZF": 25466, "Ġrebuild": 25467, "olded": 25468, "vies": 25469, "NotSupported": 25470, "181": 25471, "Ġstylesheet": 25472, "hread": 25473, "getConfiguration": 25474, "ĠVR": 25475, "compound": 25476, "ĠDIR": 25477, "keypress": 25478, "FileExists": 25479, "doctest": 25480, "Ġuserspace": 25481, "July": 25482, "280": 25483, "JH": 25484, "Kb": 25485, "æ»": 25486, "iper": 25487, "Ġbufs": 25488, "sockname": 25489, "diffs": 25490, "VERTICAL": 25491, "Svg": 25492, "TDR": 25493, "\\*": 25494, "stv": 25495, "quiz": 25496, "regval": 25497, "IntValue": 25498, "|[^|": 25499, "à¼": 25500, "è¨": 25501, "rected": 25502, "235": 25503, "CONTAINER": 25504, "Controllers": 25505, "MinMax": 25506, "splitContainer": 25507, "ĠSeries": 25508, "tnl": 25509, "ĠUNUSED": 25510, "ка": 25511, "STANDAL": 25512, "Okt": 25513, "cst": 25514, "getRecord": 25515, "290": 25516, "Builds": 25517, "ĠWINAPI": 25518, "tracing": 25519, "predictions": 25520, "ederation": 25521, "KeyCode": 25522, "Ġ'\"',": 25523, "Probability": 25524, "Nick": 25525, "raster": 25526, "fromString": 25527, "newRequest": 25528, "Mis": 25529, "Tc": 25530, "ĠMSI": 25531, "variate": 25532, "ĠgetUser": 25533, "BUCK": 25534, "styleBehaviour": 25535, "Workers": 25536, "AXB": 25537, "navbar": 25538, "Flatten": 25539, "\",\"\"": 25540, "quasi": 25541, "ĠConn": 25542, "Ġbatadv": 25543, "aead": 25544, "Ġprefixed": 25545, "Persist": 25546, ".*/": 25547, "wmb": 25548, "ĠDynamics": 25549, "GetFileName": 25550, "PHASE": 25551, ")$/": 25552, "udf": 25553, "NewValue": 25554, "Asserts": 25555, "INTEGR": 25556, "Ġea": 25557, "Errs": 25558, "Protect": 25559, "Thickness": 25560, "associated": 25561, "æł¼å¼ı": 25562, "CAD": 25563, "Gfx": 25564, "mismatch": 25565, "Ġfence": 25566, "Ġinform": 25567, "Ġpointing": 25568, "ĠTopic": 25569, "pgrp": 25570, "Ġ?>\"": 25571, "Ġ97": 25572, "\"}]}": 25573, "Monitoring": 25574, "ĠIterable": 25575, "Ġcamel": 25576, "interrupts": 25577, "ddc": 25578, "SetAttribute": 25579, "Interpolation": 25580, "loopback": 25581, "Ġangles": 25582, "Flight": 25583, "sar": 25584, "()}),": 25585, "getTemplate": 25586, "AppendFormat": 25587, "ĠIRQF": 25588, "QI": 25589, "Ġgone": 25590, "Ġmaxlen": 25591, "padded": 25592, "hose": 25593, "ĠJo": 25594, "ĠJVM": 25595, "solo": 25596, "war": 25597, "vehicle": 25598, "mpu": 25599, "Colon": 25600, "LOUD": 25601, "...'": 25602, "Sprint": 25603, "serio": 25604, "ĠCond": 25605, "Ġraster": 25606, "Ġamong": 25607, "IMPLE": 25608, "![": 25609, "invariant": 25610, "Ġcontour": 25611, "AGC": 25612, "zdGF": 25613, "chievement": 25614, "\\\\\\\\]))*?": 25615, "Pot": 25616, "ees": 25617, "human": 25618, "Conversation": 25619, "ĠOur": 25620, "SpecFlow": 25621, "ž": 25622, "ĠDH": 25623, "?\\\\": 25624, "Ġrepl": 25625, "Ġseverity": 25626, "Ġ'{'": 25627, "/')": 25628, "leader": 25629, "Ġmysqli": 25630, "ĠBPF": 25631, "VMX": 25632, "sscanf": 25633, "Ġmg": 25634, "Locales": 25635, "software": 25636, "Ġtransforms": 25637, "ĠSpecify": 25638, "çĶŁæĪIJ": 25639, "327": 25640, "startDate": 25641, "ndx": 25642, "æ·»åĬł": 25643, "answers": 25644, "Relations": 25645, "ams": 25646, "Ġgsl": 25647, "Ġrating": 25648, "1305": 25649, "å¯Ĩ": 25650, "Ġeeprom": 25651, "ertype": 25652, "ĠAng": 25653, "Ġqh": 25654, "([\"../../": 25655, ")+'": 25656, "Rn": 25657, "iadic": 25658, "xcode": 25659, "Ġnh": 25660, "FunctionType": 25661, "Extents": 25662, "ĠSTD": 25663, "ĠCalls": 25664, "Ġpev": 25665, "__.'/": 25666, "])}": 25667, "anks": 25668, "Posts": 25669, "ĠOpenGL": 25670, "synchronized": 25671, "Bc": 25672, "Jr": 25673, "Ġtn": 25674, "fsl": 25675, "ĠListen": 25676, "Ġpresentation": 25677, "Let": 25678, "Ġox": 25679, "ĠNested": 25680, "DIE": 25681, "getProject": 25682, "GetPosition": 25683, "ĠDeploy": 25684, "]=\"": 25685, "ĠStri": 25686, "(?<": 25687, "ClientConn": 25688, "UNDER": 25689, "TAILQ": 25690, "OY": 25691, "_),": 25692, "Ġew": 25693, "!!!": 25694, "pindex": 25695, "ĠvalueType": 25696, ">>>>": 25697, "ĠUtility": 25698, "Korea": 25699, "Rw": 25700, "èī": 25701, "Ġexpose": 25702, "Intensity": 25703, "Starts": 25704, "ĠReturned": 25705, "uffff": 25706, "WebRequest": 25707, "Ġtempfile": 25708, "Spinner": 25709, "èĢħ": 25710, "ĠPIO": 25711, "nose": 25712, "+\"": 26188, "Synth": 26189, "cflag": 26190, "ĠPhp": 26191, "Showing": 26192, "ppd": 26193, "errorType": 26194, "Outgoing": 26195, "BoxLayout": 26196, "Ġcaffe": 26197, "Replay": 26198, "Favor": 26199, "ÐĶ": 26200, "ocs": 26201, "ĠsetId": 26202, "ĠInf": 26203, "Personal": 26204, "getV": 26205, "Ġstay": 26206, "psi": 26207, "没æľī": 26208, "endance": 26209, "ĠpackageName": 26210, "Ġwakeup": 26211, "430": 26212, "Ġran": 26213, "INNER": 26214, "IWL": 26215, "qf": 26216, "ĠPin": 26217, "ĠLS": 26218, "Scr": 26219, "Ġadjacent": 26220, "Ġokay": 26221, "February": 26222, "Ġhda": 26223, "Ġ/[": 26224, "interop": 26225, "blockComment": 26226, "Ġrom": 26227, "Ġsplits": 26228, "Ġvd": 26229, "Ġepisode": 26230, "stick": 26231, "Ġreconnect": 26232, "vu": 26233, "Ġassoc": 26234, "Ġquiet": 26235, "('/\\": 26236, "'%": 26237, "Ey": 26238, "`);": 26239, "ANTI": 26240, "ĠLogging": 26241, "\"}.": 26242, "ĠJsonToken": 26243, "Integral": 26244, "Ġtranslators": 26245, "uDE": 26246, "Ġspa": 26247, "blockquote": 26248, "MSB": 26249, "Respond": 26250, "bson": 26251, "ã": 26252, "recipe": 26253, "isReg": 26254, "Consum": 26255, "ĠBAR": 26256, "DEPRECATED": 26257, "areas": 26258, "hdc": 26259, "Ġsmc": 26260, "CLARE": 26261, ")&&!": 26262, "lade": 26263, "ĠVB": 26264, "callParent": 26265, "Ġcircuit": 26266, "Ġgather": 26267, "fav": 26268, "osp": 26269, "ToTable": 26270, "igu": 26271, "ĠMost": 26272, "ĠFFI": 26273, "QUAD": 26274, "typename": 26275, "Ġeasily": 26276, "tsc": 26277, "Toast": 26278, "oldfd": 26279, "cyB": 26280, "Ġreplaces": 26281, "ĠHttpResponseMessage": 26282, "Determines": 26283, "WidgetItem": 26284, "Ġfactors": 26285, "domMap": 26286, "gence": 26287, "Ġhover": 26288, "ĠRB": 26289, "acf": 26290, "Ġctype": 26291, "Ġmagnitude": 26292, "LOOKUP": 26293, "Pw": 26294, "ί": 26295, "SetState": 26296, "ĠRTE": 26297, "ucode": 26298, "Ġ{?": 26299, "Ġrely": 26300, "Ġ._": 26301, "\":\",": 26302, "argumentCount": 26303, "Choices": 26304, "Ġseparately": 26305, "EPSILON": 26306, "Sorting": 26307, "ĠSUPPORT": 26308, "setattr": 26309, "+|\\": 26310, "Elems": 26311, "StateChange": 26312, "ĠMySQL": 26313, "ĠImGui": 26314, "Wake": 26315, "sharp": 26316, "newBuilder": 26317, "Ġscr": 26318, "Disconnected": 26319, "\"-": 26320, "zend": 26321, "àª": 26322, "Ġruby": 26323, "Ġexam": 26324, "ÑĤи": 26325, "ä¿®": 26326, "localVar": 26327, "csrf": 26328, "AccessControl": 26329, "ĠUsers": 26330, "Ġnick": 26331, "ĠTod": 26332, "ĠABI": 26333, "ĠDerived": 26334, "leds": 26335, "ĠCONT": 26336, "Insertion": 26337, "LOWER": 26338, "sthrough": 26339, "Pkt": 26340, "Ġino": 26341, "Ġ3000": 26342, "ByZXR": 26343, "*[": 26344, "Om": 26345, "WPA": 26346, "['__": 26347, "Ġscnprintf": 26348, "hel": 26349, "Ġgiving": 26350, "Dp": 26351, "Nx": 26352, "Estimate": 26353, "]][": 26354, "broken": 26355, "Ġeye": 26356, "ĠPUT": 26357, "protection": 26358, "filefunc": 26359, "neighbor": 26360, "Ġena": 26361, "Ġzfcp": 26362, "FRONT": 26363, "ĠHEADER": 26364, "aWYgK": 26365, "oz": 26366, "()',": 26367, "getProduct": 26368, "Ġ']'": 26369, "ĠCLOCK": 26370, "Ant": 26371, "INITIALIZED": 26372, "unycode": 26373, "gevens": 26374, "DAD": 26375, "FileList": 26376, "\\\"\");": 26377, "annotate": 26378, "ParameterType": 26379, "Ġdomains": 26380, "Chrom": 26381, ":\"$": 26382, "ETTER": 26383, "SITY": 26384, "ĠSU": 26385, "ĠOct": 26386, "Ġys": 26387, "pcmc": 26388, "Ġoffline": 26389, "Computer": 26390, "SMC": 26391, "Proposal": 26392, "ObjectFile": 26393, "rounding": 26394, "ĠDot": 26395, "backlight": 26396, "Actie": 26397, "Ġskill": 26398, "ĠToast": 26399, "RUNTIME": 26400, "|(": 26401, "ĠPDO": 26402, "nsresult": 26403, "weex": 26404, "Ġreflow": 26405, "FOC": 26406, "ictionaries": 26407, "Pulse": 26408, "Rhd": 26409, "\")&&(": 26410, "timestamps": 26411, "EndElement": 26412, "Agg": 26413, "PREF": 26414, "225": 26415, "Ġexits": 26416, "ToDouble": 26417, "<(": 26418, "Ġeasing": 26419, "favor": 26420, "Ġindexing": 26421, "Ġdirectives": 26422, "Ġconnecting": 26423, "REPLY": 26424, "Ġpj": 26425, "Ġhns": 26426, "HOUR": 26427, "ĠUniValue": 26428, "=\");": 26429, "Ġbehind": 26430, "oldpath": 26431, "Newline": 26432, "optarg": 26433, "MED": 26434, "aborted": 26435, "242": 26436, "Ġmh": 26437, "ĠAG": 26438, "DETAIL": 26439, "aclass": 26440, "Ġ'.',": 26441, "TempFile": 26442, "Statuses": 26443, "Ta": 26444, "aParams": 26445, "ĠobjectType": 26446, "ĠDetails": 26447, "spectrum": 26448, "Ġmii": 26449, "Ġenemy": 26450, "}}},": 26451, "attice": 26452, "aser": 26453, "ĠRDoc": 26454, "March": 26455, "Keeper": 26456, "MBean": 26457, "bch": 26458, "jni": 26459, "))\",": 26460, "ĠAcc": 26461, "StringBuffer": 26462, "spb": 26463, "Ġtriangles": 26464, "Ġcsio": 26465, "gcc": 26466, "InfoList": 26467, "Decls": 26468, "Rendered": 26469, "SMTP": 26470, "Recipients": 26471, "099": 26472, "Hist": 26473, "ç¡": 26474, "ĠBFD": 26475, "ISel": 26476, "ĠGLfloat": 26477, "producer": 26478, "KeepAlive": 26479, "bno": 26480, "bullet": 26481, "eor": 26482, "Ġfoot": 26483, "Ġnewpath": 26484, "Multiline": 26485, "ĠPKCS": 26486, "isBuffer": 26487, "ĠIWL": 26488, "ImGui": 26489, "Ġwalker": 26490, "éĻIJ": 26491, "urlencoded": 26492, "Ġsiblings": 26493, "olen": 26494, "ĠQLA": 26495, "Resultaat": 26496, "]+)\\": 26497, "10101010": 26498, "lopen": 26499, "Ġ'))": 26500, "SetColor": 26501, "caret": 26502, "cntr": 26503, "Surf": 26504, "Ġinterested": 26505, "Ġvr": 26506, "ĠNavigation": 26507, "Sky": 26508, "DoesNotExist": 26509, ".[": 26510, "NFC": 26511, "OGR": 26512, "StartIndex": 26513, "195": 26514, "Marks": 26515, "HTTPResponse": 26516, "GOOS": 26517, "Outside": 26518, "NotBeNull": 26519, "EMU": 26520, "Kinds": 26521, "Hop": 26522, "Ġvnode": 26523, "redraw": 26524, "]+;": 26525, "gravity": 26526, "ĠOrdered": 26527, "InUse": 26528, "ĠDecoder": 26529, "ह": 26530, "Ġmacros": 26531, "chapter": 26532, "memmove": 26533, "SourceLocation": 26534, "CacheKey": 26535, "accessToken": 26536, ")';": 26537, "Ġteardown": 26538, "ALLOWED": 26539, "åıĺéĩı": 26540, "Popen": 26541, "SIDE": 26542, "ArrayRef": 26543, "Parcel": 26544, "\")+": 26545, "Shuffle": 26546, "Apple": 26547, "FrameIndex": 26548, "=\\'": 26549, "Eh": 26550, "Hp": 26551, "vblank": 26552, "uploaded": 26553, "ByZX": 26554, "Ġversionadded": 26555, "VolumeSource": 26556, "ĠPARAMETER": 26557, "antissa": 26558, "foreg": 26559, "Ġqtscript": 26560, "Ġfits": 26561, "ĠKVM": 26562, "dijit": 26563, "Ġpersist": 26564, "Americ": 26565, "Npc": 26566, "wParam": 26567, "structs": 26568, "Ġregression": 26569, "åħĥ": 26570, "blobs": 26571, "Ġ'':": 26572, "ValueException": 26573, "ĠInet": 26574, "interpolate": 26575, "Ġtimeline": 26576, "DCB": 26577, "cif": 26578, "hang": 26579, "Ġpdb": 26580, "ĠnewName": 26581, "Bb": 26582, "KR": 26583, "GetCustom": 26584, "NodeInfo": 26585, "SHAPE": 26586, "(\",\");": 26587, "åĪ¤æĸŃ": 26588, "5100": 26589, "Ġ}\");": 26590, "DataGrid": 26591, "FieldInfo": 26592, "Ġtraversal": 26593, "hausted": 26594, "Receipt": 26595, "EGL": 26596, "//{": 26597, "ANCH": 26598, "softmax": 26599, "Ġunittest": 26600, "vxge": 26601, "GetUser": 26602, "intersection": 26603, "ĠSTM": 26604, "Camel": 26605, "ĠPIN": 26606, "opc": 26607, "Unset": 26608, "udge": 26609, "Accel": 26610, "Ec": 26611, "ForCall": 26612, "flight": 26613, "ani": 26614, "ĠNUL": 26615, "ĠDRV": 26616, "Ġtranslations": 26617, "153": 26618, "Triangles": 26619, "Correction": 26620, "(',')": 26621, "Ġesp": 26622, "->__('": 26623, "icht": 26624, "ĠHive": 26625, "157": 26626, "StyleSheet": 26627, "Ġclassification": 26628, "TRAIT": 26629, "DSI": 26630, "Ġioread": 26631, "Another": 26632, "earDown": 26633, "Copies": 26634, "Ġdiagnostics": 26635, "Moz": 26636, "relations": 26637, "Queues": 26638, "ĠCaller": 26639, "Kube": 26640, "MARKER": 26641, "ĠBackground": 26642, "xuICog": 26643, "ĠVLAN": 26644, "ĠGetAll": 26645, "ог": 26646, "ĠReflect": 26647, "WrappedObject": 26648, "alen": 26649, "Ġstrstr": 26650, "å¿ħ": 26651, "(\",\"": 26652, "ĠDup": 26653, "Substitution": 26654, "/*******************************************************************************": 26655, "Planes": 26656, "FAB": 26657, "Ġprofiles": 26658, "tribuut": 26659, "targ": 26660, "ĠisArray": 26661, "Blocked": 26662, "Closest": 26663, "metav": 26664, "页éĿ¢": 26665, "deinit": 26666, "Ġsignatures": 26667, "Elf": 26668, "uis": 26669, "curses": 26670, "overrides": 26671, "Ġintegration": 26672, "gyp": 26673, "HELP": 26674, "Classification": 26675, "subtitle": 26676, "StartDate": 26677, "brk": 26678, "byteLength": 26679, "éĢģ": 26680, "ĠFirefox": 26681, "ĠByteArrayOutputStream": 26682, "setIcon": 26683, "Kz": 26684, "()||": 26685, "Ġdll": 26686, "Ġincompatible": 26687, "probs": 26688, "paction": 26689, "ĠHASH": 26690, "getStartRule": 26691, "Ġgoroutine": 26692, "testdata": 26693, "Admission": 26694, "similar": 26695, "è·¯å¾Ħ": 26696, "Ġrecommend": 26697, "Ġ_(": 26698, "ĠOID": 26699, "Ġ'<'": 26700, "Ġapplying": 26701, "ĠCtx": 26702, "\\\\\\\"": 26703, "ArgumentParser": 26704, "aze": 26705, "Ġccw": 26706, "tune": 26707, "éĩĮ": 26708, "foreground": 26709, "vsi": 26710, "Ġflavor": 26711, "ĠGetType": 26712, "Beta": 26713, "lens": 26714, "Trail": 26715, "-_]+\"},{": 26716, "ZO": 26717, "Ġcms": 26718, "Ġrho": 26719, "Xh": 26720, "mutable": 26721, "ĠbytesRead": 26722, "çĶ±": 26723, "ĠSendMessage": 26724, "DCT": 26725, "Qx": 26726, "LineWidth": 26727, "CHG": 26728, "DeclaringType": 26729, "vocations": 26730, "Timed": 26731, "msec": 26732, "ĠFeed": 26733, "Recognizer": 26734, "Ġequation": 26735, "YV": 26736, "Participant": 26737, "---+": 26738, "ParticleSystem": 26739, "Robot": 26740, "outw": 26741, "wxT": 26742, ":].": 26743, "HMAC": 26744, "ĠnewNode": 26745, "policies": 26746, "Ġconsecutive": 26747, "__((": 26748, "Ġenvelope": 26749, "prepared": 26750, "Ġtimers": 26751, "lia": 26752, "ptrs": 26753, "Opening": 26754, "dwarf": 26755, "Candidates": 26756, "ĠURB": 26757, "descs": 26758, "BagConstraints": 26759, "(...": 26760, "mouseleave": 26761, "Today": 26762, "imports": 26763, "errChan": 26764, "glfuncs": 26765, "871": 26766, "RetryPolicy": 26767, "attachEvent": 26768, "åĪĿå§ĭ": 26769, "offer": 26770, "ï½": 26771, "ĠWebKit": 26772, "OSC": 26773, "RDF": 26774, "GroupBy": 26775, "Ġaccessing": 26776, "vsync": 26777, "errit": 26778, "主": 26779, "è¯ķ": 26780, "PDU": 26781, "mysqli": 26782, "scoped": 26783, "indented": 26784, "pple": 26785, "SECRE": 26786, "BASIC": 26787, "CURLOPT": 26788, "ĠCORBA": 26789, "pcmcia": 26790, "ESCAPE": 26791, "tup": 26792, "ĠCAR": 26793, "ĠLTS": 26794, "FACT": 26795, "Ġcljs": 26796, "Printable": 26797, "ĠCONTR": 26798, "æľį": 26799, "å®ļä¹ī": 26800, "}):": 26801, "ĠUID": 26802, "__;": 26803, "Transmit": 26804, "ĠRenderTexture": 26805, "Qty": 26806, "pNext": 26807, "toByteArray": 26808, "ĠBIOS": 26809, "THON": 26810, "Ġinternals": 26811, "CLOSED": 26812, "Mc": 26813, "reens": 26814, "TRANSL": 26815, "Ġtan": 26816, "\",$": 26817, "Applications": 26818, "Collectors": 26819, "DAV": 26820, "Gpu": 26821, "dry": 26822, "Tran": 26823, "Ġworkers": 26824, "Ġ95": 26825, "/'.$": 26826, "krb": 26827, "talk": 26828, "mday": 26829, "BigDecimal": 26830, "/\")": 26831, "ĠSOL": 26832, "ĠThrows": 26833, "WindowsAzure": 26834, "ĠAdded": 26835, "Ġpvr": 26836, "csd": 26837, "JSONObject": 26838, "Atoi": 26839, "IU": 26840, "getValues": 26841, "typedef": 26842, "bounded": 26843, "ORK": 26844, "approved": 26845, "vang": 26846, "ĠFore": 26847, "Ġenforce": 26848, "Measurement": 26849, "åħ³èģĶ": 26850, "CCA": 26851, "Dl": 26852, "bidi": 26853, "sensitive": 26854, "ĠUnused": 26855, "Ġcomparer": 26856, "//---------------------------------------------------------------------------": 26857, "exported": 26858, "acb": 26859, "AppName": 26860, "polynomial": 26861, "nacl": 26862, "vince": 26863, "devinfo": 26864, "Ġ?\",": 26865, "ĠSTA": 26866, "ognito": 26867, "hlist": 26868, "qv": 26869, "ĠCID": 26870, "objectType": 26871, "plitude": 26872, "Ġfingerprint": 26873, "Ġvallen": 26874, "Objective": 26875, "AtEnd": 26876, "])]": 26877, "Spring": 26878, "spli": 26879, "ĠErrors": 26880, "ĠDWARF": 26881, "Logout": 26882, "reviation": 26883, "VIRTUAL": 26884, ":')": 26885, "TED": 26886, "ĠpIn": 26887, "\">',": 26888, "sourceFile": 26889, "\"},\"": 26890, "661": 26891, "changeset": 26892, "Treat": 26893, "ides": 26894, "Ġ88": 26895, "anychart": 26896, "ĠJSONRPC": 26897, "clipboard": 26898, "HOOK": 26899, "SCC": 26900, "xlb": 26901, "qKioqKio": 26902, "quencer": 26903, "/[": 26904, "amt": 26905, "robe": 26906, "angerous": 26907, "248": 26908, "WebPage": 26909, "decimals": 26910, "itu": 26911, "Ġxfrm": 26912, "ĠIID": 26913, "ĠgetTarget": 26914, "Ġstrcat": 26915, "ĠCalcul": 26916, "Released": 26917, "Paging": 26918, "Ġsilently": 26919, "éĶ®": 26920, "orange": 26921, "indx": 26922, "ĠEventListener": 26923, "Networks": 26924, "afs": 26925, "Ãł": 26926, "Ġ\"${": 26927, "SPL": 26928, "ĠdateTime": 26929, "ĠSkScalar": 26930, "ĠUSART": 26931, "TIMING": 26932, "ĠSOAP": 26933, "Battle": 26934, "NDIS": 26935, "ASSERTION": 26936, "Ġeslint": 26937, "iserfs": 26938, "Ġlw": 26939, "ExtValue": 26940, "ĠListView": 26941, "permalink": 26942, "Ġque": 26943, "--,": 26944, "Ġremap": 26945, "PEAR": 26946, "ĠcurrentTime": 26947, "Ġverbosity": 26948, "checking": 26949, "xffffff": 26950, "Rf": 26951, "menus": 26952, "[^\\\\": 26953, "Ġdropout": 26954, "localeID": 26955, "ä½į": 26956, "Multipart": 26957, "Ġcredit": 26958, "morph": 26959, "uss": 26960, "Ġmit": 26961, "lacer": 26962, "lemetry": 26963, "Ġoverall": 26964, "ĠUpper": 26965, "PerformLayout": 26966, "Dyn": 26967, "Hlw": 26968, "eo": 26969, "nj": 26970, "ĠPlot": 26971, "occ": 26972, "Und": 26973, "UpdateInstruction": 26974, "Specialization": 26975, "*'": 26976, "getList": 26977, "ĠSCEV": 26978, "BaseAddress": 26979, "ĠImplement": 26980, "Ġĉĉĉ": 26981, "..\\": 26982, "backing": 26983, "ĠtargetType": 26984, "SQLITE": 26985, "Ġadjustment": 26986, "getScroll": 26987, "ENDING": 26988, "835": 26989, "Eb": 26990, "getFont": 26991, "ĠPanel": 26992, "Ġspread": 26993, "ĠDEFINE": 26994, "ECDSA": 26995, "Ġvfs": 26996, "Symlink": 26997, "tleneck": 26998, "Af": 26999, "Finite": 27000, "Ġtbody": 27001, "TOC": 27002, "Ġbitmask": 27003, "Wj": 27004, "[];": 27005, "ĠPopulate": 27006, "FSTAT": 27007, "ðŁ": 27008, "Ġ125": 27009, "MACRO": 27010, "ApplyResources": 27011, "BLOB": 27012, "ĠPaint": 27013, "TypeDefinition": 27014, "GetCount": 27015, "calling": 27016, "Ġintegral": 27017, "Squared": 27018, "TOUCH": 27019, "Ġplaylist": 27020, "NewErrParamRequired": 27021, "áĥĶáĥ": 27022, "EOS": 27023, "toFixed": 27024, "IGNvb": 27025, "代": 27026, "How": 27027, "agc": 27028, "Included": 27029, "Ġvarchar": 27030, "createEvent": 27031, "getTagRule": 27032, "Ġbogus": 27033, "Logo": 27034, "Ġ\"\\\"\"": 27035, "tmr": 27036, "OwnerAccount": 27037, "bsg": 27038, "xq": 27039, "ĠPACK": 27040, "ĠMED": 27041, "subst": 27042, "Ġ[][]": 27043, "Ġconsistency": 27044, "SUN": 27045, "spring": 27046, "ĠSafari": 27047, "Ġhope": 27048, "ĠAPIVersion": 27049, "xlan": 27050, "ifNoneMatch": 27051, "heat": 27052, "Ġlinker": 27053, "setImage": 27054, "Ġgrace": 27055, "ĠMCInst": 27056, "Ġcomputing": 27057, "Approx": 27058, "Ġ----": 27059, "Ġpwm": 27060, "Ġbrace": 27061, "Ġrepe": 27062, "ventions": 27063, "OrNull": 27064, "Ġsubtree": 27065, "Ġseparators": 27066, "Ġdojox": 27067, "parsers": 27068, "hda": 27069, "Ġfps": 27070, "ista": 27071, "ĠMicro": 27072, "rendering": 27073, "concatenate": 27074, "Ġamp": 27075, "Ġmillis": 27076, "Ġ(!*": 27077, "appy": 27078, "Ġblocksize": 27079, "Ġissued": 27080, "MEDIUM": 27081, "Ġsectors": 27082, "Ġinstantiation": 27083, "Grp": 27084, "gfs": 27085, "ObjectID": 27086, "Pb": 27087, "Ġcommitted": 27088, "RANDOM": 27089, "YM": 27090, "kq": 27091, "INODE": 27092, "ĠUb": 27093, "copyright": 27094, "websocket": 27095, "ĠNETIF": 27096, "consumed": 27097, "Ġgetopt": 27098, "pageToken": 27099, "à¤Ł": 27100, "confirmed": 27101, "Sint": 27102, "getRe": 27103, "asdf": 27104, "ContentView": 27105, "ĠoriginalDepth": 27106, "Failures": 27107, "Ġmpz": 27108, "ĠAlignment": 27109, "Mai": 27110, "stores": 27111, "Ġ}//": 27112, "Ġ*****************************************************************": 27113, "Ġcovered": 27114, "Ġforeground": 27115, "Ġ\".\")": 27116, "æĹł": 27117, "ATTACK": 27118, "gop": 27119, "lnum": 27120, "acs": 27121, "SUPER": 27122, "setsock": 27123, "batim": 27124, "Joystick": 27125, "Ng": 27126, "maker": 27127, "Ġntohl": 27128, "English": 27129, "Forum": 27130, "rxd": 27131, "AAAAAA": 27132, "SOLE": 27133, "ÑĨи": 27134, "Melding": 27135, "è¶": 27136, "Ġwil": 27137, "Ġease": 27138, "AAAAE": 27139, "ĠKeyValuePair": 27140, "737": 27141, "etable": 27142, "forge": 27143, "ĠgetMax": 27144, "ĠOwner": 27145, "Qr": 27146, "coerce": 27147, "ĠCOPY": 27148, "аÑģ": 27149, "DayOfWeek": 27150, "DSA": 27151, "Sch": 27152, "sive": 27153, "Consumed": 27154, "Ġhence": 27155, "qualifier": 27156, "rystal": 27157, "bookmarks": 27158, "Wb": 27159, "yg": 27160, "enemy": 27161, "icial": 27162, "getCell": 27163, "tested": 27164, "OfMonth": 27165, "MachO": 27166, "efi": 27167, "Ġipc": 27168, "destroyed": 27169, "аз": 27170, "pFile": 27171, "Ġaccurate": 27172, "Ġphrase": 27173, "аб": 27174, "RSSI": 27175, "setsockopt": 27176, "Ġgold": 27177, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 27178, "ĠJsonConvert": 27179, "deref": 27180, "ViewController": 27181, "dsr": 27182, "Authorized": 27183, "*>::": 27184, "Je": 27185, "dur": 27186, "ĠEven": 27187, "PropertyInfo": 27188, "cript": 27189, "pAd": 27190, "ering": 27191, "abe": 27192, "drbd": 27193, "PCR": 27194, "BufSize": 27195, "mFy": 27196, "ecs": 27197, "Manifold": 27198, "ĠWorkflow": 27199, "å°±": 27200, "CENT": 27201, "Lik": 27202, "pnp": 27203, "Ġtween": 27204, "lsb": 27205, "Specifies": 27206, "常": 27207, "ĠCREATE": 27208, "Ġsaves": 27209, "Ġstrength": 27210, "faker": 27211, "Ġkobject": 27212, "maxlen": 27213, "Zlbn": 27214, "(--": 27215, "Ġpname": 27216, "Ġdecrease": 27217, "Comparable": 27218, "Ġadvert": 27219, "ASD": 27220, "transitions": 27221, "056": 27222, "iency": 27223, "ĠDID": 27224, "Ġshifted": 27225, "#####": 27226, "Moving": 27227, "Ġweekday": 27228, "TIO": 27229, "setFont": 27230, "construction": 27231, "ĠSetLastError": 27232, "ROY": 27233, "XFER": 27234, "ĠTRANS": 27235, "GCP": 27236, "Yaml": 27237, "yZW": 27238, "Ġopposite": 27239, "ĠCrypt": 27240, "ĠBF": 27241, "SEGMENT": 27242, "vub": 27243, "DBus": 27244, "Ġsky": 27245, "Annotate": 27246, "UniqueId": 27247, "Ġanimations": 27248, "pulse": 27249, "Ġ\"\"));": 27250, "STI": 27251, "combin": 27252, "eclipse": 27253, "Ġeventually": 27254, "columnIndex": 27255, "booleanValue": 27256, "Ġfrontend": 27257, "Ġplaintext": 27258, "MHZ": 27259, "playing": 27260, "ĠMainWindow": 27261, "YT": 27262, "sctx": 27263, "Ġways": 27264, "publicKey": 27265, "Ġscipy": 27266, "Expiry": 27267, "ĠEventHandler": 27268, "BLOCKS": 27269, "Banner": 27270, "Ġnsec": 27271, "LINES": 27272, "缸": 27273, "RESERVED": 27274, "DLE": 27275, "åĥ": 27276, "()}}": 27277, "://'": 27278, "ResourceType": 27279, "Discount": 27280, "gnu": 27281, "=$.": 27282, "ZWFjd": 27283, "228": 27284, "Vn": 27285, "Ġ//{": 27286, "Ġcompany": 27287, "IntTo": 27288, "NOTIFICATION": 27289, "Ġatoms": 27290, "Ġorders": 27291, "ĠSCRIPT": 27292, "&(": 27293, "cers": 27294, "tYX": 27295, "TRAP": 27296, "foldWidgets": 27297, "Ġplaying": 27298, "çİ°": 27299, "绣": 27300, "Destroyed": 27301, "Hg": 27302, "orry": 27303, "assertion": 27304, "parentId": 27305, "FPGA": 27306, "485": 27307, "CreatedTime": 27308, "MRI": 27309, "Zi": 27310, "ĠBinaryOperator": 27311, "Sodium": 27312, "enes": 27313, "Ġcharge": 27314, "SetProperty": 27315, "ĠVGA": 27316, "requestId": 27317, "accessible": 27318, "SuppressMessage": 27319, "sj": 27320, "Ġexpensive": 27321, "ĠtopLevel": 27322, "Ġmixin": 27323, "ĠMFTestResults": 27324, "BCM": 27325, "ige": 27326, "LineEdit": 27327, "ĠUnmarshalJSON": 27328, "Cascade": 27329, "xFA": 27330, "Ġfocused": 27331, "Ġpkey": 27332, "Mutate": 27333, "ä¿ĿåŃĺ": 27334, "cascade": 27335, "msk": 27336, "ĠInvalidate": 27337, "ĠStringIO": 27338, "SYNT": 27339, "]+)": 27340, "Ġkeeping": 27341, "orbell": 27342, "Adj": 27343, "ãģĭ": 27344, "Markdown": 27345, "Ġdisables": 27346, "Ġcertificates": 27347, "usleep": 27348, "RELOC": 27349, "TextColor": 27350, "ADDING": 27351, "DWARF": 27352, "stem": 27353, "Ġcoming": 27354, "WriteHeader": 27355, "Unrecognized": 27356, "pItem": 27357, "Ġbroker": 27358, "ĠMachineFunction": 27359, "Ġfacet": 27360, "Ġutc": 27361, "LPARAM": 27362, "ĠsetOperation": 27363, "ĠElse": 27364, "Csv": 27365, "EventLoop": 27366, "Regression": 27367, "GEM": 27368, "WriteFile": 27369, "Iaa": 27370, "Ġoffer": 27371, "vip": 27372, "ĠsetState": 27373, "widths": 27374, "productId": 27375, "Ġvolumes": 27376, "rose": 27377, "getActivity": 27378, "/////////": 27379, "Ġsubsystem": 27380, "Voor": 27381, "ĠAUTO": 27382, "Jm": 27383, "Mq": 27384, "Ġjffs": 27385, "EXPI": 27386, "063": 27387, "227": 27388, "Ġimplicitly": 27389, "'-'": 27390, "Cu": 27391, "ingers": 27392, "Ġeat": 27393, "provided": 27394, "Ġslightly": 27395, "NAND": 27396, "FFT": 27397, "Ġsubtype": 27398, "ãĤ¿": 27399, "Ġiommu": 27400, "æĺŁæľŁ": 27401, "Ġnth": 27402, "Ġpolicies": 27403, "175": 27404, "__(/*!": 27405, "Ġbrackets": 27406, "Bodies": 27407, "Takes": 27408, "drivers": 27409, "essel": 27410, "eslach": 27411, "(/[": 27412, "negot": 27413, "ala": 27414, "Secs": 27415, "Ġusec": 27416, "Dm": 27417, "Lon": 27418, "ĠsourceURL": 27419, "ĠDestination": 27420, "ZXJz": 27421, "fortun": 27422, "JX": 27423, "Jc": 27424, "Ġ126": 27425, "Degrees": 27426, "770": 27427, "TLV": 27428, "ĠendIndex": 27429, "ĠHTMLElement": 27430, "ĠserviceName": 27431, "Statfs": 27432, "vlc": 27433, "interest": 27434, "lliseconds": 27435, "è¿Ľè¡Į": 27436, "isPresent": 27437, "analog": 27438, ").\"": 27439, "Ġcontrollers": 27440, "Ġargp": 27441, "MethodDecl": 27442, "ĠDelegate": 27443, "BEFORE": 27444, "comparator": 27445, "getN": 27446, "toHave": 27447, "readUInt": 27448, "RefMan": 27449, "LIBR": 27450, "ĠglVertex": 27451, "ĠXMLHttpRequest": 27452, "(?=\\": 27453, "NICALL": 27454, "TLE": 27455, "fS": 27456, "strs": 27457, "Ġatan": 27458, "THROUGH": 27459, "Ġ*)((": 27460, "QStringLiteral": 27461, "Ġpcmcia": 27462, "GK": 27463, "blink": 27464, "rtp": 27465, "edata": 27466, "esome": 27467, "ĠCWallet": 27468, "underscore": 27469, "ĠEMPTY": 27470, "Ġqx": 27471, "commons": 27472, "Ġslashes": 27473, "sizing": 27474, "ulating": 27475, "GetLastError": 27476, "Ġregistr": 27477, "ResourceGroup": 27478, "Ġsigner": 27479, "ä¸ī": 27480, "Ġexiting": 27481, "Ġbrw": 27482, "zx": 27483, "Inherited": 27484, "Ġ58": 27485, "={\"": 27486, "965": 27487, "Predis": 27488, "Ġknows": 27489, "ĠGetName": 27490, "merchant": 27491, "CompareTo": 27492, "IDENTIFIER": 27493, "getSectionRange": 27494, "emph": 27495, "OrEmpty": 27496, "IRDA": 27497, "tilemap": 27498, "Ġredundant": 27499, "pOut": 27500, "sName": 27501, "StateMachine": 27502, "Ġtextarea": 27503, "ttm": 27504, "Ee": 27505, "Fly": 27506, "gst": 27507, "()?": 27508, "msdn": 27509, "iveness": 27510, "ĠComm": 27511, "ĠZone": 27512, "reserv": 27513, "Ġtransformer": 27514, "ANA": 27515, "QUFF": 27516, "Ġappends": 27517, "lvds": 27518, "HealthCheck": 27519, "ĠUR": 27520, "derived": 27521, "AndSet": 27522, "ĠIndicates": 27523, "VLD": 27524, "_+": 27525, "rock": 27526, "Ġforget": 27527, "IY": 27528, "Malformed": 27529, "ICLE": 27530, "Accessibility": 27531, "CFGR": 27532, "MouseMove": 27533, "ĠPARAM": 27534, "Ġdashboard": 27535, "xls": 27536, "notOk": 27537, "Ġtrail": 27538, "ĠTypeCode": 27539, "EXTENDED": 27540, "SWIG": 27541, "ĠHWND": 27542, "移": 27543, ")||(": 27544, "ĠpNode": 27545, "Ġ112": 27546, "Ġdecrement": 27547, "ад": 27548, "|=": 27549, "Ġnvm": 27550, "Mailer": 27551, "agick": 27552, "findBy": 27553, "woo": 27554, "radix": 27555, "batches": 27556, "ĠSmallVectorImpl": 27557, "vfe": 27558, "æ¡": 27559, "determin": 27560, "Ġfrac": 27561, "setSource": 27562, "Ġdeque": 27563, "ĠFO": 27564, "startTag": 27565, "labor": 27566, "Uploader": 27567, "Longitude": 27568, "BoundingClientRect": 27569, "BBox": 27570, "abil": 27571, "ĠEscape": 27572, "dpi": 27573, "worksheet": 27574, "DOS": 27575, "ĠPrevious": 27576, "irk": 27577, "ĠGrab": 27578, "EventData": 27579, "OSPC": 27580, "EVENTS": 27581, "ĠAuthorization": 27582, "533": 27583, "Ġvha": 27584, "rlim": 27585, "ETA": 27586, "VOLT": 27587, "Ġmachines": 27588, "AIR": 27589, "RDS": 27590, "tie": 27591, "Ġdeg": 27592, "Ġ/>": 27907, "Ġosg": 27908, "ĠPod": 27909, "plr": 27910, "cssClass": 27911, "innerWidth": 27912, "Trying": 27913, "isfied": 27914, "ĠMar": 27915, "addEvent": 27916, "172": 27917, "Door": 27918, "StructType": 27919, "ĠActions": 27920, "Nanos": 27921, "pfile": 27922, "Lead": 27923, "Intercept": 27924, "BOTH": 27925, "Ġaud": 27926, "ols": 27927, "painter": 27928, "Ġtemporarily": 27929, "Ġeditable": 27930, "fseek": 27931, "ĠFluent": 27932, "ĠeventType": 27933, "xmlrpc": 27934, "Ġscanf": 27935, "getCanonical": 27936, "Ġ'\">'": 27937, "ĠGB": 27938, "Ġadap": 27939, "Ġ98": 27940, "Ġsimulate": 27941, "Ġomit": 27942, "Ġsemaphore": 27943, "ElementAt": 27944, "\">'+": 27945, "IODevice": 27946, "ousands": 27947, "expiry": 27948, "Ġblobs": 27949, "ç³»": 27950, "Easy": 27951, "IOR": 27952, "Navigate": 27953, "ĠerrorType": 27954, "savefile": 27955, "Ġfuncs": 27956, "tracer": 27957, "RigidBody": 27958, "æľįåĬ¡": 27959, "/^\\": 27960, "×ij": 27961, "strike": 27962, "refund": 27963, "Ġcreator": 27964, "cname": 27965, "inbuf": 27966, "toast": 27967, "ToMany": 27968, "Ġdatasets": 27969, "><": 28132, "MIB": 28133, "GetTypeInfo": 28134, "stereo": 28135, "InteropServices": 28136, "â´°": 28137, "ĠMEDIA": 28138, "fies": 28139, "ĠSlice": 28140, "adminhtml": 28141, "%%%%%%%%": 28142, "bright": 28143, "caches": 28144, "isac": 28145, "cook": 28146, "Ġdz": 28147, "errp": 28148, "Ġproviding": 28149, "dbname": 28150, "agenta": 28151, "Years": 28152, "jx": 28153, "waul": 28154, "AUTHOR": 28155, "Ġplanes": 28156, "ĉĠĠĠĠĠĠĠĠĠ": 28157, "repe": 28158, "ĠAmount": 28159, "00001": 28160, "Ġxr": 28161, "าà¸": 28162, "SECRET": 28163, "JV": 28164, "cats": 28165, "opl": 28166, "Ġqc": 28167, "246": 28168, "AAAAA": 28169, "offload": 28170, "]/);": 28171, "ercise": 28172, "Ġenvironments": 28173, "rops": 28174, "Ġdiffs": 28175, "æѤ": 28176, "MethodImplOptions": 28177, "rijving": 28178, "siblings": 28179, "ĠDif": 28180, "Ġud": 28181, "HEAP": 28182, "Ġkm": 28183, "Sku": 28184, "æľº": 28185, "ĠItemStack": 28186, "forget": 28187, "Ġprotocols": 28188, "Cards": 28189, "Ġsurf": 28190, ">(&": 28191, "Gem": 28192, "Lx": 28193, "wu": 28194, "coalesce": 28195, "oci": 28196, "Ġ\"(*": 28298, "ĠmaxSize": 28299, "239": 28300, "pools": 28301, "-----*/": 28302, "{{/": 28303, "gbl": 28304, "//$": 28305, "ĠEXIST": 28306, "sampled": 28307, "MONITOR": 28308, "ĠTokens": 28309, "ARCHIVE": 28310, "Ġconflicts": 28311, "ZK": 28312, "ellipsis": 28313, "Ġorient": 28314, "tributed": 28315, "229": 28316, "pictureBox": 28317, "解æŀIJ": 28318, "STANDALONEM": 28319, "STANDALONEMONTH": 28320, "spark": 28321, "æĦ": 28322, "Ġ------": 28323, "Ġbodies": 28324, "ĠTell": 28325, "ĠOData": 28326, "Ġxmax": 28327, "contiguous": 28328, "IsZero": 28329, "Ġscb": 28330, "ĠComput": 28331, "ĠReadOnly": 28332, "Jb": 28333, "June": 28334, "()&&(": 28335, "Ġago": 28336, "SVC": 28337, "deadline": 28338, "IED": 28339, "fout": 28340, "GetFunction": 28341, "Ġ%=": 28342, "Ġmiddlewares": 28343, "Nh": 28344, "ĠENABLED": 28345, "filelist": 28346, "AAB": 28347, "Ġfeat": 28348, "ĠParseException": 28349, "Ġsampled": 28350, "ĠSetChrPos": 28351, "Iiw": 28352, "Asn": 28353, "ĠStats": 28354, "...]": 28355, "FolderPath": 28356, "rwlock": 28357, "Ġmedian": 28358, "$',": 28359, "Sensitivity": 28360, "addProperty": 28361, "Unwind": 28362, "vestigation": 28363, "zap": 28364, "Ġaw": 28365, "1251": 28366, "iagnos": 28367, "Similar": 28368, "dual": 28369, "scheduling": 28370, "outp": 28371, "Ġkick": 28372, "Rowset": 28373, "Specify": 28374, "ĠIsNil": 28375, "Ġclearing": 28376, "ĠOCFS": 28377, "Gas": 28378, "Slave": 28379, "unprepare": 28380, "STREQ": 28381, "TestExpression": 28382, "IsEnumerable": 28383, "887": 28384, "590": 28385, "nesting": 28386, "devinit": 28387, "ĠBridge": 28388, "SetOptions": 28389, "ElementName": 28390, "FromName": 28391, "]+\\": 28392, "<<(": 28393, "Sorter": 28394, "unsubscribe": 28395, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 28396, "operators": 28397, "gauge": 28398, "ा',": 28399, "kge": 28400, "setTime": 28401, "ImageView": 28402, "DICT": 28403, "Ġdrawable": 28404, "ĠML": 28405, "Ġjarg": 28406, "Ġ\",\")": 28407, "ILLEGAL": 28408, "Ġpubkey": 28409, "çĻ»": 28410, "Ġ--------------------------------": 28411, "eration": 28412, "Ġstudent": 28413, "\\\":{\\\"": 28414, "CAMERA": 28415, "hanced": 28416, "UH": 28417, "layui": 28418, "resultSet": 28419, "Ġ800": 28420, "Ġ1280": 28421, "Transitions": 28422, "outerWidth": 28423, "Ġurlencode": 28424, "izr": 28425, "ĠgetFile": 28426, "(&:": 28427, "Ask": 28428, "Ġsubclasses": 28429, "Monday": 28430, "recording": 28431, "ĠActionResult": 28432, "ZD": 28433, "setBody": 28434, "ĠEH": 28435, "CodeAbbrev": 28436, "Ġ67": 28437, "volt": 28438, "JlYWN": 28439, "Torrent": 28440, "%,": 28441, "cin": 28442, "Ġ(?": 28443, "Ġstem": 28444, "ppi": 28445, "ĠEQUAL": 28446, "createKeyword": 28447, "Ġoccured": 28448, "æºIJ": 28449, "ĠTCG": 28450, "Ġunserialize": 28451, "newName": 28452, "rtd": 28453, "Ġ9999": 28454, "oro": 28455, "Ġmedium": 28456, "ĠOFD": 28457, "AsInt": 28458, "pbn": 28459, "Ġdeveloper": 28460, "Indic": 28461, "linesize": 28462, "uvw": 28463, "Ġunmarshalled": 28464, "Ġepochs": 28465, "//--": 28466, "()])": 28467, ":\"$\",": 28468, "Successfully": 28469, "Predict": 28470, "AzureOperationResponse": 28471, "vZHVs": 28472, "åĥı": 28473, "DONT": 28474, "pde": 28475, "ĠIde": 28476, "ĠRREG": 28477, "ĠRequires": 28478, "209": 28479, "OpenFile": 28480, "Eg": 28481, "flavor": 28482, "Ġ(...)": 28483, "RENT": 28484, "ErrorMsg": 28485, "ĠDECL": 28486, "automatic": 28487, "chained": 28488, "Dwarf": 28489, "ĠFires": 28490, "FTP": 28491, "ĠWL": 28492, "LOD": 28493, "Ġtech": 28494, "DETECT": 28495, "SST": 28496, "fusc": 28497, "rsrc": 28498, "(\"[%": 28499, "paging": 28500, "çŃī": 28501, "BED": 28502, "wbuf": 28503, "ĠIndent": 28504, "tagged": 28505, "uptools": 28506, "Ġdeserializing": 28507, "Yg": 28508, "outbuf": 28509, "Combat": 28510, "KeyPress": 28511, "ĠUnion": 28512, "InvalidArgument": 28513, "October": 28514, "dpy": 28515, "getExtension": 28516, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 28517, "sourceMap": 28518, "graded": 28519, "Listening": 28520, "createKeywordMapper": 28521, "Pure": 28522, "reward": 28523, "Invert": 28524, "ĠDistance": 28525, "GetTime": 28526, "DISCONNECT": 28527, "XK": 28528, "Ġcallers": 28529, "SCI": 28530, "SimpleAI": 28531, "ĠSparse": 28532, "postfix": 28533, "ĠDataFrame": 28534, "HTTPMethod": 28535, "ĠImplementation": 28536, "ани": 28537, "separate": 28538, "CJ": 28539, "Ġmq": 28540, "Ġ==,": 28541, "Ġgn": 28542, "boorte": 28543, "Impact": 28544, "5659": 28545, "ĠCurDAG": 28546, "HeroWarm": 28547, "QuotedString": 28548, "IHRoZSB": 28549, "HeroWarmSimpleAI": 28550, "Ġnfp": 28551, "ADA": 28552, "SIF": 28553, "CLUSTER": 28554, "Ġclocks": 28555, "Ġdistances": 28556, "586": 28557, "yaw": 28558, "Ġnest": 28559, "Ġ(!($": 28560, "æľª": 28561, "Salt": 28562, "_=": 28563, "bps": 28564, "refcnt": 28565, "Ġdiscarded": 28566, "ĠDialogResult": 28567, "pfx": 28568, "yt": 28569, "Ġworth": 28570, "Ġreaddir": 28571, "ModelName": 28572, "volumes": 28573, "GUICtrlComboBox": 28574, "Ġmultiplication": 28575, "ej": 28576, "returnUrl": 28577, "Ġ';'": 28578, "Ġflushed": 28579, "ĠMFI": 28580, "vents": 28581, "Ġjlong": 28582, "Beat": 28583, "Ġbases": 28584, "Svc": 28585, "Taken": 28586, "ĠĠĉ": 28587, "ĠNFC": 28588, "bufferSize": 28589, "organ": 28590, "FOLDER": 28591, "qM": 28592, "isSelected": 28593, "spans": 28594, "Subtree": 28595, "expectation": 28596, "]*\\": 28597, "bur": 28598, "Ġbv": 28599, "getShort": 28600, "RequestHandler": 28601, "184": 28602, "Pv": 28603, "Ġdeviation": 28604, "Ġgimp": 28605, "ĠFileInfo": 28606, "ategorical": 28607, "Tb": 28608, "Zhb": 28609, "Ġbanner": 28610, "erring": 28611, "Ġlatter": 28612, "Ġeuid": 28613, "Ġresized": 28614, "Translations": 28615, "FLD": 28616, "FFFFFFFF": 28617, "Renew": 28618, "SENSE": 28619, "OffsetY": 28620, "Ġrealpath": 28621, "nlh": 28622, "ĠscrollHeight": 28623, "299": 28624, "Sell": 28625, "motor": 28626, "advise": 28627, "ErrMsg": 28628, "rtsx": 28629, "([]);": 28630, "æĿĥ": 28631, "ĠSuch": 28632, "ĠisEmpty": 28633, "ĠPayload": 28634, "áĥĺáĥ": 28635, "QList": 28636, "aValue": 28637, "Instant": 28638, "pmic": 28639, "Cub": 28640, "qunit": 28641, "movement": 28642, "Ġcorrupt": 28643, "Overflowing": 28644, "ĠdomainObjectSet": 28645, "Fns": 28646, "Ruby": 28647, "uit": 28648, "--|": 28649, "upstream": 28650, "GetBlock": 28651, "apturing": 28652, "Suggestion": 28653, "1999": 28654, "Ljava": 28655, "exts": 28656, "ToUpdate": 28657, "rtt": 28658, "ĠPythonQt": 28659, "LuaDLL": 28660, "éķ¿": 28661, "Gp": 28662, "Ġå¦Ĥæŀľ": 28663, "getObj": 28664, "Ġinterrupted": 28665, "synchronize": 28666, "]\";": 28667, "Ùī": 28668, "igar": 28669, "ĠDRI": 28670, "Sema": 28671, "Epsilon": 28672, "åĪĿå§ĭåĮĸ": 28673, "atmel": 28674, "ptic": 28675, "PARM": 28676, "енÑĮ": 28677, "CriticalSection": 28678, "splitext": 28679, "+,": 28680, "Sqr": 28681, "dip": 28682, "()});": 28683, "186": 28684, "Pools": 28685, "Ġdifferences": 28686, "ĠOrg": 28687, "SizeInBytes": 28688, "consider": 28689, ".],": 28690, "VFS": 28691, "wpid": 28692, "ĠInitialization": 28693, "Ġ',',": 28694, "NAT": 28695, "NOR": 28696, "Ġrefcount": 28697, "YXRpb": 28698, "Ġbeans": 28699, "ĠHave": 28700, "Paras": 28701, "disconnected": 28702, "Localization": 28703, "Ġtermination": 28704, "é¢ĺ": 28705, "è£": 28706, "Ġnfc": 28707, "âĶĢâĶĢâĶĢâĶĢ": 28708, "aton": 28709, "Ġ'::": 28710, "maxSize": 28711, "Descending": 28712, "095": 28713, "RlZ": 28714, "walker": 28715, "ddi": 28716, "getStream": 28717, "ĠisActive": 28718, "3600": 28719, "manufacturer": 28720, "Ġsides": 28721, "confirmation": 28722, "Iface": 28723, "Race": 28724, "places": 28725, "352": 28726, "GUICtrlTreeView": 28727, "Ġmerging": 28728, "%'": 28729, "moid": 28730, "ĠUnpack": 28731, "Ġdbgs": 28732, "SQLException": 28733, "Ġdeserialized": 28734, "fromLatin": 28735, "QAbstract": 28736, "hif": 28737, "ddb": 28738, "getBoundingClientRect": 28739, "Ġrts": 28740, "Ġnecessarily": 28741, "LTS": 28742, "(\"/\",": 28743, "Ġdatabases": 28744, "aliyun": 28745, "blueprint": 28746, "getDays": 28747, "rax": 28748, "Ġhom": 28749, "ĠPending": 28750, "°": 28751, "Ġsts": 28752, "ĠGSS": 28753, "ItemStack": 28754, "ĠValidator": 28755, "say": 28756, "urt": 28757, "aga": 28758, "Ġ'{{": 28759, "249": 28760, "Ġlocalized": 28761, "speech": 28762, "Lan": 28763, "Ġmocked": 28764, "ĠResize": 28765, "integration": 28766, "Vid": 28767, "Ġpract": 28768, "ĠSQ": 28769, "Redraw": 28770, "ĠInitializeComponent": 28771, "ĠExpress": 28772, "Iterate": 28773, "hotplug": 28774, "squeeze": 28775, "ĠNORM": 28776, "INCLUDE": 28777, "ĠGXV": 28778, "ĠGetInstance": 28779, "AddressValue": 28780, "ICAgIH": 28781, "basics": 28782, "Obsolete": 28783, "vK": 28784, "ĠpPlayer": 28785, "ĠIM": 28786, "parseError": 28787, "WEP": 28788, "Ġsbi": 28789, "Aggregator": 28790, "ĠNativeMethods": 28791, "ĠsetOperationAction": 28792, "Fprintln": 28793, "hoc": 28794, "iX": 28795, "rastructure": 28796, "ReferenceType": 28797, "_('": 28798, "lider": 28799, "Ġ1970": 28800, "versable": 28801, "MonoJavaBridge": 28802, "ĠImmutableList": 28803, "Ġcaterwaul": 28804, "DSC": 28805, "tcon": 28806, "WRIT": 28807, "Ġpartials": 28808, "analytics": 28809, ":{\"": 28810, "ejs": 28811, "jam": 28812, "Ġnumerical": 28813, "ĠExtattr": 28814, "ĠFLAC": 28815, "Suld": 28816, "UIT": 28817, "ĠSTE": 28818, "Tls": 28819, "remember": 28820, "maxlength": 28821, "privateKey": 28822, "UFF": 28823, "referer": 28824, "Ġavio": 28825, "ĠQFont": 28826, "ENCIL": 28827, "QUnit": 28828, "millis": 28829, "slope": 28830, "Ġ>();": 28831, "Hashtable": 28832, "persoon": 28833, "Ġdistinguish": 28834, "compressor": 28835, "Pdb": 28836, "ĠtoArray": 28837, "Mini": 28838, "rmdir": 28839, "Ġmic": 28840, "lacing": 28841, "ĠMethodInfo": 28842, "blems": 28843, "fingerprint": 28844, "ĠCreated": 28845, "cite": 28846, "Bearer": 28847, "238": 28848, "DDA": 28849, "Ġ[&](": 28850, "phanumeric": 28851, "Ġdfs": 28852, "ĠWPA": 28853, "subsystem": 28854, "txid": 28855, "HG": 28856, "Ġtweak": 28857, "ĠParticle": 28858, "CastException": 28859, "kdWxl": 28860, "+-+-+-+-+-+-+-+-": 28861, "JBQ": 28862, "JAVA": 28863, "Son": 28864, "|&": 28865, "semi": 28866, "verbosity": 28867, "MLINK": 28868, "//--------------------------------------------------------------------------------": 28869, "ĠQScriptEngine": 28870, "Ġgenerally": 28871, "selectedIndex": 28872, ";\">": 28873, "Repe": 28874, "Sta": 28875, "ĠMIPS": 28876, "Dereference": 28877, "ResponseHeader": 28878, "CreateInfo": 28879, ")})},": 28880, "ĠmCurrent": 28881, "conns": 28882, "trimmed": 28883, "setValueAtTime": 28884, "ĠпÑĢ": 28885, "Udp": 28886, "ĠTextMode": 28887, "+'.": 28888, "rored": 28889, "ĠrunTest": 28890, "039": 28891, "Ġ2010": 28892, "ĠAlready": 28893, "VALIDATE": 28894, "keypad": 28895, "Ġmeant": 28896, "IMUM": 28897, "eraseFromParent": 28898, "ĠLaunch": 28899, "æł¹æį®": 28900, "Circular": 28901, "babel": 28902, "jr": 28903, "addOption": 28904, "ĠVC": 28905, "Ġ864": 28906, "Authenticator": 28907, "SerialNumber": 28908, "ĠExactly": 28909, "Maintenance": 28910, ">{@": 28911, "TestHelper": 28912, "Copyright": 28913, "ĠREF": 28914, "TryGet": 28915, "SUBTYPE": 28916, "被": 28917, "Bullet": 28918, "Ġkeyed": 28919, "им": 28920, "ĠLibFunc": 28921, "getCurrentTokenColumn": 28922, "Baz": 28923, "getParameters": 28924, "ĠSCALAR": 28925, "Ġqualifier": 28926, "bon": 28927, "esized": 28928, "Exported": 28929, "Sockets": 28930, "nvvm": 28931, "injector": 28932, "Ġapproximate": 28933, "Ġrelocation": 28934, "lastName": 28935, "doRequest": 28936, "PREV": 28937, "bservable": 28938, "ĠLF": 28939, "ĠstartPos": 28940, "clientHeight": 28941, "Gossip": 28942, "Ġrandomly": 28943, "äºĭ件": 28944, "unwind": 28945, "Ġmutable": 28946, "xuLy": 28947, ":{},": 28948, "Ġб": 28949, "cbiAgICAgICAg": 28950, "Ġstandalone": 28951, "310": 28952, "Ġdelimiters": 28953, "ĠUNITY": 28954, "ĠPartial": 28955, "Production": 28956, "Spa": 28957, "Sched": 28958, "Ġlife": 28959, "ErrorResponse": 28960, "ĠRouter": 28961, "Traced": 28962, "Ġcorrelation": 28963, "ĠMediaType": 28964, "ffffffffffffffff": 28965, "'(": 28966, "ToDelete": 28967, "ĠIRB": 28968, "getid": 28969, "scrollTo": 28970, "RetVal": 28971, "BPF": 28972, "solar": 28973, "Ġincreasing": 28974, "treturn": 28975, "peers": 28976, "ĠGetString": 28977, "Ġ/>\\": 28978, "å¹´": 28979, "缮å½ķ": 28980, "Dic": 28981, "setOptions": 28982, "ĠGst": 28983, "ĠReferences": 28984, "ĠConfirm": 28985, "Ġ77": 28986, "Ban": 28987, "wizard": 28988, "IDictionary": 28989, "ecma": 28990, "apel": 28991, "Ġlongitude": 28992, "ROUTE": 28993, "WAVE": 28994, "Ġinstantiated": 28995, "hemeral": 28996, ".\".": 28997, "WPS": 28998, "ObjectReference": 28999, "jectory": 29000, "badge": 29001, "hack": 29002, "mpq": 29003, "mpot": 29004, "Ġsect": 29005, "288": 29006, "ĠKB": 29007, "ĠClosure": 29008, "Ġlatitude": 29009, "ĠMDIO": 29010, "ĠSanity": 29011, "ĠIEnumerator": 29012, "verified": 29013, "comb": 29014, "HasIndex": 29015, "SYNTAX": 29016, "é«": 29017, "uncompressed": 29018, "Ġsal": 29019, "EventEmitter": 29020, "Ġtaxonomy": 29021, "AMDGPU": 29022, ")===": 29023, "Ġlose": 29024, "Ġcdev": 29025, "/*\",": 29026, "ivic": 29027, "ĠCodes": 29028, "/\";": 29029, "Jx": 29030, "Wiki": 29031, "hpb": 29032, "SetData": 29033, "ä»İ": 29034, ">((": 29035, "ugo": 29036, "autoneg": 29037, "Ġclipboard": 29038, "ĠOFFSET": 29039, "LDR": 29040, "ran": 29041, "exif": 29042, "buddy": 29043, "='')": 29044, "åIJij": 29045, "Ġownership": 29046, "Ġincorrectly": 29047, "LIBRARY": 29048, "lX": 29049, "TextArea": 29050, "CCB": 29051, "Ġoptimal": 29052, "Clauses": 29053, "è§Ħ": 29054, "ĠSnapshot": 29055, "435": 29056, "Sal": 29057, "pit": 29058, "ĠPEM": 29059, "ĠEasy": 29060, "neon": 29061, "Beam": 29062, "Signatures": 29063, "nlmsg": 29064, "getPrototypeOf": 29065, "018": 29066, "rinfo": 29067, "squared": 29068, "inserted": 29069, "Ġresets": 29070, "fileInfo": 29071, "ĠsourceMapping": 29072, "median": 29073, "Ġderiv": 29074, "cubic": 29075, "Ġ$(\"": 29076, "textures": 29077, "CreateCall": 29078, "ActionType": 29079, "stacle": 29080, "getOrder": 29081, "getSingleton": 29082, "ĠBX": 29083, "Ġdebuggee": 29084, "EncodeVarint": 29085, "getPropertyValue": 29086, "IHJldHVy": 29087, "NAV": 29088, "]},{": 29089, "tearDown": 29090, "Ġmusb": 29091, "excel": 29092, "QD": 29093, "ĠFraction": 29094, ":\".": 29095, "completions": 29096, "IsArray": 29097, "Ġspot": 29098, "FORWARD": 29099, "counted": 29100, "REPEAT": 29101, "IEnumerator": 29102, "Ġfputs": 29103, "GetLocal": 29104, "Ġship": 29105, "objectid": 29106, "URPOSE": 29107, "ĠModifier": 29108, "Semaphore": 29109, "Raft": 29110, "getBean": 29111, "Ġofdpa": 29112, "ogonal": 29113, "251": 29114, "rieval": 29115, "ailover": 29116, "Automation": 29117, "ĠCLIENT": 29118, "uL": 29119, "ĠTick": 29120, "phandle": 29121, "ĠtestCreate": 29122, "validators": 29123, ",\"-": 29124, "ĠPARAMETERS": 29125, "Bx": 29126, "Dual": 29127, "dct": 29128, "--+": 29129, "ERRA": 29130, "Alter": 29131, "Owned": 29132, "Past": 29133, "sRequest": 29134, "escription": 29135, "CCCC": 29136, "åĮº": 29137, "ĠMacro": 29138, "Recognition": 29139, "Ġbrightness": 29140, "Ints": 29141, "223": 29142, "Internet": 29143, "ĠpOut": 29144, "Ġrequesting": 29145, "means": 29146, "SAX": 29147, "vcn": 29148, "ĠLogical": 29149, "GRPC": 29150, "CheckedChanged": 29151, "955": 29152, "Ġtill": 29153, "\",[": 29154, "(\\$": 29155, "Ġremains": 29156, "cool": 29157, "asures": 29158, "ConstantExpr": 29159, "rono": 29160, "xxxxxxxx": 29161, "Nc": 29162, "idend": 29163, "completer": 29164, "floating": 29165, "ListResponse": 29166, "').'": 29167, "CLS": 29168, "GNU": 29169, "csp": 29170, "Locs": 29171, "hasMore": 29172, "partner": 29173, "ParseUint": 29174, "GUICtrlToolbar": 29175, "CONSTRAINT": 29176, "!')": 29177, "bands": 29178, "ecdsa": 29179, "Boxes": 29180, "ĠIsValid": 29181, ">=|": 29182, "ĠSupported": 29183, "缴": 29184, "Ġaggregation": 29185, "Saturday": 29186, "ç´¢": 29187, "Ġissuer": 29188, "AHB": 29189, "Gi": 29190, "incorrect": 29191, "2500": 29192, "EXTEND": 29193, "Underline": 29194, "Guess": 29195, "chosen": 29196, "riov": 29197, "asus": 29198, "ĠsetInterval": 29199, "ĠNotImplementedError": 29200, "Ġ'|'": 29201, "TEntity": 29202, "ahash": 29203, "ÎŃ": 29204, "getF": 29205, "Ġrealloc": 29206, "Loops": 29207, "Ġelm": 29208, "polling": 29209, "Ġsmarty": 29210, "Ber": 29211, "ddev": 29212, "ĠCString": 29213, "ĠREAL": 29214, "Ġtrimmed": 29215, "FCP": 29216, "hE": 29217, "attrnamespace": 29218, "ĠApple": 29219, "ErrInvalidParams": 29220, "MSC": 29221, "[].": 29222, "ĠOPC": 29223, "phen": 29224, "Ġtextures": 29225, "189": 29226, "($\"{": 29227, "\"\";": 29228, "YK": 29229, "avi": 29230, "returnType": 29231, "))+": 29232, "ĠNP": 29233, "ĠFatal": 29234, "WithValue": 29235, "271": 29236, "cfi": 29237, "hpd": 29238, "msecs": 29239, "registr": 29240, "ARROW": 29241, "ĠComparison": 29242, "overload": 29243, "0800": 29244, "pkcs": 29245, "ircum": 29246, "pinnedOffset": 29247, "IUS": 29248, "Invite": 29249, "preprocessor": 29250, "Ġdiffers": 29251, "ĠMinimum": 29252, "*\"": 29253, "LValue": 29254, "haskell": 29255, "Ġpragma": 29256, "edArray": 29257, "Reactor": 29258, "{}).": 29259, "ngid": 29260, "recipients": 29261, "Ġmtime": 29262, "Ġwind": 29263, "Ġhmac": 29264, "subplot": 29265, "021": 29266, "ĠlocalName": 29267, "Ġchaining": 29268, "Ht": 29269, "Ten": 29270, "upon": 29271, "Ġopens": 29272, "MESSAGES": 29273, "Terminated": 29274, "xfb": 29275, "oseconds": 29276, "GVt": 29277, "MANAGER": 29278, "recs": 29279, "pex": 29280, "ubyte": 29281, "tober": 29282, "regexLib": 29283, "usbhc": 29284, "factors": 29285, "ĠBP": 29286, "DELTA": 29287, "parseStr": 29288, "drawLine": 29289, "Ġentirely": 29290, "Wind": 29291, "fro": 29292, "×ŀ": 29293, "story": 29294, "unified": 29295, "TRIC": 29296, "herits": 29297, "ев": 29298, "natural": 29299, "UQ": 29300, "vbus": 29301, "Ġmsec": 29302, "SES": 29303, "pressure": 29304, "Subtype": 29305, "getSimpleName": 29306, "214": 29307, "ĠTouch": 29308, "Ġher": 29309, "Ġuprv": 29310, "NetworkPolicy": 29311, "cloneNode": 29312, "UXC": 29313, "EVAL": 29314, "atoi": 29315, "Ġgulp": 29316, "KEYVAL": 29317, "SearchResult": 29318, "DialogResult": 29319, "ĠWAIT": 29320, "*([": 29321, "659": 29322, "Eff": 29323, "appear": 29324, "avel": 29325, "xygen": 29326, "TRANSACTION": 29327, "Inclusive": 29328, "fieldname": 29329, "Ġinfos": 29330, "Ġoverhead": 29331, "ModifiedTime": 29332, "gfp": 29333, "InRange": 29334, "ĠDi": 29335, "Ġrdma": 29336, "ToIndex": 29337, "185": 29338, "PORTS": 29339, "ĠBUFFER": 29340, "REASON": 29341, "Spark": 29342, "Ġbag": 29343, "ĠXElement": 29344, "Typ": 29345, "ĠEXPR": 29346, "agonIE": 29347, "+',": 29348, "udata": 29349, "SetStatus": 29350, "194": 29351, "implements": 29352, "Games": 29353, "Ġinvoking": 29354, "sipSelf": 29355, "æĥħ": 29356, "AppId": 29357, "SETRE": 29358, ":'<": 29359, "USERNAME": 29360, "Basis": 29361, "CSUM": 29362, "getVar": 29363, "325": 29364, "OfLine": 29365, "Sd": 29366, "inclusive": 29367, "quiry": 29368, "newpath": 29369, "Heartbeat": 29370, "Thursday": 29371, "STOPPED": 29372, "fns": 29373, "×Ķ": 29374, "Ġpreprocess": 29375, "Worked": 29376, "editing": 29377, "instrument": 29378, "Ġsis": 29379, "ĠPDB": 29380, "langcode": 29381, "Ġpushed": 29382, "National": 29383, "ndeclare": 29384, "setInt": 29385, "keyType": 29386, "Ġstraight": 29387, "Extensible": 29388, "decessors": 29389, "ĠToo": 29390, "Ġcareful": 29391, "<$": 29392, "KI": 29393, "Tj": 29394, "degrees": 29395, "ViewHolder": 29396, "233": 29397, "PMD": 29398, "uFD": 29399, "Ġsscanf": 29400, "Inflater": 29401, "ocal": 29402, "Meshes": 29403, "è¿ŀ": 29404, "your": 29405, "rail": 29406, "StringList": 29407, "hashed": 29408, "Sr": 29409, "ivec": 29410, "Ġ2008": 29411, "CallbackImplBase": 29412, "FINE": 29413, "hq": 29414, "ctoken": 29415, "()})": 29416, "IsActive": 29417, "ThreadPool": 29418, "InternalError": 29419, "ั": 29420, "ĠMarshalTo": 29421, "GrpcClient": 29422, "hys": 29423, "getCommand": 29424, "olddir": 29425, "Ġef": 29426, "DIRTY": 29427, "ApplyOptions": 29428, "decorated": 29429, "alternative": 29430, "=\"/": 29431, "Certs": 29432, "QUOTE": 29433, "Rq": 29434, "]={": 29435, "residual": 29436, "currentState": 29437, "WriteInt": 29438, "OffsetX": 29439, "ERTIES": 29440, "ĠChip": 29441, "duk": 29442, "ĠLOAD": 29443, "Ġestablished": 29444, "gQ": 29445, "UMNS": 29446, "Consts": 29447, "Invoked": 29448, "Ahead": 29449, "gun": 29450, "rnn": 29451, "Ġcifs": 29452, "lost": 29453, "Inhoud": 29454, "Ġxc": 29455, "ternatives": 29456, "SRAM": 29457, "metaData": 29458, "Ġmarkdown": 29459, "Ġpopulation": 29460, "Arithmetic": 29461, "иÑĤÑĮ": 29462, "Moment": 29463, "setMessage": 29464, "Ġtook": 29465, "ĠQPointF": 29466, "uio": 29467, "ando": 29468, "entityType": 29469, "zeroOrMore": 29470, "}]},": 29471, "CNIC": 29472, "UnicodeString": 29473, "ĠMETHOD": 29474, "ĠSummary": 29475, "Cull": 29476, "Dropped": 29477, "clic": 29478, "Ġgro": 29479, "EndEvent": 29480, "tas": 29481, "Computes": 29482, "nilfs": 29483, "ĠMenuItem": 29484, "ĠCross": 29485, "Alternate": 29486, "349": 29487, "ãģĵ": 29488, "Sends": 29489, "peername": 29490, "Ġ'@'": 29491, "ç¡®": 29492, "Ġ*/);": 29493, "currentThread": 29494, "\"/>": 29775, "ategies": 29776, "Ġswitching": 29777, "getElementType": 29778, "Ġ(&$": 29779, "ĠPRIV": 29780, "SMBUS": 29781, "MIO": 29782, "getRange": 29783, "Ġdraft": 29784, "setDescription": 29785, "Extern": 29786, "CLAMP": 29787, "Ġidentifying": 29788, "broker": 29789, "itnim": 29790, "bbb": 29791, "GetHeight": 29792, "Unified": 29793, ":\"'": 29794, "LogFile": 29795, "hwmon": 29796, "Structured": 29797, "Ġinflate": 29798, "Fla": 29799, "Hc": 29800, "Ġ}]);": 29801, "Finds": 29802, "Ġflattened": 29803, "Ġspr": 29804, "ptt": 29805, "Ġgx": 29806, "1414": 29807, "ĠurlParams": 29808, "CellStyle": 29809, "People": 29810, "SPECIAL": 29811, "Mr": 29812, "tB": 29813, "isoc": 29814, "Ġ'../": 29815, "Ġhel": 29816, "Ġecc": 29817, "ecx": 29818, "MapType": 29819, "Journal": 29820, "Ġoriginally": 29821, "gems": 29822, "Paper": 29823, "lpc": 29824, "Ġadr": 29825, "Ġunescape": 29826, "Ġenclosing": 29827, "Clk": 29828, "Prior": 29829, "dmap": 29830, "ĠKe": 29831, "spd": 29832, "FromSeconds": 29833, "ĠPlan": 29834, "æł·": 29835, "Cm": 29836, "ĠĠĠĠĠĠĠĠĠĠĠĊ": 29837, "opener": 29838, "ENOSPC": 29839, "ĠEval": 29840, "linkat": 29841, "Ġindexer": 29842, "ĠPrototype": 29843, "ĠsuperClass": 29844, "ReportError": 29845, "DecodeString": 29846, "GetProcAddress": 29847, "Accuracy": 29848, ".\"\\": 29849, "FmPcd": 29850, "Clazz": 29851, "Tangent": 29852, "apa": 29853, "TestFailure": 29854, ":\"[\\\\": 29855, "Ġskew": 29856, "=\\\"%": 29857, "PLAYBACK": 29858, "Navig": 29859, "bash": 29860, "}#{": 29861, "quint": 29862, "ĠMer": 29863, "MapValue": 29864, "creating": 29865, "ĠSDIO": 29866, "Facebook": 29867, "setOnClickListener": 29868, "iagnosis": 29869, "]\"),": 29870, "iode": 29871, "Ġlack": 29872, "ĠSpeed": 29873, "Ġ[_": 29874, "ĠMux": 29875, "keymap": 29876, "ideos": 29877, "Ġimplies": 29878, "monitoring": 29879, "Plurals": 29880, "ĠConsider": 29881, "Wednesday": 29882, "sipParseErr": 29883, "Ele": 29884, "ZWR": 29885, "Ġ\"{\"": 29886, "semicolon": 29887, "Ġ----------------------------------------------------------------------": 29888, "Ġsomewhere": 29889, "Bed": 29890, "Evt": 29891, "Sweep": 29892, "Ġcutoff": 29893, "GetResponse": 29894, "LLO": 29895, "DataStream": 29896, "HandlerFunc": 29897, "waitqueue": 29898, "Ġclr": 29899, "ãģ¦": 29900, "ĠDisk": 29901, "../../../": 29902, "Ib": 29903, "^(": 29904, "ResultType": 29905, "DoNot": 29906, "tablename": 29907, "affinity": 29908, "ĠJsonObject": 29909, "daysShort": 29910, "Ġhexadecimal": 29911, "ç´ł": 29912, "Iz": 29913, "Vpc": 29914, "kelihood": 29915, "())),": 29916, "ipipe": 29917, "ĠEmp": 29918, "Ġcmdline": 29919, "ScaleFactor": 29920, "adir": 29921, "Ġreboot": 29922, "istant": 29923, "licate": 29924, "Compose": 29925, "Signals": 29926, "Divider": 29927, "UniValue": 29928, "!)": 29929, "696": 29930, ");\",": 29931, "isFalse": 29932, "beep": 29933, "fillColor": 29934, "sequences": 29935, "getCurrentTokenRow": 29936, "Optimization": 29937, "suspended": 29938, "Destruct": 29939, "ĠXS": 29940, "DeserializeObject": 29941, "ĠAggregate": 29942, "à·": 29943, "Ġ0777": 29944, "Ġunwind": 29945, "ĠinputStream": 29946, "topLevel": 29947, "Ġkeeps": 29948, "å¤į": 29949, "deliver": 29950, "Todo": 29951, "ĠBuiltinType": 29952, "426": 29953, ";-": 29954, "fresh": 29955, "getLanguage": 29956, "scn": 29957, "ĠgetLast": 29958, "ialias": 29959, "Attribs": 29960, "AttributeAccessor": 29961, "slices": 29962, "ĠStarting": 29963, "clusions": 29964, "à¥Ģ',": 29965, "hrt": 29966, "iations": 29967, "relay": 29968, "Ġess": 29969, "ĠDock": 29970, "Ġ<<-": 29971, "isValidated": 29972, "dealloc": 29973, "Beacon": 29974, "Ġsuperclass": 29975, "MMIO": 29976, "WEIGHT": 29977, "ĠLexer": 29978, "readFile": 29979, "lineCommentStart": 29980, "2410": 29981, "draggable": 29982, "Ġpods": 29983, "pThis": 29984, "Ġlpsz": 29985, "\"]')": 29986, "WIDGET": 29987, "getcwd": 29988, "\",\"$": 29989, "ĠexecutionContext": 29990, "!|": 29991, "WLAN": 29992, "culture": 29993, "ĠSMALL": 29994, "ĠFREE": 29995, "ĠFLOW": 29996, "particles": 29997, "ĠVertical": 29998, "MILLI": 29999, "Fall": 30000, "LUT": 30001, "Ġorphan": 30002, "CacheEntry": 30003, "enummer": 30004, "Authorize": 30005, "laves": 30006, "Ġegid": 30007, "ICH": 30008, "binder": 30009, "Ġaccumulate": 30010, "Ġignores": 30011, ")\"},{": 30012, "Ġfriend": 30013, "Ġslen": 30014, "getItems": 30015, "Contrib": 30016, "buy": 30017, "642": 30018, "Ġencodings": 30019, "ĠCOLUMN": 30020, "Ġimmutable": 30021, "getOwnPropertyDescriptor": 30022, "AIF": 30023, "Pragma": 30024, "formance": 30025, "ĠISP": 30026, "ĠPrimary": 30027, "Cubic": 30028, "TOK": 30029, "ĠSRC": 30030, "IsType": 30031, "subtree": 30032, "Ġtopics": 30033, "PushButton": 30034, "readableState": 30035, "SetBytes": 30036, "BaseURL": 30037, "Ġparty": 30038, "Ġabc": 30039, "ĠInitializes": 30040, "Filled": 30041, "ĠINTEL": 30042, "mot": 30043, "vpath": 30044, "ĠtheWrappedObject": 30045, "ĠRI": 30046, "ugar": 30047, "GoString": 30048, "CAPS": 30049, "EXISTS": 30050, "\\\");\\": 30051, "]==\"": 30052, "getPackage": 30053, "setMethods": 30054, "ĠSTO": 30055, "FileObject": 30056, "styleSheet": 30057, "åIJ¯": 30058, "Ġglyphs": 30059, "dsc": 30060, "Ġpicker": 30061, "igo": 30062, "hered": 30063, "236": 30064, "Feel": 30065, "Abbreviated": 30066, "TQ": 30067, "sit": 30068, "zp": 30069, "ingContext": 30070, "Ġanchors": 30071, "Ġfilesize": 30072, "lda": 30073, "StorageClass": 30074, "Ġreasonable": 30075, "SupportByVersion": 30076, "Waarde": 30077, "ĠSupportByVersion": 30078, "SENSOR": 30079, "Ġpwd": 30080, "ĠQAbstract": 30081, "CheckResponse": 30082, "sysc": 30083, "æŁ": 30084, "()+\"": 30085, "Ġ\")\",": 30086, "ĠAA": 30087, "ANIM": 30088, "Ġloose": 30089, ">'.$": 30090, "Ġperiodic": 30091, "ĠAPIs": 30092, "GW": 30093, "ZL": 30094, "dpc": 30095, "Ġadev": 30096, "Ġimporter": 30097, "rqst": 30098, "Bp": 30099, "_][": 30100, "SetSize": 30101, "fileSystem": 30102, "neighbors": 30103, "990": 30104, "182": 30105, "CPL": 30106, "platforms": 30107, "TRANSPORT": 30108, "+]": 30109, "staff": 30110, "ĠnewState": 30111, "ERATE": 30112, "RECOVER": 30113, "ĠdoRequest": 30114, "Ġappropriately": 30115, "Mine": 30116, "setInterval": 30117, "Ġdesktop": 30118, "ĠPASS": 30119, "DataTypes": 30120, "Ġant": 30121, "Ġunz": 30122, "{}),": 30123, "Ġdisplays": 30124, "Vdbe": 30125, "CRLF": 30126, "FCR": 30127, "RTP": 30128, "kprobe": 30129, "deck": 30130, "Ġ**)&": 30131, "LineTo": 30132, "ĠREQUI": 30133, "('-',": 30134, "TJ": 30135, "welcome": 30136, "uminance": 30137, "Ġrestriction": 30138, "interpreted": 30139, "utility": 30140, "MenuBar": 30141, ")?/\",": 30142, "Animating": 30143, "525": 30144, "Ġduplex": 30145, "ĠCarbon": 30146, "percpu": 30147, "APPRO": 30148, "Ġ',')": 30149, "losion": 30150, "ETHER": 30151, "dit": 30152, "GETR": 30153, "SubjectAccessReview": 30154, "534": 30155, "CFI": 30156, "ibo": 30157, "Ġang": 30158, "::-": 30159, "Ġtimestamps": 30160, "SYMLINK": 30161, "ntfs": 30162, "menuItem": 30163, "Ġciphertext": 30164, "DESTROY": 30165, "wAA": 30166, "xer": 30167, "Ġsuspended": 30168, "ĠRoutine": 30169, "CTSTR": 30170, "158": 30171, "Barcode": 30172, "MsRestAzure": 30173, "BROAD": 30174, "elixir": 30175, "sbuf": 30176, "ToWorld": 30177, "Locks": 30178, "Screenshot": 30179, "ĠVARI": 30180, "级": 30181, "getArguments": 30182, "ĠZIP": 30183, "æī¾": 30184, "viz": 30185, "revoke": 30186, "aru": 30187, "ĠEdm": 30188, "Ġinserts": 30189, "highlighter": 30190, "ĠMCSymbolRefExpr": 30191, "insensitive": 30192, "RoleName": 30193, "Ġframebuffer": 30194, "057": 30195, "Ġyields": 30196, "ĠPeriod": 30197, "embedRules": 30198, "UATION": 30199, "stops": 30200, "Ġgboolean": 30201, "Ġrisk": 30202, "placeholders": 30203, "modem": 30204, "inesis": 30205, "Symbolic": 30206, "INSN": 30207, "Ġgradients": 30208, "inant": 30209, "jsonp": 30210, "ãĥª": 30211, "mailto": 30212, "QVariant": 30213, "}>": 30214, "Ġ*),": 30215, "ĠAri": 30216, "renew": 30217, "throwError": 30218, "Timers": 30219, "dts": 30220, "uy": 30221, "ĠUErrorCode": 30222, "ĠfromIndex": 30223, "dwFlags": 30224, "ĠPipeline": 30225, "Ġwlan": 30226, "Ġbeh": 30227, "Ġexynos": 30228, "Ġresync": 30229, "Ġattempted": 30230, "Ġ403": 30231, "ĠServlet": 30232, "passphrase": 30233, "submitted": 30234, "DomElement": 30235, "030": 30236, "getGroup": 30237, "ĠMAT": 30238, "usbvision": 30239, ":/(": 30240, "ки": 30241, "SCHEME": 30242, "Ġcontinuous": 30243, "Subclass": 30244, "GRID": 30245, "connectionState": 30246, "wrappers": 30247, "-+": 30248, "Prepend": 30249, "xfff": 30250, "402": 30251, "Kr": 30252, "ĠCY": 30253, "NextPageToken": 30254, "GlobalValue": 30255, "Ġcalculations": 30256, "AString": 30257, "uj": 30258, "Enums": 30259, "CHECKED": 30260, "ĠPolygon": 30261, ";<": 30262, "ETag": 30263, "angling": 30264, "Ġ($(": 30265, "DrawLine": 30266, "thd": 30267, "Ġscheduling": 30268, "Visited": 30269, "Skipping": 30270, "NativeType": 30271, "Sentence": 30272, "Ġdescribes": 30273, "Lvl": 30274, "Sv": 30275, "}:{": 30276, "ĠUi": 30277, "Ġimpulse": 30278, "Spatie": 30279, "RDWR": 30280, "bundles": 30281, "mangle": 30282, "uq": 30283, "getWindow": 30284, "flux": 30285, "pmn": 30286, "Optimizer": 30287, "Ġsafety": 30288, "Gg": 30289, "Ġhop": 30290, "SchemaOrg": 30291, "impulse": 30292, "好": 30293, "Dbl": 30294, "vbox": 30295, "laats": 30296, "Recursively": 30297, "olecule": 30298, "DIGEST": 30299, "Ġmembership": 30300, "ĠINSERT": 30301, "Circuit": 30302, "OiA": 30303, "recogn": 30304, "ĠWSA": 30305, "Ġ74": 30306, "SrcReg": 30307, "QUOTES": 30308, "papsz": 30309, "wQ": 30310, "roce": 30311, "Ġmdp": 30312, "Provides": 30313, "oga": 30314, "Ġkube": 30315, "URNS": 30316, "805": 30317, "')){": 30318, "propertyIsEnumerable": 30319, "CHARS": 30320, "CONTROLL": 30321, "savedInstanceState": 30322, "Ġquickly": 30323, "Ġwebsite": 30324, "elasticsearch": 30325, "Jum": 30326, "splits": 30327, "Ġ\"+\"": 30328, "ĠStringWriter": 30329, "Ġmounted": 30330, "ĠErrorCode": 30331, "Ġencodes": 30332, "dlc": 30333, "uninit": 30334, "Ġhtt": 30335, "udGV": 30336, "Ġbytecode": 30337, "ĠAddSC": 30338, "Ġtele": 30339, "ĠVariables": 30340, "PushBackNamed": 30341, "Ġlag": 30342, "Alternative": 30343, "')):": 30344, "MainThread": 30345, "periods": 30346, "Places": 30347, "Ġuppercase": 30348, "FERENCE": 30349, "URST": 30350, "Ġtmpdir": 30351, "qtd": 30352, "infer": 30353, "Ġcch": 30354, "Ġtmpl": 30355, "ĠviewBox": 30356, "MetaObject": 30357, "HorizontalPodAutoscaler": 30358, "SpinBox": 30359, "Cle": 30360, "bmi": 30361, "cmt": 30362, "ivo": 30363, "FOLLOW": 30364, "Ġcorrupted": 30365, "ĠTranslation": 30366, "TooMany": 30367, "åĵģ": 30368, "ccp": 30369, "Ġtro": 30370, "Ġexposed": 30371, "Ġitalic": 30372, "Ġkern": 30373, "cpufreq": 30374, "天": 30375, "OPENSSL": 30376, "20000": 30377, "olations": 30378, "ĠBA": 30379, "ĠdomainFactory": 30380, "Bonus": 30381, "DID": 30382, "Hack": 30383, "ĠCity": 30384, "']):": 30385, "scriptvalue": 30386, "ĠPayment": 30387, "Ġbld": 30388, "Ġsubs": 30389, "AccessKey": 30390, "Ġstopping": 30391, "Ġirsend": 30392, "(/^(\\": 30393, "CreationTime": 30394, "Affine": 30395, "Ġcuda": 30396, "esi": 30397, "ĠgetSource": 30398, "Ġ`{": 30399, "LogMessage": 30400, "Ġtransient": 30401, "Ġicons": 30402, "VisualStudio": 30403, "Ġcontacts": 30404, "Exactly": 30405, "ylus": 30406, ")'),": 30407, ">').": 30408, "ĠLINK": 30409, "=\"[": 30410, "NumberFormat": 30411, "webView": 30412, "ĠSerialization": 30413, "ĠSDLoc": 30414, "srp": 30415, "`).": 30416, "GetState": 30417, "umbnails": 30418, "ĠÃĹ": 30419, "_<": 30420, "Ġvh": 30421, "ĠCTRL": 30422, "ĠBZ": 30423, "ĠmonthsShort": 30424, "ìĿ¼": 30425, "Mobility": 30426, "zlib": 30427, "Ġdvm": 30428, "ĠAML": 30429, "ĠLRU": 30430, "owned": 30431, "EndDate": 30432, ".'/'.$": 30433, "Tuesday": 30434, "uvwxyz": 30435, "ĠDST": 30436, "possibly": 30437, "ĠclearInterval": 30438, "probes": 30439, "Ġtells": 30440, "ĠPROCESS": 30441, "OMAP": 30442, "Zo": 30443, "nlink": 30444, "ubifs": 30445, "ÑĢа": 30446, "MODIFY": 30447, "(',');": 30448, "à¶": 30449, "Ġion": 30450, "OfWork": 30451, "FromArgb": 30452, "RegionBlock": 30453, "pck": 30454, "sata": 30455, "sax": 30456, "rene": 30457, "ĠPub": 30458, "=\"{": 30459, "226": 30460, "Ġbatches": 30461, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": 30462, "psc": 30463, "passes": 30464, "rex": 30465, "ĠCop": 30466, "Ġkp": 30467, "EventDispatcher": 30468, "GDIPlus": 30469, "]!=": 30470, "SizeVarint": 30471, "ĠVol": 30472, ".*$": 30473, "ĠgetSub": 30474, "=\".": 30475, "Buy": 30476, "Ġtransfers": 30477, "poster": 30478, "Ġconsists": 30479, "DockStyle": 30480, "BOM": 30481, "CDB": 30482, "sKey": 30483, "Heat": 30484, "(__('": 30485, "ĠQStringLiteral": 30486, "partials": 30487, "â´°âµ": 30488, ">.'.": 30533, "Broken": 30534, "Ġ144": 30535, "://\"": 30536, "ĠmoduleName": 30537, "Ġfinder": 30538, "ShowDialog": 30539, "ĠWebRtc": 30540, "Fan": 30541, "smem": 30542, "atr": 30543, "setDate": 30544, "ĠasBC": 30545, "TableSize": 30546, "})\",": 30547, "CommandText": 30548, "ĠCOMMENT": 30549, "branches": 30550, "线": 30551, "Ġarithmetic": 30552, "Uc": 30553, "Ġpmd": 30554, "Ġ//--------": 30555, "($)": 30556, "ITIES": 30557, "ĠLogPrintf": 30558, "SECTOR": 30559, "sgid": 30560, "cyan": 30561, "ãĢĤ<": 30951, "^[": 30952, "wep": 30953, "ĠDATE": 30954, "GetWidth": 30955, "++]);": 30956, "ĠRH": 30957, "Ġsubstitute": 30958, "श": 30959, "Assignments": 30960, "()['": 30961, "Ġcollapsed": 30962, "]+/": 30963, "namespaceURI": 30964, "Glyphs": 30965, "Fired": 30966, "Want": 30967, "Ġxl": 30968, "Shrink": 30969, "notif": 30970, "ĠqScriptValue": 30971, "Ġselects": 30972, "ĠLOCAL": 30973, "wz": 30974, "Ġadvice": 30975, "ĠCompletion": 30976, "JMP": 30977, "Coef": 30978, "ĠExplicit": 30979, "CollisionObject": 30980, "[!": 30981, "ý": 30982, "ά": 30983, "Reconnect": 30984, "Bob": 30985, "Ġintercept": 30986, "NES": 30987, "rfkill": 30988, "ĠRewrite": 30989, "vable": 30990, "getWorld": 30991, "Provided": 30992, "ĠJul": 30993, "Ġaccesses": 30994, "Anything": 30995, "Ġidentifies": 30996, "ä¿®æĶ¹": 30997, "QY": 30998, "UTIME": 30999, "participant": 31000, "503": 31001, "ĠOpenSSL": 31002, "PAGES": 31003, "FRAMEBUFFER": 31004, "*,\\": 31005, "zfs": 31006, "Ġpfile": 31007, "__))": 31008, "(\"/\")": 31009, "áĥĿ": 31010, "енÑĤ": 31011, "PARAMETERS": 31012, "nValue": 31013, "ĠgameObject": 31014, "ĠCurve": 31015, "gICAgICAgICAg": 31016, "èĬĤçĤ¹": 31017, "//================================================": 31018, "ĠgetMessage": 31019, "259": 31020, "opera": 31021, "Ġassociate": 31022, "ĠDeepCopyObject": 31023, "ĠNUMBER": 31024, "pickle": 31025, "MCR": 31026, "sC": 31027, "ymin": 31028, "Ġdav": 31029, "åħ¶": 31030, "ĠSCROLL": 31031, "devc": 31032, "ofile": 31033, "phon": 31034, "244": 31035, "iomap": 31036, "wacom": 31037, "deny": 31038, "Ġrecipients": 31039, "GetBuffer": 31040, "goff": 31041, "fmr": 31042, "getTest": 31043, "ĠBer": 31044, "Ġ73": 31045, "Bel": 31046, "Ġinfinity": 31047, "uploader": 31048, "ĠkeyCode": 31049, "ebx": 31050, "Ġworkbook": 31051, "Ġreplication": 31052, "Designator": 31053, "uDD": 31054, "getArray": 31055, "ĠCatalog": 31056, "IDOM": 31057, "ccr": 31058, "lnk": 31059, "ĠRetrieves": 31060, "Ġsemicolon": 31061, "BRIDGE": 31062, "rebuild": 31063, "rois": 31064, "chap": 31065, "getTab": 31066, "getHeaders": 31067, "Inlining": 31068, "ADR": 31069, "ĠHelpers": 31070, "Ġtps": 31071, "ĠMixed": 31072, "ĠLAT": 31073, "errorMsg": 31074, "labs": 31075, "Observers": 31076, "semantic": 31077, "èµĦ": 31078, "Lerp": 31079, "QByteArray": 31080, "GetExtension": 31081, "Ġexited": 31082, "ĠLIR": 31083, "printed": 31084, "rollment": 31085, "ĠnsAuto": 31086, "QUIR": 31087, "boards": 31088, "houding": 31089, "ynchronously": 31090, "ismet": 31091, "ĠsetText": 31092, "ĠHCI": 31093, "chemy": 31094, "}}}}": 31095, "PROPERTIES": 31096, "Ġbundles": 31097, "ĠTracker": 31098, "mIs": 31099, "ĠClassLoader": 31100, "quisition": 31101, "Wc": 31102, "itf": 31103, "ĠAPR": 31104, "Excluded": 31105, "Bases": 31106, "cqr": 31107, "fine": 31108, "nction": 31109, "//-------------------------------------------------": 31110, "Ġbtree": 31111, "ĠIG": 31112, "ĠPAT": 31113, "Deposit": 31114, "ĠRAND": 31115, "Ġlease": 31116, "Ġtxq": 31117, "fVxuXG": 31118, "xN": 31119, "GetId": 31120, "Ġkvp": 31121, "RowIndex": 31122, "LocalFile": 31123, "JsonUnmarshaller": 31124, "ëĭ¤": 31125, "CancellationRequested": 31126, "Ġ\"\":": 31127, "setUser": 31128, "Ġgv": 31129, "STAR": 31130, "ampdu": 31131, "ĠKeyword": 31132, "Division": 31133, "POSITIVE": 31134, "FOCUS": 31135, "QUEST": 31136, "getFloat": 31137, "SecurityGroup": 31138, "ĠSourceNode": 31139, "à¹Ī": 31140, "coeffs": 31141, "åĿĹ": 31142, "ĠTIOCM": 31143, "ĠÑĦ": 31144, "ulators": 31145, "StateManager": 31146, "joined": 31147, "Ġvalign": 31148, "Ġ'%'": 31149, "è¾ij": 31150, "getLocale": 31151, "ĠCurl": 31152, "ĠBot": 31153, "045": 31154, "151": 31155, "Variance": 31156, "AccountType": 31157, ">": 31158, "Ġmultiline": 31159, "Ġconfirmation": 31160, "Aanvang": 31161, "roff": 31162, "GetElement": 31163, "ICd": 31164, "OTE": 31165, "pointers": 31166, "CharSequence": 31167, "Ġaddrs": 31168, "Ġnormalizer": 31169, "CLUSIVE": 31170, "Occurred": 31171, "Ġpulse": 31172, "647": 31173, "Sortable": 31174, "Ġnatural": 31175, "atLeast": 31176, "TypeString": 31177, "ĠBSD": 31178, "ĠBLK": 31179, "RequestBody": 31180, "Quat": 31181, "Ġpredecessor": 31182, "Purpose": 31183, "invite": 31184, "Ġhm": 31185, "ĠIA": 31186, "JsonReader": 31187, "表示": 31188, "enic": 31189, "Deg": 31190, "])/,": 31191, "Prefab": 31192, "Ġ'*',": 31193, "οÏħ": 31194, "coupon": 31195, "Morph": 31196, "[.": 31197, "Ġgint": 31198, "Checkout": 31199, "ĠhttpContext": 31200, "Ġapproximation": 31201, "MOB": 31202, "rkey": 31203, "Ġ\"\".": 31204, "ĠDIST": 31205, "QueryParams": 31206, "iffer": 31207, "VOLTAGE": 31208, "*\\/": 31209, "entr": 31210, "Ġsrs": 31211, "ĠICollection": 31212, "ĠgetField": 31213, "Ġxtype": 31214, "Ġshorter": 31215, "errorCount": 31216, ">(_": 31217, "Ġ\"\\\\\\\\": 31218, "'?": 31219, "Rr": 31220, "ĠpDst": 31221, "uppet": 31222, "Ġ#{@": 31223, "zdHJ": 31224, "Ġcommunity": 31225, "åİŁ": 31226, "+\"},{": 31227, "fdb": 31228, "Ġ{\",": 31229, "isy": 31230, "keycode": 31231, "testExpression": 31232, "Ġprepares": 31233, "notebook": 31234, "ĠPreconditions": 31235, "AsmToken": 31236, "ynamoDB": 31237, "elect": 31238, "jsp": 31239, "smd": 31240, "GetResult": 31241, "ĠGS": 31242, "Ġ'_',": 31243, "getComputedStyle": 31244, "WALL": 31245, "quash": 31246, "pecially": 31247, "currently": 31248, "]=(": 31249, "decorators": 31250, "CYCLE": 31251, "elength": 31252, "ipts": 31253, "karma": 31254, "Ġppp": 31255, "Schemas": 31256, "Ġmongo": 31257, "getRows": 31258, "ĠSolr": 31259, "constData": 31260, "ĠnodeId": 31261, "Ġavatar": 31262, "uccs": 31263, "ĠSTOP": 31264, "teams": 31265, "TLI": 31266, "Ġ$('[": 31267, "Ġserv": 31268, "OnFailure": 31269, "ĠparentNode": 31270, "ITEMS": 31271, "ĠBucket": 31272, "RTM": 31273, "ĠSimilar": 31274, "ĠunmarshalledObject": 31275, "ĠSID": 31276, "ĠSdk": 31277, "ĠFl": 31278, "Resol": 31279, "CallSite": 31280, "Ġ\"'\";": 31281, "America": 31282, "QPoint": 31283, "alm": 31284, "Ġqscriptvalue": 31285, "ĠKo": 31286, "cbiAgICB": 31287, "ĠQUERY": 31288, "Dynamics": 31289, "byn": 31290, "ifc": 31291, "Ġ\"::": 31292, "ĠEnabled": 31293, "Ø«": 31294, "Ġmusic": 31295, "getTimestamp": 31296, "Ġexperiment": 31297, "ToLeft": 31298, "Relay": 31299, "Ñĥн": 31300, "Ġperiods": 31301, "infinity": 31302, "ĠtCIDLib": 31303, "Ġpunctuation": 31304, "Ġbidi": 31305, "Concurrency": 31306, "Ġgene": 31307, "\\\\!": 31308, "Throttle": 31309, "CreateTime": 31310, "393": 31311, "ĠFixture": 31312, "Fj": 31313, "rtx": 31314, "}\\\\": 31315, "ĠAx": 31316, "PathName": 31317, "creasing": 31318, "ĠorderBy": 31319, "ValidationException": 31320, "Ġinjected": 31321, "Ġinverted": 31322, "ĠECC": 31323, "ĠInject": 31324, "OrErr": 31325, "Ġros": 31326, "ĠRTLIB": 31327, "/****************************************************************************/": 31328, "ĠGaussian": 31329, "ItemList": 31330, "RootNode": 31331, "getFoldWidgetBase": 31332, "Ġæĺ¯åIJ¦": 31333, "ĠSUM": 31334, "conj": 31335, "liest": 31336, "Initializes": 31337, "selecting": 31338, "xuICAgICAgICAgICAg": 31339, "Ambient": 31340, "iY": 31341, "Ġsweep": 31342, "shifts": 31343, "cedures": 31344, "fadeOut": 31345, "ĠGuard": 31346, "Unreachable": 31347, "SizedBuffer": 31348, "WEAPON": 31349, "Ġincr": 31350, "ToLua": 31351, "MouseButton": 31352, "æķ°æį®åºĵ": 31353, "etica": 31354, "DeserializationError": 31355, "EOT": 31356, "Gaussian": 31357, "ration": 31358, "Ïħ": 31359, "Ġbios": 31360, "licant": 31361, "ĠlistView": 31362, "networks": 31363, "MODIFIED": 31364, "Ġafs": 31365, "Ġarena": 31366, "Story": 31367, "brd": 31368, "Ġpager": 31369, "GPS": 31370, "Solve": 31371, "cemb": 31372, "Ġ*********": 31373, "Reorder": 31374, "opro": 31375, "\"]}": 31376, "randomElement": 31377, "ĠCalc": 31378, "PLAIN": 31379, "cum": 31380, "vetica": 31381, "ĠDF": 31382, "ĠPeer": 31383, "phases": 31384, "Ġcompptr": 31385, "ISDN": 31386, "getApp": 31387, "setView": 31388, "ĠDOT": 31389, "ospace": 31390, "readw": 31391, ".$(": 31392, "Ġlogout": 31393, "commandWorked": 31394, "Activator": 31395, "catalogue": 31396, "CRO": 31397, "TValue": 31398, "tostring": 31399, "Ġnetif": 31400, "species": 31401, "ByteOrder": 31402, "DOMElement": 31403, "Sg": 31404, "imax": 31405, "division": 31406, "8821": 31407, "ĠTransformer": 31408, "gens": 31409, "mil": 31410, "ĠFFT": 31411, "checkType": 31412, "336": 31413, "ĠPsiElement": 31414, "getEndRule": 31415, "ĠHoek": 31416, "MUTEX": 31417, "\"#": 31418, "mir": 31419, "Ġcaptures": 31420, "getControl": 31421, "237": 31422, "personal": 31423, "PTRACE": 31424, "Ġinfile": 31425, "ĠFollow": 31426, "ĠBAD": 31427, "NodeContainer": 31428, "OfYear": 31429, "HttpException": 31430, "relationships": 31431, "/*************************************************************************/": 31432, "Captured": 31433, "Fv": 31434, "aditional": 31435, "ĠPB": 31436, "ĠWallet": 31437, "privErrorLog": 31438, "SUP": 31439, "Selectable": 31440, "TRUNC": 31441, "StatefulSet": 31442, "Lod": 31443, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 31444, "sps": 31445, "ĠbasePath": 31446, "Ġdescending": 31447, "Ġ((((": 31448, "Expecting": 31449, "getCommentRegionBlock": 31450, "*>,": 31451, "{%": 31452, "ĠgetInput": 31453, "mti": 31454, "998": 31455, "Elm": 31456, "LETTE": 31457, "dasd": 31458, "law": 31459, "Ġdetector": 31460, "readers": 31461, "Ġimpossible": 31462, "ĠQImage": 31463, "ASTContext": 31464, "ĠXmlElement": 31465, "Tmpl": 31466, "Ġnlattr": 31467, "(<<": 31468, "Kin": 31469, "VBO": 31470, "Ġpapsz": 31471, "\",(": 31472, "setStart": 31473, "ĠRcpp": 31474, "Ġshallow": 31475, "4444": 31476, "containing": 31477, "Ġparentheses": 31478, "finfo": 31479, "lstrip": 31480, "ocrr": 31481, "ĠgetContent": 31482, "ĠChanges": 31483, "ZXN": 31484, "fillStyle": 31485, "rejected": 31486, "Saver": 31487, "Bmp": 31488, "mant": 31489, "Ġinconsistent": 31490, "Ġ&(*": 31491, "upports": 31492, "Stick": 31493, "ĠReason": 31494, "183": 31495, "ÙĬÙĪ": 31496, "erritory": 31497, "nHeight": 31498, "asin": 31499, "ultaneous": 31500, "Ġorth": 31501, "Ġtransmission": 31502, "883": 31503, "flg": 31504, "ĠCPUs": 31505, "jy": 31506, "ddl": 31507, "ĠTestCase": 31508, "URLParams": 31509, "395": 31510, "FLIP": 31511, "ĠrelativeTime": 31512, "Ġoldest": 31513, ">\").": 31514, "bam": 31515, "yuv": 31516, "ague": 31517, "putInt": 31518, "modifiable": 31519, "Normalization": 31520, "Ġnetworks": 31521, "probability": 31522, "Gun": 31523, "nss": 31524, "cec": 31525, "162": 31526, "oldmask": 31527, "USART": 31528, "swipe": 31529, "交": 31530, "Ġresponding": 31531, "éħį": 31532, "QGraphics": 31533, "ĠFIN": 31534, "LEAVE": 31535, "Ġattrnamespace": 31536, "ĠBOOLEAN": 31537, "cachep": 31538, "Late": 31539, "algorithms": 31540, "getBy": 31541, "ĠPUSH": 31542, "outines": 31543, "lowest": 31544, "DeviceInfo": 31545, "uclide": 31546, "tabIndex": 31547, "Ġstrictly": 31548, "IBILITY": 31549, "ResetTimer": 31550, "ĠComputes": 31551, "ä¸ŃçļĦ": 31552, "Limited": 31553, "swiftmailer": 31554, "reservation": 31555, "intensity": 31556, "GetOptions": 31557, "ĠgetDescription": 31558, "ROWS": 31559, "Ġpinctrl": 31560, "Srv": 31561, "Removal": 31562, "ToWrite": 31563, "SSA": 31564, "XMLSchema": 31565, "gpios": 31566, ";')": 31567, "aC": 31568, "captcha": 31569, "ldev": 31570, "InMemory": 31571, "STENCIL": 31572, "beef": 31573, "ãģŁ": 31574, "Ġpassphrase": 31575, "Prism": 31576, "PlainText": 31577, "*|\\/\\/": 31578, "Warp": 31579, "ubit": 31580, "REACH": 31581, "Ġunload": 31582, "):\\": 31583, "WithPath": 31584, "soy": 31585, "Avail": 31586, "rottling": 31587, "*\\*\\/\\": 31588, "214748364": 31589, "XSize": 31590, "Zs": 31591, "khz": 31592, "Ġmigrate": 31593, "Ġhapd": 31594, "accepts": 31595, "xmlWriter": 31596, "enumerator": 31597, "UCTOR": 31598, "iann": 31599, "Ðŀ": 31600, "Remark": 31601, ").*\\*\\/\\": 31602, "ĠWrapper": 31603, "ReadCloser": 31604, "conntrack": 31605, "StarBlockCommentRe": 31606, "tripleStarBlockCommentRe": 31607, "singleLineBlockCommentRe": 31608, "Kd": 31609, "Deck": 31610, "=\"{{": 31611, "UNEXPECTED": 31612, "hasArg": 31613, "Ġmini": 31614, "TeX": 31615, "Ġattachments": 31616, "GlobStar": 31617, ",\"\"": 31618, "kB": 31619, "β": 31620, "reversed": 31621, "Ġ\"|\"": 31622, "Ġasd": 31623, "ĠWD": 31624, "equality": 31625, "CallSettings": 31626, "331": 31627, "Ġdenom": 31628, "RIS": 31629, "intra": 31630, "Configurator": 31631, "tdm": 31632, "resetText": 31633, "Primitives": 31634, ".-": 31635, "lck": 31636, "Ġinjection": 31637, "ĠDK": 31638, "ĠTruncate": 31639, "DRIVE": 31640, "anchors": 31641, "ĠQuant": 31642, "Suites": 31643, "ENCED": 31644, "ĠCc": 31645, "Ġgfc": 31646, "Ġvalidates": 31647, "Diffuse": 31648, "Ġ{{.*}}": 31649, "interopRequireDefault": 31650, "hil": 31651, "sab": 31652, "isinstance": 31653, "//\\": 31654, "pelg": 31655, "408": 31656, "ä½ł": 31657, "Ġterminating": 31658, "ServletResponse": 31659, "Ġstereo": 31660, "Pn": 31661, "dmac": 31662, "inq": 31663, "ulfill": 31664, "bugee": 31665, "ToSend": 31666, "Ġcampaign": 31667, "Historic": 31668, "pelganger": 31669, "Bench": 31670, "hero": 31671, "Stages": 31672, "curtime": 31673, "swagger": 31674, "Ġ.'": 31675, "SetTexture": 31676, "\";}": 31677, "7777": 31678, "autoc": 31679, "GACY": 31680, "INTEGRAL": 31681, "Sms": 31682, "ktime": 31683, "Ġmips": 31684, "getIterator": 31685, "ĠAtt": 31686, "prolog": 31687, "Ġxxxx": 31688, "CloseBody": 31689, "0641": 31690, "ĠCONTROL": 31691, "toplevel": 31692, "ĠEmbed": 31693, "Ġ4000": 31694, "mtk": 31695, "BOUN": 31696, "Ġunderline": 31697, "Ġdecorated": 31698, "ĠMatchingBraceOutdent": 31699, "GDB": 31700, "Ġcame": 31701, "()&&": 31702, "ĠCFile": 31703, "));\\": 31704, "Ġchains": 31705, "Ġunspecified": 31706, "ĠDeep": 31707, "PacketMetadata": 31708, "Ġimplementing": 31709, "409": 31710, "rift": 31711, "Reach": 31712, "StartPosition": 31713, "$,": 31714, "igible": 31715, "contrast": 31716, "TooLong": 31717, "<\\": 31718, "aEvent": 31719, "Ġary": 31720, "ĠFULL": 31721, "Ġretcode": 31722, "modelClass": 31723, "downcase": 31724, "ĠGlobals": 31725, "promises": 31726, "Doppelganger": 31727, "Ia": 31728, "jid": 31729, "Ġfflush": 31730, "edu": 31731, "ĠgetResource": 31732, "DSGenerator": 31733, "CSI": 31734, "Nix": 31735, "()": 31740, "CHAT": 31741, "scaleX": 31742, "Ġtitles": 31743, "disposed": 31744, "XBvb": 31745, "Ġrecently": 31746, "uris": 31747, "validated": 31748, "childNode": 31749, "bindValue": 31750, ")?(": 31751, "ENUWin": 31752, "åŁŁ": 31753, "TML": 31754, "fscache": 31755, "getParams": 31756, "setQuery": 31757, "apy": 31758, "ĠIOM": 31759, "329": 31760, "374": 31761, "ĠPyErr": 31762, "previousSibling": 31763, "RAID": 31764, "822": 31765, "Kw": 31766, "erate": 31767, "laced": 31768, "Globalization": 31769, "arms": 31770, "Ġnarrow": 31771, "ListValue": 31772, "ĠTIMER": 31773, "Ls": 31774, "Maj": 31775, "]=='": 31776, "xBF": 31777, "Ġndev": 31778, "(\"\"))": 31779, "Leap": 31780, "Spill": 31781, "ĠaccessToken": 31782, "Qc": 31783, "rtoken": 31784, "Profiling": 31785, "Unless": 31786, ")').": 31787, "[\\\"": 31788, "ĠCAS": 31789, "ĠRecovery": 31790, "instanceId": 31791, "Ġbitrate": 31792, "ĠDataset": 31793, "totals": 31794, "fontsize": 31795, "è¯Ń": 31796, "ĠSmart": 31797, "jshint": 31798, "kf": 31799, "settlement": 31800, "Ġeol": 31801, "Ġ480": 31802, "0433": 31803, "ĠXmlSchema": 31804, "*_": 31805, "ĠCMP": 31806, "Ġhor": 31807, "quiring": 31808, "Ġtrick": 31809, "SECT": 31810, "IText": 31811, "pbmc": 31812, "ciph": 31813, "LUN": 31814, "getDeclared": 31815, "Ġhue": 31816, "Unwrap": 31817, "Ġtextual": 31818, "оп": 31819, "Ġ'_')": 31820, "IGlmICh": 31821, "Ġsst": 31822, "idp": 31823, "triggers": 31824, "verification": 31825, "834": 31826, "PSA": 31827, "vjs": 31828, "Ġfriendly": 31829, "ĠIAM": 31830, "ToBytes": 31831, "clist": 31832, "reduction": 31833, "ĠXOR": 31834, "[$_": 31835, "Ġsympy": 31836, "listOfErrors": 31837, "XBvbmVud": 31838, "ĠUnmarshaller": 31839, "Ġrelations": 31840, "Titles": 31841, "////////////////////////////////////////////////": 31842, "QH": 31843, "poke": 31844, "ĠnumBytes": 31845, "MDS": 31846, "Ġhashed": 31847, "configurations": 31848, "Ġ'&'": 31849, "å®ŀä¾ĭ": 31850, "LNK": 31851, "WJ": 31852, "tcm": 31853, "eness": 31854, "[]}": 31855, "timedelta": 31856, "024": 31857, "CEL": 31858, "ĠAdvance": 31859, "ĠSpecific": 31860, "Ġdenominator": 31861, "ĠAbsolute": 31862, "mType": 31863, "paramName": 31864, "MAY": 31865, "userInfo": 31866, "Ġkeylen": 31867, "Ġupstream": 31868, "ĠrequestId": 31869, "skt": 31870, "Ġ82": 31871, "1004": 31872, "ĠMatches": 31873, "Bands": 31874, "Vb": 31875, "enty": 31876, "ĠScore": 31877, "Ġ_$": 31878, "ĠVG": 31879, "omega": 31880, "9000": 31881, "House": 31882, "urious": 31883, "ifm": 31884, "Ġmute": 31885, "'].\"": 31886, "\"\"\")": 31887, "-----------------------------------------------------------------------": 31888, "MemoryStream": 31889, "Firewall": 31890, "=|>>": 31891, "uap": 31892, "yz": 31893, "ĠDDS": 31894, "ToCheck": 31895, "ĠgetConfig": 31896, "bericht": 31897, "createObject": 31898, "prerelease": 31899, "ClusterRole": 31900, "Ġartist": 31901, "Limiter": 31902, "\"');": 31903, "ĠConf": 31904, "ColorSpace": 31905, "ĠParagonIE": 31906, "ĠBITS": 31907, "ALIGNMENT": 31908, "ĠParameterDirection": 31909, "isFinite": 31910, "ש": 31911, "ewidth": 31912, "(){},": 31913, "caster": 31914, "Installation": 31915, "TBL": 31916, "sinfo": 31917, "éĵ": 31918, "Ġ\"(?:": 31919, "Student": 31920, "Ġ?',": 31921, "Ġbugs": 31922, "VERSE": 31923, "Gateways": 31924, "fusb": 31925, "ĠgetNode": 31926, "FileDescriptor": 31927, "scriptPubKey": 31928, "Locals": 31929, "--------------------------------------------------------------------------------": 31930, "áŀ¶": 31931, "Diagram": 31932, "ĠReceived": 31933, "Ġ------------------------------------------------": 31934, "Ġpet": 31935, "']]['": 31936, "Ġoutcome": 31937, "CodeGenerator": 31938, "{}'.": 31939, "CLASSES": 31940, "HEADERS": 31941, "Ġ-----------------------------------------------------------------------": 31942, "Tips": 31943, "Zt": 31944, "dcache": 31945, "wsgi": 31946, "Ġ'),": 31947, "ĠCenter": 31948, "ĠPref": 31949, "DataContext": 31950, "Ġdevpriv": 31951, "Ġdivided": 31952, "ATTACHMENT": 31953, "@-": 31954, "LING": 31955, "deletion": 31956, "Ġfrm": 31957, "testcase": 31958, "ObjectList": 31959, "Ġ`(": 31960, "1001": 31961, "(\".\");": 31962, "Ġplaceholders": 31963, "ĠDeclaration": 31964, "FINISHED": 31965, "()],": 31966, "setCursor": 31967, "Ġxcb": 31968, "StartPos": 31969, "EntityManager": 31970, "Ġvaddr": 31971, "ĠICmpInst": 31972, "ĠMX": 31973, "049": 31974, "ĠONLY": 31975, "Peak": 31976, "]===": 31977, "Ġfseek": 31978, "edx": 31979, "IsVisible": 31980, "InnerException": 31981, "PartialResponse": 31982, "ExceededException": 31983, "!\";": 31984, "'>\"": 31985, "Ġintention": 31986, "INY": 31987, "ĠWarn": 31988, "Ġconstexpr": 31989, "Ġ401": 31990, "ĠjsonObject": 31991, "Ġcausing": 31992, "STARTED": 31993, "HVl": 31994, "Ġpdu": 31995, "Bitrate": 31996, "HTTPStatusCode": 31997, "nesdev": 31998, "bill": 31999, "pP": 32000, "qname": 32001, "Ġaabb": 32002, "toContain": 32003, "GetGUID": 32004, "Ġtracked": 32005, "KNOWN": 32006, "Wr": 32007, "bay": 32008, "mins": 32009, "clientY": 32010, "fullpath": 32011, "otonic": 32012, ">).": 32013, "HFC": 32014, "sriov": 32015, "Ġreact": 32016, "testream": 32017, "ibilities": 32018, "chris": 32019, "Macros": 32020, "uppercase": 32021, "ĠUNIX": 32022, "//----------------------------------------------------------------------------": 32023, "Peers": 32024, "Reward": 32025, "âĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶâĢĶ": 32026, "535": 32027, "Lg": 32028, "Ssh": 32029, "__.__": 32030, "ĠuserData": 32031, "Ġobjs": 32032, "Ġoverlapping": 32033, "ĠInputService": 32034, "Ġescaping": 32035, "\",\\": 32036, "ĠSci": 32037, "classCallCheck": 32038, "checkFor": 32039, "OSF": 32040, "=\\\"$": 32041, "airo": 32042, "ĠPreview": 32043, "django": 32044, "ĠSPELL": 32045, "ĠsourceMappingURL": 32046, "Zw": 32047, "sized": 32048, "Ġ05": 32049, "Ġwg": 32050, "ĠSHO": 32051, "(?=[": 32052, "fragments": 32053, "οÏĤ": 32054, "*)?(?:[": 32055, "ulnerability": 32056, "Rsp": 32057, "qint": 32058, "restriction": 32059, "utures": 32060, "Increase": 32061, "Stuff": 32062, "backoff": 32063, "Ġ`<": 32064, "TableEntry": 32065, "MinLen": 32066, "swizzle": 32067, "ConvertUTF": 32068, "387": 32069, "åįģ": 32070, "availability": 32071, "qdio": 32072, "fif": 32073, "ToUnicode": 32074, "ISteam": 32075, "((__": 32076, "grader": 32077, "Ġcov": 32078, "ĠBaseFoldMode": 32079, "æ¶Īæģ¯": 32080, "warf": 32081, "|~": 32082, "icc": 32083, "omit": 32084, "Repositories": 32085, "rtnl": 32086, "mmetry": 32087, "shortcode": 32088, "ĠBlocks": 32089, "Dialect": 32090, "Ġstrncpy": 32091, "OCI": 32092, "Ġ////": 32093, "ĠGradient": 32094, "IsRequired": 32095, "validates": 32096, "ĠmaxRow": 32097, "ĠStudio": 32098, "OSD": 32099, "])));": 32100, "Ġ']';": 32101, "Armor": 32102, "Nq": 32103, "Og": 32104, "Oracle": 32105, "mimetype": 32106, "ortion": 32107, "ATI": 32108, "ĠModified": 32109, "áŁĴ": 32110, "309": 32111, "Itr": 32112, "Ġfive": 32113, "getEditor": 32114, "ĠAst": 32115, "Texts": 32116, "NotNil": 32117, "SPARE": 32118, "thrift": 32119, "Fav": 32120, "]&&(": 32121, "hbn": 32122, "nargs": 32123, "Ġguint": 32124, "ĠPIL": 32125, "photos": 32126, "ĠJObject": 32127, "gov": 32128, "CLICK": 32129, "OpenGLFunctions": 32130, "GetModule": 32131, ":\"/": 32132, "colorspace": 32133, "FEAT": 32134, "SelectionChanged": 32135, "åħĪ": 32136, "ĠElementType": 32137, "sZW": 32138, "ĠRM": 32139, "disks": 32140, "Ġadres": 32141, "Curves": 32142, "]+)?": 32143, "fbdev": 32144, "Recognize": 32145, "Firmware": 32146, "Gam": 32147, "SIS": 32148, "Ġmins": 32149, "licity": 32150, "RoleSizes": 32151, "ZXM": 32152, "Delegates": 32153, "Ġinlined": 32154, "ubar": 32155, ".'": 32528, "Hls": 32529, "oops": 32530, "ô": 32531, "errCode": 32532, "ĠMUSB": 32533, "ResponseHeaders": 32534, "inspector": 32535, "867": 32536, "ĠEXEC": 32537, "activities": 32538, "xslt": 32539, "ĠReceives": 32540, "*$/);": 32541, "Lt": 32542, "]();": 32543, "`;": 32544, "bstr": 32545, "ĠPriv": 32546, "Ġatol": 32547, "Ġ\"'\",": 32548, "ĠBackup": 32549, "æĮī": 32550, "loud": 32551, "ĠSun": 32552, "ĠDuplicate": 32553, "listItem": 32554, "dmabuf": 32555, "vault": 32556, "autom": 32557, "CultureStrings": 32558, ".\")]": 32559, "ĠCost": 32560, "ĠfileInfo": 32561, "ĠpoDS": 32562, "Ġprefetch": 32563, "Friction": 32564, "xBB": 32565, "etra": 32566, "ĠFEC": 32567, "ixmap": 32568, "fieldType": 32569, "LAP": 32570, "exceptionToString": 32571, "\"+(": 32572, "Ġ'=')": 32573, "VBR": 32574, "usive": 32575, "together": 32576, "ĠFPU": 32577, "SetParam": 32578, "='.": 32579, "Interp": 32580, "Ġinteractive": 32581, "seqno": 32582, "fileno": 32583, "TexParameter": 32584, "securitypriv": 32585, "monthsShort": 32586, "ĠPlaces": 32587, "fallthrough": 32588, "inematic": 32589, "_',": 32590, "Ġshost": 32591, "247": 32592, "memberof": 32593, "Ġresetting": 32594, "çĶ»": 32595, "读åıĸ": 32596, "readString": 32597, "NotEmpty": 32598, "OnNext": 32599, "Preprocessor": 32600, "ĠFileOutputStream": 32601, "SCRIB": 32602, "SNAP": 32603, "Tunnel": 32604, "AID": 32605, "EAX": 32606, "Kv": 32607, "isInvalid": 32608, "acher": 32609, "TIAL": 32610, "Offs": 32611, "Ġossim": 32612, "mers": 32613, "xcb": 32614, "Ġbattery": 32615, "326": 32616, "())},": 32617, "SubClass": 32618, "344": 32619, "Ġdisabling": 32620, "reclaim": 32621, "fadeIn": 32622, "+\\-": 32623, "esterday": 32624, "Ġacquired": 32625, "ASTER": 32626, "progressBar": 32627, "Charts": 32628, "interaction": 32629, "ĠSetUp": 32630, "CreateDirectory": 32631, "Ġsdio": 32632, "ĠBackbone": 32633, "Ġkvmppc": 32634, "dquot": 32635, "nas": 32636, "ÅĻ": 32637, "(\"{}": 32638, "ĠSock": 32639, "ĠHit": 32640, "Ġ84": 32641, "Ġappending": 32642, "Ġgranted": 32643, "Ġwiretype": 32644, "Wil": 32645, "kJ": 32646, "iters": 32647, "THH": 32648, "SERDES": 32649, "MONO": 32650, "|\\\\*": 32651, "Dragging": 32652, "ĠARCHIVE": 32653, "$\\": 32654, "OUR": 32655, "Ys": 32656, "pL": 32657, "uz": 32658, "express": 32659, "322": 32660, "Ġdescendant": 32661, "tabindex": 32662, "544": 32663, "skippy": 32664, "BuiltIn": 32665, "Mt": 32666, "Pd": 32667, "isspace": 32668, "Ġmention": 32669, "InScope": 32670, "ĠgetWidth": 32671, "ĠgetKind": 32672, "=\"<": 32673, "557": 32674, "DDD": 32675, "RCV": 32676, "Ġtrip": 32677, "989": 32678, "SCEV": 32679, "minfo": 32680, "recycle": 32681, "retcode": 32682, "Ġplen": 32683, "Ġplat": 32684, "oneof": 32685, "Stdin": 32686, "]';": 32687, "Ġfat": 32688, "loose": 32689, "Ġ270": 32690, "FormData": 32691, "TopLeft": 32692, "nonzero": 32693, "ĠEditorCell": 32694, "DisposedException": 32695, "arts": 32696, "ĠMON": 32697, "ldns": 32698, "Ġ105": 32699, "HostPort": 32700, "Ġmixer": 32701, "valueObjectSrc": 32702, "foreignKey": 32703, "ĠBootstrap": 32704, "Xc": 32705, "ĠSEXP": 32706, "IOV": 32707, "Ġdiscover": 32708, "CIA": 32709, "regularizer": 32710, "ение": 32711, "\"';": 32712, "Blink": 32713, "GPI": 32714, "Scores": 32715, "msa": 32716, "getRegion": 32717, "ĠDrv": 32718, "achieve": 32719, "ĠgetHeight": 32720, "__),": 32721, "ĠParsed": 32722, "\":\"\",\"": 32723, "ReplicaSet": 32724, "truncated": 32725, "ĠChoose": 32726, "ĠIntegr": 32727, "BAP": 32728, "RID": 32729, "bGU": 32730, "Ġredraw": 32731, "htab": 32732, "(),{": 32733, "Ġrenamed": 32734, "ãĢĢ": 32735, "ĠcompareTo": 32736, "__[\\\"": 32737, "'-": 32738, "magento": 32739, "Addition": 32740, "IsSuccess": 32741, "ĠUndo": 32742, "Compliance": 32743, "pDest": 32744, "vsc": 32745, "getMap": 32746, "adt": 32747, "GetRequest": 32748, "Ġunlikely": 32749, "ĠVo": 32750, "avings": 32751, "COMPUT": 32752, "WEEN": 32753, "Ġdifferently": 32754, "模æĿ¿": 32755, "Ġredo": 32756, "devfn": 32757, "userinfo": 32758, "expectedResponse": 32759, "Ġbuffering": 32760, "obtain": 32761, "FontFamily": 32762, "ĠEventType": 32763, "RUPT": 32764, "asf": 32765, "ĠNX": 32766, "SUITE": 32767, "MMU": 32768, "LoadBalan": 32769, "(/<": 32770, "ilinear": 32771, "ñ": 32772, "Ġmeldingen": 32773, "SHR": 32774, "XmlSchema": 32775, "REGEXP": 32776, "ubuf": 32777, "ĠNIC": 32778, "FPS": 32779, "ĠDrawable": 32780, "ĠBUILD": 32781, "BSTR": 32782, "Managers": 32783, "ìļ": 32784, "Ġmpt": 32785, "Ġduplicated": 32786, "ftl": 32787, "Ġadc": 32788, "Separate": 32789, "qua": 32790, "ĠPACKET": 32791, "IsOpen": 32792, "ScriptContext": 32793, "ĠNodes": 32794, "igheid": 32795, "Ġideal": 32796, "gdbarch": 32797, "Ġcoding": 32798, "ĠWave": 32799, "Forced": 32800, "openElements": 32801, "ArgumentOutOfRangeException": 32802, "NOTIMPL": 32803, "GlobalVariable": 32804, "ĠUseful": 32805, "Ġ2560": 32806, "ZSTD": 32807, "jm": 32808, "à±": 32809, "imuth": 32810, "Ġnamelen": 32811, "locs": 32812, "logf": 32813, "1800": 32814, "instead": 32815, "Ġassignments": 32816, "ĠOutputs": 32817, "getLineTokens": 32818, "Purge": 32819, "uli": 32820, "appName": 32821, "Ġspill": 32822, "ĠHttpClient": 32823, "ĠProcessor": 32824, "rottled": 32825, "pnode": 32826, "izen": 32827, "asters": 32828, "ĠDOMElement": 32829, "affect": 32830, "oman": 32831, "ĠCi": 32832, "Ġnewdirfd": 32833, "phb": 32834, "Ġscales": 32835, "opsis": 32836, "ĉĉĉĉĉĉĉĉĉĉĉĉĉĉĉĉ": 32837, "RenderTexture": 32838, "Hom": 32839, "sL": 32840, "InSeconds": 32841, "Ġ==>": 32842, "AddCommand": 32843, "offsetof": 32844, "OrderId": 32845, "UVW": 32846, "ĠDOMDocument": 32847, "ThrowsException": 32848, "Vq": 32849, "Ġcvmx": 32850, "Ġ06": 32851, "ĠSur": 32852, "GetAddress": 32853, "GetProcess": 32854, "ĠgetItem": 32855, "contig": 32856, "NDB": 32857, "liner": 32858, "åĽĽ": 32859, "è¾ĵåĩº": 32860, "Ġbsize": 32861, "ĠTType": 32862, "Ġnewval": 32863, "ĠgetVersion": 32864, "LLDB": 32865, "spf": 32866, "065": 32867, "+\"_": 32868, "нÑı": 32869, "ĠParsing": 32870, "ĠByteArrayInputStream": 32871, "端": 32872, "Ic": 32873, "cable": 32874, "tween": 32875, "icp": 32876, "getR": 32877, "Ġ8192": 32878, "EXCL": 32879, "335": 32880, "optgroup": 32881, "ĠopLambda": 32882, "glVertex": 32883, "Ġtau": 32884, "627": 32885, "amap": 32886, "Ġber": 32887, "Ġvg": 32888, "Ġinbound": 32889, "Ġ83": 32890, "...))": 32891, "!=(": 32892, "optimized": 32893, "CFB": 32894, "Ġdsz": 32895, "Ġ(*[": 32896, "ĠLogic": 32897, "ConvertFrom": 32898, "448": 32899, "CONTACT": 32900, "ĠStructure": 32901, "COMPRESSED": 32902, "instantiate": 32903, "Ġshim": 32904, "intercept": 32905, "\"))&&": 32906, "778": 32907, "ÑģÑĤÑĢ": 32908, "SPROM": 32909, "ÂĻ": 32910, "ToUInt": 32911, "tpd": 32912, "gebra": 32913, "Transpose": 32914, "currentValue": 32915, "LASSERT": 32916, "BULK": 32917, "ĠDeletes": 32918, "ĠInvokeOptions": 32919, "_]*": 32920, "tweak": 32921, "estimator": 32922, "Orchestr": 32923, "SHADOW": 32924, "9652": 32925, "Secrets": 32926, "Ġdots": 32927, "PARTITION": 32928, "Ġbss": 32929, "Composer": 32930, "Ġstrips": 32931, "ãĤī": 32932, "ĠPhysical": 32933, "Np": 32934, "Ġnotified": 32935, "Ġunmarshall": 32936, "ĠRegexp": 32937, "ChangeType": 32938, "ĠLLV": 32939, "QuickFix": 32940, "auditStr": 32941, "Ġmicrotime": 32942, "WALK": 32943, "IAA": 32944, "hir": 32945, "mNum": 32946, "orum": 32947, "ĠNG": 32948, "GetNode": 32949, "Ġleftover": 32950, "Ġadf": 32951, "dotted": 32952, "Ġdescriptions": 32953, "getReference": 32954, "ĠHC": 32955, "Systems": 32956, "ĠExceptions": 32957, "Customers": 32958, "measurement": 32959, "travers": 32960, "ninja": 32961, "Ñį": 32962, "Getting": 32963, "ToLocal": 32964, "OTG": 32965, "vox": 32966, "ĠFileInputStream": 32967, "transformer": 32968, "jaxb": 32969, "STRUCTURE": 32970, "è¿ŀæİ¥": 32971, "cch": 32972, "dU": 32973, "during": 32974, "ĠaValue": 32975, ").(": 32976, "MapIndex": 32977, "CollectionChanged": 32978, "Ġpropag": 32979, "Ġprivilege": 32980, "Coroutine": 32981, "Ġprograms": 32982, "QUOTA": 32983, "chiKit": 32984, "Ġwebsocket": 32985, "Early": 32986, "atellite": 32987, ")#": 32988, "Due": 32989, "pmt": 32990, "ÂĤ": 32991, "ĠpH": 32992, "getCollection": 32993, "Ġwav": 32994, "ablk": 32995, "/*----------------------------------------------------------------------": 32996, "Ġupdater": 32997, "Ġemu": 32998, "propagate": 32999, "arball": 33000, "TearDown": 33001, "Ġclaims": 33002, "hear": 33003, "Ġalthough": 33004, "ViewState": 33005, "bitmask": 33006, "SPA": 33007, "PZ": 33008, "Ġcsum": 33009, "Ġinvoice": 33010, "filestream": 33011, "OMX": 33012, "spent": 33013, "GETE": 33014, "ByRef": 33015, "ContentLoaded": 33016, "Ġperl": 33017, "Clipping": 33018, "abcdefghijklmnopqrstuvwxyz": 33019, "tainted": 33020, "908": 33021, "Qv": 33022, "Ġdictionaries": 33023, "ĠSynchron": 33024, "Ġ[]).": 33025, "SCLK": 33026, "ĠARC": 33027, "onMatch": 33028, "etency": 33029, "ĠDocker": 33030, "Ġrss": 33031, "Ġxhci": 33032, "itect": 33033, "ĉĉĉĉĉĉĉĊ": 33034, "MouseOver": 33035, "Ġlookahead": 33036, "ĠMOVE": 33037, "Spelling": 33038, "Ascending": 33039, "Ġvxge": 33040, "Dma": 33041, "Tiny": 33042, "Ġintensity": 33043, "assertIdentical": 33044, "ĠUnder": 33045, "unlocked": 33046, "Ġpasswd": 33047, "ĠUNZ": 33048, "ĠSigned": 33049, "ĠCRYPT": 33050, "FHIR": 33051, "dtypes": 33052, "Ġfsm": 33053, "Reuse": 33054, "Ġpostfix": 33055, "âĢĿ": 33056, "DENIED": 33057, "Etag": 33058, "blogs": 33059, "ĠDistribution": 33060, "Ġreadb": 33061, "MemberType": 33062, "quantized": 33063, "NONBLOCK": 33064, "ISCSI": 33065, "toolStripSeparator": 33066, "DDS": 33067, "Nest": 33068, "ĠHz": 33069, "ieved": 33070, "DeleteOptions": 33071, "Ġ'\".$": 33072, "rtlphy": 33073, "ĠPRIu": 33074, "Ġfractional": 33075, "ribed": 33076, "ĠMBean": 33077, "lockres": 33078, "initiator": 33079, "ThrowException": 33080, "æĺİ": 33081, "Breaks": 33082, "Branches": 33083, "ComplexType": 33084, "(/\\|[^|]*?$/,\"": 33085, "(/\\|[^|]*?$/,\"|\"+": 33086, "kid": 33087, "alax": 33088, "Ġstk": 33089, "ĠIts": 33090, "ĠJSONRPCError": 33091, "getDefinition": 33092, "ibatch": 33093, "epfd": 33094, "lastChild": 33095, "ĠColl": 33096, "diagonal": 33097, "OCTET": 33098, "Fin": 33099, "bsize": 33100, "Ġdag": 33101, "ĠConcurrent": 33102, "RDMA": 33103, "PANEL": 33104, "ĠSTORE": 33105, "cfs": 33106, "iri": 33107, "decomp": 33108, "cep": 33109, "ĠpInfo": 33110, "assessment": 33111, "maxValue": 33112, "Ġ79": 33113, "sysvals": 33114, "Ġtrivial": 33115, "databases": 33116, ")\":": 33117, "UCODE": 33118, "ĠgetKey": 33119, "ĠGl": 33120, "ĠcurrentState": 33121, "NullPointerException": 33122, "ĠRawSyscallNoError": 33123, "rbuf": 33124, "thickness": 33125, "ĠCERT": 33126, "Ġhier": 33127, "GetMax": 33128, "createClass": 33129, "VEH": 33130, "ä»»": 33131, "movexattr": 33132, "tfoot": 33133, "ĠPAL": 33134, "GetFirst": 33135, "ĠcolumnName": 33136, "ĠLuaAPI": 33137, "Optimized": 33138, "Machines": 33139, "destructor": 33140, "Ġrecipe": 33141, "Ġ[\\": 33142, "Ġrdata": 33143, "ListSize": 33144, "IMR": 33145, "ãĤ¢": 33146, "PERSIST": 33147, "LVL": 33148, "ĠNORMAL": 33149, "FString": 33150, "PropertyDescriptor": 33151, "layouts": 33152, "ĠDebugLoc": 33153, "ĠDiscard": 33154, "Xp": 33155, "eos": 33156, "Ġpandas": 33157, "Exif": 33158, "Ġresid": 33159, "beam": 33160, "aad": 33161, "mcp": 33162, "ignoreCase": 33163, "ão": 33164, "Pokemon": 33165, "circular": 33166, "lime": 33167, "mur": 33168, "getUn": 33169, "coefficient": 33170, "ola": 33171, "Ġsecp": 33172, "ĠBCM": 33173, "ĠLEB": 33174, "UNIF": 33175, "ServiceAccount": 33176, "340": 33177, "SendAsync": 33178, "executed": 33179, "xFFFFFF": 33180, "executeQuery": 33181, "tau": 33182, "Temporal": 33183, "ĠJSOP": 33184, "patches": 33185, "管": 33186, "QSize": 33187, "datal": 33188, "sval": 33189, "//\",": 33190, "Ġwo": 33191, "Ġwtx": 33192, "Stable": 33193, "CREATED": 33194, "yyyyyyyy": 33195, "SAMPLES": 33196, "singletonList": 33197, "IOMUXC": 33198, "è§ĦåĪĻ": 33199, "OZ": 33200, "rws": 33201, "warm": 33202, "ripple": 33203, "ĠJAXB": 33204, "QueryResult": 33205, "Ġpredefined": 33206, "0938": 33207, "losses": 33208, "Ġxyz": 33209, "å¢ŀ": 33210, "getvalue": 33211, "hematic": 33212, "Ġecs": 33213, "596": 33214, "RenderState": 33215, "Bluetooth": 33216, "OSIX": 33217, "ĠPOS": 33218, "UpdateTime": 33219, "=\\\"${": 33220, "innerHeight": 33221, "CALC": 33222, "itt": 33223, "verbs": 33224, "ValueList": 33225, "Ġgetsockopt": 33226, "Ġjclass": 33227, "VarDecl": 33228, "datatable": 33229, "ProtocolVersion": 33230, "ĠPCIE": 33231, "Ġeffectively": 33232, "çĦ": 33233, "increase": 33234, "Ġglfw": 33235, "RESTART": 33236, "ĠgetPath": 33237, "MANAGE": 33238, "Ignoring": 33239, "idl": 33240, "icsk": 33241, "Ġmong": 33242, "initialization": 33243, "ãģį": 33244, "éĹŃ": 33245, ")...)": 33246, "startRow": 33247, "memcg": 33248, "MUTE": 33249, "getVariable": 33250, "textbox": 33251, "maxResults": 33252, "assume": 33253, "GHZ": 33254, "Ġdatalen": 33255, "concrete": 33256, "Ġstv": 33257, "Ġforces": 33258, "Ġusual": 33259, "cmNl": 33260, "ĠViewGroup": 33261, "ĠSYSTEM": 33262, "uclidean": 33263, "OHM": 33264, "dT": 33265, "racy": 33266, "ĠLat": 33267, "Ġiterating": 33268, "daysMin": 33269, "ĠNdbDictionary": 33270, "Ġinspects": 33271, "BROADCAST": 33272, "-*/": 33273, "nbuf": 33274, "pObject": 33275, "sdr": 33276, "Ġtu": 33277, "ĠBank": 33278, "shp": 33279, "been": 33280, "Ġlogo": 33281, "BUtil": 33282, "Ġcontrolled": 33283, "parameterOrder": 33284, "Ġcerts": 33285, "Ġassumption": 33286, "toHaveBeenCalled": 33287, "Birth": 33288, "sR": 33289, "MBOX": 33290, "ZGV": 33291, "kana": 33292, "alnum": 33293, "(\"\"));": 33294, "ĠRpc": 33295, "pathinfo": 33296, "Ġradians": 33297, "ĠDigest": 33298, "erb": 33299, "ĠPWM": 33300, "STDOUT": 33301, "ExceptionHandler": 33302, "ITrans": 33303, "freqs": 33304, "LINKAT": 33305, "ĠStreamReader": 33306, "Ġeliminate": 33307, "ĠSHOULD": 33308, "ĠDAT": 33309, "ĠWI": 33310, "ей": 33311, "ĠRunning": 33312, "(\"(%": 33313, "ĠTax": 33314, "GetPlayer": 33315, "SEVER": 33316, "ĠstartState": 33317, "ERRORS": 33318, "ĠVALID": 33319, "Shortcuts": 33320, "ioport": 33321, "CareContext": 33322, "BCB": 33323, "HKEY": 33324, "LAND": 33325, "exynos": 33326, "Ġether": 33327, "STO": 33328, "Ġasio": 33329, "assertString": 33330, "ĠoutputStream": 33331, "observable": 33332, "runOn": 33333, "Ġoctal": 33334, "KU": 33335, "tone": 33336, "vdd": 33337, "IDB": 33338, "ĠcurrentIndex": 33339, "MethodType": 33340, "576": 33341, "Ġsmu": 33342, "lore": 33343, "Ġdow": 33344, "Ġ_:": 33345, "ENE": 33346, "classification": 33347, "IVED": 33348, "Ġblacklist": 33349, "Tries": 33350, "yui": 33351, "getReal": 33352, "imen": 33353, "Ġly": 33354, "ĠcurrentNode": 33355, "MemOperand": 33356, "...\";": 33357, "polar": 33358, "glad": 33359, "transforms": 33360, "Ġpractice": 33361, "HNl": 33362, "]\").": 33363, "pE": 33364, "ĠmData": 33365, "getLevel": 33366, "ĠDN": 33367, "Cool": 33368, "resourceName": 33369, "Moves": 33370, "requirement": 33371, "23885": 33372, "ointee": 33373, "scales": 33374, "Colours": 33375, "BracePos": 33376, "BURST": 33377, "capi": 33378, "mplY": 33379, "Deleting": 33380, "ĠWID": 33381, "ĠsourceFile": 33382, "Ġmei": 33383, "ĠIObservable": 33384, "Ġunderstand": 33385, "åİ»": 33386, "missed": 33387, "YSize": 33388, "InPlace": 33389, "ĠCMS": 33390, "shade": 33391, "2063": 33392, "Ġcomplain": 33393, "CaseInsensitive": 33394, "ĠDataSet": 33395, "Ġrecognize": 33396, "Announce": 33397, "#{@": 33398, "FAT": 33399, "Km": 33400, "inese": 33401, "IDL": 33402, "Ġoverlaps": 33403, "ĠviewModel": 33404, "Intervals": 33405, "æķ´": 33406, "Ġpropagation": 33407, "пÑĢ": 33408, "CodedOutputStream": 33409, "UmVhY": 33410, "/);": 33515, "`),": 33516, "feeds": 33517, "Ġktime": 33518, "996": 33519, "379": 33520, "EmailAddress": 33521, "saturation": 33522, "Ġobsolete": 33523, "CQUF": 33524, "ere": 33525, "tY": 33526, "inArray": 33527, "collected": 33528, "tpm": 33529, "outputFile": 33530, "APSE": 33531, "Popover": 33532, "EXECUTE": 33533, "REFERENCED": 33534, "ĠRotation": 33535, "Ġnss": 33536, "cof": 33537, "ĠSUN": 33538, "......": 33539, "å¼Ĥ": 33540, "CALIB": 33541, "ĠWHEN": 33542, "Bij": 33543, "cvmx": 33544, "onBefore": 33545, "quet": 33546, "mdsc": 33547, "QueryParameters": 33548, "ĠEncrypt": 33549, "EditText": 33550, "ĠmenuItem": 33551, "RemoteException": 33552, "ALGOR": 33553, "CLEANUP": 33554, "stonesoup": 33555, "410": 33556, "restricted": 33557, "Ġcnic": 33558, "Ġsized": 33559, "imity": 33560, "ĠgetC": 33561, "Ġ#>": 33562, "ObjectArray": 33563, "TimeTo": 33564, "fts": 33565, "Ġexistence": 33566, "Ġpromises": 33567, "496729": 33568, "PLANE": 33569, "ncurses": 33570, "xmax": 33571, "Ġvn": 33572, "ubmit": 33573, "ĠgetTitle": 33574, "Ġje": 33575, "psmouse": 33576, "LineLength": 33577, "inputStream": 33578, "ĠLLC": 33579, "stag": 33580, "Ġcub": 33581, "ĠManaged": 33582, "addCommand": 33583, "Factories": 33584, "7511": 33585, "Instrumentation": 33586, "ĠDrupal": 33587, "javadoc": 33588, "ĠAns": 33589, "Ġnews": 33590, "__(\"": 33591, "BBI": 33592, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĊ": 33593, "StackObject": 33594, "DbContext": 33595, "bow": 33596, "cad": 33597, "fimc": 33598, "Ġ(+": 33599, "aside": 33600, "ods": 33601, "testName": 33602, "ĠLR": 33603, "NewString": 33604, "ĠYes": 33605, "ĠClassNotFoundException": 33606, "ARRAYIDX": 33607, "åıijéĢģ": 33608, "ValueObjectBean": 33609, "ifindex": 33610, "Ġ202": 33611, "Ġalone": 33612, "ĠAnonymous": 33613, "Ġobservation": 33614, "Ġcomputer": 33615, "ĠTIMx": 33616, "Ġfewer": 33617, "Ġccb": 33618, "getPlugin": 33619, "getColumns": 33620, "ĠMULT": 33621, "Ġsplitting": 33622, "Ġ\"$\",": 33623, "LICENSE": 33624, "ĠUBIFS": 33625, "'&": 33626, "(::": 33627, "Dv": 33628, "ĠBOM": 33629, "Masked": 33630, "tipc": 33631, "ĠOrig": 33632, "Jvb": 33633, "rmap": 33634, "uron": 33635, "ĠpThis": 33636, "ĠAsn": 33637, "opr": 33638, "ToDocument": 33639, "variation": 33640, "{}]": 33641, "Searcher": 33642, "FRAMES": 33643, "ä¸įèĥ½": 33644, "ĠPersistent": 33645, "ĠPRIx": 33646, "ĠBufferedReader": 33647, "Ġunreachable": 33648, "znode": 33649, "imens": 33650, "==|": 33651, "Ġatm": 33652, "ForAll": 33653, "hosted": 33654, "Stylesheet": 33655, "controlled": 33656, "throwException": 33657, "DoubleClick": 33658, "communicate": 33659, "ĠCEPH": 33660, "Ġecore": 33661, "\")})": 33662, "AAAB": 33663, "RequestContext": 33664, "Appender": 33665, "GLfloat": 33666, "domainFactory": 33667, "ล": 33668, "screenshot": 33669, "sensors": 33670, "NewErrParamMinLen": 33671, "?>(\"": 33672, "Gold": 33673, "mak": 33674, "Ġvga": 33675, "setAuto": 33676, "continuation": 33677, "udmFy": 33678, "Lobby": 33679, "lsm": 33680, "DDDo": 33681, "Ġinitialise": 33682, "|\\\\.": 33683, "Fragments": 33684, ":]:": 33685, "EEXIST": 33686, "dataGridView": 33687, "codeCoverage": 33688, "ĠProcessing": 33689, "RESTORE": 33690, "ĠcutVer": 33691, "TraceSourceAccessor": 33692, "eight": 33693, "hFile": 33694, "vibr": 33695, "osm": 33696, "ptrace": 33697, "MinLength": 33698, "Layouts": 33699, "ĠTimeval": 33700, "ĠIPV": 33701, "UpperBound": 33702, "mFt": 33703, "BABA": 33704, "8994": 33705, "Ka": 33706, "Xn": 33707, "pmap": 33708, "::*": 33709, "000000000000": 33710, "ISupports": 33711, "prect": 33712, "preparer": 33713, "订åįķ": 33714, "\",[\"": 33715, "rench": 33716, "ĠMK": 33717, "ĠLike": 33718, "Translated": 33719, "allows": 33720, "parsedFrame": 33721, "Gs": 33722, "GetTarget": 33723, "Dequeue": 33724, "doubleValue": 33725, "Ġucfirst": 33726, "Ghpcy": 33727, "OData": 33728, "csa": 33729, "isSecond": 33730, "Ġ\\''": 33731, "pict": 33732, "crements": 33733, "ĠOutputStream": 33734, "ĠPerf": 33735, "paginate": 33736, "Ġmeasured": 33737, "KQ": 33738, "PJ": 33739, "Ġgss": 33740, "verifier": 33741, "objectId": 33742, "MCInst": 33743, "Adaptor": 33744, "vtable": 33745, "intc": 33746, "heres": 33747, "ĠMlock": 33748, "Ġregistering": 33749, "ĠTokenType": 33750, "customerId": 33751, "ĠTemporary": 33752, "Creds": 33753, "}\"/>": 33754, "decrement": 33755, "Ġoob": 33756, "btv": 33757, ")}).": 33758, ".:": 33759, "Lw": 33760, "tj": 33761, "(\"(\"": 33762, "ĠSimplify": 33763, "Rebuild": 33764, "ĠRecursive": 33765, "ĠtextAfter": 33766, "containerArray": 33767, "ĠconvertTo": 33768, "preds": 33769, "Ġanswers": 33770, "IHJlc": 33771, "seller": 33772, "nmi": 33773, "Ġ{_": 33774, "getNumberOf": 33775, "ĠCos": 33776, "dateElement": 33777, "Ġzap": 33778, "ĠqWarning": 33779, "ĠUnmarshall": 33780, "Hosting": 33781, "Ġconnectivity": 33782, "Ġprivileges": 33783, "+\":": 33784, "Ei": 33785, "Ih": 33786, "pU": 33787, "Ġdos": 33788, "\"]'": 33789, "AndFeel": 33790, "508": 33791, "XMLHttpRequest": 33792, "Ġ')');": 33793, "Ġcombinations": 33794, "Ideal": 33795, "Capt": 33796, "ĠÂ": 33797, "detector": 33798, "FunctionKey": 33799, "+'/": 33800, "Ġcreds": 33801, "ĠMotionEvent": 33802, "266": 33803, "dF": 33804, "isZero": 33805, "ĠpParse": 33806, "ĠSEM": 33807, "shinfo": 33808, "Ġkeypoints": 33809, "ĠQP": 33810, "Ġscanned": 33811, "Ġreplacements": 33812, "ategorie": 33813, "éĢļè¿ĩ": 33814, "ĉĠĊ": 33815, "chnl": 33816, "devdoc": 33817, "preempt": 33818, "WithNo": 33819, "intervals": 33820, "Stereo": 33821, "valueType": 33822, "Ġstripe": 33823, "AttributeProperties": 33824, "Ġsearches": 33825, "ï¼Į\\": 33826, "exactly": 33827, "SourceMapConsumer": 33828, "qQ": 33829, "Ġmob": 33830, "ĠInvocation": 33831, "ĠGetEnumerator": 33832, "0007": 33833, "ColumnHeader": 33834, "pagesize": 33835, "Ġ'$'": 33836, "转æį¢": 33837, "Hb": 33838, "hDlg": 33839, "srl": 33840, "Ġleap": 33841, "HasEvents": 33842, "ProductId": 33843, "BDB": 33844, "CstyleBehaviour": 33845, "pnum": 33846, "Ġnano": 33847, "getDouble": 33848, "getFileName": 33849, "ĠISC": 33850, "newval": 33851, "oles": 33852, "Isolation": 33853, "MessageID": 33854, "HttpServletRequest": 33855, "è·¯çĶ±": 33856, "Nsec": 33857, "Ġbon": 33858, "Ġhfs": 33859, "rcd": 33860, "ĠQFile": 33861, "Ġbacklog": 33862, "DOOR": 33863, "Webkit": 33864, "ĠCharSequence": 33865, "RoundTripper": 33866, "Npm": 33867, "lands": 33868, "zw": 33869, "quat": 33870, "attrname": 33871, "EntryPoint": 33872, "ĠpageToken": 33873, "Ġcopyright": 33874, "fetchAll": 33875, "ĠawsRequestMetrics": 33876, "DependencyObject": 33877, "///////////////////////////////////////////////////////////////////////////////": 33878, "*}": 33879, "uations": 33880, "english": 33881, "ĠPretty": 33882, "CAS": 33883, "Ġ\"-\\": 33884, "CREAT": 33885, "highlighted": 33886, "Ġincremented": 33887, "ĠCRLF": 33888, ")(&": 33889, "sof": 33890, "DBInstance": 33891, "ByteCount": 33892, "glBind": 33893, "enums": 33894, "Polymorphic": 33895, "ĠCURRENT": 33896, "Iu": 33897, "ĠMunlock": 33898, "bev": 33899, "PropertyNames": 33900, "997": 33901, "gressive": 33902, "BRACE": 33903, "Swg": 33904, "*')": 33905, "Bj": 33906, "UED": 33907, "Ġbrcmf": 33908, "Ġ<>": 33909, "Continuous": 33910, "Ġbreaking": 33911, "ActionEvent": 33912, "339": 33913, "Ġmarket": 33914, "releases": 33915, "Ġ'\"':": 33916, "Trivia": 33917, "Ġconsisting": 33918, "ĠMockery": 33919, "Privileges": 33920, "Ġclipping": 33921, "Ġintrinsic": 33922, "KZ": 33923, "bfin": 33924, "dE": 33925, "Ġ220": 33926, "ĠmaxValue": 33927, "ishlist": 33928, "ĠFormatter": 33929, "为空": 33930, "436": 33931, "LCA": 33932, "Slope": 33933, "]').": 33934, "kHz": 33935, "ĠMutex": 33936, "ĠFTP": 33937, "Traces": 33938, "+\"-": 33939, "BinOp": 33940, "ä¹Ł": 33941, "susp": 33942, "ĠSEQ": 33943, "SetDefault": 33944, "Ġzr": 33945, "ĠgroupId": 33946, "Ġopcodes": 33947, "ĠNames": 33948, "ĠSTACK": 33949, "azard": 33950, "8712": 33951, "RemoteStorage": 33952, "Ġfilp": 33953, "Cyl": 33954, "getTop": 33955, "Removing": 33956, "serdes": 33957, "ALREADY": 33958, "Descendant": 33959, "hashtable": 33960, "035": 33961, "ynamodb": 33962, "DOMFactory": 33963, "à¹ī": 33964, "ĠPrice": 33965, "bci": 33966, "kan": 33967, "Decrement": 33968, "prv": 33969, "ANN": 33970, "Defer": 33971, "ĠfullPath": 33972, "friends": 33973, "Ġnlm": 33974, "ĠpFile": 33975, "lio": 33976, "SetFloat": 33977, "ĠtestData": 33978, "ResourceList": 33979, "SPY": 33980, "Radians": 33981, "declarations": 33982, "icm": 33983, "resizer": 33984, "viafb": 33985, "ĠBottom": 33986, "ĠsetType": 33987, "Ġparms": 33988, "Ġbasedir": 33989, "aWxk": 33990, "SecurityException": 33991, "Ñĺ": 33992, "Ġmlib": 33993, "ĠITE": 33994, "ĠPages": 33995, "ĠelementType": 33996, "Skew": 33997, "ой": 33998, "cancelled": 33999, "Ġoctets": 34000, "éĹ®": 34001, "Õ¡Õ": 34002, "]\"},{": 34003, "fli": 34004, "getLeft": 34005, "ipu": 34006, "ĠRATE": 34007, "ĠESP": 34008, "nodeid": 34009, "PRS": 34010, "ĠInterlocked": 34011, "æĶ¶": 34012, ")(*": 34013, "PMA": 34014, "aGU": 34015, "efault": 34016, "inbox": 34017, "fog": 34018, "((_": 34019, "srf": 34020, "Ġ\"{\\": 34021, "Ġ\"{\\\"": 34022, "dsaf": 34023, "WATER": 34024, "kvp": 34025, "getBo": 34026, "cobra": 34027, "DeleteCall": 34028, "SELECTOR": 34029, "zoek": 34030, "xss": 34031, "âĪ": 34032, "Ġbring": 34033, "GetContent": 34034, "typeid": 34035, "ĠRay": 34036, "cci": 34037, "ĠHandlebars": 34038, "touched": 34039, "617": 34040, "ZCB": 34041, "brew": 34042, "cocos": 34043, "(\"~/": 34044, "Ġtowards": 34045, "shards": 34046, "serving": 34047, "Ġxa": 34048, "ClassType": 34049, "243": 34050, "/******************************************************************************": 34051, "{`&": 34052, "emphasis": 34053, "PCH": 34054, "Ġ%>": 34055, "):]": 34056, "commod": 34057, "nextElement": 34058, "Ending": 34059, "VERY": 34060, "Ġtraces": 34061, "crs": 34062, "BoolValue": 34063, "venient": 34064, "simd": 34065, "ĠMinor": 34066, "Cf": 34067, "IUnknown": 34068, "pfc": 34069, "|:": 34070, "Ġcumulative": 34071, "()})}": 34072, "Remap": 34073, "paramValue": 34074, "Triggered": 34075, "OPTS": 34076, "470": 34077, "pstr": 34078, "roi": 34079, "()!=": 34080, "Ġ\"(%": 34081, "Ġmimetype": 34082, "ĠACC": 34083, "ĠisNaN": 34084, "feof": 34085, "SELECTION": 34086, "MapEntry": 34087, "CONVERT": 34088, "ĠCombo": 34089, "ож": 34090, "Convolution": 34091, "BNX": 34092, "æݧ": 34093, "recurse": 34094, "ddTHH": 34095, "Ġvy": 34096, "Ġrenew": 34097, "NameTo": 34098, "Ġymin": 34099, "ATIONS": 34100, "wxString": 34101, "Ctr": 34102, "MZ": 34103, "pCurrent": 34104, "atlas": 34105, "ĠQEvent": 34106, "rawData": 34107, "currentToken": 34108, "Reflow": 34109, "Adv": 34110, "BUFSIZE": 34111, "Ġblah": 34112, "ĠDecrement": 34113, "fstat": 34114, "rvalue": 34115, "ticker": 34116, "åł": 34117, "setModel": 34118, "(?:\"+": 34119, "shouldTrace": 34120, "prefixed": 34121, "Ġsucc": 34122, "Diags": 34123, "eslachts": 34124, "ê¸": 34125, "ande": 34126, "('~": 34127, "ĠnewSize": 34128, "ĠFac": 34129, "ResourceId": 34130, "CacheSize": 34131, "SecurityContext": 34132, "Authoring": 34133, "following": 34134, "Nom": 34135, "PSE": 34136, "igence": 34137, "Ġ!!!": 34138, "rrd": 34139, "periph": 34140, "ĠETag": 34141, "ĠRestart": 34142, "((::": 34143, "Beg": 34144, "searching": 34145, "Ġcyl": 34146, "mxl": 34147, "youtube": 34148, "Ġfav": 34149, "Ġ\".\");": 34150, "Ġhpi": 34151, "ĠBSS": 34152, "ĠXR": 34153, "IGlu": 34154, "ENTIAL": 34155, "Refer": 34156, "Ġnpm": 34157, "ĠjsonWriter": 34158, "ĠQuestion": 34159, "KN": 34160, "pNdb": 34161, "tms": 34162, "twl": 34163, "rounded": 34164, "expectedResult": 34165, "HandleFunc": 34166, "TypedArray": 34167, "626": 34168, "Fsm": 34169, "getChannel": 34170, "Ġdce": 34171, "GetAsync": 34172, "((?": 34173, "ccd": 34174, "Ġcounted": 34175, "vmw": 34176, "LIR": 34177, "Ġrotated": 34178, "hyphenate": 34179, "ĠĠĠĠĉĊ": 34180, "Ġcxx": 34181, "ICP": 34182, "])}]": 34183, "Quot": 34184, "Ifc": 34185, "à®ķ": 34186, "BIGINTEGER": 34187, "ĠABORT": 34188, "Fre": 34189, "HIDE": 34190, "OQ": 34191, "amer": 34192, "Ġay": 34193, "rcp": 34194, "PtrTo": 34195, "ImageUrl": 34196, "MenuItems": 34197, "shortname": 34198, "SerializeToString": 34199, "Ġ==========================": 34200, "ĠActiveRecord": 34201, "Coder": 34202, "Ġ=================================================": 34203, "ListEntry": 34204, "Ġ384": 34205, "Classname": 34206, "...')": 34207, "Photos": 34208, "agents": 34209, ".);": 34210, "607": 34211, "getClassName": 34212, "ĠUpgrade": 34213, "ĠOutputService": 34214, "Magnitude": 34215, "Xt": 34216, "mtr": 34217, "qml": 34218, "ython": 34219, "NameSpace": 34220, "ensing": 34221, "Ġkl": 34222, "])?": 34223, "LOCALE": 34224, "ĠToLua": 34225, "ĠInputArgument": 34226, "ĠHealth": 34227, "COMPLETED": 34228, "à¹Ģ": 34229, "Ġfourth": 34230, "ĠServiceClientTracing": 34231, ")();": 34232, "æ": 34233, "Ġgy": 34234, "ramid": 34235, "={$": 34236, "CoreApplication": 34237, "Ġ'#')": 34238, "aXM": 34239, "æĿ¡ä»¶": 34240, "ĠSIMPLEPIE": 34241, "ĠLATIN": 34242, "Broad": 34243, "san": 34244, "Ġdct": 34245, "Ġsplice": 34246, "KIT": 34247, "Âģ": 34248, "isnan": 34249, "Ġshop": 34250, "bytecode": 34251, "ĠISDN": 34252, "VectorType": 34253, "Paged": 34254, "YWNr": 34255, "Ч": 34256, "ĠPad": 34257, "saw": 34258, "Customize": 34259, "=\\\"{": 34260, "Retention": 34261, "reserving": 34262, "Allows": 34263, "Ġprecise": 34264, "ĠRenderer": 34265, "aarch": 34266, "mY": 34267, "ĠSSA": 34268, "triangles": 34269, "borderColor": 34270, "ĠCodec": 34271, "strides": 34272, "launcher": 34273, "ĠMkdir": 34274, "LoggedIn": 34275, "Cats": 34276, "Gf": 34277, "idable": 34278, "Ġ08": 34279, "Ġ254": 34280, "Ġshm": 34281, "Ġreadline": 34282, "Ġgravity": 34283, "HISTORY": 34284, "*:": 34285, "Ġ\"]\"": 34286, "ĠAverage": 34287, "ĠFront": 34288, "Ġjit": 34289, "SIP": 34290, "replication": 34291, "collectionName": 34292, "Ġetag": 34293, "raiseError": 34294, "icipants": 34295, "ĠAUDIO": 34296, "=.": 34297, "EPOLL": 34298, "PSS": 34299, "ystack": 34300, "Discharge": 34301, "FLERR": 34302, "åĨĮ": 34303, "Polling": 34304, "åijĺ": 34305, "Calculates": 34306, "bolt": 34307, "qed": 34308, "xref": 34309, "Ġconcept": 34310, "Ġsticky": 34311, "Ġ60000": 34312, "colorIdx": 34313, "Slices": 34314, "captured": 34315, "pstest": 34316, "Ãĩ": 34317, "Ġwarm": 34318, "Ġuwb": 34319, "ĠMSB": 34320, "++$": 34321, "ĠlocalStorage": 34322, "MinorVersion": 34323, "nice": 34324, "setScale": 34325, "ĠTakes": 34326, "comedi": 34327, "Ġfreeing": 34328, "Necessary": 34329, "<=|": 34330, "Knob": 34331, "xlate": 34332, "Ġ*));": 34333, "ĠgetView": 34334, "iova": 34335, "EventName": 34336, "tableFuture": 34337, "ivicrm": 34338, ">\".": 34339, "cksum": 34340, "+++": 34341, "Shaders": 34342, "pads": 34343, "ĠGNEAttributeProperties": 34344, "comps": 34345, "WriteAll": 34346, "Ġpools": 34347, "ĠMochiKit": 34348, "Fence": 34349, "cbs": 34350, "horiz": 34351, "vpc": 34352, "éĸ": 34353, "Ġfdt": 34354, "Ġencaps": 34355, "nouveau": 34356, "ĠJavascript": 34357, "Ġdropping": 34358, "Grab": 34359, "Held": 34360, "lL": 34361, "season": 34362, "ĠoSettings": 34363, "Ġdeltas": 34364, "Season": 34365, "UNZ": 34366, "ĠCompression": 34367, "ttf": 34368, "Annotated": 34369, "Digital": 34370, "2028": 34371, "ztBQU": 34372, "Exponential": 34373, "ĠGCC": 34374, "ĠtestCases": 34375, "RTMP": 34376, "hsync": 34377, "InternalType": 34378, "GMAC": 34379, "onUpdate": 34380, "Stapel": 34381, "Datas": 34382, "ĠVA": 34383, "Ġdistributions": 34384, "Hang": 34385, "Wp": 34386, "flock": 34387, "ĠSCE": 34388, "Unichar": 34389, "ĠQPainter": 34390, "contentWindow": 34391, "SelectedItems": 34392, "Ġmaterials": 34393, "对åºĶ": 34394, "Truncated": 34395, "Fib": 34396, "Ġ----------------------------------------": 34397, "relevant": 34398, "ilde": 34399, "getUri": 34400, "ĠSpawn": 34401, "elementAt": 34402, "responseChan": 34403, "DirPath": 34404, "Ġmoq": 34405, "nZX": 34406, "Õ«": 34407, "ç¦": 34408, "Ġsynthetic": 34409, "errc": 34410, "CreateFile": 34411, "Descendants": 34412, "bye": 34413, "GLuint": 34414, "BorderColor": 34415, "1105": 34416, "assertEqualInt": 34417, "toolStripButton": 34418, "ĠLWIP": 34419, "987": 34420, "Ġmir": 34421, "ĠmLoc": 34422, "']=$": 34423, "EventImpl": 34424, "OKAY": 34425, "ĠUnregister": 34426, "æĸĩåŃĹ": 34427, "solr": 34428, "946": 34429, "rang": 34430, "ĠApache": 34431, "PerPixel": 34432, "Ġattrname": 34433, "ãĤĬ": 34434, "Ġentering": 34435, "gradients": 34436, "Frozen": 34437, "`\",": 34438, "circuit": 34439, "tvar": 34440, "â": 34441, "ĉĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 34442, "ĠENOMEM": 34443, "Ġelect": 34444, "prhs": 34445, "ADB": 34446, "FFIC": 34447, "ĠDead": 34448, "ULATION": 34449, "Passphrase": 34450, "Ġspecifically": 34451, "Ġfills": 34452, "ĠENCODING": 34453, "Xil": 34454, "dptr": 34455, "isRunning": 34456, "Ġpcb": 34457, "getOrCreate": 34458, "ĠSORT": 34459, "Unordered": 34460, "Ġstrtr": 34461, "ĠGlobalValue": 34462, "ĠFeatures": 34463, "potential": 34464, "Treatment": 34465, "Dex": 34466, "Vv": 34467, "wcn": 34468, "Äħ": 34469, "Ġ'\"+": 34470, "ĠBUG": 34471, "ĠHEX": 34472, "Ġswitches": 34473, "ParameterCodec": 34474, "Marked": 34475, "(\",\",": 34476, "Brackets": 34477, "ĠActivate": 34478, "XMIT": 34479, "xM": 34480, "dbm": 34481, "constructed": 34482, "vocabulary": 34483, "sclude": 34484, "Fleet": 34485, "sFor": 34486, "setInput": 34487, "ĠTOKEN": 34488, "Ġudf": 34489, "Confirmed": 34490, "Corners": 34491, "PKIX": 34492, "ZipFile": 34493, "@@@@@@@@@@": 34494, "sprites": 34495, "ĠSIZEOF": 34496, "Ġmtx": 34497, "Ġltrim": 34498, "addons": 34499, "LEGACY": 34500, "regid": 34501, "arden": 34502, "ĠOperands": 34503, "AILQ": 34504, "ĠCRYP": 34505, "fusion": 34506, "ctls": 34507, "Ġcriterion": 34508, "prc": 34509, "ppv": 34510, "ĠcurrentValue": 34511, "NotIn": 34512, "streamID": 34513, "ĠVARCHAR": 34514, "Instantiate": 34515, "543": 34516, "dcd": 34517, "dumper": 34518, "toff": 34519, "ĠDCT": 34520, "ĠPSR": 34521, "riven": 34522, "Ġoutbound": 34523, "itemid": 34524, "Precedence": 34525, "ĠTestFmt": 34526, "exitCode": 34527, "Ġdirent": 34528, "ĠserializedObject": 34529, "ervic": 34530, "Iq": 34531, "Ġpor": 34532, "OND": 34533, "\":(": 34534, "HeaderSize": 34535, "materials": 34536, "Deny": 34537, "PollFd": 34538, "ABCDEFGHI": 34539, "Wg": 34540, "Ġbssid": 34541, "getNew": 34542, "')\");": 34543, "Ġ302": 34544, "Shares": 34545, "createNew": 34546, "VarName": 34547, "ControlPoint": 34548, "720": 34549, "ĠSat": 34550, "ToFloat": 34551, "STICK": 34552, "argmax": 34553, "rounds": 34554, "ApiClient": 34555, "VolumeAttachment": 34556, "getZExtValue": 34557, "ĠDROPDOWN": 34558, "Ġhx": 34559, "0935": 34560, "Currently": 34561, "åĪ«": 34562, "getAttributeValue": 34563, "Ġocteon": 34564, "camelCase": 34565, "GUEST": 34566, "inverted": 34567, "Ġdcb": 34568, "llis": 34569, "||{};": 34570, "snmp": 34571, "EncodeString": 34572, "Decoded": 34573, "hbWU": 34574, "gerservic": 34575, "ĠLegacy": 34576, "GAP": 34577, "Ġlay": 34578, "Ġsdata": 34579, "('?": 34580, "Exposure": 34581, "addNode": 34582, "writeFile": 34583, "oldier": 34584, "ABL": 34585, "ĠFIRST": 34586, "Ġcommits": 34587, "idu": 34588, "getTableName": 34589, "028": 34590, "linspace": 34591, "áĥĹ": 34592, "Ġinsensitive": 34593, "æīĵ": 34594, "SOCKOPT": 34595, "ĠFchown": 34596, "GetSystem": 34597, "ĠRtl": 34598, "Ġ89": 34599, "097": 34600, "Roi": 34601, "ratelimit": 34602, "(':')": 34603, "/************************": 34604, "junk": 34605, "Ġbands": 34606, "toJson": 34607, "keyName": 34608, "PCS": 34609, "ĉĉĉĉĉĉĉĠĠĠ": 34610, "Ġfullscreen": 34611, "DOMDocument": 34612, "ovy": 34613, "Msgs": 34614, "Ġpublisher": 34615, "Ġbraces": 34616, "654": 34617, "Families": 34618, "Iframe": 34619, "LCR": 34620, "QIcon": 34621, "tweet": 34622, "alph": 34623, "ĠpBuffer": 34624, "Stale": 34625, "texts": 34626, "ecp": 34627, "epc": 34628, "ServiceError": 34629, "ĠEnglish": 34630, "CHARSET": 34631, "9052": 34632, "daily": 34633, "hips": 34634, "wan": 34635, "isInt": 34636, "Ġfram": 34637, "Ġpnp": 34638, "ĠFAST": 34639, "ĠGF": 34640, "ĠWAF": 34641, "Ġ@\"\\": 34642, "ĠmediaType": 34643, "Dk": 34644, "Hel": 34645, "engines": 34646, "deregister": 34647, "ĠNOP": 34648, "Ġsequential": 34649, "lastname": 34650, "PointerTo": 34651, "ButtonText": 34652, "PARSER": 34653, "FatalError": 34654, "ĠDispatcher": 34655, "stress": 34656, "redient": 34657, "RTT": 34658, "ĠKeyEvent": 34659, "ĠMCU": 34660, "pval": 34661, "consum": 34662, "devid": 34663, "ndl": 34664, "ĠAssertions": 34665, "Ġfullname": 34666, "autorelease": 34667, "äºĶ": 34668, "Ġoverriding": 34669, "ĠmigrationBuilder": 34670, "isIE": 34671, "Ġfrees": 34672, "Ġ130": 34673, "Verbs": 34674, "038": 34675, "Ġpcie": 34676, "ĠMsgPack": 34677, "bert": 34678, "Ġ('.": 34679, "Ġipath": 34680, "Ġvary": 34681, "ĠBi": 34682, "[]{\"": 34683, "ĠstartDate": 34684, "httpClient": 34685, "WEST": 34686, "qib": 34687, "ĠMIR": 34688, "ĠgetState": 34689, "febr": 34690, "cling": 34691, "ĠnextToken": 34692, "ĠSerializer": 34693, "ãĥķãĤ": 34694, "Selections": 34695, "SGI": 34696, "XCOP": 34697, "LCJzb": 34698, "ymax": 34699, "threaded": 34700, "Keyframe": 34701, "lastModified": 34702, "OpNo": 34703, ")?\\\\": 34704, "ijit": 34705, "DOWNLOAD": 34706, "Ġpatched": 34707, "Ġdeadlock": 34708, "LINUX": 34709, "Ġmen": 34710, "Relocation": 34711, "Ġgtest": 34712, "ĠMime": 34713, "fdc": 34714, "CurrentTime": 34715, "tensors": 34716, ";=": 34717, "eager": 34718, "inset": 34719, "stab": 34720, "TimeoutSeconds": 34721, "Guzzle": 34722, "emeente": 34723, "Eo": 34724, "fsp": 34725, "Ġvim": 34726, "ĠgetSize": 34727, "validity": 34728, "Ġ([]*": 34729, "219": 34730, "_))": 34731, "hpi": 34732, "ppt": 34733, "rival": 34734, "ĠQUrl": 34735, "å¤ĸ": 34736, "mcbsp": 34737, "032": 34738, "Ġthickness": 34739, "dataSize": 34740, "newItem": 34741, "Ġfreeze": 34742, "INDENT": 34743, "áng": 34744, "ĠCONNECTION": 34745, "Ze": 34746, "pFilename": 34747, "xform": 34748, "zing": 34749, "enrol": 34750, "();)": 34751, "BytesRead": 34752, "869": 34753, "Rle": 34754, "terrain": 34755, "inates": 34756, "returncode": 34757, "ĠSyn": 34758, "Ġunmap": 34759, "Ġcompose": 34760, "maW": 34761, "ĠmaxWidth": 34762, "Verified": 34763, "ĠTargetRegisterClass": 34764, "Ġfrequencies": 34765, "ĠGravity": 34766, "dod": 34767, "Ġ设置": 34768, "Ġdur": 34769, "ValueTo": 34770, "Reservation": 34771, "ideographic": 34772, "Ġmodifications": 34773, "ĠREcma": 34774, "traceback": 34775, "ĠdecodeVarint": 34776, "Ġfixes": 34777, "Twilio": 34778, "66592": 34779, "seo": 34780, "isSupported": 34781, "mpic": 34782, "Ġgas": 34783, "ĠPhaser": 34784, "ABEL": 34785, "Ġ92": 34786, "CustomEvent": 34787, "Ġredirects": 34788, "ZR": 34789, "ή": 34790, "Ġ'>=": 34791, "RecordType": 34792, "pga": 34793, "ĠmockGrpcClient": 34794, "Fetcher": 34795, "åij½": 34796, "ìĿ´": 34797, "850": 34798, "Jp": 34799, "Ġ((_": 34800, "ĠshouldBe": 34801, "glue": 34802, "hdrlen": 34803, "DownLatch": 34804, "Datatype": 34805, "Ġrespective": 34806, "ADED": 34807, "Taint": 34808, "fgets": 34809, "ador": 34810, "food": 34811, "ĠOracle": 34812, "Ġregno": 34813, "Ġcapable": 34814, "Ġcapital": 34815, "BeanCollection": 34816, "Expectations": 34817, "kat": 34818, "pctx": 34819, "zv": 34820, "Ġtoplevel": 34821, "bogus": 34822, "Ġallocates": 34823, "sipCpp": 34824, "ĠADDR": 34825, "ĠINDArray": 34826, "hedron": 34827, "Ġhg": 34828, "ATYPE": 34829, "]...)": 34830, "terminator": 34831, "ĠCallable": 34832, "ĠtracingParameters": 34833, "FCS": 34834, "(\"!": 34835, "ĠCSharp": 34836, "continuous": 34837, "HERIT": 34838, "EXPAND": 34839, "+-]?\\": 34840, "_{$": 34841, "dport": 34842, "Ġdjango": 34843, "Reached": 34844, "IFLA": 34845, "Controllen": 34846, "Books": 34847, "çĻ»å½ķ": 34848, "Bill": 34849, "RNG": 34850, "Ġbz": 34851, "Ġoprot": 34852, "Ġ09": 34853, "ĠiCount": 34854, "Ġdemand": 34855, "ĠRob": 34856, "Ġ/*,": 34857, "Ġnsnull": 34858, "-----+": 34859, "Enterprise": 34860, "announce": 34861, "Ġ140": 34862, "shash": 34863, "ĠIntel": 34864, "EventTarget": 34865, "AndWait": 34866, "à¥Ĥ": 34867, "455": 34868, "npy": 34869, "ĠTTY": 34870, "ĠNES": 34871, "ĠLIC": 34872, "Ġ365": 34873, "CAE": 34874, "ĠGLSL": 34875, "оз": 34876, "IdentityProvider": 34877, "gotiate": 34878, "\\.[": 34879, "VersionedParams": 34880, "markTestSkipped": 34881, "evm": 34882, "jfs": 34883, "{`,": 34884, "Ġcfs": 34885, "ĠNan": 34886, "classifier": 34887, "ISSET": 34888, "sbd": 34889, "Ġaborting": 34890, "Ġ÷": 34891, "dicom": 34892, "*-": 34893, "Sense": 34894, "vbuf": 34895, "setPath": 34896, "ĠSass": 34897, "dataSet": 34898, "ĠRex": 34899, "ĠfileSystem": 34900, "SCpnt": 34901, "ĠUnlock": 34902, "à¤ħ": 34903, "ProcessId": 34904, "ĠYield": 34905, "hru": 34906, "SWF": 34907, "ClusterRoleBinding": 34908, "র": 34909, "FFFFFFF": 34910, "NixVector": 34911, "Geldigheid": 34912, "Ġpio": 34913, "setVariable": 34914, "ritem": 34915, "ĠBKE": 34916, "ReadStream": 34917, "domainObjectList": 34918, "ĠkExpr": 34919, "StartSpan": 34920, "Operating": 34921, "Ġ['-": 34922, "ĠWriteTo": 34923, "Ġsortable": 34924, "Bookmarks": 34925, "radioButton": 34926, "Raycast": 34927, "Clang": 34928, "Say": 34929, "getAlignment": 34930, "vier": 34931, "Outbound": 34932, "yyidx": 34933, "simulate": 34934, "OES": 34935, "gmail": 34936, "oids": 34937, "Ġcollation": 34938, "StartInfo": 34939, "Geboorte": 34940, "Prices": 34941, "DEFER": 34942, "ĠRules": 34943, "enforceFocus": 34944, "217": 34945, "Trees": 34946, "gB": 34947, "Ġ''));": 34948, "GetUInt": 34949, "ICC": 34950, "ĠQH": 34951, "298": 34952, "Ġ'-':": 34953, "vdXJ": 34954, "attention": 34955, "Ġtransferred": 34956, "Ġ====================": 34957, "ĠArchive": 34958, "Ġsimplified": 34959, "Zr": 34960, "cX": 34961, "jYW": 34962, "}');": 34963, "ptd": 34964, "experimental": 34965, "toHexString": 34966, "00000000000000": 34967, "046": 34968, "Ġsubscriptions": 34969, "Ġinitiate": 34970, "ãģ¾": 34971, "HTTPAPI": 34972, "12345678": 34973, "Ġmodifying": 34974, "7146": 34975, "Caster": 34976, "EPS": 34977, "filetype": 34978, "WriteObject": 34979, "Ġqobject": 34980, "defineLocale": 34981, "ç½ij": 34982, "CssHighlightRules": 34983, "MLOCK": 34984, "PMC": 34985, "isAssignableFrom": 34986, "Ġnavigate": 34987, "Ġmangle": 34988, "getRight": 34989, "ĠSPR": 34990, "contextmenu": 34991, "APInt": 34992, "Nulls": 34993, "****************************************": 34994, "UNDLE": 34995, "quivalence": 34996, "Ġcalculating": 34997, "hwndDlg": 34998, "Zp": 34999, "inge": 35000, "Ġdecrypted": 35001, "writeTo": 35002, "OTYPE": 35003, "Functional": 35004, "chipset": 35005, "recorder": 35006, "Attendance": 35007, "orbis": 35008, "Ion": 35009, "VTable": 35010, "pnl": 35011, "zes": 35012, "Ġftdi": 35013, "getIcon": 35014, "Ġrfc": 35015, "ĠQNetwork": 35016, "FieldDescriptorProto": 35017, "panies": 35018, "GLONG": 35019, "Which": 35020, "drawImage": 35021, "XMLWriter": 35022, "NotFoundError": 35023, "Ġweeks": 35024, "ĠDecor": 35025, "UsesWith": 35026, "Ġsentences": 35027, "IAM": 35028, "Ġsus": 35029, "Investigation": 35030, "ĠgetMethod": 35031, "ENET": 35032, "msvc": 35033, "queueName": 35034, "TransactionId": 35035, "aliased": 35036, "integral": 35037, "AspNetCore": 35038, "ĠerrMsg": 35039, "ĠLPARAM": 35040, "undler": 35041, "ivore": 35042, "PosX": 35043, "TagToken": 35044, "Ġ(!$.": 35045, "ECHO": 35046, "Rejection": 35047, "Ġexcess": 35048, "Chains": 35049, "ĠerrorCallback": 35050, "writeHead": 35051, "WithTimeout": 35052, "---------------------------------------------------------------------*/": 35053, "Ġobvious": 35054, "slides": 35055, "MacroAssembler": 35056, "æĭ©": 35057, "Potential": 35058, "fattr": 35059, "mState": 35060, "ToRight": 35061, "perim": 35062, "DELETED": 35063, "])},": 35064, "Ġ]->": 35065, "HeadersFrame": 35066, "zzz": 35067, "ĠAssumes": 35068, "Ġambiguous": 35069, "RATIO": 35070, "Social": 35071, "Ware": 35072, "}'\",": 35073, "ĠmComp": 35074, "prune": 35075, "ListType": 35076, "EventLog": 35077, "AGED": 35078, "Ġsynchronization": 35079, "Measurements": 35080, "Facing": 35081, "Autom": 35082, "ĠDomainObjects": 35083, "ĠUCD": 35084, "AtLeast": 35085, "Weather": 35086, "Welcome": 35087, "Ġthrew": 35088, "asprintf": 35089, "ĠIPC": 35090, "Provide": 35091, "Loan": 35092, "595": 35093, "gerservicenummer": 35094, "Od": 35095, "cpl": 35096, "mJ": 35097, "ORIENT": 35098, "doi": 35099, "VERB": 35100, "ï¼Ł": 35101, "variants": 35102, "Observed": 35103, "Ġsuffixes": 35104, "Deserializer": 35105, "cakephp": 35106, "Xb": 35107, "getMain": 35108, "ĠALT": 35109, "__));": 35110, "CreateTable": 35111, "ĠpoFeature": 35112, "defineMIME": 35113, "ĠWhich": 35114, "SECONDARY": 35115, "%&": 35116, "Amp": 35117, "vors": 35118, "Ġtinymce": 35119, "Ġsharing": 35120, "\\\\$": 35121, "ADH": 35122, "psf": 35123, "Mei": 35124, "ĠReplacement": 35125, "JKLM": 35126, "319": 35127, "ZSA": 35128, "sData": 35129, "Ġcros": 35130, "Ġmdev": 35131, "Ġdao": 35132, "TypeID": 35133, "ĠFocus": 35134, "filedescr": 35135, "ĠInventory": 35136, "Ġengines": 35137, "Ġscans": 35138, "WindowManager": 35139, "ĠObjectID": 35140, "ByteVector": 35141, "Ġ(_.": 35142, "eyJ": 35143, "377": 35144, "Hr": 35145, "ĠÑĥ": 35146, "recalc": 35147, "KeyType": 35148, "Codeception": 35149, "SCSS": 35150, "EEP": 35151, "DeclContext": 35152, "COLUMNS": 35153, "Ġdicts": 35154, "risk": 35155, "('\"',": 35156, "Ġ87": 35157, "Ġcurves": 35158, "rects": 35159, "XMLNode": 35160, "ĠwxDefault": 35161, "Ġdecimals": 35162, "NotImplementedException": 35163, "jR": 35164, "wB": 35165, "instanti": 35166, "ĠdB": 35167, "ĠIAsyncResult": 35168, "ĠLSB": 35169, "ĠsetDefault": 35170, "ĠdataSet": 35171, "OnClickListener": 35172, "ctrls": 35173, "HTTPRequest": 35174, "Ġtrial": 35175, "бÑĢ": 35176, "PropertyChangedEventArgs": 35177, "Suggestions": 35178, "Ġinheritance": 35179, "SOFTWARE": 35180, "Ġmkdirp": 35181, "DeniedException": 35182, "REGISTRY": 35183, ")//": 35184, "wY": 35185, "|^\\": 35186, "resync": 35187, "ĠeventData": 35188, "parentElement": 35189, "oooo": 35190, "ĠWITHOUT": 35191, "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd": 35192, "iid": 35193, "una": 35194, "ĠbIs": 35195, "adma": 35196, "Ġlis": 35197, "Also": 35198, "SHIP": 35199, "ToolStripButton": 35200, "ĠMODAL": 35201, "Goods": 35202, "COMPILE": 35203, "'_": 35204, "setObject": 35205, "Ġvarname": 35206, "maxWidth": 35207, "WithDefault": 35208, "OutputBuffer": 35209, "loadingText": 35210, "[($": 35211, "ifname": 35212, "SSIP": 35213, "TextUtils": 35214, "AAP": 35215, "Ġ802": 35216, "bodyIsOverflowing": 35217, "Ġinodes": 35218, ":\"\\\\*\\\\/\",": 35219, "Ea": 35220, "ĠRoom": 35221, "udents": 35222, "ContentInfo": 35223, "Ġhttptest": 35224, "ĠGecko": 35225, "WifiMac": 35226, "valueObjectDest": 35227, "Ġsatisfies": 35228, "éĢīæĭ©": 35229, "ymmetric": 35230, "tess": 35231, "ingo": 35232, "getBegin": 35233, "Ġvq": 35234, "apm": 35235, "ĠIDisposable": 35236, "minWidth": 35237, "Bounce": 35238, "PRIO": 35239, "Grouped": 35240, "ĠExchange": 35241, "ĠREPORT": 35242, "Ttl": 35243, "msc": 35244, ");\");": 35245, "Ġnfds": 35246, "odbc": 35247, "ĠMATCH": 35248, "aci": 35249, "ĠQGraphics": 35250, "ArraySize": 35251, "************************************************": 35252, "ĠDataGrid": 35253, "Ġprobabilities": 35254, "æīĭ": 35255, "Avoid": 35256, "ĠMIDI": 35257, "chrs": 35258, "ScrollView": 35259, "VARS": 35260, "\"?\"": 35261, "PLT": 35262, "pul": 35263, "Ġunordered": 35264, "MEL": 35265, "ĠXP": 35266, "fcport": 35267, "Bitcoin": 35268, "858": 35269, "[\\{\\": 35270, "ĠECMA": 35271, "Ġbnxt": 35272, "cff": 35273, "csc": 35274, "svm": 35275, "Ġiz": 35276, "ford": 35277, "GetEntity": 35278, "Brick": 35279, "ĠTwilio": 35280, "GroupVersionKind": 35281, "æıĴ": 35282, ")['": 35283, "ĠPhi": 35284, "Envi": 35285, "ListNode": 35286, "ĠReject": 35287, "338": 35288, "!=|": 35289, "åĬĽ": 35290, "NODES": 35291, "ва": 35292, "SJ": 35293, "Sect": 35294, "lB": 35295, "Ġmanner": 35296, "tris": 35297, "Ġ'));": 35298, "ĠBulk": 35299, "shiv": 35300, "TimeOut": 35301, "ĠIfNoneMatch": 35302, "Ġemployee": 35303, "hdcp": 35304, "Freeze": 35305, "ĠMaps": 35306, "persistence": 35307, "VARCHAR": 35308, "Ġproxies": 35309, "Lint": 35310, "]())": 35311, "migrations": 35312, "uing": 35313, "Ġspectrum": 35314, "/*/": 35315, "ĠGLOBAL": 35316, "ClientSize": 35317, "specification": 35318, "357": 35319, "propagation": 35320, "Ġstatuses": 35321, "åħŃ": 35322, "缩": 35323, "Either": 35324, "Uit": 35325, "ĉĉĠĠĠĠĠĠĠĠĠĠĠ": 35326, "Ġ)?": 35327, "Ġunmanaged": 35328, "Ġonerror": 35329, "ĠInvoker": 35330, "Ġtokenized": 35331, "286": 35332, "ParentId": 35333, "manifold": 35334, "Ġ/>'": 35335, "ToolStripItem": 35336, "PopupMenu": 35337, "FINAL": 35338, "ĠSERIAL": 35339, "080": 35340, "Yx": 35341, "uX": 35342, "Ġmnt": 35343, "Department": 35344, "ĠUCS": 35345, "netlink": 35346, "THR": 35347, "Ġwebpack": 35348, "sentinel": 35349, "banks": 35350, "Ġdisplacement": 35351, "ĠALLOC": 35352, "Cq": 35353, "DPRINTK": 35354, "Ġpsb": 35355, "endRow": 35356, "ĠCStdString": 35357, "REM": 35358, "boo": 35359, "ĠQFETCH": 35360, "Ġpartner": 35361, "INVALIDARG": 35362, "+)(\\\\": 35363, "Ks": 35364, "rels": 35365, "ĠCACHE": 35366, "Ġ@{": 35367, "appengine": 35368, "FieldByName": 35369, "Ends": 35370, "IGl": 35371, "ĠManifest": 35372, "ĠUTIL": 35373, "gcmV": 35374, "lig": 35375, "xit": 35376, "Ġill": 35377, "Ĥ¬": 35378, "INVOKE": 35379, "__\",": 35380, "Ġ8000": 35381, "uchos": 35382, "Hasher": 35383, "ĠDRIVER": 35384, "Around": 35385, "KASSERT": 35386, "xAxis": 35387, "death": 35388, "Ġbq": 35389, "adoop": 35390, "pxmit": 35391, "correction": 35392, "decision": 35393, "765": 35394, "Ġsummaries": 35395, "Ġstatistic": 35396, "ERESTART": 35397, "aGV": 35398, "ĠDFS": 35399, "ĠgetAttribute": 35400, "ObjectData": 35401, "ĠGetComponent": 35402, "287": 35403, "ThreadState": 35404, "convex": 35405, "Ġanimated": 35406, "normpath": 35407, "Ġfqdn": 35408, "ECONN": 35409, "nls": 35410, "Rebar": 35411, "ĠNEXT": 35412, "ĠDIE": 35413, "(&(*": 35414, "FileData": 35415, "Ġzf": 35416, "Ġ'\"');": 35417, "('_',": 35418, "ĠCmpInst": 35419, "MERGE": 35420, ")`,": 35421, "Fabric": 35422, "Gn": 35423, "aption": 35424, "riff": 35425, "Ġsdp": 35426, "Ġhuge": 35427, "ToCall": 35428, "colgroup": 35429, "Ġmeet": 35430, "ETWEEN": 35431, "DeviceName": 35432, "ConfigurationSet": 35433, "Ġsplitter": 35434, "Wrappers": 35435, "Finally": 35436, "QColor": 35437, "VST": 35438, "diagnostic": 35439, "lci": 35440, "mom": 35441, "sthru": 35442, "Ġfns": 35443, "Ġmarshaller": 35444, "ĉĉĉĠĠĠĠĠĠĠ": 35445, "ĠCtor": 35446, "ĠStringReader": 35447, "hasOne": 35448, "weighted": 35449, "PARTIAL": 35450, "Detached": 35451, "ĠEXYNOS": 35452, "DISC": 35453, "ĠImplicit": 35454, "Ġespecially": 35455, "SFTP": 35456, "Ġderivative": 35457, "bizContent": 35458, "450": 35459, "Har": 35460, "uevent": 35461, "strchr": 35462, "collation": 35463, "Ġarity": 35464, "TagIterator": 35465, "ĠParses": 35466, "LANE": 35467, "twoord": 35468, "Forwarding": 35469, "?>\",": 35470, "Qa": 35471, "Proof": 35472, "ENCH": 35473, "fsf": 35474, "Ġ--$": 35475, "ermite": 35476, "ĠGLUI": 35477, "HostedService": 35478, "9170": 35479, "Pwd": 35480, "hns": 35481, "ĠpState": 35482, "ĠCover": 35483, "ĠFs": 35484, "ObjectClass": 35485, "Ġstrprintf": 35486, "GLX": 35487, "HttpPost": 35488, "Caches": 35489, "KO": 35490, "Oauth": 35491, "zfcp": 35492, "è": 35493, "destruct": 35494, "Theta": 35495, "PerSample": 35496, "ĠCompound": 35497, "secrets": 35498, "apacheconf": 35499, "-\":": 35500, ":]+": 35501, "Imap": 35502, "IAsyncResult": 35503, "cqp": 35504, "tiff": 35505, "oracle": 35506, "Ġskeleton": 35507, "opmode": 35508, "Ġux": 35509, "Ones": 35510, "Ġzmq": 35511, "Qd": 35512, "phony": 35513, "Discrete": 35514, "enterprise": 35515, "Ġmonster": 35516, "ĠHttpContext": 35517, "Ġsaturation": 35518, "PYTHON": 35519, "TST": 35520, "UCHAR": 35521, "encap": 35522, "Ġvdev": 35523, "OnClick": 35524, "KEYWORD": 35525, "Ġ'<%=": 35526, "]*$)/,\"\"": 35527, "ĠclearMenus": 35528, "Ġhappy": 35529, "RUFB": 35530, "ĠPreferences": 35531, "ListOf": 35532, "TableRow": 35533, "(_,": 35534, "joins": 35535, "({});": 35536, "CRM": 35537, "umble": 35538, "ĠmaybeEnd": 35539, "Ġworst": 35540, "ĠPOPOVER": 35541, "/#{": 35542, "]]))": 35543, "huge": 35544, "ĠIOC": 35545, "ska": 35546, "Ġdiscovered": 35547, "Skge": 35548, "ĠRECT": 35549, "OldValue": 35550, "ĠInternet": 35551, "QF": 35552, "idity": 35553, "Ġ/[\\": 35554, "ISAC": 35555, "UMB": 35556, "]?[": 35557, "Ġowns": 35558, "Determin": 35559, "Gather": 35560, "Ġ*.": 35561, "Ġdword": 35562, "ENvb": 35563, "oldown": 35564, "Forwarded": 35565, "TableCell": 35566, "cipline": 35567, "Libraries": 35568, "Crit": 35569, "QRST": 35570, "jwt": 35571, "ÏĤ": 35572, "Ġscoped": 35573, "ĠerrorMsg": 35574, "Ġscm": 35575, "SCp": 35576, "apiKey": 35577, "ĠexitCode": 35578, "superClass": 35579, "Waypoint": 35580, "Ġcin": 35581, "keypatch": 35582, "Ġ81": 35583, "='/": 35584, "lsr": 35585, "ObjID": 35586, "ĠfullName": 35587, "0647": 35588, "copies": 35589, "Epoll": 35590, "ĠSEN": 35591, "selfLink": 35592, "([(": 35593, "/**/*.": 35594, "Zq": 35595, "amper": 35596, "Ġ\"]\");": 35597, "Ġovr": 35598, "posals": 35599, "Ġ\"%-": 35600, "Ġ91": 35601, "Ġlinkage": 35602, "ShortName": 35603, "Ġinitialised": 35604, "ĠOrigin": 35605, "VoCollectionFrom": 35606, "DECODER": 35607, "åħĥç´ł": 35608, "Bay": 35609, "sbyte": 35610, "Ġtup": 35611, "ĠMIC": 35612, "SizeF": 35613, "dbi": 35614, "fnt": 35615, "weets": 35616, "OFDAY": 35617, "scher": 35618, "æĸ¹å¼ı": 35619, "%\\": 35620, ");*/": 35621, "itution": 35622, "Ġaware": 35623, "addParameter": 35624, "ibyte": 35625, "='+": 35626, "Ġ(''": 35627, "ĠGenerated": 35628, "ĠReduce": 35629, "Ġtorrent": 35630, "Mater": 35631, "hyp": 35632, "Ġmss": 35633, "Reaction": 35634, "=\")": 35635, "Ġverifier": 35636, "NonQuery": 35637, "ĠAlbum": 35638, "Ġ1500": 35639, "$('.": 35640, "xaa": 35641, "Ġbene": 35642, "gettimeofday": 35643, "StrLen": 35644, "BeforeClass": 35645, "mcrypt": 35646, "ĠpParent": 35647, "Ġsuggested": 35648, "setToolTip": 35649, "Ġlstat": 35650, "Ġcontrast": 35651, "ĠNpc": 35652, "Entered": 35653, "ĠBIN": 35654, "Ġyym": 35655, "0941": 35656, "272": 35657, "Magick": 35658, "Knowledge": 35659, "care": 35660, "pcl": 35661, "vised": 35662, "indiv": 35663, "ABE": 35664, "Precondition": 35665, "1712": 35666, "servative": 35667, "ĠHyper": 35668, "434": 35669, "mangled": 35670, "tang": 35671, "wA": 35672, "setxattr": 35673, "].(": 35674, "])&&": 35675, "wood": 35676, "Ġunders": 35677, "chnique": 35678, "416": 35679, "Qq": 35680, "rea": 35681, "getxattr": 35682, "Inertia": 35683, "Ġgreat": 35684, "ĠPCH": 35685, "/*++": 35686, "ย": 35687, "Ġcredits": 35688, "INTERRUP": 35689, "697": 35690, "TiXml": 35691, "jn": 35692, "mhi": 35693, "reuid": 35694, "uncore": 35695, "Ġogg": 35696, "Ġvst": 35697, "umi": 35698, "ĠSolid": 35699, "representation": 35700, "CONFIGURATION": 35701, "identical": 35702, "StdTypes": 35703, "werk": 35704, "PRECISION": 35705, "sV": 35706, "vend": 35707, "getPoint": 35708, "aba": 35709, "Ġstory": 35710, "LEAD": 35711, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 35712, "])\",": 35713, "maturity": 35714, "ĠSerialized": 35715, "ALLY": 35716, "Ġsynchronize": 35717, "åĨĻåħ¥": 35718, "LSR": 35719, "icular": 35720, "ĠnewIndex": 35721, "readTag": 35722, "Ġmarshaler": 35723, "SOLID": 35724, "JKLMNOP": 35725, "getRandom": 35726, "mpa": 35727, "ĠgetInt": 35728, "Ġshipping": 35729, "enuation": 35730, "Precache": 35731, "DBCluster": 35732, "OutputFormat": 35733, "1724": 35734, "TIMEOFDAY": 35735, "GoTo": 35736, "ProtoTypes": 35737, "generatedColumn": 35738, "Ġtypename": 35739, "ĠCreating": 35740, "Equipment": 35741, "rps": 35742, "addParam": 35743, "ĠstringBuilder": 35744, "mddev": 35745, "ACITY": 35746, "Ġthrowing": 35747, "ĠArraySet": 35748, "CBE": 35749, "released": 35750, "Caught": 35751, "Ġopc": 35752, "Ġwt": 35753, "Ġlng": 35754, "ĠAK": 35755, "']])": 35756, "ĠsetKind": 35757, "ĠassertEq": 35758, "bufp": 35759, "Intermediate": 35760, "expansion": 35761, "ĠReady": 35762, "PUB": 35763, "auss": 35764, "SECURE": 35765, "Teleport": 35766, "Qml": 35767, "ĠNONE": 35768, "toml": 35769, "population": 35770, "HasSuffix": 35771, "Databases": 35772, "Swagger": 35773, "Ġscalars": 35774, "Termination": 35775, "706": 35776, "Auction": 35777, "_)*": 35778, "kubernetes": 35779, "ĉĠĠĠĠĊ": 35780, "()||(": 35781, "Ġmorph": 35782, "ĠSMI": 35783, ")))));": 35784, "ĠPe": 35785, "ecm": 35786, "minimize": 35787, "attrName": 35788, "displayed": 35789, "------------------------------": 35790, "SerializeObject": 35791, "Ġunrecognized": 35792, "Tcl": 35793, "aen": 35794, "bail": 35795, "ghost": 35796, "pNum": 35797, "tow": 35798, "Ġnex": 35799, "Ġpem": 35800, "ĠCAST": 35801, "Ġhull": 35802, "apiParas": 35803, "IfExists": 35804, "ĠQtCanvas": 35805, "hydr": 35806, "åĩ»": 35807, "计ç®Ĺ": 35808, "bivore": 35809, "ĠSaved": 35810, "maxAge": 35811, "Ġperhaps": 35812, "CCM": 35813, "snake": 35814, "Sounds": 35815, "Dedicated": 35816, "Figure": 35817, "Suspended": 35818, "ĠSig": 35819, "('('": 35820, "ĠEat": 35821, "applications": 35822, "LAS": 35823, "Ġexts": 35824, "Ġworked": 35825, "DaemonSet": 35826, "Ġoccurrences": 35827, "enk": 35828, "getVal": 35829, "ĠRAD": 35830, "Unimplemented": 35831, "HeaderText": 35832, "Ġquint": 35833, "ĠResume": 35834, "ĠCPLE": 35835, "Ġderive": 35836, "à¤Ĥ',": 35837, "itives": 35838, "errx": 35839, "inders": 35840, "STV": 35841, "ĠstringLen": 35842, "ĠVOS": 35843, "fsoc": 35844, "msvs": 35845, "NetOffice": 35846, "Fprint": 35847, "Ġ!*": 35848, "buck": 35849, "scanned": 35850, "writeField": 35851, "PCD": 35852, "LowerBound": 35853, "notifyUrl": 35854, "sameValue": 35855, "Constructs": 35856, "ãģĹãģ¦": 35857, "cate": 35858, "yA": 35859, "agur": 35860, "ĠSq": 35861, "ĠBroadcast": 35862, "appid": 35863, "Ġpreprocessor": 35864, "Projectile": 35865, "abbed": 35866, "Ġreclaim": 35867, "ĠSHADER": 35868, "Gallery": 35869, "TOR": 35870, "Ġuserid": 35871, "Ġdiscrete": 35872, "ĠLoads": 35873, "ĠAssignment": 35874, "KiB": 35875, "\\')": 35876, "bignum": 35877, "caddr": 35878, "Ġclf": 35879, "Ġtoc": 35880, "Ġecx": 35881, "ĠRoll": 35882, "KeyState": 35883, "ItemInfo": 35884, "ISDIR": 35885, "LOY": 35886, "replaces": 35887, "brw": 35888, "CloseHandle": 35889, "prodCode": 35890, "terminalType": 35891, "å·²ç»ı": 35892, "Kh": 35893, "dM": 35894, "pCh": 35895, "smt": 35896, "Ġcropped": 35897, "unmask": 35898, "setParam": 35899, "ĠCCT": 35900, "limb": 35901, "}/.": 35902, "rtlhal": 35903, "Ġcommas": 35904, "sph": 35905, "setX": 35906, "ĠScoped": 35907, "Ġehci": 35908, "opens": 35909, "TestAllTypes": 35910, "WritePropertyName": 35911, "ĠglBind": 35912, "randn": 35913, "ĠSizeVarint": 35914, "ĠCPLError": 35915, "çī¹": 35916, "ĠFAILURE": 35917, "ĠFadeTo": 35918, "840": 35919, "Give": 35920, "taken": 35921, "uo": 35922, "xplat": 35923, "ToLoad": 35924, "LEM": 35925, "'],$": 35926, "ĠexpectedResponse": 35927, "ĠrootEl": 35928, "}.{": 35929, "responder": 35930, "marquee": 35931, "createElementNS": 35932, "ĠTILE": 35933, "Abr": 35934, "Grace": 35935, "tier": 35936, "Ġnie": 35937, "Ġblas": 35938, "keyValue": 35939, "InstanceName": 35940, "Ġtexts": 35941, "Ġminimize": 35942, "ĠRequests": 35943, "TLB": 35944, "ĠMarkdown": 35945, "countries": 35946, ")\"));": 35947, "Ups": 35948, "mcc": 35949, "rar": 35950, "getUT": 35951, "ĠFeb": 35952, "portunity": 35953, "Ġjunk": 35954, "ĠJFactory": 35955, "ĠsourceMap": 35956, "relpath": 35957, "MCOperand": 35958, "Aborted": 35959, "mocked": 35960, "Fulfilled": 35961, "NGUI": 35962, "Ġfimc": 35963, "oreg": 35964, "DataBuffer": 35965, "ĠUD": 35966, "ITNESS": 35967, "Ġcodegen": 35968, "ECTOR": 35969, "ĠDisconnect": 35970, "SysMessage": 35971, "UVWXYZ": 35972, "Makes": 35973, "bE": 35974, "xAA": 35975, "ĠNaming": 35976, "ToJson": 35977, "anything": 35978, "OpenId": 35979, "FSM": 35980, "OUSEL": 35981, "Jg": 35982, "revert": 35983, "ixgbe": 35984, "ĠVOID": 35985, "Being": 35986, "SHO": 35987, "tolist": 35988, "ĠAvH": 35989, "Derivative": 35990, "Ġrndis": 35991, "-{": 35992, ";(": 35993, "Xs": 35994, "dana": 35995, "mthca": 35996, "cosh": 35997, "Refactoring": 35998, "ĠPie": 35999, "Ġsubdir": 36000, "AndAssert": 36001, "ctrlKey": 36002, "Ġ'\\''": 36003, "ĠSDHCI": 36004, "MULTICAST": 36005, "CCR": 36006, "Ġifp": 36007, "acp": 36008, "userContext": 36009, "ftdi": 36010, "Trivial": 36011, "=-=-=-=-=-=-=-=-": 36012, "Ġinvolved": 36013, "'};": 36014, "TDocument": 36015, "Ġban": 36016, "Ġball": 36017, "Ġih": 36018, "ĠHL": 36019, "'))->": 36020, "ĠSeq": 36021, "ABORTED": 36022, "Solr": 36023, "XFD": 36024, "Ðij": 36025, "Ġ'\\\"": 36026, "GetDirectoryName": 36027, "ĠgetColumn": 36028, "LLV": 36029, "KeySequence": 36030, "ĠHello": 36031, "Ġyo": 36032, "currentNode": 36033, "}}\",": 36034, "BEACON": 36035, "NetworkInterface": 36036, "awserr": 36037, "rooms": 36038, "Wilson": 36039, "jZX": 36040, "uln": 36041, "advice": 36042, "Seeds": 36043, "okt": 36044, "loaders": 36045, "groupBy": 36046, "THREE": 36047, "GoTest": 36048, "ĠTransmit": 36049, "TAO": 36050, "è§Ĵ": 36051, "terminalInfo": 36052, "Ġugly": 36053, "rases": 36054, "ĠPAS": 36055, "Ġsemi": 36056, "ĠgetImage": 36057, "Ġregval": 36058, "THCA": 36059, "encodings": 36060, "Ġzipfile": 36061, "Sprites": 36062, "SUSP": 36063, "Lmpz": 36064, "sut": 36065, "yu": 36066, "yped": 36067, "ableObject": 36068, "ĠFstat": 36069, "Ġchop": 36070, "osto": 36071, "ĠstartOffset": 36072, "findMatching": 36073, "头": 36074, "UniformLocation": 36075, "dDevice": 36076, "getScheme": 36077, "adds": 36078, "Ġqos": 36079, "Disruption": 36080, "ĠclSet": 36081, "GFy": 36082, "(?=.": 36083, "506": 36084, "601": 36085, "CERROR": 36086, "Sanitize": 36087, "]\"+": 36163, "Borders": 36164, "QZ": 36165, "alc": 36166, "Ġslower": 36167, "ĠBlack": 36168, "contained": 36169, "asserts": 36170, "FIR": 36171, "observers": 36172, "(\"/\");": 36173, "ĠGenerates": 36174, "454": 36175, "nbits": 36176, "slist": 36177, "yk": 36178, "onto": 36179, "ĠSMP": 36180, "ĠstrError": 36181, "MaxResults": 36182, "PRESSION": 36183, "(\",\")": 36184, "ĠSMLoc": 36185, "ZXJzaW": 36186, "\"')": 36187, "BOLD": 36188, "Hum": 36189, "vcm": 36190, "}.\",": 36191, "Ġ'{\"": 36192, "Ġconvenient": 36193, "LineStart": 36194, "offsetParent": 36195, "Ġanywhere": 36196, "Ġexpiry": 36197, "HasOne": 36198, "Ġdirections": 36199, "Ġsliding": 36200, "UniqueID": 36201, "rospection": 36202, "UNIFORM": 36203, "424": 36204, "@%": 36205, "pDev": 36206, "Ġbash": 36207, "ToBase": 36208, "ĠgetResponse": 36209, "Ġ103": 36210, "Ġkinds": 36211, "Ġtouches": 36212, "ä¹Ī": 36213, "ĠOFDPA": 36214, "JWT": 36215, "Oj": 36216, "`}`,": 36217, "ĠMPC": 36218, "minValue": 36219, "RequestBuilder": 36220, "corpus": 36221, "JSObject": 36222, "ĠIndexError": 36223, "Ġ'\\\\':": 36224, "Ġsprites": 36225, "Messaging": 36226, "ĠBIGNUM": 36227, "MSH": 36228, "Preamble": 36229, "inbound": 36230, "Ġcron": 36231, "Ġbk": 36232, "Ġlx": 36233, "ĠMetrics": 36234, "notNull": 36235, "070": 36236, "DTR": 36237, "erted": 36238, "setEnd": 36239, "ĠSTI": 36240, "Ġibm": 36241, "ĠDwarf": 36242, "ToNode": 36243, "ĠBACK": 36244, "Unstructured": 36245, "yym": 36246, "ConfigurationException": 36247, "ĠMathUtils": 36248, "sortBy": 36249, "sftp": 36250, "globe": 36251, "saml": 36252, "çŁ¥": 36253, "cosa": 36254, "deriv": 36255, "These": 36256, "ReadBytes": 36257, "Ġ['$": 36258, "2002": 36259, "memberOf": 36260, "Ġdistutils": 36261, "Ġrtlpriv": 36262, "ĠReply": 36263, "xH": 36264, "xef": 36265, "}${": 36266, "lele": 36267, "Ġ'\",": 36268, "ady": 36269, "Produces": 36270, "ĠBrp": 36271, "ĠdataSize": 36272, "ĠatEOF": 36273, "IsA": 36274, "UserProfile": 36275, "ERTURE": 36276, "ProjectId": 36277, "oDb": 36278, "Ġxmit": 36279, "Ġshortest": 36280, "snic": 36281, "tenna": 36282, "Ġgraphs": 36283, "Variants": 36284, "ĠSERVER": 36285, ":\"#[": 36286, "MILLISECONDS": 36287, "wfd": 36288, "ches": 36289, "getCategory": 36290, "Ġdsi": 36291, "::::": 36292, "ĠASS": 36293, "ĠAno": 36294, "INACTIVE": 36295, "Uploaded": 36296, "Ġrounds": 36297, "Ġperms": 36298, "ChangedEvent": 36299, "Ġjsoniter": 36300, "Ġthreading": 36301, "optionalArgs": 36302, "-------+": 36303, "Ġpixman": 36304, "GkAtoms": 36305, "311": 36306, "LTE": 36307, "Mute": 36308, "MVT": 36309, "orElse": 36310, "ĠPWR": 36311, "Ġkeras": 36312, "Sharing": 36313, "dbh": 36314, "UNSET": 36315, "ConfigMap": 36316, "Ġcheckout": 36317, "LabelSelector": 36318, "READONLY": 36319, "planet": 36320, "Ġtimings": 36321, "Ġcalculates": 36322, "COMPILER": 36323, "'{": 36324, ")(?:": 36325, "Tf": 36326, "onor": 36327, "enna": 36328, "Ġfz": 36329, "Ġhaystack": 36330, "ĠWeight": 36331, "çļĦæķ°æį®": 36332, "Notebook": 36333, "FloatingPoint": 36334, "Ġazure": 36335, "Ġvpc": 36336, "Ġhar": 36337, "addHandler": 36338, "ĠsetData": 36339, "userID": 36340, "ZWQ": 36341, "Ġsnapshots": 36342, "imensat": 36343, "#!": 36344, "366": 36345, "RSV": 36346, "Ġssb": 36347, "Ġ0644": 36348, "ĠPatient": 36349, "akNet": 36350, "Analog": 36351, "GLint": 36352, "prevout": 36353, "------+": 36354, "Ġdotted": 36355, "IFF": 36356, "LJ": 36357, "ÅŁ": 36358, "instant": 36359, "Ġ\">\"": 36360, "trusive": 36361, "setKey": 36362, "ĠCLA": 36363, "Ġdeflate": 36364, "cmdbuf": 36365, "Ġbasestring": 36366, "DebugLog": 36367, "Masks": 36368, "closer": 36369, "ĠExtend": 36370, "ĠSubscribe": 36371, "ĠDirective": 36372, "ILT": 36373, "uK": 36374, "isif": 36375, "Ġptl": 36376, "setContext": 36377, "Ġgrep": 36378, "ToTest": 36379, "Ġ20000": 36380, "Ġencounter": 36381, "localized": 36382, "Ġaccel": 36383, "ScriptShell": 36384, "MetaType": 36385, "toks": 36386, "Downloads": 36387, "CIDR": 36388, "Captcha": 36389, "cdr": 36390, "vil": 36391, "excerpt": 36392, "PointTo": 36393, "postData": 36394, "279": 36395, "ĠByteString": 36396, "Ġthemes": 36397, "distances": 36398, "ĠInspector": 36399, "hort": 36400, "mrq": 36401, "ĠTOK": 36402, "Ġgop": 36403, "Ġgently": 36404, "ĠOVER": 36405, "createDocumentFragment": 36406, "ĠARN": 36407, "mcu": 36408, "RIER": 36409, "ULATOR": 36410, "878": 36411, "pwsz": 36412, "Booking": 36413, "Ġfires": 36414, "Ïģι": 36415, "vfree": 36416, "inuse": 36417, "loadNpm": 36418, "substitute": 36419, "Beans": 36420, "407": 36421, "thrown": 36422, "898": 36423, "armor": 36424, "ĠCloseHandle": 36425, "ĠNegative": 36426, "TRANSFORM": 36427, "PROVIDER": 36428, "610": 36429, "MUNLOCK": 36430, "bU": 36431, "ipaddr": 36432, "xchg": 36433, "ĠOV": 36434, "readreg": 36435, "(),!": 36436, "=================": 36437, "posted": 36438, "ArgumentList": 36439, "294": 36440, "Worklist": 36441, "ĉĉĉĉĉĉĉĉĉĉĉĉĉĉ": 36442, "schemaPath": 36443, "wldev": 36444, "Bvh": 36445, "lsa": 36446, "nents": 36447, "Ġxattr": 36448, "Ġcontinu": 36449, "IsDir": 36450, "ReadBuf": 36451, "\"]');": 36452, "SYSCTL": 36453, "tsf": 36454, "callout": 36455, "fluid": 36456, "Glue": 36457, "اء": 36458, "loadNpmTasks": 36459, "mU": 36460, "vht": 36461, "amqp": 36462, "Repaint": 36463, "intermediate": 36464, "SubReg": 36465, "ĠUNIT": 36466, "mktime": 36467, "ĠCBaseEntity": 36468, "DPRINTF": 36469, "pMsg": 36470, "ifting": 36471, "ulip": 36472, "izmo": 36473, "ĠAsk": 36474, "('(": 36475, "ĠUString": 36476, "hercloud": 36477, "Ġabi": 36478, "btnCancel": 36479, "Ġsilence": 36480, "'^": 36481, "800000": 36482, "Qcm": 36483, "]*/": 36484, "errorm": 36485, "setHeight": 36486, "ONY": 36487, "FileManager": 36488, "AsStream": 36489, "]+)/": 36490, "EBAD": 36491, "affe": 36492, "Ġlaunched": 36493, "ĠFoldMode": 36494, "woocommerce": 36495, "&,": 36496, "SMS": 36497, "fam": 36498, "prite": 36499, "sQ": 36500, "ilit": 36501, "Ġstages": 36502, "Validates": 36503, "NOFS": 36504, "PassManager": 36505, "Ġdecodes": 36506, "Snapshots": 36507, "getTextRange": 36508, "openingBracketBlock": 36509, "GLES": 36510, "Ùĥ": 36511, "isSame": 36512, "ados": 36513, "bee": 36514, "byteOffset": 36515, "INTEN": 36516, "IGJ": 36517, "Ġqint": 36518, "285": 36519, "crb": 36520, "8825": 36521, "Https": 36522, "ĠRadio": 36523, "dmxdev": 36524, "Usec": 36525, "ibuf": 36526, "Ġinherits": 36527, "Ġ+\\": 36528, "ĠNd": 36529, "prov": 36530, "llSet": 36531, "groupSize": 36532, "569": 36533, "Ġsuccessors": 36534, "ĠPlane": 36535, "Tom": 36536, "ĠSIM": 36537, "industr": 36538, "ĠUDF": 36539, "newdirfd": 36540, "ĠRec": 36541, "postgres": 36542, "(\\.": 36543, "fwstate": 36544, "Ġ2014": 36545, "ĠSrcReg": 36546, "è¶ħ": 36547, "缴æİ¥": 36548, "Mes": 36549, "gtt": 36550, "anium": 36551, "umem": 36552, "CTURE": 36553, "tempdir": 36554, "fsi": 36555, "OpenLayers": 36556, "RootElement": 36557, "ĠdecodeURIComponent": 36558, "Made": 36559, "gtest": 36560, "Ġblink": 36561, "ĠCOFF": 36562, "undled": 36563, "FileMode": 36564, "Ġheuristic": 36565, "Ġinitiator": 36566, "ModuleInfo": 36567, "Ġopenssl": 36568, "Ġvoor": 36569, "ÙĬÙĨ": 36570, "TechTalk": 36571, "STEAM": 36572, "-)": 36573, "Rtl": 36574, "hitch": 36575, "demand": 36576, "Ġwfd": 36577, "ĠSOFT": 36578, "GetProperties": 36579, "\";\\": 36580, "ĠitemId": 36581, "replacements": 36582, "ĠCompress": 36583, "'])){": 36584, "ApiKey": 36585, "incident": 36586, "CompilationUnit": 36587, "388": 36588, "aE": 36589, "sens": 36590, "ĠEar": 36591, "UNSPECIFIED": 36592, "ĠEncoder": 36593, "Ġ2011": 36594, "IBM": 36595, "Ww": 36596, "XE": 36597, "inery": 36598, "ĠSans": 36599, "ĠnewData": 36600, "Ġ___": 36601, "OTIFY": 36602, "NonZero": 36603, "ĠApplicationInsights": 36604, "sanity": 36605, "getLog": 36606, "ĠOTV": 36607, "gotiated": 36608, "+---------------------------------------------------------------------*/": 36609, "AREST": 36610, "JAX": 36611, "ĠĠĠĠĉĉĉ": 36612, "Ġtda": 36613, "strtotime": 36614, "ember": 36615, "ĠuCode": 36616, "ĠListener": 36617, "397": 36618, "è§Ĩ": 36619, "æİ¥åı£": 36620, "Ġaffects": 36621, "ĠAnalyze": 36622, "ĠSeekOrigin": 36623, "Lc": 36624, "NCR": 36625, "SATA": 36626, "Tu": 36627, "pids": 36628, "uari": 36629, "ĠonChange": 36630, "hwirq": 36631, "Weighted": 36632, "åIJ«": 36633, "meridian": 36634, "adjac": 36635, "pCell": 36636, "Ġ114": 36637, "Ġinteract": 36638, "BeginInit": 36639, "ĠConvertTo": 36640, "Characteristics": 36641, "TooShort": 36642, "VerboseProto": 36643, "errMsg": 36644, "=\"$": 36645, "cyA": 36646, "fcntl": 36647, "encodeOffsets": 36648, "paypal": 36649, "innerText": 36650, "ĠFinds": 36651, "ĠSCROLLSPY": 36652, "Jack": 36653, "kV": 36654, "pill": 36655, "SSF": 36656, "FBD": 36657, "Ġdevfn": 36658, "Ġemulate": 36659, "zoneOffset": 36660, "PendingException": 36661, "Semi": 36662, "FUL": 36663, "getFilter": 36664, "getByte": 36665, "setMode": 36666, "testFile": 36667, "Ġjz": 36668, "EXC": 36669, "explain": 36670, "diffuse": 36671, "ĠEnables": 36672, "Ġpermutation": 36673, "uptime": 36674, "Ġè¿ĶåĽŀ": 36675, "idata": 36676, "constrain": 36677, "Ġlvl": 36678, "Enclosing": 36679, "dirpath": 36680, "LogWarning": 36681, "descendant": 36682, "IGlz": 36683, "orizontally": 36684, "grads": 36685, "fficiency": 36686, "709": 36687, "bys": 36688, "fde": 36689, "ת": 36690, "reached": 36691, "--){": 36692, "Ġ135": 36693, "URB": 36694, "ViewGroup": 36695, "PropertyManager": 36696, "Imag": 36697, "ReturnUrl": 36698, "Ġ'-';": 36699, "ĠdeltaY": 36700, "AbstractClass": 36701, "strconv": 36702, "Ġhouse": 36703, "ĠgetCache": 36704, "EndInit": 36705, "Ġmostly": 36706, "055": 36707, "AFE": 36708, "SAL": 36709, "flo": 36710, "mhz": 36711, "qz": 36712, "Ġclen": 36713, "ĠmLast": 36714, "Ġ[<": 36715, "Truth": 36716, "targetType": 36717, "56789": 36718, "ĠXmlDocument": 36719, "Octet": 36720, "RADIUS": 36721, "davinci": 36722, "ĠDeployment": 36723, "ÄĽ": 36724, "establish": 36725, "MDIO": 36726, "StackSize": 36727, "492": 36728, "quoteName": 36729, "GENERATED": 36730, "ĠMVPP": 36731, "'\\\\": 36732, "Vpn": 36733, "tch": 36734, "bbreg": 36735, "Ġreliable": 36736, "ibqp": 36737, "Ġzd": 36738, "hasValue": 36739, "Trakt": 36740, "36000": 36741, "mediaType": 36742, "Ġestimator": 36743, "SQRT": 36744, "Ġ{{{": 36745, "isDef": 36746, "Ġao": 36747, "Ġexplanation": 36748, "MANT": 36749, "ClassInfo": 36750, "0947": 36751, "PALETTE": 36752, "ĠYaml": 36753, "Overload": 36754, "IHRv": 36755, "Ġsuperblock": 36756, "Sigma": 36757, "lzma": 36758, "IDENTITY": 36759, "dnp": 36760, "qy": 36761, "Ġcff": 36762, "ĠBLE": 36763, "ĠHY": 36764, "timeval": 36765, "Ġreaders": 36766, "Ġrefute": 36767, "mech": 36768, "Ġ{}.": 36769, "Ġexpressed": 36770, "OpenCL": 36771, "\":\"+": 36772, "Connecting": 36773, "ĠVerbose": 36774, "ĠPause": 36775, "vZGU": 36776, "æ¯ı": 36777, "æ¯Ķ": 36778, "inplace": 36779, "FIRE": 36780, "orderId": 36781, "Ġuserdata": 36782, "AndValue": 36783, "[\\]": 36784, "ĠIndices": 36785, "busybox": 36786, "Ġrelevance": 36787, "Ġhelps": 36788, "\"=>$": 36789, "GLenum": 36790, "MSS": 36791, "vco": 36792, "itemName": 36793, "Learn": 36794, "ickago": 36795, "ĠfieldType": 36796, "IGA": 36797, "ĠLoaded": 36798, "Ġpersonal": 36799, "XFF": 36800, "tHelper": 36801, "Ġfiring": 36802, "Ġbullet": 36803, "newNode": 36804, "ĠHIGH": 36805, "psk": 36806, "Ġsubtitle": 36807, "LatLng": 36808, "CreatedAt": 36809, "å¾®": 36810, "STEREO": 36811, "ĠFEATURE": 36812, "COLLECTION": 36813, "hapd": 36814, "pblock": 36815, "åĭ": 36816, "apk": 36817, "Traverse": 36818, "ãĤŃ": 36819, "Lexical": 36820, "ĠPerformance": 36821, "getTotalMilliseconds": 36822, "Ġresolving": 36823, "ICollection": 36824, "dca": 36825, "ĠAMF": 36826, "ĠMSP": 36827, "ĠOf": 36828, "ĠExclude": 36829, "ĠStage": 36830, "latt": 36831, "\\/\\/": 36832, "animated": 36833, "ĠValidationError": 36834, "PresContext": 36835, "mplitude": 36836, "8390": 36837, "Nf": 36838, "ĠEquivalent": 36839, "ĠProd": 36840, "Neighbors": 36841, "GUICtrlRebar": 36842, "ĠCleansed": 36843, "wraps": 36844, "Rolling": 36845, "Vip": 36846, "pclk": 36847, "Ġcpi": 36848, "Ġdecompress": 36849, "ĠnewInstance": 36850, "FileAttributes": 36851, "Processors": 36852, "Ġlabeled": 36853, "LoginId": 36854, "Ġdelivered": 36855, "CDR": 36856, "aName": 36857, "rdr": 36858, "éŁ": 36859, "inebase": 36860, "GetActive": 36861, "ansions": 36862, "Chapter": 36863, "ĠElf": 36864, "diva": 36865, "Ġcallbackfn": 36866, "Ġshifts": 36867, "pluginName": 36868, "Ġbasically": 36869, "TOPIC": 36870, "(.*?)": 36871, "Yr": 36872, "mature": 36873, "spline": 36874, "GetParameters": 36875, "fep": 36876, "ĠECD": 36877, "KeyUp": 36878, "à¸ĩ": 36879, "ĠNetOffice": 36880, "mVy": 36881, "needEncrypt": 36882, "=:": 36883, "Hsm": 36884, "ÐĹ": 36885, "alphabet": 36886, "velocities": 36887, "AddComponent": 36888, "mtt": 36889, "hasContent": 36890, "Ġinitiated": 36891, "Entropy": 36892, "chips": 36893, "385": 36894, "Ġselecting": 36895, "(\"#%": 36896, "ĠBean": 36897, "Estimator": 36898, "ĠCleansedLines": 36899, "Darwin": 36900, "sZ": 36901, "ssc": 36902, "Ġchips": 36903, "ĠaddEventListener": 36904, "ĠappId": 36905, "ControlMessage": 36906, "WRONG": 36907, "Reporting": 36908, "ĠXmlNode": 36909, "Organizations": 36910, "enumerated": 36911, "xlbWVud": 36912, "ĠPRIVATE": 36913, "DisruptionBudget": 36914, "cpt": 36915, "pVM": 36916, "ĠaState": 36917, "ĠCLO": 36918, "ĠsetConfig": 36919, "ColumnWidth": 36920, "Acceleration": 36921, "Ġ{{#": 36922, "SecretKey": 36923, "tinyMCE": 36924, "mpotent": 36925, "CATCH": 36926, "Oz": 36927, "Ġach": 36928, "ĠPen": 36929, "MART": 36930, "Ġheartbeat": 36931, "FRAC": 36932, "370": 36933, "Ġmocks": 36934, "Mf": 36935, "yystack": 36936, "Ġ=================================": 36937, "getTokenizer": 36938, "experiment": 36939, "('['": 36940, "Street": 36941, "ĠBFI": 36942, "ĠISR": 36943, "Ġ94": 36944, "Postfix": 36945, "373": 36946, "responsive": 36947, "7164": 36948, "ĠkeywordMapper": 36949, "FBO": 36950, "Ġbunch": 36951, "Ġconform": 36952, "Emulate": 36953, "Charsets": 36954, "ĠUnary": 36955, "NOOP": 36956, "PhysicalDevice": 36957, "Copied": 36958, "æĦı": 36959, "701": 36960, "Ae": 36961, "UIS": 36962, "appa": 36963, "ĠDash": 36964, "IsInstanceOf": 36965, "createHeader": 36966, "msgid": 36967, "cnf": 36968, "Ġwaiter": 36969, "|>|": 36970, "Ġstrrpos": 36971, "922": 36972, "Zet": 36973, "lnet": 36974, "incl": 36975, "Ġpct": 36976, "ssd": 36977, "Ġww": 36978, "readBytes": 36979, "ĠQVector": 36980, "0928": 36981, "Debugging": 36982, "ĠRespon": 36983, "GDAL": 36984, "//==============================================================================": 36985, "Ġbottleneck": 36986, "Ġpreceded": 36987, "AzureOperationError": 36988, "DOF": 36989, "LBL": 36990, "tstamp": 36991, "׳": 36992, "alesc": 36993, "ĠCred": 36994, "ocracy": 36995, "ĠBeta": 36996, "Ġ``,": 36997, "SCL": 36998, "275": 36999, "aboutus": 37000, "Aj": 37001, "SGE": 37002, "Ġvault": 37003, "ĠCod": 37004, "addJS": 37005, "STYPE": 37006, "ĠHuffman": 37007, "elementName": 37008, "EndTags": 37009, "ClientID": 37010, "ĠProvide": 37011, "Ġacceleration": 37012, "MSGSIZE": 37013, "ĠMatchers": 37014, "SoftBody": 37015, "æ£ĢæŁ¥": 37016, "lJ": 37017, "getReturnType": 37018, "ĠNav": 37019, "InputData": 37020, "Coordinator": 37021, "ĠgroupName": 37022, "CustomAttribute": 37023, "ĠllGet": 37024, "animations": 37025, ">\\\\": 37026, "Nth": 37027, "gist": 37028, "nskb": 37029, "Ġsquared": 37030, "Ġ\"\"))": 37031, "Ġgre": 37032, "assertEmpty": 37033, "entityId": 37034, "ĠJSONArray": 37035, "azor": 37036, "redirects": 37037, "4100": 37038, "Cz": 37039, "Oy": 37040, "fed": 37041, "fir": 37042, "nud": 37043, "ĠmIs": 37044, "Ġmoney": 37045, "Ġwy": 37046, "\">%": 37047, "txpower": 37048, "coreos": 37049, "ĠCreateOrUpdate": 37050, "Connectivity": 37051, "ĠSwing": 37052, "HING": 37053, "JACK": 37054, "getDB": 37055, "ListBy": 37056, "ĠretValue": 37057, "ĠJSApi": 37058, "PageNumber": 37059, "HasColumnType": 37060, "Ġsyms": 37061, "Ġauthorize": 37062, "cwnd": 37063, "privacypolicy": 37064, "+------------------------------------------------------------------------": 37065, ";){": 37066, "Ġ(){": 37067, "Ġinference": 37068, "Ġstretch": 37069, "GetIndex": 37070, "Deprecation": 37071, "ValueMap": 37072, "ĠLAN": 37073, "ErrorString": 37074, "eneration": 37075, "saver": 37076, "ĠSetLen": 37077, "Ġcomplement": 37078, "processors": 37079, "sda": 37080, "278": 37081, "Displays": 37082, "Ġ\"\\\\/\\\\": 37083, "TestCases": 37084, "GUIDialog": 37085, "ĠValidationException": 37086, "ĠMsRestAzure": 37087, "rele": 37088, "asio": 37089, "spir": 37090, "addrinfo": 37091, "2835": 37092, "LastIndex": 37093, "Ġanimator": 37094, "ĠSingleton": 37095, "QRSTUVWXYZ": 37096, "oConfig": 37097, "intStringLen": 37098, "ĠSCC": 37099, "ĠCli": 37100, "KeyID": 37101, "Ġ{}\\": 37102, "nowrap": 37103, "clockid": 37104, "Ġsaver": 37105, "éĩij": 37106, "ENOSYS": 37107, "Ġnfsd": 37108, "è£ħ": 37109, "æ´": 37110, "Ġvport": 37111, "workload": 37112, "ĠIDENT": 37113, "TreeModel": 37114, "иÑĢ": 37115, "CBaseEntity": 37116, "five": 37117, "rcode": 37118, "Ġvnic": 37119, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĊ": 37120, "ĠDUMP": 37121, "ĠMCF": 37122, "DataLen": 37123, "':\\": 37124, "ĠcheckBox": 37125, "htmlspecialchars": 37126, "MARGIN": 37127, "hibited": 37128, "UGE": 37129, "aught": 37130, "dge": 37131, "fis": 37132, "ldb": 37133, "ĠnSize": 37134, "Ġmotor": 37135, "scroller": 37136, "ĠROS": 37137, "privilege": 37138, "OnLoad": 37139, "Ġprintln": 37140, "polarity": 37141, "ĠCurrency": 37142, "bom": 37143, "tact": 37144, "erber": 37145, "icom": 37146, "Ġunquoted": 37147, "ĠGetDefault": 37148, "ServiceType": 37149, "vmcs": 37150, "ParameterList": 37151, "DecSendContainerState": 37152, "Ġorganizations": 37153, "metal": 37154, "ĠSLJIT": 37155, "Faction": 37156, "cE": 37157, "pMac": 37158, "lew": 37159, "Reconc": 37160, "Ġbeam": 37161, "perly": 37162, "rtm": 37163, "NextResults": 37164, "GUICtrlMenu": 37165, "ĠWARN": 37166, "xZ": 37167, "zig": 37168, "getById": 37169, "nology": 37170, "ginx": 37171, "Monitored": 37172, "Downloader": 37173, "grace": 37174, "ĠSWAP": 37175, "isNotEmpty": 37176, "COMPRESSION": 37177, "Eloquent": 37178, "xie": 37179, "Ġmot": 37180, "Ġoa": 37181, "scip": 37182, "PathTo": 37183, "Ġkeyctl": 37184, "uiding": 37185, "Structural": 37186, "671": 37187, "Ġfinite": 37188, "EncSendContainerState": 37189, "movq": 37190, "LLVMContext": 37191, "Ease": 37192, "SLOW": 37193, "ĠSHR": 37194, "Ġhdc": 37195, "rowIndex": 37196, "lsrv": 37197, "WindowUpdate": 37198, "RefVoCollection": 37199, "469": 37200, "TryAdd": 37201, "Ġsentinel": 37202, "ediator": 37203, "QUFBO": 37204, "AsmParser": 37205, "Occurs": 37206, "Provisioning": 37207, "LIKELY": 37208, "isInstanceOf": 37209, "ĠTor": 37210, "ĠAug": 37211, "ĠNON": 37212, "ĠBNX": 37213, "ĠBytecodes": 37214, "074": 37215, "JobRequest": 37216, "Ġbars": 37217, "Ġjoystick": 37218, "???": 37219, "votes": 37220, "ĠTestingT": 37221, "Achievement": 37222, "taint": 37223, "ĠpV": 37224, "rowData": 37225, "DataString": 37226, "DELIMIT": 37227, "CHA": 37228, "(){\"": 37229, "CSD": 37230, "vZiB": 37231, "836": 37232, "eron": 37233, "anduiding": 37234, "Remainder": 37235, "Deactivate": 37236, "spc": 37237, "ResponseBody": 37238, "CreateNew": 37239, "ngdoc": 37240, "396": 37241, "ctypes": 37242, "reach": 37243, "enumber": 37244, "ifstream": 37245, "Ġ\"}": 37246, "getFullName": 37247, "devtools": 37248, "ĠLAST": 37249, "FileId": 37250, "Ġtrait": 37251, "ConstantPool": 37252, "drvinfo": 37253, "BYPASS": 37254, "JobId": 37255, "Glv": 37256, "çĶ¨äºİ": 37257, "Ġvcmp": 37258, "ĠonSuccess": 37259, "Contextual": 37260, "ĠWriteLine": 37261, "MySQL": 37262, "Ġgraphic": 37263, "RestClient": 37264, "UnsupportedOperationException": 37265, "wheelDelta": 37266, "Singular": 37267, "Vision": 37268, "ĠPIC": 37269, "ĠHPI": 37270, "Boom": 37271, "0600": 37272, "267": 37273, "Ġaccumulated": 37274, "JComponent": 37275, "LRU": 37276, "Ġprun": 37277, "bbing": 37278, "cob": 37279, "setBackground": 37280, "ĠSATA": 37281, "ĠTCL": 37282, "startLine": 37283, "competency": 37284, "ntb": 37285, "DRS": 37286, "7654": 37287, "executeCommand": 37288, "Normalizer": 37289, "EnvironmentVariable": 37290, "466": 37291, "Eve": 37292, "fbt": 37293, "pstate": 37294, "sans": 37295, "xj": 37296, "oning": 37297, "NotBe": 37298, "Applicable": 37299, "ĠnumSamples": 37300, "uids": 37301, "\".',": 37302, "===-": 37303, "PoolSize": 37304, "Corrupt": 37305, "sych": 37306, "(?:(?:\\\\\\\\.)|(?:[^'": 37307, "Ftp": 37308, "cean": 37309, "Ġspark": 37310, "lov": 37311, "atakana": 37312, "OrDie": 37313, "ĠmaxResults": 37314, "SCAL": 37315, "COMMA": 37316, "ĠFileAccess": 37317, "responding": 37318, "merbivore": 37319, "Smtp": 37320, "ĠASTNode": 37321, "cidr": 37322, "Ġaggregated": 37323, "Ġcomparisons": 37324, "ĠChildren": 37325, "ÄĮ": 37326, "ctf": 37327, "Ġnbuf": 37328, "==='": 37329, "ĠSIR": 37330, "Ġkr": 37331, "etailed": 37332, "hasData": 37333, "SPDIF": 37334, "ighbours": 37335, "standalone": 37336, "ĠAllowed": 37337, "pEntry": 37338, "ĠAlt": 37339, "ĠBMP": 37340, "Ġcool": 37341, "ĠExpressionType": 37342, "TenantId": 37343, "313": 37344, "Dan": 37345, "strbuf": 37346, "getPlayer": 37347, "ĠDemo": 37348, "perator": 37349, "NodeIndex": 37350, "Ġprintable": 37351, "Discover": 37352, "tsi": 37353, "AsyncOperation": 37354, "RectF": 37355, "ĠDateTimeOffset": 37356, "ĠSizeof": 37357, "ĠWithout": 37358, "BiDi": 37359, "ĠScratch": 37360, "\"{": 37361, "çĪ": 37362, "Ġmdb": 37363, "writeback": 37364, "Ġlooping": 37365, "keepalive": 37366, "GraphicsUnit": 37367, "tensorflow": 37368, "associations": 37369, ".*?)\\": 37370, "SelectedIndexChanged": 37371, "486": 37372, "8250": 37373, "asl": 37374, "occur": 37375, "Ġobjective": 37376, "bytesRead": 37377, "kwds": 37378, "ĠDisabled": 37379, "æŃ¢": 37380, "ĠSymfony": 37381, "Combiner": 37382, "Yv": 37383, "mont": 37384, "Ġmsi": 37385, "Ġ//@": 37386, "ĠnewItem": 37387, "ĠPtrace": 37388, "Ġgettext": 37389, "ĠEBT": 37390, "((\\": 37391, "ldo": 37392, "\"),{": 37393, "Relatie": 37394, "mocks": 37395, "MainFrame": 37396, "ĠMCExpr": 37397, "gICAgIC": 37398, "Sqlite": 37399, "IamPermissions": 37400, "ĠDOCUMENT": 37401, ".@": 37402, "JText": 37403, "brcmf": 37404, "etary": 37405, "Ġsmi": 37406, "raper": 37407, "ĠSNode": 37408, "Ġarma": 37409, "keygen": 37410, "ĠOTG": 37411, "fileHandle": 37412, "mluZ": 37413, "Scaler": 37414, "MessageSize": 37415, "calibrate": 37416, "Redirects": 37417, ".*?\\\\": 37418, "//=========================================================": 37419, "MSP": 37420, "QG": 37421, "hj": 37422, "Ġ(.": 37423, "ĠresultSet": 37424, "Shr": 37425, "292": 37426, "customers": 37427, "Ġ{};\\": 37428, "ĠPoints": 37429, "ĠDepending": 37430, "ĠPopup": 37431, "/?>\",": 37432, "jdGlvbiB": 37433, "ZhciB": 37434, "]});": 37435, "InList": 37436, "formData": 37437, "\"),\"": 37438, "Ġcoerce": 37439, "ĠBuf": 37440, "expecting": 37441, "ç»Ļ": 37442, "Carrier": 37443, "brackets": 37444, "ĠExecutionContext": 37445, "(?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?": 37446, "UHJvc": 37447, "pops": 37448, "isEqual": 37449, "Ġtur": 37450, "ĠDAY": 37451, "ĠMIT": 37452, "GetImage": 37453, "lenp": 37454, "ynch": 37455, "ICsg": 37456, "transports": 37457, "Transparency": 37458, "IntegerValue": 37459, "DropTarget": 37460, "Ġrecorder": 37461, "editabletypes": 37462, "rfind": 37463, "),\\": 37464, "'])->": 37465, "QUIT": 37466, "sendbuf": 37467, "CmdLine": 37468, "InnerText": 37469, "ç§Ĵ": 37470, "spreadsheet": 37471, "fscanf": 37472, "Ġtangent": 37473, "__|": 37474, "ĠWORK": 37475, "ViewItem": 37476, "NEAREST": 37477, "existsSync": 37478, "BigInt": 37479, "Ġmlxsw": 37480, "Ġне": 37481, "alicious": 37482, "HMg": 37483, "QFont": 37484, "gwin": 37485, "pDX": 37486, "readPreference": 37487, "Ġ`&": 37488, "createWorker": 37489, "\",\"\\": 37490, "boxed": 37491, "098": 37492, "graphs": 37493, "AtomContainer": 37494, "åĨį": 37495, "ç³»ç»Ł": 37496, "ĠSTEP": 37497, "atingWebhookConfiguration": 37498, "/~": 37499, "sbox": 37500, "vxlan": 37501, "δ": 37502, "::%": 37503, "ĠRails": 37504, "TEAM": 37505, "Ġhotplug": 37506, "625": 37507, "amar": 37508, "itype": 37509, "ĠSEND": 37510, "Ġipt": 37511, "ACP": 37512, "RequestID": 37513, "Regel": 37514, "ãĥĹ": 37515, "è¿ĺ": 37516, "Ġmdio": 37517, "å¿Ĺ": 37518, "maintenance": 37519, "наÑĩ": 37520, "934": 37521, "BSP": 37522, "Kk": 37523, "eente": 37524, "ĠgetStatus": 37525, "cpup": 37526, "pcf": 37527, "TaskId": 37528, "Ġcompletions": 37529, "pubKey": 37530, "mlxsw": 37531, "ĠSAXException": 37532, "Mysql": 37533, "cust": 37534, "ihost": 37535, "Ġtape": 37536, "ĠgetModel": 37537, "SizeType": 37538, "NotEquals": 37539, "ActiveRecord": 37540, "filler": 37541, "ĠAllows": 37542, "ĠDPLL": 37543, "Ġchmod": 37544, "Intf": 37545, "Ġexplain": 37546, "398": 37547, "Ġclipped": 37548, "Cant": 37549, "dHJ": 37550, "kaddr": 37551, "zQ": 37552, "==(": 37553, "ĠAck": 37554, "Ġhdev": 37555, "ĠgetProperty": 37556, "cold": 37557, "ĠXPC": 37558, "NEQ": 37559, "wrqu": 37560, "ĠBackend": 37561, "NUnit": 37562, "fputs": 37563, "mutation": 37564, "Ġfgets": 37565, "Ġovers": 37566, "Ġwnd": 37567, "istical": 37568, "ANDB": 37569, "((!": 37570, "}}.": 37571, "ĠLocalDate": 37572, "314": 37573, "zR": 37574, "getBounds": 37575, "ĠDWC": 37576, "Ġuan": 37577, "SEED": 37578, "Tested": 37579, "lastError": 37580, "AutoFilter": 37581, "REFRESH": 37582, "ĠblkCnt": 37583, "Ġviolation": 37584, "mcr": 37585, "getSheet": 37586, "Ġtopo": 37587, "scx": 37588, "ĠBH": 37589, "ANALOG": 37590, "classMap": 37591, "transformation": 37592, "centers": 37593, "261": 37594, "StructField": 37595, "Ġcpufreq": 37596, "DIGIT": 37597, "ĠSdkClientException": 37598, "ĠLICENSE": 37599, "sint": 37600, "recurring": 37601, "Ġwrote": 37602, "\")(": 37603, "ĠdataGridView": 37604, "sdu": 37605, "ircraft": 37606, "æĿĥéĻIJ": 37607, "nIndex": 37608, "atEOF": 37609, "deem": 37610, "Ġ\"\"},": 37611, "Ġjvm": 37612, "Algorithms": 37613, "ResourceAttributes": 37614, "2412": 37615, "Ġinstaller": 37616, "(?:(?:\\\\\\\\.)|(?:[^\"": 37617, "Bas": 37618, "fits": 37619, "Ġfds": 37620, "Incr": 37621, "ĠerrorCount": 37622, "ĠGIMP": 37623, "MAD": 37624, "curves": 37625, "StartOffset": 37626, "splitter": 37627, "swarm": 37628, "Ġlibusb": 37629, "PRETTY": 37630, "GridLayout": 37631, "Ġsupporting": 37632, "]()})},": 37633, "SubtargetInfo": 37634, "JqZWN": 37635, "Bright": 37636, "BCD": 37637, "PVOID": 37638, "qreal": 37639, "Ġpreamble": 37640, "cher": 37641, "getDoc": 37642, "ĠSteam": 37643, "ĠgetS": 37644, "\\\\$_": 37645, "Ġpermit": 37646, "ArgumentError": 37647, "supportConstant": 37648, "]?\\": 37649, "ĠROUND": 37650, "Cas": 37651, "sus": 37652, "vhost": 37653, ":\"/?>\",": 37654, "\\\"\";": 37655, "DYN": 37656, "Ġaver": 37657, "Ġegg": 37658, "GetFullPath": 37659, "ToStream": 37660, "STP": 37661, "ĠtestParse": 37662, "Ġ`\\": 37663, "IPA": 37664, "Polyline": 37665, "Ġphysics": 37666, "CUBE": 37667, "doesNot": 37668, "CryptoKey": 37669, "Ġwrappers": 37670, "Bloom": 37671, "Gls": 37672, "Ġwps": 37673, "StringLength": 37674, "rived": 37675, ":\"(<": 37676, "Minimal": 37677, "ĠRegular": 37678, "LOGERROR": 37679, "ĠOutputInterface": 37680, "iphers": 37681, "10000000": 37682, "witness": 37683, "toh": 37684, "][-": 37685, "hwc": 37686, "Ġ108": 37687, "Factors": 37688, "ĠLeaf": 37689, "Ġactivities": 37690, "movable": 37691, "#\"": 37692, "SOF": 37693, "funct": 37694, "mdata": 37695, "Ðļ": 37696, "Exclusion": 37697, "Ġbehave": 37698, "SetCurrent": 37699, "Ġkcalloc": 37700, "IsChecked": 37701, "Ġparport": 37702, "ĠclientId": 37703, "longest": 37704, "ĠNewClient": 37705, "Brand": 37706, "balanced": 37707, "$(\"": 37708, "BPP": 37709, "DCD": 37710, "sen": 37711, "srs": 37712, "skeleton": 37713, "AddString": 37714, "Cmds": 37715, "Ghost": 37716, "bnd": 37717, "hive": 37718, "kthread": 37719, "nio": 37720, "uhci": 37721, "recursion": 37722, "ĠNDIS": 37723, "ĠDONE": 37724, "nummer": 37725, "Ġquadr": 37726, "BitSet": 37727, "ĠAPIlib": 37728, "ĠmetaData": 37729, "[[@": 37730, "addJSLine": 37731, "GSS": 37732, "ĠÙħ": 37733, "ontouchstart": 37734, "ĠmContext": 37735, "setFocus": 37736, "ERCE": 37737, "regset": 37738, "ĠWrapped": 37739, "283": 37740, "calibration": 37741, "codable": 37742, "nZhci": 37743, "iamVjd": 37744, "EUR": 37745, "tLS": 37746, "RESTRICT": 37747, "ALARM": 37748, "mlc": 37749, "doSomething": 37750, "ĠSCHED": 37751, "éĿŀ": 37752, "!.": 37753, "ingroup": 37754, "Ġbed": 37755, "ĠTele": 37756, "Defaulted": 37757, "Ġunbind": 37758, "Ġdoor": 37759, "ItemSelected": 37760, "anners": 37761, "((((": 37762, "scaleY": 37763, "464": 37764, "418": 37765, "TCA": 37766, "xV": 37767, "isson": 37768, "ĠAudit": 37769, "ĠisOpen": 37770, "GetInfo": 37771, "Chron": 37772, "WithMany": 37773, "APM": 37774, "URLConnection": 37775, "defineMode": 37776, "chunkSize": 37777, "\"=>\"": 37778, "sdb": 37779, "(\"${": 37780, "ĠtoIndex": 37781, "ĠisSet": 37782, "Ġformed": 37783, "addSql": 37784, "TextAlign": 37785, "ĠexpectedValue": 37786, "ĠcurPunc": 37787, "ĠBased": 37788, "parenthesis": 37789, "ĠREGISTER": 37790, "dssdev": 37791, "getGlobalContext": 37792, "breadcrumbs": 37793, "kex": 37794, "Ġprune": 37795, "ĠPress": 37796, "Ġuniversal": 37797, "TRUST": 37798, "ConfigRequest": 37799, "localization": 37800, "EXCLUSIVE": 37801, "})})}": 37802, "Ġiobase": 37803, "6050": 37804, "RemoteAddr": 37805, "à®®": 37806, "VEHICLE": 37807, "819": 37808, "sprom": 37809, "xhc": 37810, "ĠaSource": 37811, "ĠDUP": 37812, "Ġanon": 37813, "charStream": 37814, "GroupID": 37815, "ContentId": 37816, "Ġqdisc": 37817, "Prep": 37818, "TreeWidgetItem": 37819, "ambient": 37820, "StandardItem": 37821, "EndpointAddress": 37822, "IZON": 37823, "管çIJĨ": 37824, "Jvm": 37825, "bdb": 37826, "Ġvtx": 37827, "Ġherm": 37828, "($('#": 37829, "ĠVIS": 37830, "Ġdescend": 37831, "hdGV": 37832, "alerts": 37833, "ä¸įåŃĺåľ¨": 37834, "silence": 37835, ".','": 37836, "Ġthrottle": 37837, "getPrevious": 37838, "Inbound": 37839, "ĠCalle": 37840, "Serv": 37841, "Ġ(${": 37842, "TagBuffer": 37843, "attributeValue": 37844, "cdi": 37845, "Ġtriangular": 37846, "eslachtsnaam": 37847, "Juni": 37848, "QN": 37849, "clen": 37850, "arrange": 37851, "isWindow": 37852, "ĠAFFIX": 37853, "ĠRV": 37854, "ĠstartTag": 37855, "ExecCredential": 37856, "PacketSize": 37857, "NEWLINE": 37858, "ĠPrism": 37859, "POLY": 37860, "ĠHardware": 37861, "jia": 37862, "ĠEnumeration": 37863, "setTo": 37864, "ĠADV": 37865, "ĠNID": 37866, "Ġobjc": 37867, "jsoniter": 37868, "sdc": 37869, "ĠDECODE": 37870, "FCMP": 37871, "Population": 37872, "ĠXmlNodeType": 37873, "juin": 37874, "Ġexponential": 37875, "gpiod": 37876, "Gzip": 37877, "Lv": 37878, "XO": 37879, "wusbhc": 37880, "trb": 37881, "ĠgetTable": 37882, "Compartment": 37883, "newt": 37884, "rawSyscall": 37885, "PET": 37886, "AttributeType": 37887, "\"]).": 37888, "ĠHTTPS": 37889, "Ġlicensed": 37890, "ĠMultiply": 37891, "Mol": 37892, "SLASH": 37893, "aStr": 37894, "amz": 37895, "Ġpgid": 37896, "imb": 37897, "ubus": 37898, "quite": 37899, "Ġgrand": 37900, "ĠgetService": 37901, "Ġprofiler": 37902, "bsi": 37903, "Novemb": 37904, "992": 37905, "genesis": 37906, "RXZlbn": 37907, "è¯Ŀ": 37908, "ĠHttpResponseException": 37909, "Favorite": 37910, "èµĦæºIJ": 37911, "Dq": 37912, "lum": 37913, "Ġsir": 37914, "stry": 37915, ")?\\": 37916, "Ġunderscore": 37917, "ĠUNI": 37918, "juil": 37919, "947": 37920, "Tn": 37921, "dname": 37922, "echarts": 37923, "kM": 37924, "Σ": 37925, "Ġlpc": 37926, "Ġ(!((": 37927, "fileSize": 37928, "AppData": 37929, "Ġmodifies": 37930, "353": 37931, "Ġredirected": 37932, "ĠAnother": 37933, "=*": 37934, "SDR": 37935, ");\"": 37936, "urgerservicenummer": 37937, "setFrom": 37938, "liptic": 37939, "ĠFMOD": 37940, "ServiceV": 37941, "outputStream": 37942, "FrameRate": 37943, "ggy": 37944, "ĠKS": 37945, "hdGlvb": 37946, "ĠClearChr": 37947, "Ġpinned": 37948, "NSU": 37949, "YI": 37950, "à¬": 37951, "redd": 37952, "outError": 37953, "ordova": 37954, "=\"-": 37955, "ITest": 37956, "idxs": 37957, "ĠAllocation": 37958, "vidia": 37959, "lossary": 37960, "Strike": 37961, "AlreadyExists": 37962, "APPROX": 37963, "IAN": 37964, "deleter": 37965, "Ġspc": 37966, "CodeCoverage": 37967, "firstLine": 37968, "canon": 37969, "ĠShuffle": 37970, "WEAK": 37971, "461": 37972, "deltaTime": 37973, "Ġswipe": 37974, "TickCount": 37975, "ĠMini": 37976, "//===========================================================================": 37977, "аÑĤÑĮ": 37978, "Tt": 37979, "preamble": 37980, "ĠAnt": 37981, "Converted": 37982, "addHeader": 37983, "TestUtil": 37984, "LOADED": 37985, "numberFormat": 37986, "PARITY": 37987, "FBQUE": 37988, "Ġpersistence": 37989, "midnight": 37990, "Semicolon": 37991, "strokeColor": 37992, "Mixer": 37993, "Ġguarantees": 37994, "ĠCalculates": 37995, "KEN": 37996, "cash": 37997, "Ġmanag": 37998, "ĠScheme": 37999, "Deviation": 38000, "codecs": 38001, "Ġ#\"": 38002, "NewClient": 38003, "openxml": 38004, "Ġconsensus": 38005, "ĠSqlDbType": 38006, "Ribbon": 38007, "tcblx": 38008, "IFICATE": 38009, "EditorBrowsableState": 38010, "cis": 38011, "ÄĻ": 38012, "Ġpaddr": 38013, "Ġinformer": 38014, "ĠHot": 38015, "BaseName": 38016, "packaged": 38017, "ĠREC": 38018, "namesAbbr": 38019, "bootstrapTable": 38020, "çľĭ": 38021, "ĠClearChrFlags": 38022, "atl": 38023, "development": 38024, "Ġcdb": 38025, "ĠFchmod": 38026, "Ġextraction": 38027, "paration": 38028, "avac": 38029, "httpContext": 38030, "StartTag": 38031, ",\"__": 38032, "ĠpageNumber": 38033, "ĠPRBool": 38034, "Badge": 38035, "AQD": 38036, "Adaptive": 38037, "Shopping": 38038, "Bv": 38039, "Dav": 38040, "War": 38041, "ĠâĶ": 38042, "Ġbdrv": 38043, "ICmd": 38044, "NewInt": 38045, "replaceWith": 38046, "]+$)/,": 38047, "ĉĉĉĉĉĉĉĉĠĠ": 38048, "GraphNode": 38049, "drawText": 38050, "CNM": 38051, "EQUALS": 38052, "pwallet": 38053, "slashes": 38054, "ĠBufferedImage": 38055, "ABCDEFGHIJKLMNOP": 38056, "bcast": 38057, "Sts": 38058, "exture": 38059, "WriteBuf": 38060, "InterfaceType": 38061, "Mozilla": 38062, "WRONLY": 38063, "pbiB": 38064, "DebugString": 38065, "(\".\")": 38066, "Characteristic": 38067, "ĠSmallString": 38068, "ĠDISPLAY": 38069, "dnd": 38070, "sudo": 38071, "yet": 38072, "Ġconversation": 38073, "Ġrtx": 38074, "ĠLOW": 38075, "numerator": 38076, "createChild": 38077, "ĠreadOnly": 38078, "Variation": 38079, "ĠrowCount": 38080, "autoscaling": 38081, "ĠdateFormat": 38082, "gbm": 38083, "Mechanism": 38084, "Ġtyping": 38085, "ĠPOINT": 38086, "ĠSOCKET": 38087, "Ġ'!'": 38088, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA": 38089, "gA": 38090, "sable": 38091, "zV": 38092, "ĠMU": 38093, "addComponent": 38094, "['$": 38095, "ĠRDS": 38096, "Buffering": 38097, "ĠUnlike": 38098, "Ġsigns": 38099, "(/,": 38100, "Insts": 38101, "replies": 38102, "[^>]*": 38103, "MICRO": 38104, "UNIQUE": 38105, "Ġtrouble": 38106, "Ġlosses": 38107, "BROW": 38108, "GAM": 38109, "cumulative": 38110, "Ġ==============": 38111, "setPrototypeOf": 38112, "ĠCAmount": 38113, "outstanding": 38114, "shl": 38115, "FileReader": 38116, "FunctionInfo": 38117, "061": 38118, "导": 38119, "assertNotEmpty": 38120, "Ġparticipant": 38121, ".),": 38122, "ĠEnumerate": 38123, "retrans": 38124, "edd": 38125, "GetClient": 38126, "olet": 38127, "nope": 38128, "Ġspecialization": 38129, "Ġcoded": 38130, "Ġacts": 38131, "3945": 38132, "affine": 38133, "Ġ':',": 38134, "Poco": 38135, "denominator": 38136, "MISMATCH": 38137, "dice": 38138, "Ġtheano": 38139, "asan": 38140, "ĠMagick": 38141, "ĠgetUrl": 38142, "ĠRL": 38143, "ĠEMIT": 38144, "FunctionCall": 38145, "tracked": 38146, "irrors": 38147, "Platforms": 38148, "courses": 38149, "Ġspeech": 38150, "xaxis": 38151, "stall": 38152, "Ġwcs": 38153, "apim": 38154, "ĠisObject": 38155, "ĠFault": 38156, "Ġresizing": 38157, "ĠIncrease": 38158, "ĠRevision": 38159, "TestBase": 38160, "ichael": 38161, "mei": 38162, "866": 38163, "EXTENT": 38164, "ĠMessageType": 38165, "+'\"": 38589, "CUI": 38590, "Hs": 38591, "VIA": 38592, "Yc": 38593, "Ġ$$.": 38594, "strName": 38595, "agrid": 38596, "ĠTSK": 38597, "ixp": 38598, "Predefined": 38599, "Commentf": 38600, "ĠPREFIX": 38601, "ĠRedirectTo": 38602, "537": 38603, "Ġ(:": 38604, "unhandled": 38605, "ATR": 38606, "acute": 38607, "assertInternalType": 38608, "Aggressive": 38609, "APCI": 38610, "Ġcoins": 38611, "Ġosd": 38612, "theData": 38613, "XmlReader": 38614, "TXD": 38615, "ĠOptionally": 38616, "HtmlHighlightRules": 38617, "BatchSize": 38618, "ĠCanonical": 38619, "gestion": 38620, "ĠinstalledModules": 38621, "PictureBox": 38622, "builtins": 38623, "DETAILS": 38624, "AAAAEAAAA": 38625, "xdd": 38626, "{//": 38627, "itative": 38628, "()].": 38629, "Ġschemas": 38630, "getProcess": 38631, "getAsString": 38632, "=\"'.": 38633, "signup": 38634, "made": 38635, "PageLink": 38636, "ãĤĮ": 38637, "ĠPRUint": 38638, "decltype": 38639, "QualType": 38640, "Ġwpabuf": 38641, "FCHMOD": 38642, "711": 38643, "PTE": 38644, "Ġspend": 38645, "Ġreaches": 38646, "Restrict": 38647, "ResourceModel": 38648, "webhook": 38649, "CDF": 38650, "Usages": 38651, "ãĥĨ": 38652, "meridiem": 38653, "Ġ???": 38654, "DHCP": 38655, "Ġmicroseconds": 38656, "TUNNEL": 38657, "_$][": 38658, "illsLeft": 38659, "*(\\/\\*)": 38660, "ĠSucc": 38661, "Hud": 38662, "dmat": 38663, "Ġudev": 38664, "Scintilla": 38665, "ACI": 38666, "createInstance": 38667, "PosY": 38668, "MPP": 38669, "sdhci": 38670, "PTSTR": 38671, "stacked": 38672, "Ġspinner": 38673, "Overlapped": 38674, "coupled": 38675, "Glow": 38676, "KJ": 38677, "WAN": 38678, "ben": 38679, "ĠPag": 38680, "ĠRIGHT": 38681, "Ġneighbour": 38682, "latex": 38683, "WriteAttribute": 38684, "rams": 38685, "769": 38686, "757": 38687, "/****************************************************************************": 38688, "RUBY": 38689, "Ġconcurrently": 38690, "codeCoverageIgnore": 38691, "Ġflipped": 38692, "getline": 38693, "ĠSom": 38694, "Restricted": 38695, "Ġ304": 38696, "IndexBuffer": 38697, "Ġimap": 38698, "CIAL": 38699, "tmf": 38700, "hexdigest": 38701, "ĠSymlink": 38702, "488": 38703, "Fwd": 38704, "iwm": 38705, "{});": 38706, "Îł": 38707, "Ġ\"'.": 38708, "pest": 38709, "toStdString": 38710, "ĠMn": 38711, "ĠFmt": 38712, "StringArray": 38713, "ĠLU": 38714, "Ġemails": 38715, "JsonUnmarshallerContext": 38716, "AVG": 38717, "SequenceNumber": 38718, "ĠENTRY": 38719, "Ġ=======================": 38720, "enumerate": 38721, "Ġpolygons": 38722, "Ġmissed": 38723, ">())).": 38724, "Irp": 38725, "kR": 38726, "ĠScheduler": 38727, "();//": 38728, "Ġgcode": 38729, "ĠFallback": 38730, "GetLog": 38731, "Ġprov": 38732, "ĠInstanti": 38733, "matchers": 38734, ".'_": 38735, "UVD": 38736, "fastcall": 38737, "ĠBTN": 38738, "<_": 38739, "[\",": 38740, "rdesc": 38741, "zID": 38742, "department": 38743, "Ġomega": 38744, "MessageSet": 38745, "ABAA": 38746, "0006": 38747, "CONS": 38748, "removeItem": 38749, "ĠUnless": 38750, "Ġtimeouts": 38751, "Ġл": 38752, "widgetName": 38753, "ĠContentType": 38754, "+\")(\\\\.": 38755, "VXGE": 38756, "/////////////////////////////////////////////////////////////////////////////": 38757, "IMI": 38758, "Ssid": 38759, "Ġsquares": 38760, "mdma": 38761, "CommandEvent": 38762, "sdag": 38763, "Prints": 38764, "Abp": 38765, "Ġcpumask": 38766, "Shadows": 38767, "Ġпол": 38768, "ecmaVersion": 38769, "uIjoz": 38770, "elevation": 38771, "ufs": 38772, "Ġrol": 38773, "Ġ$__": 38774, "}}{'": 38883, "getCondition": 38884, "getPlot": 38885, "ĠTY": 38886, "Ġru": 38887, "StringSlice": 38888, "DataManager": 38889, "Ġstrike": 38890, "ForUser": 38891, "Ġverifies": 38892, "macaddr": 38893, "åĽł": 38894, "flattened": 38895, "Adjusted": 38896, "checkPositionWithEventLoop": 38897, "ADHOC": 38898, "TSC": 38899, "lmc": 38900, "ê": 38901, "upy": 38902, "GetMetadata": 38903, "testMethod": 38904, "ValueGenerated": 38905, "HELLO": 38906, "ĠJERR": 38907, "Ġapple": 38908, "1978": 38909, "Ġ(\"-": 38910, "ĠprivateKey": 38911, "cancelButton": 38912, "اÙħ": 38913, "victim": 38914, "'},{": 38915, "Fab": 38916, "oForm": 38917, "Ġfif": 38918, "intree": 38919, "getTokens": 38920, "ptx": 38921, "verses": 38922, "tpc": 38923, "Ġvalidating": 38924, "Ġprism": 38925, "sigBytes": 38926, "Ġtabindex": 38927, "Occurrences": 38928, "\\*]*(\\": 38929, "Audience": 38930, "xEF": 38931, "Ġ'\".": 38932, "ĠPLT": 38933, "ainted": 38934, "ĠRich": 38935, "parql": 38936, "minHeight": 38937, "escript": 38938, "ĠCompact": 38939, "Ġqueried": 38940, "Ġcarrier": 38941, "SortedSet": 38942, "Deriv": 38943, "\\*]*(\\*\\/": 38944, "917": 38945, "Xfrm": 38946, "ĠnIndex": 38947, "stripped": 38948, "timeZone": 38949, "cyI": 38950, "sessionEntry": 38951, "Overlapping": 38952, "MyFloat": 38953, "ITHM": 38954, "eatSpace": 38955, "Constructed": 38956, "REXIT": 38957, "Zigzag": 38958, "mvc": 38959, "van": 38960, "Ġstick": 38961, "listxattr": 38962, "ProjectName": 38963, "////////////////////////////////////////////////////////": 38964, "ว": 38965, "RELATIVE": 38966, "WRAPPER": 38967, "Ġfriends": 38968, "ĠNormally": 38969, "itations": 38970, "prg": 38971, "fileinfo": 38972, "])}}": 38973, "RefPtr": 38974, "Ġ\"\"\")": 38975, "radial": 38976, "ãĤ³": 38977, "ĠMarker": 38978, "TZOFFSET": 38979, "Einde": 38980, "HOLD": 38981, "MUST": 38982, "Ġrich": 38983, "2800": 38984, "ZXhw": 38985, "rypton": 38986, "Ġpipes": 38987, "718": 38988, "Vary": 38989, "Xhr": 38990, "latable": 38991, "·": 38992, "ĠMul": 38993, "VariableName": 38994, "routeParams": 38995, "/{+": 38996, "extractor": 38997, "Ġ=========================": 38998, "enumeration": 38999, "StrokeWidth": 39000, "ĠBounds": 39001, "ĠQLCNIC": 39002, "TOGGLE": 39003, "Bq": 39004, "Garbage": 39005, "freed": 39006, "garbage": 39007, "icache": 39008, "ĠCBlockIndex": 39009, "Ġnewest": 39010, "localPosition": 39011, "debugLog": 39012, "5380": 39013, "virtio": 39014, "Accumulator": 39015, "ĠChoice": 39016, "mValue": 39017, "nY": 39018, "xJ": 39019, "getController": 39020, "Ġdbl": 39021, "GetModel": 39022, "REDIRECT": 39023, "ĠGDT": 39024, "newoffset": 39025, "(?:\"": 39026, "joystick": 39027, "Rounded": 39028, "GameState": 39029, "Shipment": 39030, "*]": 39031, "Hmac": 39032, "nfp": 39033, "Ġcentered": 39034, "Ġ>'])": 39035, "Loot": 39036, "]]=": 39037, "ĠDifferent": 39038, "Rss": 39039, "fest": 39040, "fcoe": 39041, "Ġcascade": 39042, "Ġifi": 39043, "imshow": 39044, "imulus": 39045, "ĠerrInternalBadWireType": 39046, "ĠNDEBUG": 39047, "ĠLABEL": 39048, "ideal": 39049, "ĠGetData": 39050, "Ġbytestream": 39051, "ĠnodeType": 39052, "FromInstruction": 39053, "nsKey": 39054, "]+\"": 39055, "traces": 39056, "ãĥŃ": 39057, "unpacked": 39058, "Ġpossibility": 39059, ")`.": 39060, "Grip": 39061, "Ofs": 39062, "SPtr": 39063, "Ġ\"()": 39064, "edp": 39065, "oma": 39066, "Contained": 39067, "ACB": 39068, "MapKey": 39069, "longname": 39070, "ĠOutStreamer": 39071, "Ġ')')": 39072, "wantErr": 39073, "/^([": 39074, "Taxonomy": 39075, "Ġresponsibility": 39076, "('|',": 39077, "Cue": 39078, "pClient": 39079, "addData": 39080, "ĠgetToken": 39081, "argtypes": 39082, "Ġheat": 39083, "ArrayOf": 39084, "Frustum": 39085, "ValueGeneratedOnAdd": 39086, "ASP": 39087, "Ġmz": 39088, "coins": 39089, "otp": 39090, "Recorded": 39091, "Staff": 39092, "ĠPJ": 39093, "signum": 39094, "1201": 39095, "baseDir": 39096, "formatString": 39097, "([{": 39098, "568": 39099, "FBF": 39100, "swab": 39101, "HasForeignKey": 39102, "ĠParagraph": 39103, "YXNz": 39104, "们": 39105, "clipse": 39106, "æĪĸèĢħ": 39107, "414": 39108, "wrb": 39109, "Ġinde": 39110, "vere": 39111, "upid": 39112, "topo": 39113, "toUtf": 39114, "KeyMap": 39115, "EventQueue": 39116, "OnDelete": 39117, "Ġlookups": 39118, "jacency": 39119, "ORIENTATION": 39120, "Ġ`&`,": 39121, "CCE": 39122, "cand": 39123, "jJ": 39124, "shallow": 39125, "perl": 39126, "ĠHold": 39127, "Ġ`.": 39128, "ClientInfo": 39129, "freebsd": 39130, "Emu": 39131, "(!!": 39132, "Ġlinking": 39133, "revisions": 39134, "ĠAccum": 39135, "Cand": 39136, "Kg": 39137, "RIC": 39138, "Äģ": 39139, "Ġnir": 39140, "getSelect": 39141, "setB": 39142, "Ġ&)": 39143, "Scsi": 39144, "ĠmethodInfo": 39145, "FrameInfo": 39146, "ĠCompany": 39147, "ĠObjectType": 39148, "HasAttribute": 39149, "amplers": 39150, "Ġdeserialization": 39151, "-',": 39152, "Dag": 39153, "fL": 39154, "kQ": 39155, "uta": 39156, "Recursion": 39157, "ĠCredentials": 39158, "outset": 39159, "ĠWIFI": 39160, "Ġuseless": 39161, "ledge": 39162, "groupid": 39163, "CallbackBase": 39164, "beginTransaction": 39165, "passive": 39166, "ĠCommands": 39167, "بÙĩ": 39168, "ĠsetError": 39169, "Uninstall": 39170, "())}": 39171, "sony": 39172, "CHandle": 39173, "DBBB": 39174, "}}{{": 39175, "ĠSerializable": 39176, "]*\",": 39177, "ĠSCU": 39178, "Arial": 39179, "(?:\\.\\": 39180, "ĠCHANNEL": 39181, "IZONA": 39182, "Oa": 39183, "Sale": 39184, "WDT": 39185, "lQ": 39186, "pseud": 39187, "Ġáĥ": 39188, "odv": 39189, "='';": 39190, "MPC": 39191, "fnic": 39192, "ĠINF": 39193, "vidence": 39194, "lcdc": 39195, "$\"": 39196, "inl": 39197, "Ġccc": 39198, "**)&": 39199, "erty": 39200, "Ġlda": 39201, "Ġstudy": 39202, "ĠRP": 39203, "ĠGM": 39204, "ĠtestFile": 39205, "monster": 39206, "2200": 39207, "ĠGLsizei": 39208, "Successors": 39209, "BeginTransaction": 39210, "Ġpooling": 39211, "CastExpr": 39212, "Consensus": 39213, "éĤ£": 39214, "RValue": 39215, "mN": 39216, "Ġmsr": 39217, "straction": 39218, "Ġgcd": 39219, "ĠDY": 39220, "ToType": 39221, "ĠVIEW": 39222, "Ġrough": 39223, "msbuild": 39224, "ĠINNER": 39225, "genre": 39226, "ĠAcquire": 39227, "CodecInfo": 39228, "QuadPart": 39229, "Ġeffort": 39230, "RichText": 39231, "amen": 39232, "datasource": 39233, "Charg": 39234, "ĠHSE": 39235, "ĠHence": 39236, "writeFileSync": 39237, "StartOf": 39238, "Advert": 39239, "GoAway": 39240, "HTTPClient": 39241, "Ġaccounting": 39242, "OperatorType": 39243, "Ġdragging": 39244, "?(\"": 39245, "XNl": 39246, "cL": 39247, "xec": 39248, "erd": 39249, "staging": 39250, "Ġ-$": 39251, "functional": 39252, "ĠFORE": 39253, "GetConfig": 39254, "ErrInternalBadWireType": 39255, "Ġretained": 39256, "LineItem": 39257, "Ġ768": 39258, "[-_": 39259, "ESTORAGE": 39260, ")}}}": 39261, "FACTORY": 39262, "ABCDEFGHIJKLMNOPQRSTUVWXYZ": 39263, "pdc": 39264, "xT": 39265, "raat": 39266, "ĠHand": 39267, "Ġregnum": 39268, "ĠtokenString": 39269, "ReferenceCount": 39270, "ReferenceExpression": 39271, "359": 39272, "represent": 39273, "ĠWaiting": 39274, "HARDWARE": 39275, "succeeded": 39276, "EID": 39277, "Jam": 39278, "MCAST": 39279, "infinite": 39280, "Ġnoc": 39281, "ĠCr": 39282, "ĠPadding": 39283, "codepoint": 39284, "ORB": 39285, "ADAB": 39286, "PIL": 39287, "pense": 39288, "hasher": 39289, "FilterType": 39290, "া": 39291, "}`);": 39292, "REMOTESTORAGE": 39293, "ĠLegal": 39294, "UnderlyingType": 39295, "EINTR": 39296, "SByte": 39297, "wZXJ": 39298, "ĠnMax": 39299, "collide": 39300, "bearer": 39301, "FOV": 39302, "Eu": 39303, "Ole": 39304, "Pf": 39305, "GetParam": 39306, "ĠRaster": 39307, "ĠEpoll": 39308, "OutStream": 39309, "MPU": 39310, "creat": 39311, "ENCODER": 39312, "UnderTest": 39313, "supplied": 39314, "Ġconflicting": 39315, "Braces": 39316, "STEAMREMOTESTORAGE": 39317, "dum": 39318, "kL": 39319, "qg": 39320, "Ġtarg": 39321, "ĠpOp": 39322, "Ġson": 39323, "ilib": 39324, "Ġudc": 39325, "Debian": 39326, "Ġdoctype": 39327, "ISM": 39328, "hasKey": 39329, "Ġcompliance": 39330, "SAPI": 39331, "(/&": 39332, "HttpHeader": 39333, "Ġ''};": 39334, "OFFLINE": 39335, "Ġ``'": 39336, "whiteSpace": 39337, "ĠSAFE": 39338, "---+---+": 39339, "\"\\\\": 39340, "hud": 39341, "kdf": 39342, "Ø·": 39343, "paid": 39344, "ipo": 39345, "Ġ@$": 39346, "Ġinterpolated": 39347, "276": 39348, "vortex": 39349, "2022": 39350, "/*#####################################################################": 39351, "BLen": 39352, "Pwr": 39353, "RANK": 39354, "Ġpcl": 39355, "Ġwq": 39356, "Ġlh": 39357, "resched": 39358, "GetFiles": 39359, "ĠOrient": 39360, "LEASE": 39361, "ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ": 39362, "ClassWith": 39363, "dbs": 39364, "Ġqdev": 39365, "ĠqueryString": 39366, "à¸ŀ": 39367, "ĠTraverse": 39368, "Ġquotient": 39369, "huff": 39370, "getSuper": 39371, "Ġkobj": 39372, "drReadBuf": 39373, "='\\": 39374, "://%": 39375, "childs": 39376, "ĠlastWeek": 39377, "CBAB": 39378, "MINUTE": 39379, "Ġswig": 39380, "ĠTokenIterator": 39381, "ĠDaemon": 39382, "332": 39383, "Eth": 39384, "Hue": 39385, "_'+": 39386, "vst": 39387, "Ġtcs": 39388, "Ġboto": 39389, "ĠAsc": 39390, "Timestamps": 39391, "EndSpan": 39392, "InputInterface": 39393, "Ġtrash": 39394, "POW": 39395, "CPT": 39396, "ĠSubstitute": 39397, "Ġtypical": 39398, "toolStripMenuItem": 39399, "ĠTeuchos": 39400, "\"<<": 39401, "521": 39402, "hpp": 39403, "ropping": 39404, "SetField": 39405, "curPunc": 39406, "LineEnd": 39407, "Ġzk": 39408, "CallCount": 39409, "2841": 39410, "ĠBuilt": 39411, "PROTOTYPE": 39412, "çīĪ": 39413, "Ġevaluates": 39414, "heden": 39415, "SMSG": 39416, "wdata": 39417, "Ġrepaint": 39418, "Ġdso": 39419, "ĠPVR": 39420, "devattr": 39421, "TextReader": 39422, "pushstring": 39423, "Generating": 39424, "SPAR": 39425, "SchemaPath": 39426, "ĠAssemble": 39427, "Ġsmtp": 39428, "Ġutimes": 39429, "è¾¾": 39430, "ĠRows": 39431, "MIDDLE": 39432, "Els": 39433, "iL": 39434, "alsy": 39435, "ĠpEntity": 39436, "Ġsiz": 39437, "GetEntry": 39438, "ĠGOSS": 39439, "ĠQPixmap": 39440, "CodeAnalysis": 39441, "BlockState": 39442, "Ġ{}));": 39443, "437": 39444, "ĠASTContext": 39445, "é¡»": 39446, "findMatchingBracket": 39447, "ramp": 39448, "vld": 39449, "fax": 39450, "lastmodified": 39451, "ModelState": 39452, "REGNUM": 39453, "tsb": 39454, "ĠsipName": 39455, "ениÑı": 39456, "Dur": 39457, "Tell": 39458, "Ġcname": 39459, "Ġbcd": 39460, "utations": 39461, "Ġdeactivate": 39462, "1280": 39463, "METRIC": 39464, "floatValue": 39465, "frameset": 39466, "Ġmoz": 39467, "036": 39468, "Ġ\"-\")": 39469, "Ownership": 39470, "Ġetcd": 39471, "CAPABILITY": 39472, "DAYS": 39473, "Ġintegrity": 39474, "Sectors": 39475, "ĠGOSSIP": 39476, "LIF": 39477, "cbuf": 39478, "thru": 39479, "roys": 39480, "getEnv": 39481, "getpid": 39482, "mounted": 39483, "ĠRing": 39484, "Ġcovers": 39485, "MBBI": 39486, "dashed": 39487, "PlusPlus": 39488, "Droid": 39489, "HLEN": 39490, "Xy": 39491, "etries": 39492, "getScalar": 39493, "Ġforbidden": 39494, "ances": 39495, "Ġunlocked": 39496, "createQuery": 39497, "ĠmaxHeight": 39498, "ĠUndefined": 39499, "MinSize": 39500, "ByteTagList": 39501, "Ġ32768": 39502, "Decay": 39503, "Ġ2007": 39504, "ToLowerInvariant": 39505, "ĠCXXRecordDecl": 39506, "Hx": 39507, "Lag": 39508, "Sol": 39509, "Zu": 39510, "cHJ": 39511, "lcn": 39512, "getsockopt": 39513, "/*--------------------------------------------------------": 39514, "gso": 39515, "281": 39516, "à¤ļ": 39517, "Ġioe": 39518, "QTs": 39519, "}]},{": 39520, "pcpu": 39521, "Ġ\"/*": 39522, "getRules": 39523, "GetC": 39524, "GetVersion": 39525, "ĠRock": 39526, "pcib": 39527, "ResourcePath": 39528, "OSState": 39529, "LOGIC": 39530, "svd": 39531, "lanes": 39532, "\"%(": 39533, "/\">": 39534, "CST": 39535, "HIG": 39536, "pF": 39537, "Ġnpy": 39538, "Conns": 39539, "outStream": 39540, "Ġxn": 39541, "TestContext": 39542, "ugate": 39543, "GroupInfo": 39544, "cbp": 39545, ",\"\");": 39546, "Ġdatepicker": 39547, "cmVud": 39548, "Pieces": 39549, "Ġehca": 39550, "hQ": 39551, "dataPath": 39552, "RELOAD": 39553, "645": 39554, "AddAttribute": 39555, "iovec": 39556, "summaries": 39557, "OSDiskConfiguration": 39558, "ĠparserConfig": 39559, ":/[\\": 39560, "Ġcasting": 39561, "aXJl": 39562, "VMImageState": 39563, "Fsb": 39564, "atu": 39565, "Ġcue": 39566, "Ġfair": 39567, "ĠTail": 39568, "Ġstones": 39569, "ACING": 39570, "ĠXST": 39571, "Subst": 39572, "StyleClass": 39573, "rootElement": 39574, "resourceId": 39575, "SPIN": 39576, "myid": 39577, "297": 39578, "Ġfilling": 39579, "SharedPreferences": 39580, "OOL": 39581, "QOpenGLFunctions": 39582, "eigen": 39583, "ĠCpp": 39584, "emplate": 39585, "ĠIQueryable": 39586, "locking": 39587, "++],": 39588, "CreateOrUpdate": 39589, "Substitute": 39590, "ĠATF": 39591, "mounts": 39592, "ĠOpCode": 39593, "VOICE": 39594, "MustBe": 39595, "+\")\",": 39596, "Ġistanbul": 39597, "Standalone": 39598, "TestShapeInputService": 39599, "TracedValue": 39600, "å¡«": 39601, "Dz": 39602, "Rings": 39603, "lte": 39604, "aro": 39605, "Ġ}},": 39606, "getA": 39607, "Ġ'>')": 39608, "ToCopy": 39609, "ĠgetTotal": 39610, "ĠXC": 39611, "TemplateName": 39612, "Blcn": 39613, "Ġamt": 39614, "ValidationResult": 39615, "Ġextractor": 39616, "ĠAnything": 39617, "Ġconstructing": 39618, "Ġadapters": 39619, "Hyperlink": 39620, "ĠHttpRequestMessage": 39621, "ĉĠĠĊ": 39622, "getFormat": 39623, "ItemData": 39624, "TableView": 39625, "FRI": 39626, "vbG": 39627, "Ġindication": 39628, "Highlighted": 39629, "ĠLabels": 39630, "pctldev": 39631, "XElement": 39632, "kdb": 39633, "xlink": 39634, "Ġ\"}\")": 39635, "errun": 39636, "ĠSCRE": 39637, "Ġldb": 39638, "ĠNAN": 39639, "verbatim": 39640, "ĠBlog": 39641, "Ġassembler": 39642, "computer": 39643, "pbmd": 39644, "ĠRegistration": 39645, "Ġquat": 39646, "OUTOF": 39647, "ĠSTV": 39648, "Ġtelemetry": 39649, "ĠCONDITION": 39650, "SecurityPolicy": 39651, "ĠCopyTo": 39652, "ĠCharset": 39653, "permutation": 39654, "ĠCountDownLatch": 39655, "TRIANGLE": 39656, "ĠCmdArgs": 39657, ";};": 39658, "ELT": 39659, "EACH": 39660, "[((": 39661, "bak": 39662, "xsize": 39663, "getOrigin": 39664, "Ġgetreg": 39665, "Ġcomposition": 39666, "\",\"+": 39667, "Ġpredecessors": 39668, "994": 39669, "BBA": 39670, "Ġadt": 39671, "Ġ2006": 39672, "TemporaryFile": 39673, "setTarget": 39674, "makefile": 39675, "ĉĉĉĉĉĉĉĉĉĉĉĉĉĉĉ": 39676, "fmdev": 39677, "Ġdecorate": 39678, "859": 39679, "das": 39680, "sters": 39681, "urate": 39682, "Ġsrp": 39683, "ĠMade": 39684, "produce": 39685, "Prov": 39686, "ĠLIS": 39687, "Ġ456": 39688, "descriptions": 39689, "ĠSubtract": 39690, "ĠSimpleDateFormat": 39691, "ĠAsyncCallback": 39692, "Ġfinfo": 39693, "InContext": 39694, "ĠMutation": 39695, "ToHex": 39696, "codePoint": 39697, "ĠRST": 39698, "Ġcomposed": 39699, "ĠVEC": 39700, "Classify": 39701, "THAN": 39702, "(/%": 39703, "ãģı": 39704, "Ġimporting": 39705, "AUTHENT": 39706, "*>(&": 39707, ".([]": 39708, "Easing": 39709, "Yellow": 39710, "fingers": 39711, "gcm": 39712, "pG": 39713, "rptr": 39714, "׾": 39715, "agana": 39716, "Sticky": 39717, "pong": 39718, "acme": 39719, "KeyIdentifier": 39720, "Shorthand": 39721, "debugging": 39722, "Ġbitwise": 39723, "Constructors": 39724, "å¤ĩ": 39725, "PROPS": 39726, "ĠLOOP": 39727, "Ġ'('}}": 39728, "Ġowning": 39729, "FREQU": 39730, "ĠPanic": 39731, "$('": 39732, "evaluation": 39733, "sfx": 39734, "ĠSpl": 39735, "\")==": 39736, "ĠHome": 39737, "Ġcolormap": 39738, "Ġzi": 39739, "Trash": 39740, "ĠObjective": 39741, "Ġ;_;": 39742, "taskId": 39743, "PERCENT": 39744, "ÑģÑı": 39745, "Ġpopular": 39746, "BRANCH": 39747, "nVsb": 39748, "PullRequest": 39749, "è¿Ļ个": 39750, "CONSTRUCTOR": 39751, "Ġgrayscale": 39752, "!$": 39753, "kG": 39754, "Ġmib": 39755, "Ġmangled": 39756, "Ġwizard": 39757, "Ġ//#": 39758, "ĠBra": 39759, "],$": 39760, "KeySet": 39761, "ĠHA": 39762, "errorString": 39763, "PtrSet": 39764, "SCN": 39765, "FormatInt": 39766, "ActionBar": 39767, "timeouts": 39768, "Transactional": 39769, "facts": 39770, "ĠScenario": 39771, "TAGS": 39772, "Ġhighlighted": 39773, "XVpcm": 39774, "ĠCollision": 39775, "WriteRawTag": 39776, "cC": 39777, "cGU": 39778, "xdp": 39779, "idct": 39780, "getCompletions": 39781, "oldest": 39782, "GetValues": 39783, "SizeX": 39784, "ousand": 39785, "Ġelastic": 39786, "ParameterSpec": 39787, "FuncInfo": 39788, "ĠREFERENCE": 39789, "tcXG": 39790, "Relax": 39791, "ĠInitFunctionIndex": 39792, "ĠInitScenaIndex": 39793, "DateTimeOffset": 39794, "numericUpDown": 39795, "ĠIndexed": 39796, "ĠInstrument": 39797, "ĠâĢĵ": 39798, "Coefficients": 39799, "ddp": 39800, "gettop": 39801, "TypeIndex": 39802, "Generators": 39803, "289": 39804, "DepthStencil": 39805, "InlineAsm": 39806, "Executions": 39807, "Ġdragged": 39808, "getFieldValue": 39809, "ĠANSI": 39810, "QStyleOption": 39811, "ival": 39812, "Ġbrc": 39813, "ĠClang": 39814, "urelia": 39815, "Ġkk": 39816, "\\\"]": 39817, "Ġpacker": 39818, "ProviderName": 39819, "]+$)/,\"\"": 39820, "DEFINITION": 39821, "COMPLETION": 39822, "Catalogue": 39823, "KnownTypes": 39824, "LnN": 39825, "Ġintroduced": 39826, "ĠOrderedDict": 39827, "achievement": 39828, "proof": 39829, "clf": 39830, "aca": 39831, "ioim": 39832, "being": 39833, "complain": 39834, "awn": 39835, "ScaleX": 39836, "|\\[": 39837, "Ġ1900": 39838, "Ġpwsz": 39839, "ĠJustification": 39840, "Evaluated": 39841, "hierarchical": 39842, "lval": 39843, "nkerning": 39844, "spect": 39845, "yin": 39846, "yaxis": 39847, "getRegister": 39848, "concept": 39849, "procal": 39850, "ONLINE": 39851, "ĠBS": 39852, "ĠWa": 39853, "FileNames": 39854, "Shards": 39855, "ĠActually": 39856, "ĠPOINTER": 39857, "Ġcompressor": 39858, "ĠAUTH": 39859, "èµ·": 39860, ".])": 39861, "FPR": 39862, "QDeclarative": 39863, "`\\": 39864, "getopt": 39865, "GetColor": 39866, "addFilter": 39867, "ĠGlyph": 39868, "ĠQSql": 39869, "subelement": 39870, "Ġserializable": 39871, "ĠAddition": 39872, "FullMethod": 39873, "0000001": 39874, "RealMatrix": 39875, "ĠSYNC": 39876, "Ġriid": 39877, "oucher": 39878, "ĠOrganization": 39879, "EndEventNames": 39880, "ERESTARTSYS": 39881, "CCT": 39882, "Df": 39883, "spare": 39884, "Ġdq": 39885, "ĠMSD": 39886, "ĠRd": 39887, "Intro": 39888, "SIR": 39889, "penalty": 39890, "overlaps": 39891, "radians": 39892, "ĠARIZONA": 39893, "LPVOID": 39894, "ĠSupports": 39895, "Craft": 39896, "Sorry": 39897, "ìł": 39898, "relat": 39899, "Ġterrain": 39900, "getFilename": 39901, "opend": 39902, "Ġcompares": 39903, "ĠHack": 39904, "ĠInotify": 39905, "ĠQQuick": 39906, "LOSS": 39907, "Ġcomplicated": 39908, "Verbosity": 39909, "dtor": 39910, "ா": 39911, "ĠColumns": 39912, "hidl": 39913, "Cycling": 39914, "ĠBlend": 39915, "diagnostics": 39916, "kunmap": 39917, "à³": 39918, "really": 39919, "Ġ(::": 39920, "Ġpert": 39921, "Ġ>&": 39922, "Ġanti": 39923, "assertions": 39924, "ighter": 39925, "sendto": 39926, "SVN": 39927, "GoogleCloud": 39928, "Community": 39929, "Adjustments": 39930, "ĠXRFDC": 39931, "SINT": 39932, "madd": 39933, "Ġcrit": 39934, "Ġmigr": 39935, "endPoint": 39936, "ĠIp": 39937, "ĠWrong": 39938, "ĠQName": 39939, "currentItem": 39940, "Ġcook": 39941, "268": 39942, "versing": 39943, "courseid": 39944, "Synchronize": 39945, "滤": 39946, "ĠITEM": 39947, "gcd": 39948, "hdf": 39949, "vim": 39950, "arx": 39951, "bbf": 39952, "exch": 39953, "Ġrelax": 39954, "))*(": 39955, "Ġstuck": 39956, "paired": 39957, "ĠBTC": 39958, "TimeValue": 39959, "WithField": 39960, "groupby": 39961, "ĠlastDay": 39962, "AddressChecker": 39963, "NORED": 39964, "RawBytes": 39965, "Ġ----------------------------------------------------------------------------": 39966, "ĠPROTOCOL": 39967, "ĠSENSOR": 39968, "504": 39969, "Schemes": 39970, "aWN": 39971, "qo": 39972, "getW": 39973, "Ġdtypes": 39974, "angler": 39975, "ĠRK": 39976, "})/);": 39977, "ufffd": 39978, "foundation": 39979, "MySql": 39980, "ĠSelectionDAG": 39981, "Ġigb": 39982, "Xo": 39983, "wor": 39984, "wtx": 39985, "xQ": 39986, "tea": 39987, "getExpression": 39988, "('!": 39989, "ĠFactor": 39990, "ĠELEMENT": 39991, "ĠHS": 39992, "udma": 39993, "ldm": 39994, "FieldDefn": 39995, "SIZEOF": 39996, "bfad": 39997, "]/',": 39998, "Ġcollisions": 39999, "enclosure": 40000, "Fetched": 40001, "pName": 40002, "isPlaying": 40003, "Ġreduces": 40004, "Ġ//,": 40005, "ĠDASD": 40006, "ĠGAME": 40007, "reduced": 40008, "ĠHACK": 40009, "ookeeper": 40010, "Ġheads": 40011, "IFICATIONS": 40012, "Ġ*********************************************************": 40013, "å¯Ĩçłģ": 40014, "Ġmantissa": 40015, "getAnnotation": 40016, "promote": 40017, "Ġproposal": 40018, "tmpfile": 40019, "AccessControls": 40020, "Ġ\"<\"": 40021, "xcf": 40022, "Ġ')'}}": 40023, "åħ³éĹŃ": 40024, "ĠSCREEN": 40025, "980": 40026, "Others": 40027, "SMI": 40028, "ahw": 40029, "ĠBAT": 40030, "ĠInverse": 40031, "offsetLeft": 40032, "sampleRate": 40033, "ShaderProgram": 40034, "Ġbiases": 40035, "Ijpb": 40036, "LPP": 40037, "lps": 40038, "tinfo": 40039, "ÅĤ": 40040, "ç¾": 40041, "chop": 40042, "chomp": 40043, "Ġeager": 40044, "Ġgadget": 40045, "ipmi": 40046, "LLED": 40047, "ĠsetDoesNot": 40048, "\"],[": 40049, "ĠAccording": 40050, "Hibernate": 40051, ":\"^\\\\": 40052, "å¿ħé¡»": 40053, "+')": 40054, "chen": 40055, "ĠTelemetry": 40056, "Ġconstrain": 40057, "CHOWN": 40058, "ĠbaseUrl": 40059, "tendee": 40060, "Splash": 40061, "dmamap": 40062, "Ġconfirmed": 40063, "Ġstructured": 40064, "Ġunderflow": 40065, "Quicktime": 40066, "CMSG": 40067, "_));": 40068, "SetRequest": 40069, "ĠRecogn": 40070, "Ġeng": 40071, "ACAA": 40072, "ĠJComponent": 40073, "grading": 40074, "LineInfo": 40075, "skipping": 40076, "ServiceConfig": 40077, "068": 40078, "Ġdownloading": 40079, "CURVE": 40080, "å½¢": 40081, "Ġglobally": 40082, "31536000": 40083, "Ġtomoyo": 40084, "Ġbufsz": 40085, "SMO": 40086, "פ": 40087, "getAlias": 40088, "ĠSPU": 40089, "ĠSolution": 40090, "DataModel": 40091, "plex": 40092, "okai": 40093, "postdata": 40094, "crq": 40095, "269": 40096, "categoryId": 40097, "Ġlangword": 40098, "IHtcbiAgICAgICAg": 40099, "411": 40100, "Gender": 40101, "HAD": 40102, "drc": 40103, "iId": 40104, "wif": 40105, "æĴ": 40106, "Ġpcs": 40107, "ĠSMS": 40108, "Ġhcd": 40109, "ĠFALL": 40110, "========================": 40111, "WindowTitle": 40112, "Ġqeth": 40113, "ColumnCount": 40114, "'.\",": 40115, "]+(?:": 40116, "Ġirqs": 40117, "Ġ')',": 40118, "MonoTODO": 40119, "alaxy": 40120, "IOT": 40121, "NVM": 40122, "tbs": 40123, "ĠNever": 40124, "typeOf": 40125, "ĠQV": 40126, "CreateFrom": 40127, "Convertible": 40128, "Beginning": 40129, "Identification": 40130, "ĠPropertyInfo": 40131, "Ġoverflows": 40132, "Ġwacom": 40133, "prettyPrint": 40134, "Ġ191": 40135, "ĠANT": 40136, "ĠnewTest": 40137, "SSP": 40138, "ĠQDialog": 40139, "ĠXT": 40140, "copyTo": 40141, "ĠAnim": 40142, "QTT": 40143, "YXNl": 40144, "ĠFunctional": 40145, ">'+": 40146, "ĠDiscovery": 40147, "Dots": 40148, "Ġpanels": 40149, "Dialer": 40150, "$$$$": 40151, "大å°ı": 40152, "FriendlyName": 40153, "Cognito": 40154, "obuf": 40155, "ctn": 40156, "Ġdatasource": 40157, "Ġcomb": 40158, "nodeIndex": 40159, "Returning": 40160, "payments": 40161, "getNumElements": 40162, "ĠpubKey": 40163, "Deployments": 40164, "Messenger": 40165, "415": 40166, "475": 40167, "]|\\\\": 40168, "wsz": 40169, "ulas": 40170, "TypeKind": 40171, "tembre": 40172, "ATING": 40173, "ĠkAudio": 40174, "WriteValue": 40175, "serverConn": 40176, "SingleObject": 40177, "Castaway": 40178, "ма": 40179, ")\").": 40180, "Gene": 40181, "cW": 40182, "starget": 40183, "Ġbilling": 40184, "Ġtower": 40185, "Ġconcern": 40186, "ĠDisp": 40187, "Ġbounce": 40188, "Applies": 40189, "ĠZoom": 40190, "(\"%.": 40191, "Ġride": 40192, "Mounts": 40193, "Destructuring": 40194, "Ġ{*}": 40195, "Inde": 40196, "setResult": 40197, "privkey": 40198, "sonic": 40199, "doctrine": 40200, "BufferLength": 40201, "calib": 40202, "678": 40203, "HALT": 40204, "ĠJanuary": 40205, "eled": 40206, "vz": 40207, "ento": 40208, "Ġscp": 40209, "Experience": 40210, "\");}": 40211, "ĠsetMax": 40212, "ĠProjection": 40213, "343": 40214, "Ġ900": 40215, "546": 40216, "8021": 40217, "UDT": 40218, "platdata": 40219, "denied": 40220, "åĽŀè°ĥ": 40221, "XEN": 40222, "pandas": 40223, "ammer": 40224, "getBitWidth": 40225, "Residual": 40226, "DEPEND": 40227, "spn": 40228, "netmask": 40229, "Ġ(_(\"": 40230, "Ġsyslog": 40231, "Glj": 40232, "Glzd": 40233, "ĠJsonResponse": 40234, "ĠFuncInfo": 40235, "CLRTypes": 40236, "Ġincreased": 40237, "cycled": 40238, "artifacts": 40239, "^^^^^^^^": 40240, "largest": 40241, "SWIGPendingException": 40242, "Captor": 40243, "pW": 40244, "getDimension": 40245, "(\":/": 40246, ")...": 40247, "ĠHermite": 40248, "ResourceRequest": 40249, "Ġcovariance": 40250, "Compensation": 40251, "AppendInt": 40252, "Sniffer": 40253, "intrinsic": 40254, "tcbiAgICB": 40255, "Ġaffinity": 40256, "ĠConditional": 40257, "ĠOCIO": 40258, "Technique": 40259, "NOM": 40260, "cfb": 40261, "oS": 40262, "Ġcrystal": 40263, "Ġtweet": 40264, "imd": 40265, "ĠGa": 40266, "ImagePath": 40267, "ĠwriteTo": 40268, "273": 40269, "=%#": 40270, "Directives": 40271, "xlarge": 40272, "rokes": 40273, "hematical": 40274, "cpos": 40275, "hR": 40276, "Ġquestions": 40277, "Ġsbuf": 40278, "idList": 40279, "getHash": 40280, "toLatin": 40281, "ĠRDMA": 40282, "ĠsetCurrent": 40283, "regnum": 40284, ":\"\"},": 40285, "StateRef": 40286, "Classic": 40287, "FieldDescriptor": 40288, "CaseSensitive": 40289, "Ġ\"%.": 40290, "ĠrowIndex": 40291, "ĠLogError": 40292, "ĠWhite": 40293, "CodecContext": 40294, "Ġrevisions": 40295, "YGON": 40296, "ĠWritable": 40297, "pCur": 40298, "Ġsrb": 40299, "getSubject": 40300, "ToNext": 40301, "ĠOhm": 40302, "saW": 40303, "nextLink": 40304, "Validators": 40305, "Renderable": 40306, "ĠLoading": 40307, "svs": 40308, "Ġinvoker": 40309, "iguity": 40310, "Blt": 40311, "VReg": 40312, "bump": 40313, "}['": 40314, "ĠSomething": 40315, "Ġ:\"": 40316, "('../../": 40317, "tout": 40318, "ĠOrd": 40319, "ĠHB": 40320, "evhttp": 40321, "Ġagp": 40322, "451": 40323, "paddingRight": 40324, "Delimited": 40325, "wrapping": 40326, "ĠnValue": 40327, "adp": 40328, "asize": 40329, "KeyInfo": 40330, "Quads": 40331, "Ġappname": 40332, "optind": 40333, ")?)?)|": 40334, "LOGICAL": 40335, "dmesg": 40336, "Ġblit": 40337, "ĠTextBox": 40338, "BinaryExpression": 40339, "RATES": 40340, "éĵ¾": 40341, "PITCH": 40342, "Ù¾": 40343, "Ġcvt": 40344, "Ġmsb": 40345, "ĠMoney": 40346, "TypeParameter": 40347, "32768": 40348, "shdr": 40349, "ALIVE": 40350, "TRC": 40351, "FieldSet": 40352, "CheckCLRTypes": 40353, "uaW": 40354, "sqlserver": 40355, "Represent": 40356, "MULTIS": 40357, "Ġmeasurements": 40358, "GREATER": 40359, "lacier": 40360, "tdata": 40361, "))-": 40362, "ĠAW": 40363, "irda": 40364, "UNSPEC": 40365, "Preconditions": 40366, "ĠnsAString": 40367, "filtering": 40368, "DeviceId": 40369, "Ġcosts": 40370, "ExpectationFailedException": 40371, "Dfa": 40372, "TBB": 40373, "Van": 40374, "]})": 40375, "sXG": 40376, "DataService": 40377, "FileTo": 40378, "neutral": 40379, "0621": 40380, "ĠUnfortunately": 40381, "LinkID": 40382, "Ġgenesis": 40383, "лÑĮ": 40384, "Jlbn": 40385, "majorVersion": 40386, "ĠManual": 40387, "brushes": 40388, "|<|>|": 40389, "åķĨåĵģ": 40390, "Dj": 40391, "GIF": 40392, "Opr": 40393, "TArg": 40394, "mX": 40395, "ĠpMem": 40396, "Infinite": 40397, "ĠTKey": 40398, "putAll": 40399, "ĠMakes": 40400, "ĠFLT": 40401, "Ġsealed": 40402, "queryBuilder": 40403, "ĠCollector": 40404, "897": 40405, "DVD": 40406, "Everything": 40407, "Fuzzy": 40408, "CSC": 40409, "Vg": 40410, "fZ": 40411, "gery": 40412, "mLoc": 40413, "mfd": 40414, "malformed": 40415, "nbr": 40416, "Ġflight": 40417, "Ġniet": 40418, "Ġ//<": 40419, "556": 40420, "Ġacceler": 40421, "ĠattributeName": 40422, "usbd": 40423, "socks": 40424, "Folding": 40425, "Ġobserve": 40426, "WAITING": 40427, "Ġresolves": 40428, "Padded": 40429, "xeb": 40430, "('.'": 40431, "Ġ)[": 40432, "InstanceAdmin": 40433, "qlcnic": 40434, "Ġaddressing": 40435, "085": 40436, "Ġautom": 40437, "DISCARD": 40438, "CURR": 40439, "ĠclickHandler": 40440, "Datetime": 40441, "Friends": 40442, "ĠEmployee": 40443, "376": 40444, "ECP": 40445, "ECB": 40446, "iates": 40447, "sT": 40448, "}\"},{": 40449, "ingress": 40450, "Ġwiphy": 40451, "SEM": 40452, "ĠHI": 40453, "indexName": 40454, "skcipher": 40455, "Ġiova": 40456, "ĠentityType": 40457, "adaptive": 40458, "Enforce": 40459, "testCases": 40460, "DataStore": 40461, "AddValue": 40462, "OPC": 40463, "ĠStringUnmarshaller": 40464, "WithString": 40465, "Ġprepended": 40466, "ciprocal": 40467, "1900": 40468, "realtime": 40469, "cbiAgICAg": 40470, "Associations": 40471, "MEDIATE": 40472, "à¥ĩ',": 40473, "succeed": 40474, "代çłģ": 40475, "|==|": 40476, "ÏĮ": 40477, "conom": 40478, "Ġgnc": 40479, "KeySpec": 40480, "):!": 40481, "EnableWindow": 40482, "SyntaxNode": 40483, "Ġflushing": 40484, "UNITS": 40485, "Ġivtv": 40486, "Ġxbmc": 40487, "Ġ429": 40488, "Anon": 40489, "Ġstrange": 40490, "ifying": 40491, "QUALITY": 40492, "DLG": 40493, "æİĴ": 40494, "Merc": 40495, "40000": 40496, "756": 40497, "Ozs": 40498, "Sparc": 40499, "ĠnBytes": 40500, "rog": 40501, "(\"{$": 40502, "ĠTreat": 40503, ").')": 40504, "Ġ248": 40505, "ĠLIT": 40506, "Ġxpc": 40507, "Ġyaw": 40508, "...',": 40509, "ĠskipGenerated": 40510, "GFp": 40511, "571": 40512, "Personen": 40513, "OVERLAY": 40514, "Polar": 40515, "Eviction": 40516, "iProfileId": 40517, "jdbc": 40518, "virq": 40519, "xDC": 40520, "getAdapter": 40521, "Ġ'(?:": 40522, "ofstream": 40523, "ApplicationContext": 40524, "LiteVo": 40525, "иÑĤе": 40526, "55555555": 40527, "ĠincludeSubDomains": 40528, "QFile": 40529, "federation": 40530, "rek": 40531, "Ġ\";\\": 40532, "Ġ$($": 40533, "getSizeInBits": 40534, "ĠSel": 40535, "readObject": 40536, "Ġunw": 40537, "startOffset": 40538, "ĠinnerHTML": 40539, "SAMPLER": 40540, "ĠWINDOW": 40541, "cdef": 40542, "fptr": 40543, "study": 40544, "shoot": 40545, "ĠgetClient": 40546, "ĠRTP": 40547, "composed": 40548, "TIMES": 40549, "Ġglut": 40550, "Executes": 40551, "bucketName": 40552, "pubsub": 40553, "plurals": 40554, "Gj": 40555, "Ġ)),": 40556, "Ġfy": 40557, "setDisabled": 40558, "ĠElem": 40559, "ustre": 40560, "Asia": 40561, "FromPoint": 40562, "Ġnumer": 40563, "HasFlag": 40564, "ĠTextView": 40565, "ĠinitialValue": 40566, "rotated": 40567, "ĠPrepared": 40568, "BUFFERS": 40569, "Ġfalling": 40570, "WWW": 40571, "mipi": 40572, ";\").": 40573, "lK": 40574, "Ġmater": 40575, "ellipse": 40576, "getMachine": 40577, "riage": 40578, "Ġ