Project update 1.2

 As the semester coming to an end today, I decided to show what I find and my potential solution for this issue. I wish I was a bit smarter and had more time to work on this issue as it's very interesting to me. Anyways, here are what I found so far that could potentially be beneficial in the future. All the files I mention below will be located in gcc/gcc/config/aarch64.

What I found in the GCC repo that may be useful in the future:

I believe I located the file that store all the values for the target_versions, it's a file called: aarch64-option-extensions.def. There is another file called aarch64-cores.def which included all the aarch64 architectures (in this file, they call those options "core options", if I understand correctly then they are the same). If this is the case, then the update process seems to be a bit easier as we already have the implementation to design for a specific architecture when we use target_version. Last but not least, in aarch64.cc, there line 19712, there is one single function that handle fmv parsing called aarch64_parse_fmv_features. However, till now I'm not yet sure what a ISA flag is and thus this would need more investigation. A bunch of functions utilizing this function, however, they just use it to return true/false so I'm not really sure what the next steps are. In addition, You would find another function that mentions target_clones, it's called aarch64_generate_version_dispatcher_body. However, based on my research, this is mainly used to help the compiled program selects the correct function versions to run on a specific machine so we would have to worry about this one too much.

Potential solution for this problem:

Since my problem mainly has to do with finding the correct place to add the code, I would show the general path/idea that I would follow if I had more time to pursue this project:
  1. Search how x86_64 handle this task and see how they add the arch= part into their code
  2. With the same logic, implement the functionality to handle arch= in the aarch64_parse_fmv_features
  3. Trigger the respective functions in aarch64-cores.def
  4. Profit

Conclusion:

This blog is rather short as I just finished on of my final today. Time is quite limited for me this last week. Though this is unfinished, it's allowed me to have a grasp of working with large scale projects and improved my navigation skills. I hope whoever read this can help me finish what I started, and if possible, and me an email about how you do it.


Comments

Popular posts from this blog

How to get multiple inputs from the emulator

Lab 2 - Letter guessing game