Re: [go-nuts] NOSPLIT on Go assembler defined functions

2018-02-26 Thread Pablo Rozas Larraondo
Thank you very much Ian, I didn't notice the imported headers file in the
examples I was looking at. My code is compiling perfectly fine after I
added that line.

Cheers,
Pablo

On Tue, Feb 27, 2018 at 8:46 AM, Ian Lance Taylor  wrote:

> On Sun, Feb 25, 2018 at 11:27 PM, Pablo Rozas Larraondo
>  wrote:
> >
> > I started learning about Go assembler and I'm having problems with the
> > NOSPLIT symbol, which makes the compilation fail with error message:
> > "illegal or missing addressing mode for symbol NOSPLIT"
> >
> > I've found a blog post which describes the same problem and proposes
> > removing the symbol in order to compile it:
> > https://www.manniwood.com/2016_07_03/fun_with_go_assembler.html
> >
> > Apart from this reference, I cannot find more information on this problem
> > and I would like to understand when NOSPLIT has to be used.
>
> What, precisely, did you do?
>
> In order to use NOSPLIT, you must #include "textflag.h".  Then you can
> use NOSPLIT as a function flag to indicate that the function should
> not have a stack split preamble.  There are many examples in
> runtime/*.s in the standard library.
>
> 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.


Re: [go-nuts] NOSPLIT on Go assembler defined functions

2018-02-26 Thread Ian Lance Taylor
On Sun, Feb 25, 2018 at 11:27 PM, Pablo Rozas Larraondo
 wrote:
>
> I started learning about Go assembler and I'm having problems with the
> NOSPLIT symbol, which makes the compilation fail with error message:
> "illegal or missing addressing mode for symbol NOSPLIT"
>
> I've found a blog post which describes the same problem and proposes
> removing the symbol in order to compile it:
> https://www.manniwood.com/2016_07_03/fun_with_go_assembler.html
>
> Apart from this reference, I cannot find more information on this problem
> and I would like to understand when NOSPLIT has to be used.

What, precisely, did you do?

In order to use NOSPLIT, you must #include "textflag.h".  Then you can
use NOSPLIT as a function flag to indicate that the function should
not have a stack split preamble.  There are many examples in
runtime/*.s in the standard library.

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.