[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 04/17] x86/acrn: Introduce hypercall interfaces
On Mon, Nov 02, 2020 at 12:10:00PM -0600, Segher Boessenkool wrote:
> movl works for moving anything g->r.


> This is not true for most insns, and not for most architectures at
> all (usually loading from memory has a separate mnemonic; moving an
> immediate number often as well (and it does not usually allow *every*
> immediate anyway, not even all numbers!)

So I've heard from other architectures. Every arch has its own problems.

> Most people do not read the documentation, they just copy from (bad)
> examples (and arguably, any example you do not really understand is a
> bad example).


> (It does not allow *all* memory and *all* constants, btw... And the
> condition for registers is not really "general register", whatever that
> means...

I think that means general purpose registers. I.e., it won't use, say
FPU, XMM or whatever special regs.

What does the asm() parsing code in gcc do for "g"? There should be
some logic which constraints what register is valid...

> I hope no one ever told you our documentation does not have white
> lies!)

I have convinced myself of this a couple of times already so I either go
ask our gcc friends or go look straight at gcc source. It is useful to
know folks which hack on it so that I can ask them stupid questions and
not go off into the weeds, trying to figure out what the documentation

But hey, if that gets the documentation improved, that's a win-win
situation right there. Might even make people copying from bad examples
to go look at the docs first...



 \ /
  Last update: 2020-11-02 19:35    [W:0.069 / U:3.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site