Skip to content

Cut target.h into pieces.#52952

Merged
sandreenko merged 5 commits intodotnet:mainfrom
sandreenko:cutTarget_h
May 19, 2021
Merged

Cut target.h into pieces.#52952
sandreenko merged 5 commits intodotnet:mainfrom
sandreenko:cutTarget_h

Conversation

@sandreenko
Copy link
Copy Markdown
Contributor

@sandreenko sandreenko commented May 19, 2021

Before:
image
After:
image

So now you don't need to memorize the order of the platforms in the target.t (note that the memorization did not help if there were more than 1 define for some platform, like on the screen).

That was a long time on my TODO list but I always wanted to do it like:

#ifdef PLATFORM_ARM
#define TIMEOUT_VALUE_IMPL 0
#define OUR_MAGIC_VALUE_IMPL 1
#elif PLATFORM_ARM64
#define TIMEOUT_VALUE_IMPL 2
#define OUR_MAGIC_VALUE_IMPL 3
#endif 

// a comment for TIMEOUT_VALUE
#define TIMEOUT_VALUE TIMEOUT_VALUE_IMPL

// a comment for OUR_MAGIC_VALUE
#define OUR_MAGIC_VALUE OUR_MAGIC_VALUE_IMPL

so we have comments in one place, but looks like I would not have time for it any time soon, so let's just cut it into pieces.

and small additional changes:
57d0580: C_ASSERT is not used there.

e3f5685: delete unused "REGNUM_MASK'.

e876ff0: delete redefines of "REGMASK_BITS".

@sandreenko sandreenko added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 19, 2021
@sandreenko sandreenko marked this pull request as ready for review May 19, 2021 01:07
@sandreenko sandreenko requested a review from BruceForstall May 19, 2021 01:07
@sandreenko
Copy link
Copy Markdown
Contributor Author

PTAL @BruceForstall @dotnet/jit-contrib

Copy link
Copy Markdown
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor of this.

I think you should add the new headers to JIT_HEADERS in CMakeLists.txt

@sandreenko
Copy link
Copy Markdown
Contributor Author

I think you should add the new headers to JIT_HEADERS in CMakeLists.txt

done

@sandreenko sandreenko merged commit a287b6d into dotnet:main May 19, 2021
@sandreenko sandreenko deleted the cutTarget_h branch May 19, 2021 20:20
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants