Posts

Showing posts from June, 2024

Project Stage 3

Goal:   After checking if the options are valid. Have to create a global array of afmv_targets and unsigned int of afmv_cnt. This is for others to consume. -fafmv="default" will have a count of 0. -fafmv="default, abc" will have a count of 1. Try to use the target_clone in GCC. Make a afmv.h for the global var I have to make. Header file: #ifndef GCC_AFMV_H #define GCC_AFMV_H /* Storage global variable for AFMV*/ #define AFMV_MAX_ARRAY_SIZE 100 extern unsigned int afmv_cnt; extern char* afmv_targets[AFMV_MAX_ARRAY_SIZE]; #endif /* GCC_AFMV_H */ add include header in opts.cc update count and array if all options passes the chceck. unsigned int afmv_cnt = 0; char* afmv_targets[AFMV_MAX_ARRAY_SIZE]; and      if (!is_found) {           error_at(loc, "Unsupported option '%s'", feature);           is_valid = false;      } else {           afmv_targets[afmv_cnt++] = feat...

Project Stage 2

 My task is: Command-line Parsing Description: Parse the GCC command line to pick up AFMV options, process the version list to validate the architectural feature specification. (example: -fafmv=var1,var2) One of the places to see how others did it is on GitHub of other class that did similar project task. I could also go on GCC's git to see pass commit that is could be related to my task of adding a pass. Most of my work will be done in the  .opt file writing. We will be using slack as a communication tool. Link: other class: https://github.com/seneca-cdot/gcc GCC: https://gcc.gnu.org/onlinedocs/gccint/ GitHub: https://github.com/seneca-cdot/gcc (I work in the branch " 2024-S-command-line-parsing ") GitHub branch: https://github.com/Seneca-CDOT/gcc/tree/2024-S-command-line-parsing I will be using the class server. I don think I want to spend time on trying to do it on my local device. This term of SPO600 they cut the time in half. We are very time limited. This stage we...

Week4

 Makefile   A Makefile is a text file used with the GNU Make utility to automate the compilation process in GCC. It specifies the instructions for building an executable or library from your source code files. This is like building a LEGO set. makefile takes all the different pieces and put them together. One of the benefits is when rebuilding makefile only update the part that need to. so it just switch out a small part of the LEGO set, no need to start from stretch. Reduce time of building a new version speed up developing time.  On the project I will be