graysky2 / kernel_compiler_patch

Kernel patch enables compiler optimizations for additional CPUs.
GNU General Public License v2.0
658 stars 77 forks source link

Add MNATIVE_INTEL and MNATIVE AMD #66

Closed sirlucjan closed 3 years ago

sirlucjan commented 3 years ago

Referring to the discussion in #63, I tried to solve the problem as follows. What do you think about this @graysky2?

Signed-off-by: Piotr Gorski lucjan.lucjanov@gmail.com

sirlucjan commented 3 years ago

If X86_CMOV is needed for AMD, I can fix that very quickly.

graysky2 commented 3 years ago

Looks decent. I do not have AMD hardware for testing. We can only assume about the X86_CMOV setting or try to dig up information on it. Do you have AMD hardware?

sirlucjan commented 3 years ago

No. I suggest adding just in case, since it was reported that Ryzen has such a flag.

I have a proper commit prepared, just need git push :)

montjoie commented 3 years ago

For me you need to split in two. Rename MNATIVE to MNATIVE_INTEL since it is what it mean to be. Then add MNATIVE_AMD.

sirlucjan commented 3 years ago

@graysky2 Should I do another rebase? If so, I will send it out on Monday.

graysky2 commented 3 years ago

Where did we land on the X86_CMOV for AMD flag?

sirlucjan commented 3 years ago

It was mentioned earlier that Ryzen has one. Maybe it's worth giving it a try?

graysky2 commented 3 years ago

It's include it for AMD since upstream has it for both K7 and K8. Please rebase/fpush.