On Thu, Oct 11, 2018 at 3:01 PM, Jeffrey Baker <jwba...@gmail.com> wrote:
>
> I'm trying to learn how to safely use this asm, and I don't understand some
> of the existing asm in the runtime package.  From amd64.s:
>
> TEXT runtime·procyield(SB),NOSPLIT,$0-0
> MOVL cycles+0(FP), AX
>
> My understanding of $0-0 is it's supposed to indicate the sizes of the
> arguments, in this case would seem to be $0-4 since the argument is uint32.
> Indeed, specializations of this function on other platforms use $0-4, such
> as ppc64:
>
> TEXT runtime·procyield(SB),NOSPLIT|NOFRAME,$0-4
> MOVW cycles+0(FP), R7
>
> Why does the amd64 version work? Why doesn't `go vet` complain about it?

I think it's a bug.  Two bugs. Maybe three.  Thanks for pointing it out.

Sent https://golang.org/cl/142758 to start fixing this.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to