Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VU0MixVec only flush used registers #278

Merged
merged 1 commit into from Jul 6, 2020
Merged

Conversation

astrelsky
Copy link
Contributor

@astrelsky astrelsky commented May 25, 2020

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK
  • Requires update of the gsKit
  • Others (please specify below)

Pull Request description

I did some more research this morning and realized that the "memory" clobber flushed all of the registers. The gcc documentation recommends listing additional inputs/outputs for the accessed memory and this is the approach I took. Technically all the used registers should be listed as scratch registers so that gcc knows not to use them but I could not get it to accept any of the register names a0, $a0, etc it would only accept 0-64. AFAIK gcc cannot use the v0 vector registers directly anyway so I don't think there will be an issue. If any problems ever arise then we can fallback to the "memory" clobber.

Here is the gcc documentation https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Clobbers-and-Scratch-Registers

@astrelsky astrelsky changed the title Only keep used memory instead of flushing all registers VU0MixVec only flush used registers May 25, 2020
@uyjulian uyjulian merged commit 2e10915 into ps2homebrew:master Jul 6, 2020
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants