Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<std::string> maskedVLIW(std::vector<std::string> instructions)
- {
- std::vector<std::string> encodedVLIW;
- std::int16_t width = instWidth(instructions);
- for (std::vector<int>::size_type i = 0; i != instructions.size(); i++){
- // utilities per line
- std::regex regex("c0\s+(.*)")
- std::string mask = "";
- std::string instructions = "";
- std::string line;
- if instructions[i].find("NOP"){
- mask += "0";
- }
- else {
- mask += "1";
- // TODO parse this
- instructions += instructions[i];
- }
- if (instructions[i].find(";;") == 0){
- string = "";
- instructions = "";
- line = "c0\t" + mask + "\t" + instructions + "\n";
- encodedVLIW.push_back(line);
- }
- }
- return encodedVLIW;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement