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

x/sys: missing rcx in clobber list for gccgoXgetbv #53302

Closed
tianxiaogu opened this issue Jun 9, 2022 · 2 comments
Closed

x/sys: missing rcx in clobber list for gccgoXgetbv #53302

tianxiaogu opened this issue Jun 9, 2022 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@tianxiaogu
Copy link

The inline assembly in gccgoXgetbv (https://cs.opensource.google/go/x/sys/+/master:cpu/cpu_gccgo_x86.c;l=40) modifies rcx but forgets to add rcx to the clobber list. We have encountered a crash when building an application with GOLLVM (and setting CC to clang-11.

void
gccgoXgetbv(uint32_t *eax, uint32_t *edx)
{
	__asm("  xorl %%ecx, %%ecx\n"
	      "  xgetbv"
	    : "=a"(*eax), "=d"(*edx));
}
@gopherbot gopherbot modified the milestones: Unreleased, Gccgo Jun 9, 2022
@cherrymui
Copy link
Member

cc @thanm @ianlancetaylor

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 9, 2022
@gopherbot
Copy link

Change https://go.dev/cl/411635 mentions this issue: cpu: use xgetbv intrinsic

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 10, 2022
@golang golang locked and limited conversation to collaborators Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants